CN118193723A - Text parsing method, system, electronic equipment and storage medium - Google Patents

Text parsing method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN118193723A
CN118193723A CN202410164686.1A CN202410164686A CN118193723A CN 118193723 A CN118193723 A CN 118193723A CN 202410164686 A CN202410164686 A CN 202410164686A CN 118193723 A CN118193723 A CN 118193723A
Authority
CN
China
Prior art keywords
text
picture
parsing
label
extensible
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410164686.1A
Other languages
Chinese (zh)
Inventor
任宇飞
吴庆
张凯旋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Aixue Education Technology Co ltd
Original Assignee
Anhui Aixue Education Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Aixue Education Technology Co ltd filed Critical Anhui Aixue Education Technology Co ltd
Priority to CN202410164686.1A priority Critical patent/CN118193723A/en
Publication of CN118193723A publication Critical patent/CN118193723A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The application provides a text parsing method, a text parsing system, electronic equipment and a storage medium, wherein the method responds to a text loading request sent by a user, an extensible character string constructor is created for constructing character sequences with various styles, and a preset main parsing engine is used for parsing the text to obtain different types of labels; aiming at each different type of tag, calling a corresponding specific analysis engine to analyze, and respectively adding analysis results into the extensible character string constructor; and outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying. According to the method and the device, different labels can be analyzed, and text contents are displayed according to the styles provided by the labels, so that diversified style effects are achieved.

Description

Text parsing method, system, electronic equipment and storage medium
Technical Field
The present application relates to the field of text processing technologies, and in particular, to a text parsing method, a text parsing system, an electronic device, and a storage medium.
Background
With the popularity of mobile devices, the frequency and time of students learning using mobile devices increase, so a set of efficient parsing and rendering schemes is needed to show the questions. At present, an H5 (i.e. HTML5, representing a fifth version of HTML) scheme is mainly adopted, and Webview is used for loading pages at a mobile terminal for analysis and rendering, but the mode has the conditions of performance problem and poor user experience. The use of a plurality of Webview results in higher memory occupation and slower rendering speed, and the Webview also has the problems of white screen, high consumption flow, high memory occupation and the like when loading pages.
Disclosure of Invention
The application provides a text parsing method, a text parsing system, electronic equipment and a storage medium, which are used for solving the problem of how to efficiently display texts.
In a first aspect, the present application provides a text parsing method, the method including:
Responding to a text loading request sent by a user, creating an extensible character string constructor for constructing character sequences with various styles, and analyzing the text by using a preset main analysis engine to obtain different types of labels;
Aiming at each different type of tag, calling a corresponding specific analysis engine to analyze, and respectively adding analysis results into the extensible character string constructor;
and outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying.
In an embodiment of the present application, the method further includes:
Judging whether the character sequence which is the same as the text exists in the cache or not;
If the same character sequence as the text exists, converting the character sequence into a visual result;
if there is no character sequence identical to the text, the extensible string builder is created and the text is parsed using the master parsing engine.
In an embodiment of the present application, the step of calling, for each tag of a different type, a specific parsing engine of the corresponding tag to parse, and adding the parsing result to the extensible character string builder respectively includes:
If the text label is the text label, calling a text parsing engine to parse the text label, and adding the parsed style object into the extensible character string constructor;
If the picture is the picture label, a picture analysis engine is called to analyze the picture label, and the analyzed picture is converted into an image pattern and added into the extensible character string constructor;
if the form label is the form label, converting the form label into an image style according to a form rule and adding the image style into the extensible character string constructor;
And if the bitmap is the formula label, calling a formula analysis engine to analyze the formula label, converting the analyzed bitmap into an image style, and adding the image style into the extensible character string constructor.
In an embodiment of the present application, the method further includes:
And configuring a label analysis expansion interface, wherein the label analysis expansion interface is used for allowing the type of the custom label and designating a corresponding specific analysis engine to analyze the custom label.
In an embodiment of the present application, the method further includes:
When a picture needs to be loaded, judging whether a cached picture exists in a memory according to a network address of the picture;
if the cached picture exists in the memory, directly returning the picture;
If the cached pictures do not exist in the memory, judging whether the cached pictures exist on the movable storage medium or not;
If the cached pictures exist in the movable storage medium, loading the pictures from a local file, and generating a bitmap to be cached in the memory;
And if the cached pictures do not exist in the movable storage medium, triggering a picture downloading task, downloading the pictures through a network, analyzing the pictures into bitmaps after the pictures are downloaded successfully, and caching the bitmaps in the internal memory.
In one embodiment of the present application, the steps of converting it into a visual result and rendering the display include:
Adding the character sequence to the preset control, and converting the character sequence into the visual result by utilizing the preset control;
And binding the image patterns in the preset control with click browsing events so as to realize a large-image preview function in the preset control by the visualized result.
In an embodiment of the present application, the method further includes:
converting the formula into a bitmap;
Converting the bitmap into a renderable object;
Converting the renderable object into an image style;
and rendering the image pattern into the preset control.
In a second aspect, the present application also provides a text parsing system, the system including:
The creation module is used for responding to a text loading request sent by a user, creating an extensible character string constructor for constructing character sequences with various styles, and analyzing the text by using a preset main analysis engine to obtain different types of labels;
The analysis module is used for calling a corresponding specific analysis engine for analyzing each label of different types and respectively adding analysis results into the extensible character string constructor;
and the rendering module is used for outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying the visual result.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor implementing the steps of the text parsing method according to any one of the first aspects when the computer program is executed.
In a fourth aspect, the present application provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the text parsing method according to any of the first aspects.
The application provides a text parsing method, a text parsing system, electronic equipment and a storage medium. And then, analyzing the text through a preset main analysis engine to obtain different types of labels. Then, for each different type of tag, a corresponding specific parsing engine is called for parsing, and the parsing results are respectively added into the extensible character string constructor. Finally, the parsing result is output as a sequence of characters and added to a buffer to facilitate conversion into a visual result.
Therefore, the present application can efficiently present text and maintain various styles by parsing and processing different types of tags using an extensible string builder and a specific parsing engine. Meanwhile, the labels of different types can be analyzed, and the labels can be accurately and beautifully displayed when the text is displayed. In addition, the analysis result is output as a character sequence and added into a cache, so that the speed of subsequent access and conversion into a visual result can be improved, the performance and response time are further improved, and better reading and using experience is provided.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a text parsing method provided by the application;
FIG. 2 is a flowchart of a text parsing method provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a problem library problem analysis effect according to an embodiment of the present application;
FIG. 4 is a flowchart of a text loading method provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a text parsing system according to the present application;
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein.
The following is a description of terms related to the present application.
HTML tag: special codes for describing the structure and content of the web page are enclosed by brackets (< >) and may have attributes. Each label has a specific meaning and purpose for representing different document structures and elements, such as titles, paragraphs, links, images, etc. Common HTML tags include < HTML >, < head >, < title >, < body >, < h1> to < h6>, < p >, < a >, < img >, < div > and < span >, etc. By using these tags, a web page with a hierarchical structure, rich content, and interactive elements can be constructed.
Webview: is a control or container for exposing Web content, commonly used for mobile application development. It may embed web page content into an application and display the web page inside the application. Webview functions to parse and render web page technologies such as HTML, CSS, and JavaScript by providing a browser engine. It allows applications to interact with web page content in the manner of native applications, such as loading web pages, navigating to different web pages, displaying and manipulating forms in web pages, executing JavaScript code, etc.
TextView: is a basic control on the Android platform and is used for displaying text contents. It can display plain text, or rich text display can be realized by using SpannableString modes, such as changing the character color, setting font style, adding click event, etc.
HtmlTextView: is a custom TextView control, and is often used in Android development. Unlike ordinary TextView, htmlTextView can parse HTML tags and present text content according to the style and format provided by the tag. It supports some basic HTML tags and attributes, such as < b > or < i > tags, so that the developer can set bold or italic effects in the text. HtmlTextView is also capable of parsing the image tag < img >, loading the image from the network or locally and displaying it in text. In addition, htmlTextView can also process other HTML features such as hyperlinks, providing a richer text presentation function.
Since Webview loads pages, the following common problems are often faced: 1) White screen problem. Often in the case of network delays or loading errors, resulting in a user seeing a blank page; 2) The large loading of images, videos, or other resources can increase traffic consumption, especially using Webview to compare traffic consumption on mobile devices; 3) Webview needs to maintain the state of web page display and execute JavaScript code and other functions, so that higher memory may be occupied, especially in complex web page applications.
In order to solve the problem of how to efficiently display text, the application provides a text parsing method, a text parsing system, electronic equipment and a storage medium. By parsing different types of labels, text can be efficiently presented while maintaining various styles. The analysis result is output as a character sequence and added into a cache so as to improve the speed of subsequent access and conversion into a visual result, thereby improving the performance and response time and realizing better reading and using experience.
The application has wide application scene, can be applied to the display of the question library questions, analyzes the question texts containing different styles and labels, and displays the question texts to users in an accurate and attractive mode. For example, in an online examination or educational application, the text parsing method of the present application may be used to display rich text topics including different levels of titles, paragraph formats, links, and the like. A rich text editor may also be constructed to enable a user to edit and present text content in a what-you-see-is-what-you-get manner. The user may add styles (bolded, italics, etc.), insert formulas/pictures, create links, etc., rather than just plain text input.
The text parsing method, system, electronic device and storage medium of the present application are described below with reference to fig. 1 to 6.
Referring to fig. 1, fig. 1 is a flowchart of a text parsing method provided by the present application. A text parsing method, the method comprising:
in step 110, in response to a user sending a text loading request, an extensible character string builder is created for building character sequences having multiple styles, and the text is parsed using a pre-set main parsing engine to obtain different types of labels.
Specifically, when a user sends a text loading request, the system triggers a corresponding processing program and starts to execute text parsing and construction processes by using a preset main parsing engine. To construct character sequences having multiple styles, the system creates an extensible string builder. The extensible string builder allows for dynamic addition, modification, and combination of text content as text processing occurs. The system uses a pre-set main parsing engine to parse text sent by the user. The master parsing engine may be custom or employ a standard parsing engine capable of identifying different types of tags and formats. Through the parsing process, different types of labels and corresponding contents are parsed.
Through the above step 110, the system can correctly identify various labels and patterns in the text according to the input text, and perform subsequent processing and display. For example, in a rich text editor, the system may parse the text into tags for titles, paragraphs, links, etc., and apply corresponding styles and processing logic for each tag. Flexible parsing and processing of rich text content can be achieved, enabling text to be presented in various styles, and providing a basis for subsequent operations and presentations.
And 120, aiming at each label of different types, calling a corresponding specific analysis engine to analyze, and respectively adding analysis results into the extensible character string constructor.
Specifically, the system performs further processing and parsing operations based on the type of each tag in this step based on the different types of tags parsed by the prior master parsing engine. For each different type of tag, the system may call a particular parsing engine to process that type of tag. These particular parsing engines may be preset or custom, dedicated to parsing and processing a particular type of tag. By invoking the corresponding parsing engine, the system parses the content and style of the particular tag and prepares it for subsequent processing. After the parsing is completed, the system will add the parsing result of each tag to the extensible character string builder created previously. In this way, the parsing results of different labels are combined together in a unified manner to construct a character sequence containing multiple styles.
Through the above step 120, by calling a specific parsing engine, accurate parsing and processing operations can be performed for the content and style of different tags. And respectively adding the analysis results into the extensible character string constructor so that the final character sequence can contain text contents in various styles. The method realizes fine analysis and processing of the rich text content, converts different types of labels into character sequences which can be accurately displayed, and ensures that styles and content are correctly added into a final extensible character string constructor. This provides a basis for subsequent text presentation and manipulation, enabling text to be presented to a user in a variety of styles and formats. Different labels can be analyzed, and text content is displayed according to the styles provided by the labels, so that diversified style effects are realized.
And 130, outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying.
Specifically, in step 120 described above, the extensible character string builder contains character sequences of various styles. In step 130, the system converts the content in the scalable string builder into a character sequence. The character sequence is then added to the buffer so that it can be used later and converted into a visual result. The converted text may be stored and managed by a cache to improve reading and display efficiency. The visual result is that the text information is presented in a graphical or visual mode, so that a user can more intuitively understand and process the text content in a visual mode. The visualized results can include elements such as pictures, texts, formulas, tables and the like which are analyzed, and the text information is displayed in a more vivid and visual form.
The style-rich character sequence constructed in the scalable string builder is converted into a visualized text through the above-described step 130. In this way, the results of the parsing may be presented in a readable manner in the interface. In addition, the character sequence is stored in the buffer memory, so that the speed and efficiency of subsequent reading and conversion into a visual result can be improved. By caching, repeated parsing and processing processes can be avoided, thereby saving computing resources and improving performance. In addition, the analysis result is stored in the cache, so that the access and conversion operation of the analysis result can be quickened, the cost of repeated analysis is reduced, and the response speed of the application is improved.
In some embodiments of the present application, the step of converting 130 the same into a visual result and rendering the display includes:
And 131, adding the character sequence to the preset control, and converting the character sequence into the visual result by utilizing the preset control.
And 132, binding the image patterns in the preset control with click browsing events to realize a large-image preview function in the preset control by the visualized result.
That is, steps 131 and 132 are performed for the purpose of stitching the parsed related content (including pictures, text, tables, formulas, etc.) into a complete preview form prior to rendering the display for a developer or machine to check whether each portion of the content has been parsed and rendered. Only after confirming that all the content is ready will the system formally display the visual results to the user, thereby ensuring that the final effect presented to the user is complete and accurate.
Illustratively, the preset control may employ HtmlTextView controls, and HtmlTextView controls have the following advantages:
Support rich text display: the HtmlTextView control allows for the direct use of HTML markup language to define styles and formats for text, including fonts, colors, sizes, hyperlinks, etc., to enable presentation of rich text. This allows for more flexibility in defining and presenting various styles of text content in preset controls.
Cross-platform support: htmlTextView controls can be implemented based on WebView or TextView and provide functionality based on an HTML parsing engine. Therefore, htmlTextView controls can be used on different mobile application platforms (such as Android and iOS) to achieve similar preview effects, maintaining multi-platform consistency.
Automatically processing HTML escape characters: the HtmlTextView control is internally provided with a processing mechanism for the HTML escape characters, so that the HTML entity characters can be automatically analyzed and displayed, for example, special characters are correctly converted and displayed, and the readability and the understandability of text contents are improved.
Easy to use and integrate: the HtmlTextView controls can provide a compact API and easy-to-use interface that makes integration and use in an application relatively simple. The developer can easily display and analyze the text contents in multiple styles in the preset control by loading the HTML string or designating the HTML file.
The above steps 110 to 130 are specifically described below.
In some embodiments of the present application, in performing step 110, the method further comprises:
step 111, determining whether the same character sequence as the text already exists in the buffer memory.
Specifically, during parsing the text using a preset main parsing engine, the system determines whether the same character sequence as the current text has been previously stored in the cache. The character sequence refers to text content which is obtained by analysis and has rich styles.
The purpose of this step is to avoid repeated parsing and processing of the same text. If the character sequence which is the same as the current text exists in the cache, the character sequence can be directly obtained from the cache without the need of carrying out analysis and construction processes again, thereby saving the computing resources and time. By judging whether the same character sequence exists in the cache, the performance and efficiency of the system can be improved. If the same character sequence exists, the cached result can be directly used for subsequent operation, so that repeated work is avoided. If the same character sequence does not exist in the cache, the parsing and construction process is continued, a new character sequence is generated and added to the cache for subsequent use. The method can improve the response speed of the system, avoid repeated calculation of the analysis result of the same text, and provide higher efficiency and performance for repeated text content.
Step 112, if there is already a character sequence identical to the text, converting the character sequence into a visual result.
Specifically, if the same character sequence as the current text is found in the buffer, this means that parsing and conversion of the same text has been performed before, and the conversion result is stored in the buffer. The character sequence stored in the buffer may be directly used to convert it into a visual result representation. By directly converting the character sequences in the cache into visual results, repeated parsing and conversion processes are avoided. This saves computational resources and time and increases the response speed of the system.
This step is suitable for, when a character sequence corresponding to a certain text already exists in the buffer, directly retrieving from the buffer and converting it into a visual result for presentation to the user. Thus, the system can quickly display the results of the same text processed before, and efficiency and performance are improved.
Step 113, if there is no character sequence identical to the text, creating the extensible character string builder and parsing the text using the main parsing engine.
Specifically, if the same character sequence as the current text is not found in the cache, this means that parsing and conversion of the same text has not been performed before, or that the previous result has been cleared or updated. In this case, an extensible string builder is created for building the multi-style character sequence. And analyzing the current text by calling a preset main analysis engine. The main parsing engine may identify different types of tags and formats and parse them into corresponding content and styles.
This step is applicable when the same character sequence as the current text is not found in the cache, and the system needs to reprocess the text. By creating an extensible string builder and using a main parsing engine, the basis for text parsing and building can be prepared to generate new, style-rich character sequences.
In some embodiments of the present application, in the step 120, the step of calling, for each tag of a different type, a specific parsing engine of the corresponding tag to parse, and adding the parsing result to the extensible character string builder includes:
and step 121, if the text label is the text label, calling a text parsing engine to parse the text label, and adding the parsed style object into the extensible character string builder.
In particular, a text label means that the label is intended to contain plain text content. Based on the characteristics of the text labels, the system invokes the text parsing engine to process the text content within the labels. The text parsing engine is responsible for parsing the content in the text labels and performing corresponding processing. After processing by the text parsing engine, the resulting parsing result is added to the previously created extensible string builder. In this way, the parsed text content is applied with the corresponding text-related style.
Through the text parsing engine, the content in the text label can be parsed and processed to conform to the corresponding rules and formats. After the parsed text is added to the extensible string builder, corresponding text styles are applied to the text content. This maintains style consistency of the text in the extensible string builder. Through the analysis process of the text analysis engine, more accurate style control can be realized on the content in the text label, and the requirement of a user on the text style is met.
And step 122, if the picture label is the picture label, calling a picture analysis engine to analyze the picture label, converting the analyzed picture into an image pattern, and adding the image pattern into the extensible character string constructor.
Specifically, the picture tag indicates that the tag is used to insert a picture. The system calls a picture analysis engine to analyze the picture label and process parameters and attributes in the picture label so as to acquire related information of the picture. After the related information of the picture is obtained by the picture analysis engine, the related information can be converted into a corresponding image style. Thus, the portion in the scalable string builder will have a style effect of a picture. And a function of clicking a browsing event can be added to the analyzed picture. When the user clicks on a picture, an operation of browsing (viewing a large picture, jumping a link, etc.) may be triggered. In this way, the picture portion in the extensible string builder is provided with browsing interaction capabilities.
The picture label can be analyzed by calling a picture analysis engine, and parameters and attributes in the picture label can be extracted so as to acquire information such as an address, a size, a format and the like of the picture. And the parsed picture is converted into an image style, so that the picture can be displayed in an extensible character string constructor. In addition, through binding the click browsing event, the user can interact with the picture, such as browsing, amplifying, jumping links and the like after clicking the picture. This increases the diversity and richness of the text parsing system and improves the interactive experience.
Step 123, if the form label, converting it into an image style according to the form rule and adding it into the extensible character string builder.
In particular, a table label indicates that the label is used to create a table structure. The table contents and styles are converted into image styles by parsing the table and processing according to the table rules. Thus, the portion in the extensible string builder presents the table contents in the form of image styles. After conversion, the resulting tabular content of the image style is added to the extensible string builder for subsequent use and presentation.
The step analyzes the table label, extracts information such as table structure, content and style, and converts the table content and style into image style according to the table rule. And then, adding the converted table contents into an extensible character string constructor, so that the table contents can be presented in the extensible character string constructor in an image style mode, the effect of presenting the table in the image style is realized, and the functions and effects of a text analysis system are enriched.
And 124, if the formula label is the formula label, calling a formula analysis engine to analyze the formula label, converting the analyzed bitmap into an image pattern, and adding the image pattern into the extensible character string constructor.
In particular, the formula tag represents that the tag is used to insert a mathematical or scientific formula. The system calls a formula analysis engine to analyze the formula label and process parameters and attributes in the formula label to obtain related information of the formula. After the related information of the formula is obtained through the formula analysis engine, the analyzed formula can be generated into a bitmap, and the bitmap is converted into a corresponding image style. Thus, the portion in the extensible string builder presents the formula content in the form of an image style. The formula content of the converted image style is added to the extensible string builder for subsequent use and presentation.
The step can analyze the formula label by calling the formula analysis engine, and extract parameters and attributes in the formula label so as to acquire the related information of the formula. And generating a corresponding bitmap from the parsed formula by a formula parsing engine, wherein the bitmap presents a mathematical or scientific expression of the formula. And converting the bitmap into an image style, the mathematical or scientific formula can be presented in the form of an image in the constructor. The method can realize the analysis of the formula label, bitmap generation and image style conversion, so that the content containing the formula is correctly presented in the extensible character string constructor, and the imaging display effect is provided. This improves the support of the text parsing system for mathematical and scientific content and increases the effect of visual presentation.
In some embodiments of the present application, the text parsing method further includes:
And 140, configuring a label analysis expansion interface, wherein the label analysis expansion interface is used for allowing the type of the custom label and designating a corresponding specific analysis engine to analyze the custom label.
Specifically, this step is an operation performed to increase support for custom tags. By configuring the tag parsing expansion interface, a user can be allowed to customize the types of the tags, and a corresponding specific parsing engine is designated to parse the customized tags. The label parsing expansion interface is an interface allowing a user to perform custom expansion. It provides a mechanism to enable a user to specify the types of custom tags and select a particular parsing engine for parsing for those custom tags.
Therefore, by configuring the tag parsing expansion interface, a user can define a new tag type. In this way, during text parsing, the system can identify and process these custom tags to meet the user's personalized customization for the particular tag needs. In addition, the tag parsing expansion interface not only allows the user to define the type of custom tag, but also assigns a specific parsing engine to each custom tag. Therefore, when the system analyzes, the system can select a corresponding analysis engine to analyze according to the type of the custom label, and ensure that the content of the custom label is accurately analyzed and processed. And a flexible mechanism is provided by configuring a label analysis expansion interface, so that the text analysis method has the capability of adapting to different requirements. The user can customize a new label type according to the actual requirement and assign a specific analysis engine to the new label type, so that the function and the application range of text analysis can be conveniently expanded. The support and flexible expansion of the custom labels are realized, the personalized requirements of users on the specific labels are met, and the applicability and the customization of the text analysis method are improved.
In some embodiments of the present application, the text parsing method further includes:
Step 151, when the picture needs to be loaded, judging whether the cached picture exists in the memory according to the network address of the picture.
Specifically, in the text parsing process of step 110, a situation may be encountered in which a picture needs to be loaded, that is, the text content includes a network address of the picture. Before loading a picture, the system checks if there is already a cache of the picture in memory. The method checks whether the same picture is cached in the memory or not by judging according to the network address of the picture.
Step 152, if there is a cached picture in the memory, directly returning to the picture.
Specifically, when a picture needs to be loaded, firstly checking whether a buffer memory of a corresponding picture exists in a memory. If the cache exists, the picture data in the cache can be directly used, so that the picture is prevented from being downloaded from the network again, network overhead and loading time are reduced, and loading speed and user experience are improved. Moreover, by utilizing the cached pictures, the pictures can be quickly loaded and presented. And network request and downloading are not required to be waited, the loading speed of the pictures is increased, and the page loading efficiency is improved.
Step 153, if there is no cached picture in the memory, determining whether there is a cached picture on the removable storage medium.
Specifically, when there is no cached picture in the memory, the system further checks whether there is a cached picture on the removable storage medium (e.g., SD card, usb disk, etc.). It will query whether there is a corresponding picture cache file by accessing the removable storage medium.
This step is based on the fact that if no cached pictures are found in the memory, the cached source of the pictures can be extended by looking for the cached file on the removable storage medium. In this way, even if the picture cache does not exist in the memory, the cache of the picture can still be obtained from the removable storage medium. And the cached pictures are backed up on the removable storage medium, so that the condition of cache loss caused by memory cleaning or other reasons can be avoided. The cache on the removable storage medium can be used as a backup of the cache in the memory, so that the availability and persistence of the picture are ensured.
And step 154, if the cached pictures exist in the removable storage medium, loading the pictures from a local file, and generating a bitmap to be cached in the memory.
Specifically, when there is a cached picture in the removable storage medium, the system reads the picture data from the corresponding cached file. And the picture can be loaded by reading the data in the local file. After the picture data is read, the system converts the picture data into a bitmap and caches the bitmap in the memory. Thus, a bitmap cache of the picture is generated in the memory.
This step provides a fault tolerant mechanism based on the fact that if cached pictures are present on the removable storage medium, the text parsing method can load pictures using these cached files. Even if the cache in the memory is lost or unavailable, the cache on the movable storage medium can still be used for loading the picture, so that the normal display of the picture is ensured. And, the buffer picture in the removable storage medium is loaded from the local file, and the generated bitmap is buffered in the memory. The method improves the loading speed of the pictures, reduces network requests, improves user experience and system performance, and enhances the loading and displaying effects of the pictures.
Step 155, if there is no cached picture in the removable storage medium, triggering a picture downloading task, downloading the picture through a network, resolving the picture into a bitmap after the downloading is successful, and caching the bitmap in the memory.
Specifically, when there is no cached picture in the removable storage medium, the system triggers a picture download task. This means that the picture needs to be downloaded from the network. The system requests to download the required pictures through the network. It will send requests and receive picture data using the appropriate network communication protocol. After the downloading is successful, the system analyzes the downloaded picture data into a bitmap form for subsequent processing and display. The parsing process may include operations such as data decoding, format conversion, and the like. The bitmap after the analysis is successfully cached in the memory as the bitmap cache of the picture. Thus, a bitmap buffer of the downloaded pictures is generated in the memory for subsequent use and display.
The step can realize that the required picture is dynamically obtained from the network by triggering the picture downloading task and downloading the picture through the network. This expands the source of picture resources, providing more picture choices and application scenarios. And by carrying out the downloading and analyzing operation of the pictures in parallel, the blocking of the main thread is avoided, and the response speed and the user experience of the system are improved. And, the downloaded pictures are resolved into bitmaps and cached in a memory for subsequent use. This reduces the overhead of repeated downloads and parsing of pictures, saving bandwidth and time. In addition, through downloading and analyzing the pictures in advance and caching the bitmap in the memory, the display speed of the pictures can be increased, the user experience is improved, and meanwhile, the loads of network requests and data transmission are reduced.
The text parsing method according to the present application will be described by way of examples.
Embodiment one:
Referring to fig. 2, fig. 2 is a flowchart of a text parsing method according to an embodiment of the application. A text parsing method includes:
Step 211, a question text loading request is sent in response to a user.
In step 212, the htmltextview control parses the topic text through the main parsing engine HTMLPARSEENGINE to determine if there is a cached character sequence CharSequence.
If there is a cached character sequence CharSequence, step 213, it is rendered by the HtmlTextView control.
In step 214, if there is no cached character sequence CharSequence, an extensible string builder SpannableStringBuilder is created and other engines are invoked to parse the tag.
In step 215, if the text label is a text label, the text parsing engine is invoked to convert the text label into a corresponding text style and append it to the extensible string builder SpannableStringBuilder, which displays the text content when the HtmlTextView control is redrawn.
Specifically, the text labels include labels of < p >, < h1>, < h2>, < h3>, < h4>, < h5>, < h6>, < small >, etc. The text parsing engine converts these tags into corresponding style objects Span by parsing them. For example, labels of < p >, < h1>, < h2>, < h3>, < h4>, < h5>, < h6>, < small > etc. are converted to RelativeSizeSpan (a Span object) for changing the relative size of text. Tags of < b >, < strong >, < em >, etc. are converted to STYLESPAN (a Span object) for changing the bold or italic style of the text. While other style tags are converted to custom Span objects for handling other specific style requirements. The parsed style Span may be added to the extensible string builder SpannableStringBuilder, which may style set and render the text as desired and input parameters.
Through the above process, the text parsing engine may parse the text according to the labels, generate a corresponding style Span for each label, and finally append the style objects Span to the expandable string builder SpannableStringBuilder, thereby realizing style customization and rendering of the text.
And step 216, if the picture is a picture label, calling a picture management engine to asynchronously load the picture, and judging whether the cached picture exists in the memory according to the network address of the picture.
Specifically, when the < img > tag is encountered, the system invokes the picture management engine to handle the picture loading operation. First, the picture loading engine will try to find whether there is a loaded picture buffer from the memory according to the network address URL of the picture.
And step 217, if the cached picture exists in the memory, directly returning the picture, and displaying the picture when the HtmlTextView control is redrawn.
In step 218, if there is no cached picture in the memory, it is determined whether there is a cached picture on the removable storage medium.
Specifically, if there is no cached picture in the memory, it will find whether there is a downloaded picture file from the SD (Secure Digital) card.
If there is a cached picture in the removable storage medium, the picture is loaded from the local file and a bitmap is generated for caching in memory, step 219.
Step 220, if there is no cached picture in the removable storage medium, triggering a picture downloading task, downloading the picture through a network, resolving the picture into a bitmap after successful downloading, and caching the bitmap in the memory.
Specifically, if the picture is not found in the memory and the SD card, a thread is started, and the missing picture is downloaded through the network. After the picture is downloaded successfully, the picture is added into a memory buffer and stored on an SD card: after the downloading is successful, the downloaded picture can be added into the memory buffer for later quick access, and meanwhile, the picture can be stored on the SD card, so that the picture can be conveniently used offline or stored in a lasting mode. The downloaded picture is converted into an image pattern IMAGESPAN, and the image pattern IMAGESPAN contains pattern and position information of the picture, and the picture can be inserted into the text. After adding the image style IMAGESPAN of the picture, calling the redrawing method of the HtmlTextView control, and rendering the new expandable character string constructor SpannableStringBuilder to the HtmlTextView control, so that the picture is displayed in the text.
Through the flow, asynchronous loading and cache management of the pictures in the < img > picture tag can be realized, and the pictures are inserted into the text in the form of image patterns IMAGESPAN, so that the function of displaying the pictures in the HtmlTextView control is realized.
Step 221, if a form tab, renders the form through the grid table view GridTableView of the layout manager GridLayout, converts it into a renderable object Drawable, converts it into an image style IMAGESPAN, and appends to the extensible string builder SpannableStringBuilder, displaying the form as the control is redrawn HtmlTextView.
Specifically, a specific layout manager GridTableView is used to create and arrange the table first according to rules and contents between the table tags < tr >, < td >. The rendered grid table view GridTableView is then converted into a renderable object Drawable. And converts the renderable object Drawable object into an image style IMAGESPAN, i.e., inserts the renderable image Drawable as a picture into text and specifies its position and style properties. The converted image style IMAGESPAN is then added to the extensible string builder SpannableStringBuilder for building rich text content. Finally, the updated content of the scalable string builder SpannableStringBuilder is displayed by redrawing HtmlTextView the control, thereby implementing the table display in HtmlTextView.
Through the above flow, the method can be used for analyzing the table label and rendering the table, converting the table into a drawable image Drawable and an image style IMAGESPAN to be inserted into a text, and finally displaying the effect of the table in a HtmlTextView control.
Step 222, if the formula label is the formula label, call the formula parsing engine to convert the formula label into Bitmap of corresponding size, convert the Bitmap into image style IMAGESPAN and append the image style to the expandable string builder SpannableStringBuilder, and display the formula when the control is redrawn HtmlTextView.
Specifically, first, the source address srcURL of the required resource locator and the attribute values of width and height of the picture are extracted from the data-LaTeX (LaTeX code for storing the mathematical formula). And calling a formula analysis engine to convert the extracted srcURL data into a Bitmap with a corresponding size according to the provided attribute values of the width and the height. Then, the converted Bitmap is converted into an image style IMAGESPAN, that is, the picture is inserted into the text as one picture, and its position and style are specified. And adds the converted image style IMAGESPAN to the extensible string builder SpannableStringBuilder for building rich text content. Finally, the updated content of the expandable character string builder SpannableStringBuilder is displayed by redrawing HtmlTextView the control, so that the effect of displaying the formula picture in HtmlTextView is achieved.
Through the flow, srcURL data of the formula label can be analyzed, a formula analysis engine is called according to given width and height to convert the formula into pictures with corresponding sizes, and the pictures are inserted into texts to show the effect of the formula.
As one embodiment, the formula rendering process flow involved in the subject is as follows:
First, the LaTeX code of the formula is converted into a corresponding mathematical formula picture using the LaTeX library of Java version. LaTeX is a markup language for typesetting mathematical formulas and scientific and technological documents.
Then, the mathematical formula picture generated by the LaTeX library is converted into a Bitmap, so that the subsequent processing and display are facilitated. The generated Bitmap is then converted into a renderable object Drawable.
Finally, the renderable object Drawable is converted to an image style IMAGESPAN, i.e., the picture is inserted into the text as a picture, and its properties, such as position and style, are specified. And adding the converted image style IMAGESPAN to the HtmlTextView control, and displaying the formula picture by redrawing the HtmlTextView control, thereby realizing the effect of rendering the formula in the HtmlTextView control.
Through the flow, the LaTeX formula code can be converted into the corresponding mathematical formula picture, and the picture is inserted into the HtmlTextView control to show the formula effect.
In summary, according to the topics in the topic library, the native HtmlTextView control inheriting the native TextView can be adopted on the Android (an open-source mobile operating system) mobile terminal, and the experience of users on the topics is improved by optimizing the analysis and rendering scheme. In addition, in order to further optimize the analysis scheme of the mobile terminal on the questions of the question bank, memory occupation can be reduced, expansibility of analysis labels can be improved, success rate of picture loading can be enhanced, efficiency of rendering a mathematical formula can be improved, and efficiency of displaying the questions for multiple times can be improved. Through the optimization measures, a native resolution scheme can be improved, and the efficiency and performance of topic resolution are improved. Fig. 3 is a schematic diagram of a problem library problem analysis effect according to an embodiment of the present application, as shown in fig. 3.
In addition, it can be applied to other types of text parsing, such as XML text. By referring to the optimization thought of topic analysis, a corresponding analysis engine and a corresponding control can be developed to analyze and render XML text, and corresponding characteristics and functions are provided to meet different application requirements. Therefore, the method can realize high-efficiency analysis and rendering of various types of text contents, and further improve user experience.
Embodiment two:
In the prior art, when a scheme of H5 (HTML 5, which is a latest webpage standard technology proposed by a Web standardization organization W3C) is adopted to render a title, if the same title is displayed for multiple times or displayed on multiple pages, the title resource needs to be analyzed each time, which results in poor performance. Because the resources need to be re-parsed each time, more time and resources may be consumed.
In order to solve the performance problem, the application adopts a new scheme for rendering. In the new scheme, a certain strategy can be designed to increase the memory cache, and meanwhile, the cache of the picture is combined. Therefore, when the same title is displayed for multiple times or displayed for multiple pages, the resolved result can be directly obtained from the memory cache engine HtmlSpannableCache for direct rendering, so that the problem of repeated resolution of the title resource is avoided. By the method, the efficiency of the question rendering can be improved, the time for analyzing resources and the resource consumption are saved, and the performance of the question rendering is optimized.
Referring specifically to fig. 4, fig. 4 is a flowchart of a text loading method according to an embodiment of the present application, where the text loading method includes:
In step 411, the text is loaded.
In particular, text content that needs to be parsed and rendered is loaded from a data source or other source. Text data may be obtained by file reading, web request, or user input, among other means.
At step 412, a unique identification MD5 value is generated from the text.
Specifically, for the loaded text content, a unique identifier is calculated by using an MD5 algorithm and is used for distinguishing different text contents. The MD5 algorithm is used for generating hash values of specific lengths of data, has low collision probability, and can be quickly generated and used for judging the uniqueness of text contents.
In step 413, it is determined whether the parsed character sequence CharSequence exists in the memory.
Specifically, a check is made in memory to see if the parsing result (i.e., character sequence CharSequence) of the text content has been cached. The method can avoid repeated analysis of the same text content and improve analysis efficiency.
In step 414, if the parsed character sequence CharSequence exists in the memory, the cached result is obtained from the cache, and is directly rendered by using the HtmlTextView control.
Specifically, if the parsing result of the text parsed before already exists in the memory, the parsing result may be directly obtained from the cache. Then, the control HtmlTextView is used for rendering and displaying the analysis result, so that analysis time and resource consumption are saved.
In step 415, if the parsed character sequence CharSequence does not exist in the memory, a specific parsing engine is invoked to parse the text.
Specifically, when the parsing result of the previously parsed text is not found in the memory, a specific parsing engine needs to be called to parse the target text. According to preset parsing rules and logic, a specific parsing engine executes parsing process for text content, and processes text, pictures, tables, formulas and the like in the text.
And step 416, rendering the generated analysis result by utilizing HtmlTextView controls.
Specifically, the parsing result generated in step 415 is rendered and displayed through HtmlTextView controls. HtmlTextView control is a special TextView control that supports the display of rich text, including processing HTML markup, rendering images, processing hyperlinks, and so forth. The parsing result will be presented in a HtmlTextView control in rich text form for viewing and manipulation by the user.
In summary, through the steps of loading the text and generating the unique MD5 identifier, and combining the memory caching mechanism and cache hit optimization, it can be quickly determined whether there is an parsed text result. When analysis is needed, a specific analysis engine is called for analysis, and analysis results are rendered by utilizing HtmlTextView controls, so that efficient, quick and high-quality text analysis and display are provided, and user experience and system performance are improved.
The text parsing system provided by the application is described below, and the text parsing system and the text parsing method described below can be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a text parsing system provided by the present application. A text parsing system 500 includes a creation module 510, a parsing module 520, and a rendering module 530.
Illustratively, the creation module 510 is configured to create an extensible character string builder for building character sequences having multiple styles in response to a user sending a text loading request, and parse the text using a preset main parsing engine to obtain different types of labels.
Illustratively, the parsing module 520 is configured to invoke a corresponding specific parsing engine to parse for each tag of different types, and add the parsing results to the extensible string builder respectively.
Illustratively, the rendering module 530 is configured to output the parsing result of the scalable string builder as a character sequence, and add the character sequence to the buffer to convert it into a visualization result, and render the visualization.
Illustratively, the text parsing system 500 is also for:
Judging whether the character sequence which is the same as the text exists in the cache or not;
If the same character sequence as the text exists, converting the character sequence into a visual result;
if there is no character sequence identical to the text, the extensible string builder is created and the text is parsed using the master parsing engine.
Illustratively, the parsing module 520 is further configured to:
If the text label is the text label, calling a text parsing engine to parse the text label, and adding the parsed style object into the extensible character string constructor;
If the picture is the picture label, a picture analysis engine is called to analyze the picture label, and the analyzed picture is converted into an image pattern and added into the extensible character string constructor;
if the form label is the form label, converting the form label into an image style according to a form rule and adding the image style into the extensible character string constructor;
And if the bitmap is the formula label, calling a formula analysis engine to analyze the formula label, converting the analyzed bitmap into an image style, and adding the image style into the extensible character string constructor.
Illustratively, the text parsing system 500 is also for:
And configuring a label analysis expansion interface, wherein the label analysis expansion interface is used for allowing the type of the custom label and designating a corresponding specific analysis engine to analyze the custom label.
Illustratively, the text parsing system 500 is also for:
When a picture needs to be loaded, judging whether a cached picture exists in a memory according to a network address of the picture;
if the cached picture exists in the memory, directly returning the picture;
If the cached pictures do not exist in the memory, judging whether the cached pictures exist on the movable storage medium or not;
If the cached pictures exist in the movable storage medium, loading the pictures from a local file, and generating a bitmap to be cached in the memory;
And if the cached pictures do not exist in the movable storage medium, triggering a picture downloading task, downloading the pictures through a network, analyzing the pictures into bitmaps after the pictures are downloaded successfully, and caching the bitmaps in the internal memory.
Illustratively, the text parsing system 500 is also for:
Adding the character sequence to the preset control, and converting the character sequence into the visual result by utilizing the preset control;
And binding the image patterns in the preset control with click browsing events so as to realize a large-image preview function in the preset control by the visualized result.
Illustratively, the text parsing system 500 is also for:
converting the formula into a bitmap;
Converting the bitmap into a renderable object;
Converting the renderable object into an image style;
and rendering the image pattern into the preset control.
It should be noted that, the text parsing system provided in the embodiment of the present application can implement all the method steps implemented in the method embodiment and achieve the same technical effects, and detailed descriptions of the same parts and beneficial effects as those in the method embodiment in the embodiment are omitted.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 6, the electronic device may include: processor (Processor) 610, communication interface (Communications Interface) 620, memory (Memory) 630, and communication bus 640, wherein Processor 610, communication interface 620, memory 630 complete communication with each other through communication bus 640. Processor 610 may invoke logic instructions in memory 630 to perform the text parsing method.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the text parsing method provided by the methods described above.
In yet another aspect, the present application further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the text parsing method provided above.
The electronic device, the computer program product, and the computer readable storage medium provided by the embodiments of the present application have the advantage that the computer program stored thereon enables the processor to implement all the method steps implemented by the embodiments of the method and achieve the same technical effects, and detailed descriptions of the same parts and advantages as those of the embodiments of the method are omitted herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of text parsing, the method comprising:
Responding to a text loading request sent by a user, creating an extensible character string constructor for constructing character sequences with various styles, and analyzing the text by using a preset main analysis engine to obtain different types of labels;
Aiming at each different type of tag, calling a corresponding specific analysis engine to analyze, and respectively adding analysis results into the extensible character string constructor;
and outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying.
2. The text parsing method of claim 1, wherein the method further comprises:
Judging whether the character sequence which is the same as the text exists in the cache or not;
If the same character sequence as the text exists, converting the character sequence into a visual result;
if there is no character sequence identical to the text, the extensible string builder is created and the text is parsed using the master parsing engine.
3. The text parsing method according to claim 1, wherein the step of calling a specific parsing engine corresponding to the tag for parsing for each different type of tag and adding the parsing result to the extensible character string builder, respectively, comprises:
If the text label is the text label, calling a text parsing engine to parse the text label, and adding the parsed style object into the extensible character string constructor;
If the picture is the picture label, a picture analysis engine is called to analyze the picture label, and the analyzed picture is converted into an image pattern and added into the extensible character string constructor;
if the form label is the form label, converting the form label into an image style according to a form rule and adding the image style into the extensible character string constructor;
And if the bitmap is the formula label, calling a formula analysis engine to analyze the formula label, converting the analyzed bitmap into an image style, and adding the image style into the extensible character string constructor.
4. The text parsing method of claim 1, wherein the method further comprises:
And configuring a label analysis expansion interface, wherein the label analysis expansion interface is used for allowing the type of the custom label and designating a corresponding specific analysis engine to analyze the custom label.
5. The text parsing method of claim 1, wherein the method further comprises:
When a picture needs to be loaded, judging whether a cached picture exists in a memory according to a network address of the picture;
if the cached picture exists in the memory, directly returning the picture;
If the cached pictures do not exist in the memory, judging whether the cached pictures exist on the movable storage medium or not;
If the cached pictures exist in the movable storage medium, loading the pictures from a local file, and generating a bitmap to be cached in the memory;
And if the cached pictures do not exist in the movable storage medium, triggering a picture downloading task, downloading the pictures through a network, analyzing the pictures into bitmaps after the pictures are downloaded successfully, and caching the bitmaps in the internal memory.
6. The text parsing method of claim 1, wherein the steps of converting it into a visual result and rendering a display include:
Adding the character sequence to the preset control, and converting the character sequence into the visual result by utilizing the preset control;
And binding the image patterns in the preset control with click browsing events so as to realize a large-image preview function in the preset control by the visualized result.
7. The text parsing method of claim 6, further comprising:
converting the formula into a bitmap;
Converting the bitmap into a renderable object;
Converting the renderable object into an image style;
and rendering the image pattern into the preset control.
8. A text parsing system, the system comprising:
The creation module is used for responding to a text loading request sent by a user, creating an extensible character string constructor for constructing character sequences with various styles, and analyzing the text by using a preset main analysis engine to obtain different types of labels;
The analysis module is used for calling a corresponding specific analysis engine for analyzing each label of different types and respectively adding analysis results into the extensible character string constructor;
and the rendering module is used for outputting the analysis result of the extensible character string constructor into a character sequence, adding the character sequence into a cache, converting the character sequence into a visual result, and rendering and displaying the visual result.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that the processor implements the steps of the text parsing method according to any one of claims 1 to 7 when the computer program is executed.
10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the text parsing method according to any one of claims 1 to 7.
CN202410164686.1A 2024-02-05 2024-02-05 Text parsing method, system, electronic equipment and storage medium Pending CN118193723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410164686.1A CN118193723A (en) 2024-02-05 2024-02-05 Text parsing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410164686.1A CN118193723A (en) 2024-02-05 2024-02-05 Text parsing method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118193723A true CN118193723A (en) 2024-06-14

Family

ID=91397468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410164686.1A Pending CN118193723A (en) 2024-02-05 2024-02-05 Text parsing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118193723A (en)

Similar Documents

Publication Publication Date Title
US10325012B2 (en) Filtered stylesheets
JP4344693B2 (en) System and method for browser document editing
US20190251143A1 (en) Web page rendering method and related device
US10289649B2 (en) Webpage advertisement interception method, device and browser
US20150286739A1 (en) Html5-protocol-based webpage presentation method and device
CN106294658B (en) Webpage quick display method and device
US9646103B2 (en) Client-side template engine and method for constructing a nested DOM module for a website
US20110191668A1 (en) Extended cascading style sheets
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
CN112256990B (en) Image processing method and device and computer readable storage medium
US20160012144A1 (en) Javascript-based, client-side template driver system
CN113703893B (en) Page rendering method, device, terminal and storage medium
CN108170409B (en) Development method and system of WEB front-end control
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN114791988A (en) Browser-based PDF file analysis method, system and storage medium
US8756487B2 (en) System and method for context sensitive content management
CN113760283A (en) Text rendering method and device
US20160012023A1 (en) Self-Referencing of Running Script Elements in Asynchronously Loaded DOM Modules
CN112905944A (en) Page online dynamic generation method and device, electronic equipment and readable storage medium
CN115438290A (en) Method and system for automatically analyzing static resources of single-page application and preloading
CN115994517A (en) Information processing method, apparatus, storage medium, device, and program product
CN118193723A (en) Text parsing method, system, electronic equipment and storage medium
CN112799745B (en) Page display control method and device
CN114168875A (en) Page program generation method and device, computer equipment and storage medium
US20160012146A1 (en) Client Web Browser and Method for Constructing a Website DOM Module With Client-Side Functional Code

Legal Events

Date Code Title Description
PB01 Publication