CN113361235A - HTML file generation method and device, electronic equipment and readable storage medium - Google Patents
HTML file generation method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN113361235A CN113361235A CN202110742484.7A CN202110742484A CN113361235A CN 113361235 A CN113361235 A CN 113361235A CN 202110742484 A CN202110742484 A CN 202110742484A CN 113361235 A CN113361235 A CN 113361235A
- Authority
- CN
- China
- Prior art keywords
- view
- attribute information
- html file
- generating
- program
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000004590 computer program Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000004048 modification Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
- G06F40/154—Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a method and a device for generating an HTML file, an electronic device and a readable storage medium, and relates to the field of computers, in particular to the technical field of user interfaces. The specific implementation scheme is as follows: running a target program in a pre-constructed operating system; after the view is loaded by the target program, acquiring attribute information for describing a view object in the view, wherein the attribute information is used for generating an HTML file for displaying the view. By the aid of the method and the device, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the APP view can be viewed.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for generating an HTML file, an electronic device, and a readable storage medium.
Background
The Android system is a widely used operating system, and can install and run application programs (APPs).
In some scenarios, the view of the APP may need to be viewed in a non-Android operating system, and the APP cannot be directly run on the non-Android operating system, so that there is a certain difficulty in viewing the view of the APP.
Disclosure of Invention
In order to solve at least one of the above defects, the present disclosure provides a method and an apparatus for generating an HTML file, an electronic device, and a readable storage medium.
According to a first aspect of the present disclosure, there is provided a method of generating an HTML file, the method including:
running a target program in a pre-constructed operating system;
after the view is loaded by the target program, acquiring attribute information for describing a view object in the view, wherein the attribute information is used for generating a HyperText Markup Language (HTML) file for displaying the view.
According to a second aspect of the present disclosure, there is provided another method of generating an HTML file, the method including:
receiving attribute information for describing a view object in a view of an application program, wherein the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and the object program loads the view;
and generating an HTML file for showing the view based on the attribute information.
According to a third aspect of the present disclosure, there is provided an apparatus for generating an HTML file, the apparatus including:
the program running module is used for running a target program in a pre-constructed operating system;
and the attribute information acquisition module is used for acquiring attribute information for describing the view object in the view after the view is loaded by the target program, and the attribute information is used for generating an HTML file for displaying the view.
According to a fourth aspect of the present disclosure, there is provided an apparatus for generating an HTML file, the apparatus including:
the attribute information receiving module is used for receiving attribute information used for describing a view object in a view of an application program, wherein the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and the object program loads the view;
and the HTML file generating module is used for generating an HTML file for displaying the view based on the attribute information.
According to a fifth aspect of the present disclosure, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method for generating the HTML file.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above-described method of generating an HTML file.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described method of generating an HTML file.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the scheme provided by the embodiment of the disclosure, the target program is run in the pre-constructed operating system, and after the view is loaded by the target program, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of a method for generating an HTML file according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another method for generating an HTML file according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a method for generating an HTML file according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a specific manner of a method for generating an HTML file according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an HTML file generation apparatus provided in accordance with the present disclosure;
fig. 6 is a schematic structural diagram of another HTML file generation apparatus provided in accordance with the present disclosure;
fig. 7 is a schematic structural diagram of still another HTML file generation apparatus provided in accordance with the present disclosure;
FIG. 8 is a block diagram of an electronic device for implementing a method of generating an HTML file of an embodiment of the present disclosure;
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
At present, when viewing an APP view in a non-Android system, a screenshot of the APP view in the Android system is generally captured, and the screenshot is stored and displayed in the non-Android system.
In this way, because the view of the APP is displayed in the form of the screenshot, resources such as characters in the view of the APP cannot be modified and copied, so that the view of the APP is converted into static resources and cannot be flexibly used.
The method and the device for generating the HTML file, the electronic device and the readable storage medium provided by the embodiments of the present application aim to solve at least one of the above technical problems in the prior art
Fig. 1 shows a schematic flowchart of a method for generating an HTML file according to an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes:
step S110: and running the target program in the pre-constructed operating system.
Step S120: after the view is loaded by the target program, acquiring attribute information for describing a view object in the view, wherein the attribute information is used for generating an HTML file for displaying the view.
The operating system is an Android system constructed according to the requirements in the disclosure, and compared with a standard Android system, the Android system constructed in the disclosure modifies system codes, so that attribute information describing view objects in a view can be described when the view of a target program is loaded.
The view object is also called a view element, attribute information of the view object may be capable of being used to describe the view object, the attribute information may include, for example, width, height, coordinates, whether the view object is visible, and display content of the view object, and the display content may include text, pictures, and background.
According to the attribute information of the view objects in the view, an HTML file of the view can be constructed, and the HTML file can be displayed in various non-Android systems in a webpage mode.
According to the method provided by the embodiment of the disclosure, by running the target program in the pre-constructed operating system, after the target program loads the view, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Compared with the mode of converting a page into a screenshot in the prior art, the method and the device for displaying the HTML file in the webpage have the advantages that by generating the HTML file of the view, when the HTML file is displayed as the webpage, resources such as characters in the webpage can be copied, modification of the resources such as the characters in the HTML file is supported, and the method and the device for displaying the HTML file in the webpage have good use flexibility.
In an optional implementation manner of the present disclosure, acquiring attribute information for describing a view object in a view includes:
writing attribute information for describing the view objects in the view into a dump file through a dump thread, wherein the dump thread is started when an object program is started;
attribute information is acquired based on the dump file.
The dump file can record attribute information describing the view objects in the view, and the attribute information can be acquired by analyzing the dump file.
The view attribute information can be acquired through the dump file, and a foundation is provided for constructing an HTML file based on the attribute information subsequently.
In an alternative embodiment of the present disclosure, a view class called by a view object in an operating system is encapsulated with code for describing property information of the view object.
Wherein, a view class (i.e. view class) is a class called by a view object.
When the operating system is built, relevant code of a view class in the operating system can be modified, and code for describing view information of the view is packaged in the view class.
Through modification of relevant codes of view classes in an operating system, after a target program loads a view, attribute information for describing a view object in the view can be output.
Fig. 2 shows a schematic flowchart of a method for generating an HTML file according to an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes:
step S210: and running the target program in the pre-constructed operating system.
Step S220: after the view is loaded by the target program, acquiring attribute information for describing a view object in the view, wherein the attribute information is used for generating an HTML file for displaying the view.
Step S230: and generating an HTML file for showing the view based on the attribute information.
The operating system is an Android system constructed according to the requirements in the disclosure, and compared with a standard Android system, the Android system constructed in the disclosure modifies system codes, so that attribute information describing view objects in a view can be described when the view of a target program is loaded.
The view object is also called a view element, attribute information of the view object may be capable of being used to describe the view object, the attribute information may include, for example, width, height, coordinates, whether the view object is visible, and display content of the view object, and the display content may include text, pictures, and background.
According to the attribute information of the view objects in the view, an HTML file of the view can be constructed, and the HTML file can be displayed in various non-Android systems in a webpage mode.
According to the method provided by the embodiment of the disclosure, by running the target program in the pre-constructed operating system, after the target program loads the view, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Compared with the mode of converting the page into the screenshot in the prior art, the method has the advantages that the HTML file of the view is generated, so that when the HTML file is displayed as the webpage, resources such as characters in the webpage can be copied, modification of the resources such as the characters in the HTML file is supported, and the method has good use flexibility.
In an optional mode of the present disclosure, generating an HTML file for displaying a view based on attribute information includes:
converting the view object into a DOM node in a file object model of the HTML file based on the attribute information;
and generating an HTML file for showing the view based on the DOM node.
Since the view object of the target program page is in a tree structure and the file object model of the HTML file is also in a tree structure, the HTML file of the view can be constructed by converting the view object into a DOM node in the file object model of the HTML file.
In an optional mode of the present disclosure, the method further includes:
and sending the attribute information to the receiver so that the receiver generates an HTML file for displaying the view based on the attribute information.
In the embodiment of the present disclosure, the terminal device running the target program may generate the HTML file according to the attribute information of the view object, or the terminal device running the target program may send the attribute information of the view object to the receiving party, and the receiving party generates the HTML file according to the attribute information of the view object.
The terminal equipment running the target program can package and store the attribute information of all the view objects in the view, when the HTML file of the view needs to be generated, the terminal equipment running the target program can generate the HTML file according to the attribute information of the packaged view object, and also can send the attribute information of the packaged view object to a receiving party, and the receiving party generates the HTML file according to the attribute information of the view object.
In actual use, the generated HTML file can be stored in both a terminal device or a receiving party running the target program, so as to be called by a service party.
Fig. 3 is a schematic flowchart illustrating a method for generating an HTML file according to an embodiment of the present disclosure, where as shown in fig. 3, the method mainly includes:
step S310: receiving attribute information for describing a view object in a view of an application program, wherein the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and the object program loads the view;
step S320: and generating an HTML file for showing the view based on the attribute information.
The sender is the terminal device with the pre-constructed operating system deployed therein.
The operating system is an Android system constructed according to the requirements in the present disclosure, and compared with a standard Android system, the Android system constructed in the present disclosure modifies system codes, so that when a view of a target program is loaded, attribute information describing a view object in the view can be described.
The view object is also called a view element, attribute information of the view object may be capable of being used to describe the view object, the attribute information may include, for example, width, height, coordinates, whether the view object is visible, and display content of the view object, and the display content may include text, pictures, and background.
After receiving the attribute information of the view object sent by the sender, the receiver can construct an HTML file of the view according to the attribute information of the view object in the view, and the HTML file can be displayed in various non-Android systems in a webpage mode.
According to the method provided by the embodiment of the disclosure, the attribute information of the view object in the description view acquired and sent by the sender is received, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Compared with the mode of converting the page into the screenshot in the prior art, the method has the advantages that the HTML file of the view is generated, so that when the HTML file is displayed as the webpage, resources such as characters in the webpage can be copied, modification of the resources such as the characters in the HTML file is supported, and the method has good use flexibility.
In an optional mode of the present disclosure, generating an HTML file for displaying a view based on attribute information includes:
converting the view object into a DOM node in a file object model of the HTML file based on the attribute information;
and generating an HTML file for showing the view based on the DOM node.
Since the view object of the target program page is in a tree structure and the file object model of the HTML file is also in a tree structure, the HTML file of the view can be constructed by converting the view object into a DOM node in the file object model of the HTML file.
Fig. 4 is a flowchart illustrating a specific implementation manner of a method for generating an HTML file according to an embodiment of the present disclosure.
As shown in fig. 4, the Android system is an operating system constructed in the embodiments of the present disclosure.
Opening the APP, namely starting the application program, and starting the dump thread at the same time of starting the application program.
When the page is loaded after opening the APP, data of the attribute information is provided, namely, the attribute information describing the view object is provided.
And packaging the view information, namely packaging the attribute information of each view object so as to provide the packaged attribute information of the view object to the conversion module.
And the conversion model is used for converting the view into the HTML file according to the attribute information of the view object.
And converting the view related information output by the dump into an HTML file according to a specified rule, sending the HTML file to a storage unit for unified storage, namely generating the HTML file according to the attribute information of the view object, and storing the HTML file. The storage unit will communicate with the business party to provide the generated HTML file to the business party for use.
Based on the same principle as the method shown in fig. 1, fig. 5 shows a schematic structural diagram of an apparatus for generating an HTML file according to an embodiment of the present disclosure, and as shown in fig. 5, the apparatus 50 for generating an HTML file may include:
a program running module 510, configured to run a target program in a pre-built operating system;
the attribute information obtaining module 520 is configured to obtain attribute information for describing a view object in a view after the view is loaded by the target program, where the attribute information is used to generate an HTML file for displaying the view.
According to the device provided by the embodiment of the disclosure, the target program is run in the pre-constructed operating system, and after the view is loaded by the target program, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Optionally, when acquiring the attribute information for describing the view object in the view, the attribute information acquiring module is specifically configured to:
writing attribute information for describing the view objects in the view into a dump file through a dump thread, wherein the dump thread is started when an object program is started;
attribute information is acquired based on the dump file.
Optionally, the view class called by the view object in the operating system is encapsulated with code for describing attribute information of the view object.
Optionally, the method further includes:
and the HTML file generating module is used for generating an HTML file for displaying the view based on the attribute information.
Optionally, the HTML file generating module is specifically configured to:
converting the view object into a DOM node in a file object model of the HTML file based on the attribute information;
and generating an HTML file for showing the view based on the DOM node.
It is understood that the above modules of the apparatus for generating an HTML file in the embodiment of the present disclosure have functions of implementing the corresponding steps of the method for generating an HTML file in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the above apparatus for generating an HTML file, reference may be specifically made to the corresponding description of the method for generating an HTML file in the embodiment shown in fig. 1, and details are not repeated here.
Based on the same principle as the method shown in fig. 2, fig. 6 shows a schematic structural diagram of another apparatus for generating an HTML file provided by the embodiment of the present disclosure, and as shown in fig. 6, the apparatus 60 for generating an HTML file may include:
a program running module 610 for running a target program in a pre-built operating system;
the attribute information obtaining module 620 is configured to obtain attribute information for describing a view object in a view after the view is loaded by the target program, where the attribute information is used to generate an HTML file for displaying the view.
And an HTML file generating module 630, configured to generate an HTML file for displaying the view based on the attribute information.
According to the device provided by the embodiment of the disclosure, the target program is run in the pre-constructed operating system, and after the view is loaded by the target program, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
It is understood that the above modules of the apparatus for generating an HTML file in the embodiment of the present disclosure have functions of implementing the corresponding steps of the method for generating an HTML file in the embodiment shown in fig. 2. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the above apparatus for generating an HTML file, reference may be specifically made to the corresponding description of the method for generating an HTML file in the embodiment shown in fig. 2, and details are not repeated here.
Based on the same principle as the method shown in fig. 3, fig. 7 shows a schematic structural diagram of another apparatus for generating an HTML file provided by the embodiment of the present disclosure, and as shown in fig. 7, the apparatus 70 for generating an HTML file may include:
an attribute information receiving module 710, configured to receive attribute information used for describing a view object in a view of an application program, where the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and loads the view on the object program;
and an HTML file generating module 720, configured to generate an HTML file for displaying the view based on the attribute information.
According to the device provided by the embodiment of the disclosure, the attribute information of the view object in the description view acquired and sent by the sender is received, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Optionally, the HTML file generating module is specifically configured to:
converting the view object into a DOM node in a file object model of the HTML file based on the attribute information;
and generating an HTML file for showing the view based on the DOM node.
It is understood that the above modules of the apparatus for generating an HTML file in the embodiment of the present disclosure have functions of implementing the corresponding steps of the method for generating an HTML file in the embodiment shown in fig. 3. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the above apparatus for generating an HTML file, reference may be specifically made to the corresponding description of the method for generating an HTML file in the embodiment shown in fig. 3, which is not described herein again.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the cross-chain data processing method provided by the embodiment of the disclosure.
Compared with the prior art, the electronic equipment runs the target program in the pre-constructed operating system, and after the target program loads the view, the attribute information for describing the view object in the view is acquired, so that the HTML file for displaying the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the cross-chain data processing method provided by the embodiment of the disclosure.
Compared with the prior art, the readable storage medium runs the target program in the pre-constructed operating system, and after the target program loads the view, the attribute information for describing the view object in the view is acquired, so that the HTML file for showing the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
The computer program product comprises a computer program which, when executed by a processor, implements the cross-chain data processing method as provided by the embodiments of the present disclosure.
Compared with the prior art, the computer program product runs the target program in the pre-constructed operating system, and after the target program loads the view, the attribute information for describing the view object in the view is acquired, so that the HTML file for showing the view is generated based on the attribute information. In the scheme, the HTML file of the view can be generated based on the attribute information of the view object, so that the view is displayed through the HTML file, and the view of the APP is viewed.
Fig. 8 illustrates a schematic block diagram of an example electronic device 2000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the device 2000 includes a computing unit 2010, which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)2020, or a computer program loaded from a storage unit 2080 into a Random Access Memory (RAM) 2030. In the RAM 2030, various programs and data required for the operation of the device 2000 can also be stored. The computing unit 2010, ROM 2020, and RAM 2030 are coupled to each other via bus 2040. An input/output (I/O) interface 2050 is also connected to bus 2040.
Various components in device 2000 are connected to I/O interface 2050, including: an input unit 2060 such as a keyboard, a mouse, or the like; an output unit 2070 such as various types of displays, speakers, and the like; a storage unit 2080 such as a magnetic disk, an optical disk, and the like; and a communication unit 2090, such as a network card, modem, wireless communication transceiver, etc. The communication unit 2090 allows the device 2000 to exchange information/data with other devices over a computer network, such as the internet, and/or various telecommunication networks.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (13)
1. A method for generating an HTML file, comprising:
running a target program in a pre-constructed operating system;
and after the target program loads the view, acquiring attribute information for describing a view object in the view, wherein the attribute information is used for generating a hypertext markup language (HTML) file for displaying the view.
2. The method of claim 1, wherein the obtaining attribute information describing the view object in the view comprises:
writing attribute information for describing the view objects in the view into a dump file through a dump thread, wherein the dump thread is started when the object program is started;
and acquiring the attribute information based on the dump file.
3. The method of claim 1, wherein the view class called by the view object in the operating system is encapsulated with code for describing property information of the view object.
4. The method of any of claims 1-3, further comprising:
and generating an HTML file for displaying the view based on the attribute information.
5. The method of claim 4, wherein the generating an HTML file for presenting the view based on the attribute information comprises:
converting the view object into a DOM node in a file object model of an HTML file based on the attribute information;
and generating an HTML file for displaying the view based on the DOM node.
6. The method of any of claims 1-5, further comprising:
and sending the attribute information to a receiver so that the receiver generates an HTML file for displaying the view based on the attribute information.
7. A method for generating an HTML file, comprising:
receiving attribute information for describing a view object in a view of an application program, wherein the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and the object program loads the view;
and generating an HTML file for displaying the view based on the attribute information.
8. The method of claim 7, wherein the generating an HTML file for presenting the view based on the attribute information comprises:
converting the view object into a DOM node in a file object model of an HTML file based on the attribute information;
and generating an HTML file for displaying the view based on the DOM node.
9. An apparatus for generating an HTML file, comprising:
the program running module is used for running a target program in a pre-constructed operating system;
and the attribute information acquisition module is used for acquiring attribute information for describing a view object in the view after the view is loaded by the target program, wherein the attribute information is used for generating an HTML file for displaying the view.
10. An apparatus for generating an HTML file, comprising:
the system comprises an attribute information receiving module, a view object obtaining module and a view object obtaining module, wherein the attribute information receiving module is used for receiving attribute information used for describing a view object in a view of an application program, and the attribute information is obtained after a sender runs an object program in a pre-constructed operating system and the view is loaded by the object program;
and the HTML file generating module is used for generating an HTML file for displaying the view based on the attribute information.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110742484.7A CN113361235B (en) | 2021-06-30 | 2021-06-30 | HTML file generation method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110742484.7A CN113361235B (en) | 2021-06-30 | 2021-06-30 | HTML file generation method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113361235A true CN113361235A (en) | 2021-09-07 |
CN113361235B CN113361235B (en) | 2024-03-22 |
Family
ID=77537669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110742484.7A Active CN113361235B (en) | 2021-06-30 | 2021-06-30 | HTML file generation method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113361235B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070214178A1 (en) * | 2006-03-13 | 2007-09-13 | Sheffler Thomas J | Multi-project verification environment |
US20080098300A1 (en) * | 2006-10-24 | 2008-04-24 | Brilliant Shopper, Inc. | Method and system for extracting information from web pages |
CN107633055A (en) * | 2017-09-15 | 2018-01-26 | 国云科技股份有限公司 | A kind of method by picture converting to HTML document |
CN107632869A (en) * | 2017-09-15 | 2018-01-26 | 百富计算机技术(深圳)有限公司 | A kind of method and apparatus of the user interface of loading POS applications |
CN108153845A (en) * | 2017-12-19 | 2018-06-12 | 北京天元创新科技有限公司 | Method and device derived from a kind of realization backstage image data |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
CN111818123A (en) * | 2020-05-28 | 2020-10-23 | 中国平安财产保险股份有限公司 | Network front-end remote playback method, device, equipment and storage medium |
CN112269576A (en) * | 2020-08-07 | 2021-01-26 | 北京沃东天骏信息技术有限公司 | Component display method and device, server and storage medium |
CN112433799A (en) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | Page generation method, device, equipment and medium |
CN113050940A (en) * | 2021-03-24 | 2021-06-29 | 百度在线网络技术(北京)有限公司 | Method for previewing small program, related device and computer program product |
-
2021
- 2021-06-30 CN CN202110742484.7A patent/CN113361235B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070214178A1 (en) * | 2006-03-13 | 2007-09-13 | Sheffler Thomas J | Multi-project verification environment |
US20080098300A1 (en) * | 2006-10-24 | 2008-04-24 | Brilliant Shopper, Inc. | Method and system for extracting information from web pages |
CN107633055A (en) * | 2017-09-15 | 2018-01-26 | 国云科技股份有限公司 | A kind of method by picture converting to HTML document |
CN107632869A (en) * | 2017-09-15 | 2018-01-26 | 百富计算机技术(深圳)有限公司 | A kind of method and apparatus of the user interface of loading POS applications |
CN108153845A (en) * | 2017-12-19 | 2018-06-12 | 北京天元创新科技有限公司 | Method and device derived from a kind of realization backstage image data |
CN109086204A (en) * | 2018-07-20 | 2018-12-25 | 北京小米移动软件有限公司 | The foundation of node relationships tree, page marks and recognition methods, device and storage medium |
CN111818123A (en) * | 2020-05-28 | 2020-10-23 | 中国平安财产保险股份有限公司 | Network front-end remote playback method, device, equipment and storage medium |
CN112269576A (en) * | 2020-08-07 | 2021-01-26 | 北京沃东天骏信息技术有限公司 | Component display method and device, server and storage medium |
CN112433799A (en) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | Page generation method, device, equipment and medium |
CN113050940A (en) * | 2021-03-24 | 2021-06-29 | 百度在线网络技术(北京)有限公司 | Method for previewing small program, related device and computer program product |
Non-Patent Citations (1)
Title |
---|
郑宇;白凡凡;: "Android多媒体通信终端自动化测试工具设计与实现", 电信快报, no. 04 * |
Also Published As
Publication number | Publication date |
---|---|
CN113361235B (en) | 2024-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109145238B (en) | Card display method and device and mobile device | |
CN113010827B (en) | Page rendering method and device, electronic equipment and storage medium | |
CN113392346B (en) | Path processing method and device for resource file, electronic equipment and storage medium | |
CN113656124B (en) | Login page generation method and device | |
CN115309470B (en) | Method, device, equipment and storage medium for loading widget | |
CN110109983B (en) | Method and device for operating Redis database | |
CN114218890A (en) | Page rendering method and device, electronic equipment and storage medium | |
CN111125057A (en) | Service request processing method and device and computer system | |
CN114398023A (en) | File generation method and page configuration method and device | |
CN114780196B (en) | User interface form rendering method and device, electronic equipment and storage medium | |
CN114138397B (en) | Page display method and device, electronic equipment and storage medium | |
CN113361235B (en) | HTML file generation method and device, electronic equipment and readable storage medium | |
CN116302218A (en) | Function information adding method, device, equipment and storage medium | |
CN113722037B (en) | User interface refreshing method and device, electronic equipment and storage medium | |
CN112882711B (en) | Rendering method, device, equipment and storage medium | |
CN114661402A (en) | Interface rendering method and device, electronic equipment and computer readable medium | |
CN114218313A (en) | Data management method, device, electronic equipment, storage medium and product | |
CN114168172A (en) | Application program installation method and device, electronic equipment and storage medium | |
CN113849164A (en) | Data processing method and device, electronic equipment and memory | |
CN113656041A (en) | Data processing method, device, equipment and storage medium | |
CN113835893B (en) | Data processing method, device, equipment, storage medium and program product | |
CN113360407B (en) | Function positioning method and device, electronic equipment and readable storage medium | |
CN113760356B (en) | Differential configuration method, device, equipment and medium of program product | |
CN117931195A (en) | Data dictionary processing method and device, electronic equipment and storage medium | |
CN116431108A (en) | Object type processing method and device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |