File conversion method, device and related equipment

By automatically converting UI design files into application page files, the problems of errors from manual code input and difficulties in acceptance during development are solved, achieving efficient and accurate file conversion and supporting UI designer acceptance.

CN113448576BActive Publication Date: 2025-01-10北京新氧万维科技咨询有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011028703.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-27
Publication Date
2025-01-10
Estimated Expiration
2040-09-27

AI Technical Summary

Technical Problem

In existing technologies, the development process of an APP requires developers to manually input code, which is prone to errors and time-consuming and labor-intensive. It is also difficult for UI designers to accept the design, making it hard to ensure that the developed APP is consistent with the original UI design files.

Method used

A file conversion method and apparatus are provided, which can automatically convert UI design files into application page files or vice versa, realizing bidirectional conversion between UI design files and application page files, avoiding manual code input and ensuring conversion accuracy.

Benefits of technology

It enables automatic conversion of UI design files to application page files, saving time and effort, ensuring accurate conversion without errors, and facilitating UI designers' acceptance of the consistency between the developed APP and the original UI design files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448576B_ABST
    Figure CN113448576B_ABST
Patent Text Reader

Abstract

The present application is about a file conversion method, device and related equipment. The method includes: obtaining a first file to be converted; identifying the file type of the first file, determining a conversion method that matches the file type of the first file, the file type of the first file includes a user interface UI design file or an application page file; converting the first file using a conversion method that matches the file type of the first file to obtain a second file, the file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file. The solution provided by the present application can realize the free conversion of UI design files and application page files without errors, and saves time and effort.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology, and in particular to a file conversion method, device and related equipment. Background Art

[0002] In the related technology, the page development process of an application (APP) is generally as follows: 1. First, the UI designer uses drawing and design software to design the UI interface (User Interface) and outputs the UI design draft to the developer; 2. The developer opens the design draft to see the UI interface included in the design draft, and clicks on each control on the interface to view the parameters of the control; the developer manually writes the corresponding code based on the parameters of each control.

[0003] From the above development process, it can be seen that the development process requires developers to manually enter codes according to memory, which is time-consuming and labor-intensive. In addition, it is easy to have memory or input errors in the process, which may cause problems in the written code.

[0004] After the developer develops the APP, the developed APP must also be submitted to the UI designer for acceptance, such as whether the size of each control is consistent with the UI design file, whether the color of each control is consistent with the UI design file, and so on.

[0005] In related technologies, UI designers can only rely on experience to inspect and accept, but cannot check details such as specific control size, specific color value, etc., making it difficult to ensure that the developed APP is consistent with the original UI file. Summary of the invention

[0006] In order to overcome the problems existing in the related art, the present application provides a file conversion method, device and related equipment. The file conversion method, device and related equipment can realize the free conversion of UI design files and application page files without errors, saving time and effort.

[0007] The first aspect of the present application provides a file conversion method, comprising:

[0008] Obtaining a first file to be converted;

[0009] Identify a file type of a first file, and determine a conversion method that matches the file type of the first file, where the file type of the first file includes a user interface UI design file or an application page file;

[0010] The first file is converted using a conversion method that matches the file type of the first file to obtain a second file, where the file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file.

[0011] A second aspect of the present application provides a file conversion device, comprising:

[0012] An acquisition module, used for acquiring a first file to be converted;

[0013] an identification module, configured to identify a file type of a first file and determine a conversion method matching the file type of the first file; the file type of the first file includes a UI design file or an application page file;

[0014] A conversion module is used to convert the first file using a conversion method that matches the file type of the first file to obtain a second file; the file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file.

[0015] A third aspect of the present application provides an electronic device, including:

[0016] Processor; and

[0017] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0018] A fourth aspect of the present application provides a non-transitory machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.

[0019] The technical solution provided by the present application may include the following beneficial effects: the file conversion method, device and related equipment provided in this embodiment can automatically convert UI design files into application page files without the need for developers to manually enter codes, which saves time and effort and avoids errors; at the same time, application page files can also be converted into UI design files, which is convenient for UI designers to check whether the APP developed by developers is consistent with the original UI design files.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other objects, features and advantages of the present application will become more apparent through a more detailed description of exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0022] Figure 1 is a schematic diagram of a UI design file shown in an embodiment of the present application;

[0023] Figure 2 It is a schematic diagram of a UI design interface shown in an embodiment of the present application;

[0024] Figure 3 It is a flowchart of a file conversion method shown in an embodiment of the present application;

[0025] Figure 4 is another flowchart of the file conversion method shown in an embodiment of the present application;

[0026] Figure 5 is a schematic diagram of the structure of a file conversion device shown in an embodiment of the present application;

[0027] Figure 6 is a structural schematic diagram of an electronic device shown in an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of the attribute information of the UI interface shown in the embodiment of the present application;

[0029] Figure 8 It is a schematic diagram of the application code shown in the embodiment of the present application. DETAILED DESCRIPTION

[0030] The preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0031] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0032] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0033] In the related art, if a developer obtains a UI design file in the form of a web page, he can open Figure 1 The index.html file in the web page file shown above, the UI design file after opening is as follows Figure 2 As shown, one or more UI design interfaces ( Figure 2 There are 4 in the figure), click one of the controls on the current UI design interface ( Figure 2 The relevant properties of the control are displayed, so that the developer can see the relevant properties of the control and write them in the code accordingly. However, the above method is a test of the developer's memory, and manual code writing is prone to errors, which is time-consuming and laborious.

[0034] In the related technology, during the acceptance phase of the APP, the UI designer can only accept it based on experience, but cannot check the specific control size, specific color value and other details, making it difficult to ensure that the developed APP is consistent with the original UI file.

[0035] In response to the above problems, an embodiment of the present application provides a file conversion method that can automatically convert a UI design file into a corresponding application page file, or convert an application page file into a UI design file, to facilitate the development and acceptance of the APP.

[0036] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0037] Figure 3 It is a flowchart of the file conversion method shown in an embodiment of the present application.

[0038] See also Figure 3 , the file conversion method includes:

[0039] S301, obtaining a first file to be converted;

[0040] The first file may be any file to be converted.

[0041] S302, identifying the file type of the first file, and determining a conversion method matching the file type of the first file;

[0042] In this embodiment, the file type of the first file includes a UI design file or an application page file.

[0043] S303: convert the first file using a conversion method that matches the file type of the first file to obtain a second file;

[0044] The file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file;

[0045] That is, when the first file is a UI design file and the second file is an application page file, the file conversion method provided in this embodiment can convert the UI design file into an application page file; when the first file is an application page file and the second file is a UI design file, the file conversion method provided in this embodiment can also convert the application page file into an I design file.

[0046] Therefore, the file conversion method provided in this embodiment can automatically convert UI design files into application page files without the need for developers to manually enter code, which saves time and effort and will not cause errors; at the same time, the application page files can also be converted into UI design files, which is convenient for UI designers to check whether the APP developed by developers is consistent with the original UI design files.

[0047] Please refer to Figure 4 , Figure 4 is another flowchart of a file conversion method shown in an embodiment of the present application, the method comprising:

[0048] 401. Obtain a file conversion instruction, where the file conversion instruction is used to instruct to convert a first file at a target storage location into a second file.

[0049] S402: Obtain a first file to be converted.

[0050] S403, identifying the type of the first file, if the first file is a UI design file, executing S404, if the first file is an application page file, executing S407;

[0051] For example, the UI design file can be a file in the form of a web page, such as Figure 1 The web page file shown;

[0052] The UI design file includes at least one UI interface's attribute information.

[0053] S404, reading the UI design file (ie, the first file) to obtain attribute information of the at least one UI interface;

[0054] A UI design file may contain information of one or more UI interfaces. For one of the UI interfaces, the UI interface may include one or more controls, and each control has its corresponding attribute information;

[0055] The attribute information of the UI interface may include the attribute information of each control on the interface, and may also include the overall attribute information of the UI interface;

[0056] like Figure 7 As shown, after reading the UI design file, the attribute information of the UI interface is obtained. It should be noted that: Figure 7 The following example shows some of the attribute information of the UI interface. The attribute information of the UI interface is not limited to Figure 7 The content displayed.

[0057] S405, converting and generating application code in a target language format using the attribute information of the at least one UI interface;

[0058] For example, the attribute information of a predetermined attribute field may be extracted from the attribute information of the UI interface, and the attribute information of the predetermined attribute field may be used to convert and generate application code in a target language format;

[0059] The predetermined attribute fields may be some attribute fields in the UI interface attribute information, such as x (control x coordinate), y (control y coordinate), Width (control width), Height (control height), Rotation (rotation angle), Radius (radius), BordersFills (fill color), Shadows (shadows), Opacity (transparency), color-hex (background color) and other fields;

[0060] Preferably, if some attribute fields of the controls included in the UI design file may not be needed when converted into application code, only some attribute fields in the UI interface attribute information may be extracted to convert and generate application code in the target language format;

[0061] Preferably, before the above S405, the method may further include:

[0062] Obtaining the correspondence between each attribute field in the attribute information of the UI interface and each code field in the target language format; accordingly, the above S405 may include: using the above correspondence, converting the predetermined attribute field into a code field in the target language format to generate an application code in the target language format;

[0063] The attribute fields in the attribute information of the UI interface and the code fields in the target language format may have different field names, so the correspondence between the attribute fields and the code fields can be preset, and the correspondence can be used to achieve the conversion of the attribute fields to the code fields, for example, converting the x field in the UI interface to the code field layout_x, and converting the color-hex field in the UI interface to the code field background; it should be noted that the specific content and form of the above correspondence are related to the format of the UI design file and the target language format, and no specific restrictions are made here on the specific content and form of the above correspondence;

[0064] The application code in the target language format obtained by converting the attribute information of the UI interface is as follows Figure 8 shown.

[0065] S406, encapsulating the application code in the target language format to obtain an application page file (i.e., a second file); and ending the process;

[0066] For example, S406 may include:

[0067] S406A, packaging the target language format code into a software package in a second predetermined format;

[0068] For example, the target language format may be a Java language format, the second predetermined format may be a jar format, and the software package in the second predetermined format is a software package with a suffix of .jar;

[0069] S406B, expand the software package to obtain at least one application page file in a first predetermined format;

[0070] For example, the first predetermined format is an XML (Extensible Markup Language) format, and after the software package is expanded, one or more application page files with a suffix of .xml may be obtained;

[0071] When the first file is a UI design file, the attribute information of the UI design interface can be obtained by reading the UI design file, and then the UI design file can be converted into application code in the target language format. Compared with the solutions of the related technology, the file conversion method provided in this embodiment can realize the automatic conversion of UI design files to codes, without errors, and saving time and effort.

[0072] S407, reading the application page file (ie, the first file) to obtain the application code in the target language format;

[0073] Specifically, the application page file may be parsed to obtain the application code contained therein. The specific parsing method is related to the format of the application page file, and the relevant parsing method may adopt the parsing method in the prior art, which will not be described in detail here.

[0074] For example, the target language format may be a Java language format.

[0075] S408, acquiring the attribute information of the UI interface included in the application code from the application code;

[0076] The attribute information of the UI interface may be the attribute information of one or more UI interfaces;

[0077] In one embodiment, before S408, the method may further include: obtaining the correspondence between each attribute field in the attribute information of the above-mentioned UI interface and each code field in the above-mentioned target language format; accordingly, S408 may be specifically: using the above-mentioned correspondence, converting the code field in the target language format into corresponding attribute fields; wherein the attribute field may include the overall attribute field of the UI interface, and may also include the attribute field of each control in the UI interface.

[0078] S409, generating a UI design file (i.e., a second file) using the attribute information of the UI interface;

[0079] The UI design file may include one or more UI interfaces, and each UI interface may include multiple controls.

[0080] In this embodiment, when the target storage location contains a UI design file, the UI design file is converted into an application page file. If the target storage location does not contain a UI design file but contains an application page file, the application page file can also be converted into a UI design file, thereby realizing two-way conversion of UI design files and application page files. This is convenient for developers to develop applications and for UI designers to verify whether the application page files are consistent with the UI design files.

[0081] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a file conversion device, an electronic device and corresponding embodiments.

[0082] Figure 5 It is a structural schematic diagram of a file conversion device 500 shown in an embodiment of the present application.

[0083] See also Figure 5 , the file conversion device 500 comprises:

[0084] An acquisition module 510 is used to acquire a first file to be converted;

[0085] The identification module 520 is used to identify the file type of the first file and determine a conversion method that matches the file type of the first file; the file type of the first file includes a user interface UI design file or an application page file;

[0086] The conversion module 530 is used to convert the first file using a conversion method that matches the file type of the first file to obtain a second file;

[0087] The file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file;

[0088] That is, when the first file is a UI design file and the second file is an application page file, the file conversion method provided in this embodiment can convert the UI design file into an application page file; when the first file is an application page file and the second file is a UI design file, the file conversion method provided in this embodiment can convert the application page file into a UI design file.

[0089] The file conversion device provided in this embodiment can automatically convert UI design files into application page files without the need for developers to manually enter code, which saves time and effort and does not cause errors; it can also convert application page files into UI design files, making it easier for UI designers to check whether the APP developed by developers is consistent with the original UI design files.

[0090] Preferably, the acquisition module 510 may also be used to acquire a file conversion instruction, and the file conversion instruction may be used to instruct to convert a first file at a target storage location into a second file.

[0091] In one implementation, when the identification module 520 identifies that the first file is a UI design file, the conversion module 530 may include:

[0092] A first reading submodule is used to read the UI design file and obtain the attribute information of the at least one UI interface;

[0093] A conversion submodule, used to convert and generate application code in a target language format using the attribute information of the at least one UI interface;

[0094] The encapsulation submodule is used to encapsulate the application code in the target language format to obtain the application page file.

[0095] Preferably, the acquisition module 510 is also used to obtain the correspondence between each attribute field in the attribute information of the above-mentioned UI interface and each code field in the target language format; the conversion submodule is specifically used to use the above-mentioned correspondence to convert the predetermined attribute field into the code field in the target language format to generate the application code in the target language format.

[0096] For example, the encapsulation submodule may specifically include:

[0097] A packaging unit, used for packaging the code in the target language format into a software package in a second predetermined format;

[0098] The expansion unit is used to expand the software package to obtain at least one application page file in a first predetermined format.

[0099] When the first file is a UI design file, the attribute information of the UI design interface can be obtained by reading the UI design file, and then the UI design file can be converted into application code in the target language format. Compared with the solutions of the related technology, the file conversion device provided in this embodiment can realize the automatic conversion of UI design files to codes, without errors, and saving time and effort.

[0100] In another embodiment, when the identification module 520 identifies that the first file is an application page file, the conversion module 530 may include:

[0101] The second reading submodule is used to read the application page file (i.e., the first file) to obtain the application code in the target language format;

[0102] An acquisition submodule, used to acquire the attribute information of the UI interface included in the above application code from the above application code;

[0103] The generation submodule is used to generate a UI design file (ie, a second file) using the attribute information of the above-mentioned UI interface.

[0104] In this embodiment, when the target storage location contains a UI design file, the UI design file is converted into an application page file. If the target storage location does not contain a UI design file but contains an application page file, the application page file can also be converted into a UI design file, thereby realizing two-way conversion of UI design files and application page files. This is convenient for developers to develop applications and for UI designers to verify whether the application page files are consistent with the UI design files.

[0105] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0106] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0107] See also Figure 6 , the electronic device 600 includes a memory 610 and a processor 620 .

[0108] The processor 620 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0109] The memory 610 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 620 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at runtime. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 610 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0110] The memory 610 stores executable codes, and when the executable codes are processed by the processor 620 , the processor 620 can execute part or all of the above-mentioned methods.

[0111] The scheme of the present application has been described in detail above with reference to the accompanying drawings. In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, refer to the relevant description of other embodiments. Those skilled in the art should also know that the actions and modules involved in the description are not necessarily required for the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application can be adjusted in order, merged and deleted according to actual needs, and the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0112] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0113] Alternatively, the present application can also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or electronic device, server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0114] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or combinations of both.

[0115] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, a program segment or a code, and the part of the module, the program segment or the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or the flow chart, and the combination of the square boxes in the block diagram and / or the flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A file conversion method, characterized in that: The method comprises: Obtaining a first file to be converted; Identify a file type of a first file, and determine a conversion method that matches the file type of the first file, where the file type of the first file includes a user interface UI design file or an application page file; Converting the first file by using a conversion method that matches the file type of the first file to obtain a second file, where the file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file; The file type of the first file is a UI design file, and the UI design file includes attribute information of at least one UI interface; the converting the first file using a conversion method matching the file type of the first file to obtain the second file includes: reading the UI design file to obtain the attribute information of the at least one UI interface; converting and generating application code in a target language format using the attribute information of the at least one UI interface; encapsulating the application code in the target language format to obtain the second file, and the file type of the second file is an application page file; The file type of the first file is an application page file; the first file is converted using a conversion method that matches the file type of the first file to obtain a second file, including: reading the application page file to obtain the application code in the target language format; obtaining attribute information of the UI interface included in the application code from the application code; and generating a UI design file using the attribute information of the UI interface.

2. The method according to claim 1, characterized in that: The converting and generating application code in a target language format by using the attribute information of the at least one UI interface includes: Extracting attribute information of a predetermined attribute field from the attribute information of the at least one UI interface; The attribute information of the predetermined attribute field is used to convert and generate application code in a target language format.

3. The method according to claim 1, characterized in that Before the conversion generates the application code in the target language format, the method further includes: obtaining the correspondence between each attribute field in the attribute information of the UI interface and each code field in the target language format; the conversion generates the application code in the target language format by using the attribute information of the at least one UI interface includes: By using the corresponding relationship, the predetermined attribute field is converted into a code field in the target language format to generate application code in the target language format.

4. The method according to claim 1, characterized in that The step of encapsulating the application code in the target language format to obtain the second file comprises: The application code in the target language format is packaged into a software package in a first predetermined format; and the software package is expanded to obtain at least one application page file in a second predetermined format.

5. The method according to claim 1, characterized in that Before generating a UI design file using the attribute information of the UI interface, the method further includes: obtaining a correspondence between each attribute field in the attribute information of the UI interface and each code field in the target language format; obtaining the attribute information of the UI interface included in the application code from the application code includes: using the correspondence, converting the code fields in the target language format into corresponding attribute fields, and obtaining the attribute information of the UI interface included in the application code.

6. The method according to any one of claims 1 to 5, characterized in that: Before obtaining the first file to be converted, the method further includes: A file conversion instruction is obtained, where the file conversion instruction is used to instruct to convert a first file at a target storage location into a second file.

7. A file conversion device, characterized in that: include: An acquisition module, used for acquiring a first file to be converted; an identification module, configured to identify a file type of a first file and determine a conversion method matching the file type of the first file; the file type of the first file includes a UI design file or an application page file; a conversion module, configured to convert the first file by using a conversion method matching a file type of the first file to obtain a second file; the file type of the second file includes an application page file or a UI design file, and the file type of the second file is different from the file type of the first file; The file type of the first file is a UI design file, and the UI design file includes at least one UI interface; The conversion module comprises: A first reading submodule, configured to read the UI design file to obtain attribute information of the at least one UI interface; A conversion submodule, used to convert and generate application code in a target language format using the attribute information of the at least one UI interface; A packaging submodule, used for packaging the application code in the target language format to obtain the second file, wherein the file type of the second file is an application page file; The file type of the first file is an application page file; the conversion module includes: A second reading submodule is used to read the application page file and obtain the application code in the target language format; An acquisition submodule, used to acquire the attribute information of the UI interface included in the application code from the application code; The generation submodule is used to generate a UI design file using the attribute information of the UI interface.

Citation Information

Patent Citations

  • Code file generation method and device, computing apparatus, and storage medium

    CN109189383A

  • Interface processing method and device and terminal

    CN110069257A