CN113361235B - 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 PDF

Info

Publication number
CN113361235B
CN113361235B CN202110742484.7A CN202110742484A CN113361235B CN 113361235 B CN113361235 B CN 113361235B CN 202110742484 A CN202110742484 A CN 202110742484A CN 113361235 B CN113361235 B CN 113361235B
Authority
CN
China
Prior art keywords
view
attribute information
html file
generating
describing
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.)
Active
Application number
CN202110742484.7A
Other languages
Chinese (zh)
Other versions
CN113361235A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110742484.7A priority Critical patent/CN113361235B/en
Publication of CN113361235A publication Critical patent/CN113361235A/en
Application granted granted Critical
Publication of CN113361235B publication Critical patent/CN113361235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Abstract

The disclosure provides a method and a device for generating an HTML file, electronic equipment 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-built operating system; after the target program loads the view, attribute information for describing the view object in the view is acquired, and the attribute information is used for generating an HTML file for showing the view. According to 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 view is realized.

Description

HTML file generation method and device, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the field of computer technology, in particular to the field of user interface technology, and specifically relates to a method and a device 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 (APP).
In some scenarios, it may be necessary to view the view of the APP in a non-Android operating system, but the APP cannot directly run on the non-Android operating system, so that viewing the view of the APP is difficult to achieve.
Disclosure of Invention
In order to solve at least one of the defects, the disclosure provides a method, a device, an electronic device and a readable storage medium for generating an HTML file.
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-built operating system;
after the target program loads the view, attribute information describing the view objects in the view is obtained, which is used to generate a hypertext markup language (HyperText Markup Language, HTML) file for exposing the view.
According to a second aspect of the present disclosure, there is provided another HTML file generating method, 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 a target program in a pre-constructed operating system and loads the view by the target program;
an HTML file for presenting the view is generated based on the attribute information.
According to a third aspect of the present disclosure, there is provided an HTML file generating apparatus, the apparatus including:
the program running module is used for running the target program in the pre-built 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, 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 HTML file generating apparatus, the apparatus including:
the attribute information receiving module is used for receiving attribute information of a view object in a view for describing an application program, wherein the attribute information is obtained after a sender operates a target program in a pre-constructed operating system and loads the view by the target program;
and the HTML file generation module is used for generating an HTML file for showing the view based on the attribute information.
According to a fifth aspect of the present disclosure, there is provided 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 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 HTML file generation method.
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 HTML file generation method.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
The beneficial effects that this disclosure provided technical scheme brought are:
according to the scheme provided by the embodiment of the disclosure, the target program is operated in the pre-built 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. According to 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 view of the APP view is realized.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of an HTML file generating method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating 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 view of an HTML file generating device provided according to the present disclosure;
FIG. 6 is a schematic diagram of another HTML file generation apparatus provided in accordance with the present disclosure;
fig. 7 is a schematic structural view of a further HTML file generating device provided according to the present disclosure;
FIG. 8 is a block diagram of an electronic device for implementing a method of generating HTML files of an embodiment of the present disclosure;
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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 the view of the APP in a non-Android system, a mode of capturing the view of the APP in the Android system, storing the captured image and displaying the captured image in the non-Android system is generally adopted.
In this way, since the view of the APP is displayed in the form of a 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, device, electronic equipment and readable storage medium for generating HTML files aim to solve at least one of the technical problems in the prior art
Fig. 1 shows a flowchart of an HTML file generating method provided by an embodiment of the present disclosure, where, as shown in fig. 1, the method may mainly include:
step S110: and running the target program in the pre-built operating system.
Step S120: after the target program loads the view, attribute information for describing the view object in the view is acquired, and the attribute information is used for generating an HTML file for showing the view.
The Android system constructed in the disclosure modifies system codes compared with a standard Android system, so that attribute information describing view objects in views of a target program can be obtained when the views of the target program are loaded.
The view object is also called a view element, and attribute information of the view object may be used to describe the view object, where the attribute information may include width, height, coordinates, whether the view object is visible, and presentation content of the view object, where the presentation content may include text, pictures, and background.
According to the attribute information of the view object 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, the target program is operated in the pre-built 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. According to 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 view of the APP view is realized.
Compared with the mode of converting the page into the screenshot in the prior art, the method and the device have the advantages that by generating the HTML file of the view, when the HTML file is displayed as the webpage, the 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 good use flexibility is achieved.
In an alternative embodiment of the present disclosure, obtaining attribute information for describing a view object in a view includes:
writing attribute information for describing a view object in the view into a dump file through a dump thread, wherein the dump thread is started when a target program is started;
attribute information is obtained based on the dump file.
The dump file can record attribute information describing a view object in the view, and the attribute information can be obtained 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.
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 attribute information of the view object.
Wherein the view class (i.e., view class) is the class called by the view object.
When the operating system is built, the relevant code of the view class in the operating system can be modified, and the code for describing the view information of the view is encapsulated in the view class.
By modifying the relevant code of the view class in the operating system, the attribute information for describing the view object in the view can be output after the target program loads the view.
Fig. 2 shows a flowchart of a method for generating an HTML file according to an embodiment of the present disclosure, where, as shown in fig. 2, the method may mainly include:
step S210: and running the target program in the pre-built operating system.
Step S220: after the target program loads the view, attribute information for describing the view object in the view is acquired, and the attribute information is used for generating an HTML file for showing the view.
Step S230: an HTML file for presenting the view is generated based on the attribute information.
The Android system constructed in the disclosure modifies system codes compared with a standard Android system, so that attribute information describing view objects in views of a target program can be obtained when the views of the target program are loaded.
The view object is also called a view element, and attribute information of the view object may be used to describe the view object, where the attribute information may include width, height, coordinates, whether the view object is visible, and presentation content of the view object, where the presentation content may include text, pictures, and background.
According to the attribute information of the view object 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, the target program is operated in the pre-built 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. According to 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 view of the APP view is realized.
Compared with the mode of converting the page into the screenshot in the prior art, the method and the device have the advantages that by generating the HTML file of the view, when the HTML file is displayed as the webpage, the 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 better use flexibility is achieved.
In an alternative manner of the present disclosure, generating an HTML file for presenting a view based on attribute information includes:
converting the view object into DOM nodes in a file object model of the HTML file based on the attribute information;
an HTML file for exposing the view is generated 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 DOM nodes in the file object model of the HTML file.
In an optional manner of the disclosure, the method further includes:
the attribute information is transmitted to the receiving side so that the receiving side generates an HTML file for showing the view based on the attribute information.
In the embodiment of the 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 receiver, and the receiver may generate the HTML file according to the attribute information of the view object.
The terminal device running the target program can package and store the attribute information of all view objects in the view, and when the HTML file of the view needs to be generated, the terminal device running the target program can generate the HTML file according to the attribute information of the packaged view objects, or can send the attribute information of the packaged view objects to the receiver, and the receiver generates the HTML file according to the attribute information of the view objects.
In practical use, the generated HTML file can be stored in the terminal device or the receiver running the target program for the service party to call.
Fig. 3 is a flowchart illustrating another method for generating an HTML file according to an embodiment of the present disclosure, where, as shown in fig. 3, the method may mainly include:
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 a target program in a pre-constructed operating system and loads the view by the target program;
step S320: an HTML file for presenting the view is generated based on the attribute information.
The sender is the terminal equipment deployed with the pre-built operating system.
The Android system constructed in the disclosure modifies system codes compared with a standard Android system, so that attribute information describing view objects in a view can be obtained when the view of a target program is loaded.
The view object is also called a view element, and attribute information of the view object may be used to describe the view object, where the attribute information may include width, height, coordinates, whether the view object is visible, and presentation content of the view object, where the presentation 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 showing the view is generated based on the attribute information. According to 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 view of the APP view is realized.
Compared with the mode of converting the page into the screenshot in the prior art, the method and the device have the advantages that by generating the HTML file of the view, when the HTML file is displayed as the webpage, the 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 better use flexibility is achieved.
In an alternative manner of the present disclosure, generating an HTML file for presenting a view based on attribute information includes:
converting the view object into DOM nodes in a file object model of the HTML file based on the attribute information;
an HTML file for exposing the view is generated 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 DOM nodes in the file object model of the HTML file.
Fig. 4 provides a flowchart of a specific implementation manner of an HTML file generating method according to an embodiment of the present disclosure.
As shown in fig. 4, the Android system is an operating system of the framework in the embodiment of the disclosure.
And 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 the APP is opened, data of attribute information, namely, attribute information describing view objects is provided.
And packaging information of view, namely packaging attribute information of each view object so as to provide the attribute information of the packaged view object to the conversion module.
And the conversion model is used for converting the view into an HTML file according to the attribute information of the view object.
And converting the view related information output by 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 HTML file generating device provided by an embodiment of the present disclosure, and as shown in fig. 5, the HTML file generating device 50 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 the view after the object program loads the view, 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 operated in the pre-built 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. According to 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 view of the APP view is realized.
Optionally, the attribute information acquisition module is specifically configured to, when acquiring attribute information for describing a view object in the view:
writing attribute information for describing a view object in the view into a dump file through a dump thread, wherein the dump thread is started when a target program is started;
attribute information is obtained based on the dump file.
Optionally, a view class invoked by a view object in the operating system is encapsulated with code for describing attribute information of the view object.
Optionally, the method further comprises:
and the HTML file generation module is used for generating an HTML file for showing the view based on the attribute information.
Optionally, the HTML file generation module is specifically configured to:
converting the view object into DOM nodes in a file object model of the HTML file based on the attribute information;
an HTML file for exposing the view is generated based on the DOM node.
It will be appreciated that the above-described modules of the HTML file generating apparatus in the embodiment of the present disclosure have functions of implementing the respective steps of the HTML file generating method in the embodiment shown in fig. 1. The functions 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 may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the HTML file generating device, reference may be specifically made to the corresponding description of the HTML file generating method in the embodiment shown in fig. 1, which is not repeated herein.
Based on the same principle as the method shown in fig. 2, fig. 6 shows a schematic structural diagram of another HTML file generating device provided by an embodiment of the present disclosure, and as shown in fig. 6, the HTML file generating device 60 may include:
a program running module 610, configured to run a target program in a pre-built operating system;
the attribute information acquisition module 620 is configured to acquire attribute information for describing a view object in the view after the object program loads the view, where the attribute information is used to generate an HTML file for displaying the view.
The HTML file generating module 630 is configured to generate an HTML file for showing the view based on the attribute information.
According to the device provided by the embodiment of the disclosure, the target program is operated in the pre-built 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. According to 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 view of the APP view is realized.
It will be appreciated that the above-described modules of the HTML file generating device in the embodiment of the present disclosure have functions of implementing the respective steps of the HTML file generating method in the embodiment shown in fig. 2. The functions 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 may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the HTML file generating device, reference may be specifically made to the corresponding description of the HTML file generating method in the embodiment shown in fig. 2, which is not repeated herein.
Based on the same principle as the method shown in fig. 3, fig. 7 shows a schematic structural diagram of another HTML file generating device provided by an embodiment of the present disclosure, and as shown in fig. 7, the HTML file generating device 70 may include:
an attribute information receiving module 710, configured to receive attribute information for describing a view object in a view of an application program, where the attribute information is obtained after a sender runs a target program in a pre-built operating system and loads the view by the target program;
the HTML file generating module 720 is configured to generate an HTML file for showing the view based on the attribute information.
The device provided by the embodiment of the disclosure generates the HTML file for displaying the view based on the attribute information by receiving the attribute information of the view object in the description view acquired and transmitted by the transmitting side. According to 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 view of the APP view is realized.
Optionally, the HTML file generation module is specifically configured to:
converting the view object into DOM nodes in a file object model of the HTML file based on the attribute information;
an HTML file for exposing the view is generated based on the DOM node.
It will be appreciated that the above-described modules of the HTML file generating apparatus in the embodiment of the present disclosure have functions of implementing the respective steps of the HTML file generating method in the embodiment shown in fig. 3. The functions 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 may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the HTML file generating device, reference may be specifically made to the corresponding description of the HTML file generating method in the embodiment shown in fig. 3, which is not repeated herein.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
The electronic device includes: 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 a method of cross-chain data processing as provided by embodiments of the present disclosure.
Compared with the prior art, the electronic device has the advantages that the object program is operated in the pre-built operating system, and after the view is loaded by the object 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. According to 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 view of the APP view is realized.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method of cross-chain data processing as provided by embodiments of the present disclosure.
In contrast to the prior art, the readable storage medium acquires attribute information for describing a view object in a view after the view is loaded by a target program by running the target program in a pre-built operating system, so as to generate an HTML file for presenting the view based on the attribute information. According to 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 view of the APP view is realized.
The computer program product comprises a computer program which, when executed by a processor, implements a method for cross-chain data processing as provided by embodiments of the present disclosure.
In contrast to the prior art, the computer program product obtains attribute information describing a view object in a view after the view is loaded by a target program by running the target program in a pre-built operating system, so as to generate an HTML file for showing the view based on the attribute information. According to 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 view of the APP view is realized.
Fig. 8 shows a schematic block diagram of an example electronic device 2000 that may 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 2000 includes a computing unit 2010 that may perform various appropriate actions and processes according to 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 may also be stored. The computing unit 2010, ROM 2020, and RAM 2030 are connected to each other by a bus 2040. An input/output (I/O) interface 2050 is also connected to bus 2040.
Various components in the device 2000 are connected to the 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, or 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 through a computer network such as the internet and/or various telecommunication networks.
The computing unit 2010 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 2010 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The calculation unit 2010 executes the HTML file generation method provided in the embodiment of the present disclosure. For example, in some embodiments, the methods of generating an HTML file provided in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 2080. In some embodiments, some or all of the computer program may be loaded and/or installed onto the device 2000 via the ROM 2020 and/or the communication unit 2090. When a computer program is loaded into RAM 2030 and executed by computing unit 2010, one or more steps of the HTML file generation method provided in the embodiments of the disclosure may be performed. Alternatively, in other embodiments, the computing unit 2010 may be configured to perform the method of generating the HTML file in embodiments of the disclosure in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (11)

1. A method for generating an HTML file includes:
running a target program in a pre-built operating system;
after loading a view 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;
the view class called by the view object in the operating system is encapsulated with code for describing attribute information of the view object.
2. The method of claim 1, wherein the obtaining attribute information describing a view object in the view comprises:
writing attribute information for describing a view object in the view into a dump file through a dump thread, wherein the dump thread is started when the target program is started;
and acquiring the attribute information based on the dump file.
3. The method of claim 1, further comprising:
and generating an HTML file for showing the view based on the attribute information.
4. A method according to claim 3, wherein the generating an HTML file for presenting the view based on the attribute information comprises:
converting the view object into DOM nodes 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.
5. The method of any of claims 1-4, 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.
6. A method for generating an HTML file includes:
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 a target program in a pre-constructed operating system and loads the view by the target program, and a view class called by the view object in the operating system is packaged with codes for describing the attribute information of the view object;
and generating an HTML file for showing the view based on the attribute information.
7. The method of claim 6, wherein the generating an HTML file for exposing the view based on the attribute information comprises:
converting the view object into DOM nodes 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.
8. An HTML file generation device, comprising:
the program running module is used for running the target program in the pre-built operating system;
the attribute information acquisition module is used for acquiring attribute information for describing a view object in the view after the target program loads the view, and the attribute information is used for generating an HTML file for displaying the view;
the view class called by the view object in the operating system is encapsulated with code for describing attribute information of the view object.
9. An HTML file generation device, comprising:
the device comprises an attribute information receiving module, a view information processing module and a view information processing module, wherein the attribute information receiving module is used for receiving attribute information of a view object in a view for describing an application program, the attribute information is obtained after a sender runs a target program in a pre-built operating system and loads the view by the target program, and a view class called by the view object in the operating system is packaged with codes for describing the attribute information of the view object;
and the HTML file generation module is used for generating an HTML file for displaying the view based on the attribute information.
10. 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-7.
11. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202110742484.7A 2021-06-30 2021-06-30 HTML file generation method and device, electronic equipment and readable storage medium Active CN113361235B (en)

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 CN113361235A (en) 2021-09-07
CN113361235B true 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632869A (en) * 2017-09-15 2018-01-26 百富计算机技术(深圳)有限公司 A kind of method and apparatus of the user interface of loading POS applications
CN107633055A (en) * 2017-09-15 2018-01-26 国云科技股份有限公司 A kind of method by picture converting to HTML document
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632869A (en) * 2017-09-15 2018-01-26 百富计算机技术(深圳)有限公司 A kind of method and apparatus of the user interface of loading POS applications
CN107633055A (en) * 2017-09-15 2018-01-26 国云科技股份有限公司 A kind of method by picture converting to HTML document
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)

* Cited by examiner, † Cited by third party
Title
Android多媒体通信终端自动化测试工具设计与实现;郑宇;白凡凡;;电信快报(04);全文 *

Also Published As

Publication number Publication date
CN113361235A (en) 2021-09-07

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
CN113808231B (en) Information processing method and device, image rendering method and device, and electronic device
CN109582317B (en) Method and apparatus for debugging hosted applications
CN115309470B (en) Method, device, equipment and storage medium for loading widget
CN113392346B (en) Path processing method and device for resource file, electronic equipment and storage medium
CN115809056B (en) Component multiplexing implementation method and device, terminal equipment and readable storage medium
CN113361235B (en) HTML file generation method and device, electronic equipment and readable storage medium
CN114780196B (en) User interface form rendering method and device, electronic equipment and storage medium
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN113722037B (en) User interface refreshing method and device, electronic equipment and storage medium
US11544140B2 (en) Method and apparatus for generating error reporting content of deep learning framework
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
CN116431108B (en) Object type processing method and device, electronic 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
CN114791996B (en) Information processing method, device, system, electronic equipment and storage medium
CN113553489B (en) Method, device, equipment, medium and program product for capturing content
CN116048519A (en) Front-end business embedding method and device, electronic equipment and storage medium
CN116149962A (en) Plug-in application method, device, equipment and medium based on graph analysis engine
CN114911858A (en) Cloud platform interface generation method and device
CN114546966A (en) Animation file generation method and device, electronic equipment and storage medium
CN116341663A (en) Extension method, device, equipment and medium of deep learning reasoning framework
CN117971343A (en) Method and system for dynamically loading service components on line

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