CN118036561A - Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium - Google Patents

Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium Download PDF

Info

Publication number
CN118036561A
CN118036561A CN202410096023.0A CN202410096023A CN118036561A CN 118036561 A CN118036561 A CN 118036561A CN 202410096023 A CN202410096023 A CN 202410096023A CN 118036561 A CN118036561 A CN 118036561A
Authority
CN
China
Prior art keywords
source file
document element
markup language
language text
text
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
CN202410096023.0A
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.)
Dakun Zhilian Beijing Technology Co ltd
Original Assignee
Dakun Zhilian Beijing 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 Dakun Zhilian Beijing Technology Co ltd filed Critical Dakun Zhilian Beijing Technology Co ltd
Priority to CN202410096023.0A priority Critical patent/CN118036561A/en
Publication of CN118036561A publication Critical patent/CN118036561A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the disclosure discloses a lightweight markup language text conversion method, a lightweight markup language text conversion device, electronic equipment and a medium. One embodiment of the method comprises the following steps: acquiring a lightweight markup language text conforming to a preset expansion rule; carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree; converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set; selecting a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled; and filling the text intermediate element set into a document element template to be filled to obtain a document element source file. The embodiment reduces the error of the converted source file and improves the application adaptability of the converted source file.

Description

Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a lightweight markup language text conversion method, apparatus, electronic device, and medium.
Background
Markdown (lightweight markup language) to latex (document element) functions have been implemented in an open source. Most commonly, "pandoc", a powerful document conversion tool, can directly convert Markdown into latex sources, pdf (Portable Document Format) sources, and the like.
However, converting Markdown by a document conversion tool generally has the following technical problems:
firstly, the generated source is a custom template, the codes are numerous, the errors are more, the existing latex template is not in line with the requirements in the final format, and the direct application difficulty is high;
second, the generated source is not tested, and when the generated source has an abnormality, the use efficiency in the actual application process is affected.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, may contain information that does not form the prior art that is already known to those of ordinary skill in the art in this country.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose lightweight markup language text conversion methods, apparatus, electronic devices, and computer readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a lightweight markup language text conversion method, the method comprising: acquiring a lightweight markup language text conforming to a preset expansion rule; carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree; converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set; selecting a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled; and filling the text intermediate element set into the document element template to be filled to obtain a document element source file.
In a second aspect, some embodiments of the present disclosure provide a lightweight markup language text conversion device, the device comprising: the acquisition unit is configured to acquire the lightweight markup language text conforming to the preset expansion rule; the parsing unit is configured to parse the lightweight markup language text to obtain an abstract syntax tree; the conversion unit is configured to convert each tree node element included in the abstract syntax tree to obtain a text intermediate element set; a selection unit configured to select a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled; and the filling unit is configured to fill the text intermediate element set into the document element template to be filled to obtain a document element source file.
In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors causes the one or more processors to implement the method described in any of the implementations of the first aspect above.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantageous effects: by the lightweight markup language text conversion method of some embodiments of the present disclosure, errors of the converted source file are reduced, and application adaptability of the converted source file is improved. Specifically, the existing latex template is not in line with the requirement in the final format reuse, and the reason that the direct application difficulty is high is that: the generated source is a custom template, the codes are numerous, the errors are more, the existing latex template is not in accordance with the requirement when the final format is reused, and the direct application difficulty is high. Based on this, in the lightweight markup language text conversion method of some embodiments of the present disclosure, first, a lightweight markup language text conforming to a preset expansion rule is obtained. Thereby facilitating text conversion of lightweight markup language text. And secondly, carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree. Thereby facilitating extraction of elements of text. And then, converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set. Then, a document element template corresponding to the lightweight markup language text is selected from a preset document element template set as a document element template to be filled. Thus, an adapted template can be selected from among the individual element templates set in advance. Thereby, the application adaptability of the converted source file is improved. And finally, filling the text intermediate element set into the document element template to be filled to obtain a document element source file. Therefore, the error of the converted source file is reduced, and the application adaptability of the converted source file is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of some embodiments of a lightweight markup language text conversion method according to the present disclosure;
FIG. 2 is a schematic structural diagram of some embodiments of a lightweight markup language text conversion device according to the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a flow chart of some embodiments of a lightweight markup language text conversion method according to the present disclosure. A flow 100 of some embodiments of a lightweight markup language text conversion method according to the present disclosure is shown. The lightweight markup language text conversion method comprises the following steps:
Step 101, obtaining a lightweight markup language text conforming to a preset expansion rule.
In some embodiments, an execution subject (e.g., a computing device) of the lightweight markup language text transformation method may obtain lightweight markup language text conforming to a preset extension rule through a wired or wireless connection method. The preset extension rule may be a superset of Markdown grammar, supporting extended revisions of Markdown, such as: a title identifier, which may be added at the end of a title line to add attributes to the title. The preset extension rule may also be a custom Markdown extension grammar rule. Lightweight markup language text can refer to Markdown text.
And 102, carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree.
In some embodiments, the execution body may parse the lightweight markup language text to obtain an abstract syntax tree. That is, the ANTLR4 (lexical analysis framework) may be used to perform lexical analysis on the lightweight markup language text to generate an abstract syntax tree for obtaining the memory model. The abstract syntax tree may refer to AST (Abstract Syntax Tree) syntax trees. The abstract syntax tree may contain a plurality of tree nodes, each tree node corresponding to a text element (tree node element).
And step 103, converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set.
In some embodiments, the execution body may convert each tree node element included in the abstract syntax tree to obtain a text intermediate element set. That is, the conversion rule pandoc may be used to convert each tree node element included in the abstract syntax tree to obtain a text intermediate element set. The text intermediate element may refer to a Latex element block.
Step 104, selecting a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled.
In some embodiments, the execution body may select a document element template corresponding to the lightweight markup language text from a preset document element template set as the document element template to be filled. The document element template may refer to a preset Latex template. That is, each preset document element template corresponds to a type or text identifier. Thus, the document element templates with the same text type or text identifier as the lightweight markup language text representation can be selected from the preset document element template set as the document element templates to be filled.
And 105, filling the text intermediate element set into the document element template to be filled to obtain a document element source file.
In some embodiments, the execution body may populate the text intermediate element set in the document element template to be filled to obtain a document element source file. That is, the set of text intermediate elements may be nested into the document element template to be populated to obtain the document element source file. The document element source file may refer to a Latex source.
Optionally, in response to detecting a test task for the document element source file, the document element source file is run on a test terminal to obtain source file running data.
In some embodiments, the execution body may run the document element source file on a test terminal to obtain source file run data in response to detecting a test task for the document element source file. The test task is used for indicating an application to test the running data of the source file. The application may be an application to be updated that assigns a document element source file. For example, the application may be a web browsing-type application. The business modules of the application may include: a home page, a user detail page, and an information browsing page.
In the testing process, the execution body may acquire the content data displayed on the test terminal in various manners. For example, the execution body may intercept a screenshot of the test terminal as source file running data. For another example, after obtaining the screenshot, the execution body may extract content data in the screenshot, and use the extracted data as source file operation data.
Optionally, according to the test task, the source file running data is detected to determine whether the front end of the test terminal runs the document element source file.
In some embodiments, the execution body may detect the source file running data according to the test task to determine whether the front end of the test terminal runs the document element source file. In an application page, it will typically include: text information, pictures or video, etc. In practice, the feature data may typically be preconfigured for source file run data detection before application testing is performed. Thus, the feature data herein may be set according to the actual scene, such as may include text feature data and/or feature images, etc.
In practice, the execution body may detect the source file running data to determine whether the front end of the test terminal runs the document element source file by:
and step one, acquiring pre-configured characteristic data according to the test task. The pre-configured corresponding feature data may be obtained according to the test task. I.e. the characteristic data corresponding to the application identification and the service identification in the test task. And determining whether the source file operation data contains characteristic data.
For example, the execution body may determine a page title of a page indicated by the document element source file as the feature data of the document element source file. For another example, the execution body may determine page layout information of the page indicated by the document element source file as feature data of the document element source file.
And a second step of determining whether the source file operation data contains the characteristic data. The test tasks include: test application identification, file identification of the document element source file.
Wherein, the second step may comprise the following substeps:
and a first sub-step of extracting text data in the source file operation data in response to the characteristic data being text characteristic data, and determining whether the text data contains text characteristic data. The execution body may extract text data in the source file run data to determine whether text feature data is included in the text data. I.e. whether there is data in the text data that matches the text feature data.
And a second sub-step of performing image recognition on the image in the source file operation data to obtain image text data in response to determining that the source file operation data is preset scene data, and determining whether the image text data contains text feature data. The preset scene may refer to a scene in which an image/video presentation is performed. The execution body may also perform image recognition on the image in the source file running data to obtain text data in the image. And may determine whether text data in the image contains text feature data. As an example, the execution subject may adopt an image recognition method of DBNET +crnn. Wherein DBNET (Deep Bidirectional network) is typically a deep learning model for text detection, which can detect text regions in an image and output its location and size information. CRNN (Convolutional Recurrent Neural Network) is generally a convolutional neural network structure, and is mainly used for identifying text sequences with indefinite lengths end to end.
And a third sub-step of determining whether the source file operation data contains the feature picture by using an image feature matching algorithm in response to the feature data as the feature picture. The image feature matching algorithm may be TM CCORR _ NORMED.
And thirdly, determining that the front end of the test terminal runs the document element source file in response to determining that the source file running data contains the characteristic data.
Optionally, in response to determining that the front end is running the document element source file, continuing to perform the test task.
In some embodiments, the execution body may continue to execute the test task in response to determining that the front end is running the document element source file.
Optionally, in response to determining that the front end is not running the document element source file, stopping performing the test task.
In some embodiments, the execution body may stop executing the test task in response to determining that the front end is not running the document element source file.
Optionally, based on the test task, controlling the test terminal to skip an application page so as to skip to the page indicated by the document element source file.
In some embodiments, the execution body may control the test terminal to perform an application page skip based on the test task to skip to a page indicated by the document element source file. The skip prompt message can be displayed on the test terminal, so that the user can operate according to the skip prompt message until the page indicated by the source file operation data is displayed on the screen of the test terminal.
Optionally, in response to determining that the application page jump is completed, controlling the test terminal to continue to execute the test task.
In some embodiments, the execution body may control the test terminal to continue to execute the test task in response to determining that the application page jump is completed.
Optionally, in response to detecting a process of the application indicated by the test task, not running on the test terminal, restarting the application at a front end of the test terminal, and executing the test task.
In some embodiments, the execution body may restart the application at a front end of the test terminal and execute the test task in response to detecting a process of the application indicated by the test task without running on the test terminal.
The above related matters serve as an invention point of the present disclosure, and solve the second technical problem mentioned in the background art, which affects the use efficiency in the practical application process. ". Factors influencing the use efficiency in practical application processes are often as follows: the generated source is not tested, and when the generated source has abnormality, the use efficiency in the actual application process is affected. If the above factors are solved, the effect of improving the use efficiency in the practical application process can be achieved. To achieve this, first, in response to detecting a test task for the document element source file, the document element source file is run on a test terminal to acquire source file running data. And secondly, detecting the running data of the source file according to the test task to determine whether the front end of the test terminal runs the document element source file. Next, in response to determining that the front end is running the document element source file, the test task is continued. And then stopping executing the test task in response to determining that the front end does not run the document element source file. And then, based on the test task, controlling the test terminal to carry out application page skip so as to skip to the page indicated by the document element source file. And finally, responding to the determination that the jump of the application page is completed, and controlling the test terminal to continue to execute the test task. Thus, the acquired source file running data can be detected to determine whether the front end is currently running the document element source file. Thereby ensuring that the content of the current test is page data indicated by the service module to be tested. Under the condition that the execution program of the application test does not influence, the random event test can be implemented in the appointed service module of the application. Thereby realizing targeted test, ensuring the accuracy of test results and meeting different test requirements. Furthermore, the use efficiency of the generated source file in the actual application process is ensured.
With further reference to fig. 2, as an implementation of the method shown in the above figures, the present disclosure provides embodiments of a lightweight markup language text conversion device that corresponds to those method embodiments shown in fig. 1, which may find particular application in a variety of electronic devices.
As shown in fig. 2, the lightweight markup language text conversion device 200 of some embodiments includes: an acquisition unit 201, a parsing unit 202, a conversion unit 203, a selection unit 204 and a filling unit 205. Wherein, the obtaining unit 201 is configured to obtain a lightweight markup language text conforming to a preset extension rule; a parsing unit 202 configured to parse the lightweight markup language text to obtain an abstract syntax tree; a conversion unit 203 configured to convert each tree node element included in the abstract syntax tree to obtain a text intermediate element set; a selecting unit 204 configured to select a document element template corresponding to the above lightweight markup language text from a preset document element template set as a document element template to be filled; and a filling unit 205 configured to fill the text intermediate element set into the document element template to be filled to obtain a document element source file.
It will be appreciated that the elements recited in the lightweight markup language text conversion device 200 correspond to the steps in the method described with reference to FIG. 1. Thus, the operations, features, and advantages described above with respect to the method are equally applicable to the lightweight markup language text conversion device 200 and the units contained therein, and are not described herein.
Referring now to fig. 3, a schematic diagram of an electronic device (e.g., computing device) 300 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), car terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various suitable actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and task data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
In general, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 308 including, for example, magnetic tape, hard disk, etc.; and communication means 309. The communication means 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange task data. While fig. 3 shows an electronic device 300 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 3 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via communications device 309, or from storage device 308, or from ROM 302. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing means 301.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a task data signal that propagates in baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital task data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a lightweight markup language text conforming to a preset expansion rule; carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree; converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set; selecting a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled; and filling the text intermediate element set into the document element template to be filled to obtain a document element source file.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including a product oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor comprising: the device comprises an acquisition unit, an analysis unit, a conversion unit, a selection unit and a filling unit. The names of the units do not limit the unit itself in some cases, for example, the determining unit may also be described as "a unit for determining the message class and the information transmission restriction information corresponding to the target message according to the message type corresponding to the target message" in response to receiving the message push instruction corresponding to the target message ".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (7)

1. A method of lightweight markup language text conversion, comprising:
Acquiring a lightweight markup language text conforming to a preset expansion rule;
carrying out grammar analysis on the lightweight markup language text to obtain an abstract grammar tree;
Converting each tree node element included in the abstract syntax tree to obtain a text intermediate element set;
selecting a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled;
and filling the text intermediate element set into the document element template to be filled to obtain a document element source file.
2. The method of claim 1, wherein the method further comprises:
Running the document element source file on a test terminal to acquire source file running data in response to detection of a test task for the document element source file, wherein the test task is used for instructing an application to test the source file running data;
detecting the source file operation data according to the test task to determine whether the front end of the test terminal operates the document element source file;
continuing to execute the test task in response to determining that the front end is running the document element source file;
stopping executing the test task in response to determining that the front end is not running the document element source file;
Controlling the test terminal to jump to an application page based on the test task so as to jump to a page indicated by the document element source file;
and controlling the test terminal to continue to execute the test task in response to determining that the application page jump is completed.
3. The method of claim 2, wherein the detecting the source file operation data according to the test task to determine whether the front end of the test terminal is operating the document element source file comprises:
Acquiring pre-configured characteristic data according to the test task;
Determining whether the source file operation data contains the characteristic data, wherein the test task comprises the following steps: testing an application identifier and a file identifier of the document element source file;
and in response to determining that the source file operation data contains the characteristic data, determining that the front end of the test terminal is operating the document element source file.
4. A method according to claim 3, wherein the method further comprises:
In response to detecting that the process of the application indicated by the test task is not running on the test terminal, restarting the application at the front end of the test terminal, and executing the test task.
5. A lightweight markup language text conversion device, comprising:
The acquisition unit is configured to acquire the lightweight markup language text conforming to the preset expansion rule;
the parsing unit is configured to parse the lightweight markup language text to obtain an abstract syntax tree;
the conversion unit is configured to convert each tree node element included in the abstract syntax tree to obtain a text intermediate element set;
A selecting unit configured to select a document element template corresponding to the lightweight markup language text from a preset document element template set as a document element template to be filled;
And the filling unit is configured to fill the text intermediate element set into the document element template to be filled to obtain a document element source file.
6. An electronic device, comprising:
One or more processors;
A storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-4.
7. A computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-4.
CN202410096023.0A 2024-01-23 2024-01-23 Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium Pending CN118036561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410096023.0A CN118036561A (en) 2024-01-23 2024-01-23 Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410096023.0A CN118036561A (en) 2024-01-23 2024-01-23 Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN118036561A true CN118036561A (en) 2024-05-14

Family

ID=90984988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410096023.0A Pending CN118036561A (en) 2024-01-23 2024-01-23 Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN118036561A (en)

Similar Documents

Publication Publication Date Title
CN111274760B (en) Rich text data processing method and device, electronic equipment and computer storage medium
CN111367516B (en) Application interface generation method and device and electronic equipment
CN110780874B (en) Method and device for generating information
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN110795910B (en) Text information processing method, device, server and storage medium
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111597107B (en) Information output method and device and electronic equipment
CN114721656A (en) Interface structure extraction method, device, medium and electronic equipment
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111399902B (en) Client source file processing method and device, readable medium and electronic equipment
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN111539200B (en) Method, device, medium and electronic equipment for generating rich text
CN113704079B (en) Protobuf-based interface testing method and device
CN114489902A (en) Interface display method, device, equipment and medium
CN118036561A (en) Lightweight markup language text conversion method, lightweight markup language text conversion device, electronic equipment and medium
CN113761588A (en) Data verification method and device, terminal equipment and storage medium
CN113779952B (en) Text processing method and device and electronic equipment
CN116561015B (en) Map application testing method, electronic device and computer readable medium
CN114428823B (en) Data linkage method, device, equipment and medium based on multidimensional variable expression

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination