An information compiling method, device and equipment and computer readable storage medium

By analyzing local compilation controls and code dependencies, only code files related to the page to be compiled are compiled, which solves the problem of low compilation efficiency in existing technologies and improves compilation efficiency and resource utilization.

CN115407977BActive Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-05-28
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing application development tools require compiling all code files in the project when compiling a specified page, resulting in low compilation efficiency.

Method used

By presenting a partial compilation control, the page node to be compiled is obtained, and the code node to be compiled is obtained based on the code dependency relationship. Only the relevant code files are compiled, thus achieving partial compilation.

Benefits of technology

It improves information compilation efficiency, reduces compilation time and resource consumption, and reduces the amount of code packages uploaded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115407977B_ABST
    Figure CN115407977B_ABST
Patent Text Reader

Abstract

The application provides an information compiling method and device, equipment and a computer readable storage medium. The method comprises: presenting a local compiling control, wherein the local compiling control is used to set a page node to be locally compiled; in response to a local compiling operation acting on the local compiling control, obtaining a to-be-compiled page node; obtaining a to-be-compiled code node corresponding to the to-be-compiled page node from a code dependency relationship, wherein the code dependency relationship is a hierarchical relationship between code file corresponding nodes constructed based on a dependency relationship between code files; compiling a to-be-compiled code file corresponding to the to-be-compiled code node to obtain compiled code; and presenting a to-be-viewed page corresponding to the to-be-compiled page node based on the compiled code. Through the application, the efficiency of information compiling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to information processing technology in the field of computer applications, and more particularly to an information compilation method, apparatus, device and computer-readable storage medium. Background Technology

[0002] Application development tools (IDEs) are tools used to develop and debug applications. During development and debugging, IDEs compile code files and use the compiled information to develop and debug specific pages, thereby improving development and debugging efficiency. However, when using IDEs to perform compilation, they typically compile all code files in the project containing the specified page, resulting in low compilation efficiency. Summary of the Invention

[0003] This application provides an information compilation method, apparatus, device, and computer-readable storage medium, which can improve the efficiency of information compilation.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides an information compilation method, including:

[0006] A partial compilation control is presented, wherein the partial compilation control is used to set the page node to be partially compiled;

[0007] In response to a local compilation operation performed on the local compilation control, obtain the page node to be compiled;

[0008] From the code dependency relationship, obtain the code node to be compiled corresponding to the page node to be compiled, wherein the code dependency relationship is a hierarchical relationship between corresponding nodes of code files constructed based on the dependency relationship between code files;

[0009] Compile the code file corresponding to the code node to be compiled to obtain the compiled code;

[0010] Based on the compiled code, the page to be viewed corresponding to the page node to be compiled is presented.

[0011] This application provides an information compilation apparatus, including:

[0012] The control rendering module is used to render partial compilation controls, wherein the partial compilation controls are used to set the page nodes to be partially compiled;

[0013] The node acquisition module is used to acquire the page node to be compiled in response to the local compilation operation performed on the local compilation control.

[0014] The node determination module is used to obtain the code node to be compiled corresponding to the page node to be compiled from the code dependency relationship, wherein the code dependency relationship is a hierarchical relationship between corresponding nodes of code files constructed based on the dependency relationship between code files;

[0015] The code compilation module is used to compile the code file corresponding to the code node to be compiled, and obtain the compiled code;

[0016] The page presentation module is used to present the page to be viewed corresponding to the page node to be compiled, based on the compiled code.

[0017] In this embodiment, the information compilation device further includes a relationship construction module, used to obtain an application configuration file from an application code file, wherein the application code file is all the code files of the application to be developed; obtain a first code file with the same name as the application configuration file from the application code file, and read the application configuration file to obtain a page configuration file; obtain a second code file with the same name as the page configuration file from the application code file, and obtain the dependent code files corresponding to the code reference information in the second code file; determine page nodes based on the name of the page configuration file, and determine the nodes corresponding to the second code file and the dependent code files as descendant nodes of the page nodes; determine application nodes based on the name of the application configuration file, and determine the nodes corresponding to the first code file and the page nodes as descendant nodes of the application nodes, wherein the code dependency relationship is a hierarchical relationship between the application node, the node corresponding to the first code file, the page node, the node corresponding to the second code file, and the node corresponding to the dependent code files.

[0018] In this embodiment of the application, the node determination module is further configured to: determine the target page node corresponding to the page node to be compiled from the code dependency relationship; obtain the descendant nodes of the target page node from the code dependency relationship; obtain the parent node of the target page node to obtain the application node; and obtain the non-page node referenced by the application node from the code dependency relationship to obtain the node corresponding to the first code file with the same name; and determine the descendant node of the target page node and the node corresponding to the first code file with the same name as the code node to be compiled.

[0019] In this embodiment of the application, the control presentation module is further configured to present a local compilation switch control, wherein the local compilation switch control is used to set the compilation mode of the code file; in response to a local compilation enable operation performed on the local compilation switch control, the local compilation control is presented.

[0020] In this embodiment of the application, the control presentation module is further configured to, in response to a local compilation shutdown operation applied to the local compilation switch control, hide the local compilation control and compile the application code file; and present the page to be viewed based on the compiled application code file.

[0021] In this embodiment of the application, the code compilation module is further configured to compile the application code file when the local compilation control based on the presentation does not obtain the page node to be compiled, and to present the page to be viewed based on the compiled application code file.

[0022] In this embodiment, the node acquisition module is further configured to: acquire a main page node to be compiled in response to a main node input operation applied to the main node input control; present an associated node input control to be compiled in response to a node addition operation applied to the node addition control; obtain an associated page node to be compiled in response to an associated node input operation applied to the associated node input control; wherein the local compilation control includes the main node input control to be compiled and the node addition control, and the local compilation operation includes the main node input operation to be compiled and the node addition operation; and determine the main page node to be compiled and the associated page node to be compiled as the node to be compiled.

[0023] In this embodiment of the application, the information compilation device further includes an information prompting module, which is used to present local compilation prompting information when compiling based on the page node to be compiled, wherein the local compilation prompting information includes at least one of local compilation title prompting information and local compilation status prompting information.

[0024] In this embodiment of the application, the information compilation device further includes a code packaging module for presenting a packaging control, wherein the packaging control is a preview control or a real device debugging control; in response to a packaging operation performed on the packaging control, the compiled code is packaged to obtain a code package; the size information of the code package is presented, and the code package is sent to the service device to preview or debug the code file to be compiled.

[0025] In this embodiment of the application, the page to be viewed is a subroutine page.

[0026] This application provides an information compilation device, including:

[0027] Memory, used to store executable instructions;

[0028] The processor, when executing executable instructions stored in the memory, implements the information compilation method provided in the embodiments of this application.

[0029] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the information compilation method provided in this application.

[0030] The embodiments of this application have at least the following beneficial effects: by pre-analyzing the dependencies between code files, code dependencies are constructed so that when the page to be viewed is presented, only the code files (code files to be compiled) involved in the page to be viewed obtained based on the code dependencies are compiled, and the number of code files to be compiled is small; therefore, the efficiency of information compilation can be improved. Attached Figure Description

[0031] Figure 1a This is an optional architecture diagram of the information compilation system provided in the embodiments of this application;

[0032] Figure 1b This is another optional architecture diagram of the information compilation system provided in the embodiments of this application;

[0033] Figure 2 This is a schematic diagram of the composition structure of an information compilation device provided in an embodiment of this application;

[0034] Figure 3 This is an optional flowchart illustrating the information compilation method provided in the embodiments of this application;

[0035] Figure 4 This is an exemplary schematic diagram of presenting a page to be viewed, provided in an embodiment of this application;

[0036] Figure 5 This is another optional flowchart illustrating the information compilation method provided in the embodiments of this application;

[0037] Figure 6 This is a schematic diagram illustrating an exemplary code file target structure provided in an embodiment of this application;

[0038] Figure 7 This is a schematic diagram illustrating an exemplary information compilation process provided in an embodiment of this application;

[0039] Figure 8 This is another exemplary code file directory structure diagram provided in the embodiments of this application;

[0040] Figure 9 This application provides a method related to... Figure 8 The corresponding code dependency diagram;

[0041] Figure 10 This is a schematic diagram illustrating an exemplary local compilation setting provided in an embodiment of this application;

[0042] Figure 11 This is an exemplary embodiment provided in this application. Figure 9 A diagram illustrating the process of determining page nodes for partial compilation;

[0043] Figure 12 This is an exemplary embodiment provided in this application. Figure 9 A diagram illustrating the identification of code nodes to be compiled;

[0044] Figure 13 This is a schematic diagram of an exemplary code file to be compiled, provided in an embodiment of this application.

[0045] Figure 14 This is an exemplary schematic diagram illustrating the presentation of partial compilation prompts provided in an embodiment of this application;

[0046] Figure 15 This is a schematic diagram illustrating the presentation of code package size information, as provided in an embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0049] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0051] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0052] 1) Code file: A type of information that achieves corresponding functions through compilation, such as files in the formats of "json", "wxml", "wxs", "wxss" and "js". Code files are usually composed of code. During compilation, the code in the code file is compiled. The code is the source file written by the programmer using a language supported by the development tool. It is a set of clear rules that represent information in discrete form using characters, symbols or signal code elements.

[0053] 2) Compilation is the process of translating code in a code file, designed in one programming language, into another language (e.g., a computer-readable language).

[0054] 3) Preview: Upload the code files corresponding to the project to the application platform. Developers can view the project's running effect by accessing the application platform. Here, a project refers to a functional application, such as a sub-program application (e.g., a mini-program application), an application program (APP), a website, etc.

[0055] 4) Mini Program, also known as a mini application, is an application that can be used without downloading and installing. Typically, in order to provide users with more diversified business services, developers can develop corresponding mini programs for terminal applications (such as instant messaging applications, shopping applications, email applications, etc.). The mini program can be embedded as a sub-application into the terminal application. By running the sub-application (i.e. the corresponding mini program) within the application, the corresponding business services can be provided to the user.

[0056] 5) Real device debugging: Based on the preview, remotely debug the project running on the application platform.

[0057] 6) A control is a triggerable piece of information displayed in the form of a button, icon, link, text, selection box, input box, tab, etc. The triggering method can be contact triggering, non-contact triggering, or instruction-based triggering, etc. In addition, the various controls in the embodiments of this application can be a single control or a collective term for multiple controls.

[0058] 7) An operation is a way to trigger a device to perform processing, such as a click operation, a double-click operation, a long press operation, a swipe operation, a gesture operation, a received trigger command, etc. In addition, the various operations in the embodiments of this application can be a single operation or a collective term for multiple operations; and the various operations in the embodiments of this application can be touch operations or non-touch operations.

[0059] 8) In response to, used to indicate the conditions or states on which the performed processing depends, one or more operations may be performed in real time or with a set delay when the conditions or states on which they depend are met; unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0060] Generally, to compile code files, application development tools typically compile all code files within the project containing the specified page. For example, during the development phase of a subprogram application, when developers are previewing a small subset of pages under development, the application development tool loads all code files in the project (i.e., all pages) for compilation, which is time-consuming. Similarly, during the preview and real-device testing phases of a subprogram application, for the pages to be previewed and tested on a real device, the application development tool loads all code files in the project, compiles and packages them for uploading to the subprogram application backend (application platform). This compilation is time-consuming, and the uploaded code package is also large, resulting in a lengthy upload process.

[0061] Based on this, embodiments of this application provide an information compilation method, apparatus, device, and computer-readable storage medium, which can improve information compilation efficiency, reduce information compilation resource consumption, reduce the upload volume of code packages, and improve the upload efficiency of code packages. The exemplary applications of the information compilation device provided in this application embodiment are described below. The information compilation device provided in this application embodiment can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server, or as both a terminal and a server. The exemplary applications of the information compilation device when implemented as a terminal and a server will be described below.

[0062] See Figure 1a , Figure 1a This is an optional architecture diagram of the information compilation system provided in the embodiments of this application; such as Figure 1a As shown, to support an information compilation application, in the information compilation system 100, terminal 400 connects to server 200 via network 300 (terminal 400 and server 200 together constitute the information compilation device in this embodiment). Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. Additionally, the information compilation system 100 also includes a database 500, used to send code dependencies and code files to be compiled to server 200.

[0063] Terminal 400 is used to present a partial compilation control, wherein the partial compilation control is used to set the page node to be partially compiled; in response to the partial compilation operation applied to the partial compilation control, it obtains the page node to be compiled (e.g., "pages / index") and sends the page node to be compiled to server 200 via network 300; it is also used to receive the page to be viewed sent by server 200 via network 300 and present the page to be viewed corresponding to the page node to be compiled.

[0064] Server 200 is used to receive page nodes to be compiled sent by terminal 400 via network 300, obtain the code nodes to be compiled corresponding to the page nodes to be compiled from the code dependency relationship, wherein the code dependency relationship is a hierarchical relationship between corresponding nodes of code files constructed based on the dependency relationship between code files; locally compile the code files to be compiled corresponding to the code nodes to be compiled to obtain compiled code; and based on the compiled code, send the page to be viewed to terminal 400 via network 300.

[0065] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0066] See Figure 1b , Figure 1b This is another optional architecture diagram of the information compilation system provided in the embodiments of this application; such as Figure 1b As shown, based on Figure 1a During preview or real device debugging, server 400 is also used to package the compiled code; thus, the information compilation system 100 also includes server 600 (service device) and terminal 700. Server 600 obtains the code package sent by server 200 through network 300 and sends data for presenting the page to be viewed to terminal 700 through network 300, so that terminal 700 can present the page to be viewed.

[0067] See Figure 2 , Figure 2 This is a schematic diagram of the composition structure of an information compilation device provided in an embodiment of this application; Figure 2The information compilation device 2-1 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the information compilation device 2-1 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 440.

[0068] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0069] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0070] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0071] Memory 450 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0072] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0073] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0074] The network communication module 452 is used to reach other computer devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0075] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices, displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0076] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0077] In some embodiments, the information compilation apparatus provided in this application can be implemented in software. Figure 2 An information compilation device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a control rendering module 4551, a node acquisition module 4552, a node determination module 4553, a code compilation module 4554, a page rendering module 4555, a relationship construction module 4556, an information prompting module 4557, and a code packaging module 4558. These modules are logically connected and can therefore be arbitrarily combined or further split according to their implemented functions. The functions of each module will be described below.

[0078] In other embodiments, the information compilation apparatus provided in this application can be implemented in hardware. As an example, the information compilation apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the information compilation method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0079] The information compilation method provided in this application will now be described in conjunction with exemplary applications and implementations provided in the embodiments of this application.

[0080] See Figure 3 , Figure 3 This is an optional flowchart illustrating the information compilation method provided in the embodiments of this application; it will be combined with Figure 3 The steps shown are explained.

[0081] S301, Presents partial compilation controls.

[0082] In this embodiment of the application, when the information compilation device runs the application development tool and starts the partial compilation process, it obtains the page node to be partially compiled by presenting the partial compilation control; that is, the partial compilation control is used to set the page node to be partially compiled. Here, the page is used as a node, and the page and the page node correspond.

[0083] It should be noted that the partial compilation control can be displayed on the page or pop-up window used for setting compilation information, or on the page used for compiling code files, etc. This application embodiment does not specifically limit the presentation form of the partial compilation control. The partial compilation control can also correspond to prompt information, such as "When developing and previewing locally, only compile the following pages:", or "Please enter the page to be partially compiled", etc. Here, the partial compilation control can be an input box, a selection box, a list of selectable pages, etc. This application embodiment does not specifically limit the control form of the partial compilation control.

[0084] S302. In response to a local compilation operation performed on a local compilation control, obtain the page node to be compiled.

[0085] In this embodiment of the application, when a user specifies a page to be partially edited through a partial compilation control, the information compilation device obtains a partial compilation operation applied to the partial compilation control. At this time, in response to the partial compilation operation, the information compilation device can obtain the page node corresponding to the input page to be partially compiled, which is the page node to be compiled.

[0086] It should be noted that the partial compilation operation is an operation that triggers the partial compilation control to determine the page node to be partially compiled. Thus, the information compilation device can obtain the page node to be partially compiled, i.e., the page node to be compiled, by responding to this partial compilation operation. Here, the page node to be compiled includes at least one page node, such as at least one of the page nodes "pages / index", "pages / logs", and "pages / details".

[0087] S303. Obtain the code node to be compiled corresponding to the page node to be compiled from the code dependency relationship.

[0088] In this embodiment, the information compilation device can obtain code dependencies, which are hierarchical relationships between corresponding nodes of code files constructed based on dependencies between code files. Therefore, after obtaining the page node to be compiled, the information compilation device can determine the node of the code file associated with the page node to be compiled within the code dependencies. This node of the code file associated with the page node to be compiled is the code node to be compiled. Here, code files are treated as nodes, and code files correspond to code nodes.

[0089] It should be noted that the code dependency relationship can include page nodes and code nodes, page nodes are associated with code nodes, and there are dependencies between code nodes. It can also include application-level code nodes under the functional application to be developed. Therefore, the code node to be compiled can include the code node associated with the page node to be compiled, the code node that the code node associated with the page node to be compiled depends on, and the application-level code node under the functional application to be developed. This application embodiment does not specifically limit this.

[0090] For example, when the page node to be compiled is the page node "pages / index", the code nodes to be compiled include the application-level code nodes "app.js", "app.json" and "app.wxss", and the code nodes "index.js", "index.json", "index.wxml" and "index.wxss" associated with the page node to be compiled.

[0091] S304. Compile the code file corresponding to the code node to be compiled to obtain the compiled code.

[0092] In this embodiment, since the code node to be compiled includes at least one code node, and one code node corresponds to one code file, the information compilation device can obtain at least one code file corresponding to the code node to be compiled, which is the code file to be compiled. Here, the information compilation device compiles the code file to be compiled, and the obtained compilation result is the compiled code; that is, the compiled code is the compiled code file to be compiled. In addition, the information compilation device can compile the code file to be compiled using the compilation module in the application development tool.

[0093] S305. Based on the compiled code, present the page to be viewed corresponding to the page node to be compiled.

[0094] In this embodiment, the information compilation device presents a page in response to instructions to compile code. The page presented in response to these instructions is the page to be viewed corresponding to the page node to be compiled. The page to be viewed can be a page under development, a page in the preview stage, a page in the real device debugging stage, etc., and this embodiment does not specifically limit its scope.

[0095] For example, see Figure 4 , Figure 4 This is an exemplary schematic diagram of presenting a page to be viewed, provided in an embodiment of this application; as shown... Figure 4 As shown, page 4-1 displays a partial compilation control 4-11 and a prompt message 4-12; page 4-2 displays a partial compilation control 4-21 and a prompt message 4-22; and page 4-3 displays a partial compilation control 4-31 and a prompt message 4-32. By selecting the page node "pages / detail" to be compiled in the partial compilation control 4-11, by entering the page node "pages / detail" in the partial compilation control 4-21, or by selecting the page node "pages / detail" on the partial compilation control 4-31, the page to be viewed, 4-4, can be displayed.

[0096] Understandably, by analyzing the dependencies between code files and identifying the currently developing page (corresponding to the page to be compiled stage), the relevant code files (code files to be compiled) are determined. This reduces the number of code files during compilation, increases compilation speed, reduces compilation time, and improves the smoothness of compilation, thereby improving the development efficiency of functional applications.

[0097] See Figure 5 , Figure 5 This is another optional flowchart illustrating the information compilation method provided in the embodiments of this application; such as Figure 5 As shown in the embodiment of this application, S306 to S310 are included before S303; that is, before the information compilation device obtains the code node to be compiled corresponding to the page node to be compiled from the code dependency relationship, the information compilation method further includes S306 to S310. Each step is described below.

[0098] S306. Obtain the application configuration file from the application code file.

[0099] It should be noted that the application code file refers to all the code files of the application to be developed, including the code files corresponding to the application-level configuration information of the application to be developed; among them, the code files corresponding to the application-level configuration information of the application to be developed are the application configuration files, such as the "app.json" code file.

[0100] In this embodiment of the application, the information compilation device can also obtain the application configuration file based on the target structure information of the code file; wherein, the target structure information of the code file refers to the target structure corresponding to the code file of the application to be developed; the target structure information of the code file includes the configuration file identifier of the application to be developed, and the corresponding code file is obtained based on the configuration file identifier, and the code file corresponding to the obtained configuration file identifier is the application configuration file.

[0101] For example, see Figure 6 , Figure 6 This is a schematic diagram illustrating an exemplary code file target structure provided in an embodiment of this application; as shown below. Figure 6 As shown in Figure 6-1, the directory structure information of the code files is the directory structure of the code files of a subroutine application containing two pages (the home page "index" and the logs page "logs"). The first-level directory includes the names of the code files corresponding to the non-pages of the subroutine application: "app.js", "app.json", "app.wxss", "project.config.json", "sitemap.json", ..., where "app.json" (configuration file identifier) ​​corresponds to the application configuration file.

[0102] S307. Obtain the first code file with the same name as the application configuration file from the application code file, and read the application configuration file to obtain the page configuration file.

[0103] It should be noted that the application configuration file name includes both the file name and the code type. For example, in "app.json", "app" is the file name, and ".json" is the code type. Here, the information compilation device reads the application code file based on the file name of the application configuration file, identifies the code file with the same name as the application configuration file, and designates the identified code file with the same name as the first code file with the same name; for example, the code files "app.js" and "app.wxss" with the same name as "app" in "app.json".

[0104] In this embodiment, the information compilation device can also obtain a first code file with the same name through the code file target structure information. Here, the information compilation device obtains the code file corresponding to the identifier other than the identifier of the page-associated code file under the target level where the configuration file identifier is located from the code file target structure information, and determines the code file corresponding to the identifier other than the identifier of the page-associated code file under the target level where the configuration file identifier is located as the first code file with the same name. The application code file corresponds to the code file target structure information.

[0105] For example, see [link to previous article] Figure 6 The identifiers for the configuration files at the target level, excluding the identifiers for the page-related code files, are: "app.js", "app.json", "app.wxss", "project.config.json", and "sitemap.json".

[0106] In this embodiment of the application, the application configuration file includes information related to the configuration files of the pages of the application to be developed. Here, the information compilation device reads the information related to the configuration files of the pages of the application to be developed in the application configuration file, and obtains the corresponding code file based on the read information related to the configuration files of the pages of the application to be developed, thus obtaining the page configuration file.

[0107] S308. Obtain a second code file with the same name as the page configuration file from the application code file, and obtain the dependent code file corresponding to the code reference information in the second code file.

[0108] It should be noted that the name of the page configuration file includes both the file name and the code type. Here, the information compilation device reads the application code file based on the file name of the page configuration file, identifies the code file with the same name as the page configuration file, and designates the identified code file with the same name as the second code file with the same name. For example, the code files corresponding to "index.js", "index.wxml", and "index.wxss" with the same name as "index" in "index.json"; and the code files corresponding to "logs.js", "logs.wxml", and "logs.wxss" with the same name as "logs" in "logs.json".

[0109] In this embodiment of the application, the information compilation device reads the second code file with the same name. If code reference information is obtained, the referenced code file is determined based on the name of the code file referenced in the code reference information. The referenced code file is the dependent code file. For example, the code file referenced by the code file "logs.js" (the second code file with the same name) is "util.js" under the path "util".

[0110] S309. Determine the page node based on the name of the page configuration file, and determine the node corresponding to the second code file with the same name and the node corresponding to the dependent code file as the descendant node of the page node.

[0111] In this embodiment, a page node can be the file name in the page configuration file name, the page configuration file name itself, or a combination of the file name and path in the page configuration file name, etc. This embodiment does not specifically limit this. The path of the page configuration file can be determined based on the code file directory structure information. For example, when the page configuration file is the code file corresponding to "index.json", the corresponding page node can be "pages / index"; similarly, when the page configuration file is the code file corresponding to "logs.json", the corresponding page node can be "pages / logs". Here, the node corresponding to the second code file with the same name can be the name of the second code file with the same name, and the node corresponding to the dependent code file can be a combination of the dependent code file name and path, where the path of the dependent code file can be determined based on the code file directory structure information.

[0112] It should be noted that the nodes corresponding to the second code file with the same name and the nodes corresponding to the dependent code files are both descendant nodes of the page nodes. Specifically, the nodes corresponding to the dependent code files are descendant nodes of the nodes corresponding to the second code file with the same name.

[0113] S310. Determine the application node based on the name of the application configuration file, and determine the node corresponding to the first code file with the same name and the page node as the descendant nodes of the application node. The code dependency relationship is the hierarchical relationship between the application node, the node corresponding to the first code file with the same name, the page node, the node corresponding to the second code file with the same name, and the node corresponding to the dependent code file.

[0114] In this embodiment, the application node can be a file name in the application configuration file name, the application configuration file name itself, or a combination of the file name and path in the application configuration file name, etc. This embodiment does not specifically limit this. The path of the application configuration file can be determined based on the code file directory structure information. For example, when the application configuration file is the code file corresponding to "app.json", the corresponding application node can be "app". Here, the node corresponding to the first code file with the same name can be the name of the first code file with the same name.

[0115] It should be noted that the hierarchical relationship between nodes, i.e. the code dependency relationship, is as follows: the node corresponding to the first code file with the same name and the page node are both descendant nodes of the application node; the node corresponding to the second code file with the same name is a descendant node of the page node; and the node corresponding to the dependent code file is a descendant node of the node corresponding to the second code file with the same name.

[0116] Understandably, by analyzing the dependencies between code files in advance and constructing code dependency relationships, data support is provided for the partial compilation of code files.

[0117] In this embodiment, S303 can be implemented through S3031 to S3034; that is, the information compilation device obtains the code node to be compiled corresponding to the page node to be compiled from the code dependency relationship, including S3031 to S3034. Each step is described below.

[0118] S3031. Determine the target page node corresponding to the page node to be compiled from the code dependency relationship.

[0119] In the embodiments of this application, when the information compilation device determines the code node to be compiled from the code dependency relationship based on the page node to be compiled, it first locates the page node corresponding to the page node to be compiled in the code dependency relationship. The located page node corresponding to the page node to be compiled is the target page node.

[0120] S3032. Obtain the descendant nodes of the target page node from the code dependency relationship.

[0121] S3033. Obtain the parent node of the target page node, get the application node, and obtain the non-page node referenced by the application node from the code dependency relationship, and get the node corresponding to the first code file with the same name.

[0122] In this embodiment, on the one hand, the information compilation device obtains the descendant nodes of the target page node from the code dependency relationship; on the other hand, the information compilation device also obtains the non-page node referenced by the application node from the code dependency relationship, and the non-page node referenced by the application node is the node corresponding to the first code file with the same name.

[0123] S3034. Determine the descendant nodes of the target page node and the node corresponding to the first code file with the same name as the code node to be compiled.

[0124] It should be noted that the code nodes to be compiled include the descendant nodes of the target page node and the node corresponding to the first code file with the same name. The descendant nodes of the target page node include the node corresponding to the second code file with the same name, or the descendant nodes of the target page node include the node corresponding to the second code file with the same name and the node corresponding to the dependent code file.

[0125] In this embodiment, S301 can be implemented through S3011 and S3012; that is, the information compilation device presents local compilation controls, including S3011 and S3012. The steps are described below.

[0126] S3011, Presents the partial compilation switch control.

[0127] It should be noted that when the information compilation device runs the application development tool, it can first present a control for setting the compilation mode of the code file. This control for setting the compilation mode of the code file is a local compilation switch control. Here, the local compilation switch control can be a selection box for global compilation and local compilation, or it can be a checkbox for local compilation, etc. The embodiments of this application do not specifically limit the form of the local compilation switch control. Among them, the compilation mode includes local compilation mode and global compilation mode.

[0128] S3012. In response to a local compilation enable operation applied to the local compilation switch control, the local compilation control is displayed.

[0129] In this embodiment of the application, when a user activates the local compilation mode by triggering the local compilation switch control, the information compilation device receives the local compilation activation operation applied to the local compilation switch control; at this time, in response to the local compilation activation operation, the information compilation device presents a local compilation control for obtaining the page node to be compiled, so as to enter the local compilation mode.

[0130] It should be noted that the local compilation control can be presented directly, or it can be presented based on the local compilation enable operation of the local compilation switch control, etc. This application embodiment does not specifically limit this.

[0131] In this embodiment, S3012 is followed by S3013 and S3014; that is, after the information compilation device responds to the local compilation start operation acting on the local compilation switch control and presents the local compilation control, the information compilation method further includes S3013 and S3014. Each step is described below.

[0132] S3013. In response to a local compilation off operation applied to the local compilation switch control, hide the local compilation control and compile the application code file.

[0133] In this embodiment of the application, when the user turns off the local compilation mode or turns on the global compilation mode by triggering the local compilation switch control, the information compilation device also receives the local compilation shutdown operation applied to the local compilation switch control; at this time, the information compilation device responds to the local compilation shutdown operation, hides the local compilation control, and compiles the application code file to enter the global compilation mode.

[0134] S3014. Based on the compiled application code file, the page to be viewed is presented.

[0135] It should be noted that in global compilation mode, all code files (application code files) are compiled, and the page to be viewed is presented based on all the compiled code files (compiled application code files).

[0136] In this embodiment, S301 is followed by S311; that is, after the information compilation device presents the local compilation control, the information compilation method further includes S311, which will be described below.

[0137] S311. When the local compilation control based on the presentation does not obtain the page node to be compiled, compile the application code file, and present the page to be viewed based on the compiled application code file.

[0138] It should be noted that if the information compilation device fails to obtain the page node to be compiled based on the local compilation control, it indicates that global compilation is performed instead of local compilation. In this case, the information compilation device compiles the application code file and presents the page to be viewed based on the compiled application code file.

[0139] In this embodiment of the application, when presenting a local compilation switch control, the compilation mode can be determined as local compilation mode or global compilation mode based on the local compilation switch control; when presenting a local compilation control, the compilation mode can be determined as local compilation mode or global compilation mode based on whether the presented local compilation control has obtained the page node to be compiled, that is, if the page node to be compiled is obtained, the local compilation mode is entered, and if the page node to be compiled is not obtained, the global compilation mode is entered.

[0140] In this embodiment, S302 can be implemented through S3021 to S3024; that is, the information compilation device responds to the local compilation operation acting on the local compilation control and obtains the page node to be compiled, including S3021 and S3024. Each step is described below.

[0141] S3021. In response to the input operation of the main node to be compiled on the input control of the main node to be compiled, obtain the main page node to be compiled.

[0142] In this embodiment, the local compilation control includes a master node input control to be compiled. The information compilation device obtains the page node corresponding to the launched page through the master node input control to be compiled, which is referred to here as the master page node to be compiled.

[0143] S3022. In response to a node addition operation performed on a node addition control, present the input control for the associated node to be compiled.

[0144] In this embodiment, the local compilation control further includes a node adding control. The information compilation device uses this node adding control to display a control for obtaining the page node corresponding to the page associated with the main page node to be compiled. This control for obtaining the page node corresponding to the page associated with the main page node to be compiled is the input control for the associated node to be compiled. The page associated with the main page node to be compiled may be, for example, a page that has been redirected, a page that has been returned to, etc.

[0145] S3023, In response to the input operation of the associated node to be compiled on the input control of the associated node to be compiled, obtain the associated page node to be compiled.

[0146] In this embodiment, when a user inputs the page node corresponding to the page associated with the main page node to be compiled by triggering the input control for the associated node to be compiled, the information compilation device receives the input operation of the associated node to be compiled on the input control. The input operation of the associated node to be compiled refers to the operation of inputting the page node corresponding to the page associated with the main page node to be compiled through the input control. At this time, the information compilation device responds to the input operation of the associated node to be compiled and can obtain the page node corresponding to the page associated with the main page node to be compiled. The page node corresponding to the page associated with the main page node to be compiled is the associated page node to be compiled.

[0147] It should be noted that the local compilation controls include the input controls for the main node to be compiled and the node addition controls, and the local compilation operations include the input operations for the main node to be compiled and the node addition operations.

[0148] S3024. Determine the main page node to be compiled and the associated page node to be compiled as nodes to be compiled.

[0149] It should be noted that the nodes to be compiled include the main page node to be compiled and the associated page nodes to be compiled.

[0150] In this embodiment, S302 is followed by S312; that is, after the information compilation device obtains the page node to be compiled in response to the local compilation operation acting on the local compilation control, the information compilation method further includes S312, which will be described below.

[0151] S312. When compiling based on the page node to be compiled, display partial compilation prompts.

[0152] It should be noted that local compilation prompts include at least one of local compilation title prompts and local compilation status prompts. Local compilation title prompts refer to prompts that display the local compilation mode in the form of a title, while local compilation status prompts refer to prompts that display local compilation mode information in response to the presented compilation process information.

[0153] Understandably, presenting partial compilation prompts during the compilation process can not only improve the presentation of information during compilation, but also help determine the compilation mode in a timely manner, reduce human-computer interaction in determining the compilation mode, and improve the efficiency of information compilation.

[0154] In this embodiment, S305 is followed by S313 to S315; that is, after the information compilation device presents the page to be viewed corresponding to the page node to be compiled based on the compiled code, the information compilation method further includes S313 to S315. Each step is described below.

[0155] S313, Present the packaging control.

[0156] It should be noted that the packaging control can be either a preview control or a real device debugging control; the preview control is used to trigger preview processing, and the real device debugging control is used to trigger real device debugging processing.

[0157] S314. In response to the packaging operation applied to the packaging control, package and compile the code to obtain a code package.

[0158] In this embodiment of the application, when the user triggers the preview control to preview, or when the user triggers the real device debugging control to debug, the information compilation device also obtains the packaging operation applied to the packaging control; here, the packaging operation refers to the operation of packaging the compiled code for preview or real device debugging by triggering the packaging control; at this time, the information compilation device responds to the packaging operation and performs packaging processing on the compiled code, wherein the packaged compiled code is the code package.

[0159] S315. Present the size information of the code package and send the code package to the service device for previewing the code file to be compiled or debugging on a real device.

[0160] In this embodiment of the application, after the information compilation device completes the packaging of the compiled code and obtains the code package, it will also display the size information of the code package, such as "Partial compilation in progress, code package 594KB"; and the information compilation device will also send the code package to the service device so that the service device can send data to the real device and realize the preview of the page to be viewed or the real device debugging on the real device.

[0161] Understandably, by using the partial compilation control, only the code files involved in the page to be viewed are compiled. This not only achieves partial compilation but also reduces the size of the code package, improves the upload efficiency of the code package, and reduces the resource consumption of uploading the code package.

[0162] In this embodiment, the page to be viewed is a subroutine page. Therefore, the application development tool is the development tool for the subroutine application, the application code file is all the code files corresponding to the subroutine application, and the application for which the function to be developed is the subroutine application.

[0163] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0164] See Figure 7 , Figure 7 This is a schematic diagram illustrating an exemplary information compilation process provided in an embodiment of this application; such as Figure 7 As shown, the information compilation implementation process in this exemplary case is as follows:

[0165] S701. Construct a code dependency graph (code dependency relationships).

[0166] It's important to note that a code dependency graph is constructed by analyzing the code files (application code files) of a mini-program project (sub-application). Here, "project code files" refers to all code files in the project, including the project configuration file "app.json" (application configuration file). First, all page configuration files are retrieved from the project configuration file "app.json". Then, the corresponding code file with the same name (the second code file with the same name) is retrieved. Finally, the code file with the same name is read to obtain the referenced code files (dependent code files). The code file with the same name corresponding to the page configuration file and the referenced code file are the code files corresponding to the page. Simultaneously, the code file with the same name corresponding to the project configuration file (the first code file with the same name) is retrieved. Therefore, a code dependency graph is constructed based on the code files corresponding to the pages and the code files corresponding to the project configuration files.

[0167] For example, see Figure 8 , Figure 8 This is another exemplary diagram of the code file directory structure provided in this application embodiment; as shown below. Figure 8 As shown in Figure 8-1, the code file directory structure of a mini-program project containing two pages includes the following organization of code files: "app.js", "app.json", "app.wxss", "index.js", "index.json", "index.wxml", "index.wxss", "logs.js", "logs.json", "logs.wxml" and "logs.wxss", "project.config.json", "sitemap.json", and "util.js" under "utils".

[0168] based on Figure 8 See Figure 9 , Figure 9 This application provides a method related to... Figure 8 The corresponding code dependency diagram; such as Figure 9 As shown, based on Figure 8The target structure shown in Figure 9-1 illustrates the following process for obtaining the code dependency graph: obtaining the project configuration file "app.json", retrieving the page configuration files "index.json" and "logs.json" from "app.json", constructing the page node "pages / index" based on "index.json", and obtaining the code files "index.js", "index.wxml", and "index.wxss" (second code files with the same names as "index.json"). Additionally, it reads the referenced code in "index.js", "index.wxml", and "index.wxss", identifies unreferenced code files, and thus, at this point, the code nodes corresponding to the page node "pages / index" are the code nodes "index.js", "index.wxml", and "index.wxss". The code snippets "dex.wxml" and "index.wxss" are generated. Based on the page configuration file "logs.json", the page node "pages / logs" is constructed, and the code files "logs.js", "logs.wxml", and "logs.wxss" with the same names as the page configuration file "logs.json" are obtained. The referenced code in the code files "logs.js", "logs.wxml", and "logs.wxss" is read, and the code file "util.js" under the code file "untils" (dependent code file) referenced by the code file "logs.js" is determined. Therefore, at this time, the code nodes corresponding to the page node "pages / logs" are the code nodes "logs.js", "logs.wxml", and "logs.wxss", and the code node "utils / util.js" corresponding to the code node "logs.js". At the same time, obtain the code files "app.js" and "app.wxss" (the first code file with the same name) that have the same name as the project configuration file "app.json". Then, construct the project node "app" (application node). The nodes corresponding to the project node "app" are: code nodes "app.js" and "app.wxss", page node "pages / logs", and page node "pages / logs".

[0169] S702, Local compilation settings.

[0170] Here, local compilation is enabled through local compilation settings to obtain a list of pages to be compiled (page nodes to be compiled).

[0171] See Figure 10 , Figure 10 This is a schematic diagram illustrating an exemplary partial compilation setup provided in an embodiment of this application; as shown... Figure 10 As shown, on the Custom Compilation Conditions page 10-1, the following items are displayed: title 10-11 (Custom Compilation Conditions), other compilation settings 10-12 (mode name "pages / index", startup page "pages / index", startup parameters "name=vendor&color=black", entry scene "default" and compilation settings), and local compilation checkbox 10-13 (local compilation switch control). There are also a cancel button 10-14 and an OK button 10-15. When the user selects the partial compilation checkbox 10-13, on the custom compilation conditions page 10-1, a prompt message 10-131, a page list input box 10-132 (partial compilation control), and an add button 10-133 (node ​​addition control) are displayed at the corresponding position of the selected partial compilation checkbox 10-133. Here, the page list to be compiled is obtained by entering the page list in the page list input box 10-132; or, by entering the page list 10-1321 (“pages / index”) in the page list input box 10-132 and clicking the add button 10-133, the page list 10-1331 (“pages / detail”) is entered in the newly presented page list input box 10-133. At this time, page list 10-1321 and page list 10-1331 are the page lists to be compiled.

[0172] S703. Determine whether to perform partial compilation. If not, execute S704; if yes, execute setting S705.

[0173] Here, if the local compilation flag is "1" and the list of pages to be compiled is obtained, then local compilation is determined to be performed; otherwise, global compilation is determined to be performed.

[0174] S704. Compile all code files (application code files) of the project. Execute S708.

[0175] S705. Determine the page node (target page node) for partial compilation.

[0176] It should be noted that determining the page node corresponding to the list of pages to be compiled from the code dependency graph also determines the page node for local compilation.

[0177] See Figure 11 , Figure 11 This is an exemplary embodiment provided in this application. Figure 9 A diagram illustrating the determination of page nodes for partial compilation; such as... Figure 11 As shown, based on through Figure 10The input list of pages to be compiled (taking page list 10-1321 as an example) is used to determine the page node 11-1 for local compilation in the code dependency graph 9-1 as the page node "pages / index".

[0178] S706. Obtain all descendant nodes of the partially compiled page nodes and the non-page descendant nodes of the project nodes.

[0179] Here, all descendant nodes of the partially compiled page node and the non-page descendant nodes of the project node correspond to the code nodes to be compiled mentioned above.

[0180] See Figure 12 , Figure 12 This is an exemplary embodiment provided in this application. Figure 9 A diagram showing the identification of code nodes to be compiled; such as Figure 12 As shown, based on Figure 11 In the code dependency graph 9-1, the page node 11-1 that is partially compiled is identified as the code nodes “index.js”, “index.wxml”, and “index.wxss”. The non-page node descendant node 12-3 of the application node 12-2 is identified as the code nodes “app.js” and “app.wxss”.

[0181] S707, compile the code files corresponding to all descendant nodes of the partially compiled page nodes, as well as the code files corresponding to the descendant nodes of the non-page nodes of the project nodes.

[0182] Here, the code files corresponding to all descendant nodes of the partially compiled page nodes, and the code files corresponding to the descendant nodes of the non-page nodes of the project nodes, correspond to the code files to be compiled mentioned above.

[0183] See Figure 13 , Figure 13 This is a schematic diagram of an exemplary code file to be compiled, provided in an embodiment of this application; as shown... Figure 13 As shown, based on Figure 12 The descendant nodes 12-1 and 12-3 are determined, and the code file list 13-1 (the code files to be compiled) is determined.

[0184] See Figure 14 , Figure 14 This is an exemplary schematic diagram illustrating the presentation of partial compilation prompts provided in an embodiment of this application; such as Figure 14During the partial compilation process, the page title displays a prompt message 14-1 ("[Partial Compilation] pages / ...", corresponding to the partial compilation title prompt message mentioned above), and the development page (page to be viewed) displays a prompt message 14-2 ("Partial compilation in progress", corresponding to the partial compilation status prompt message mentioned above).

[0185] See next Figure 15 , Figure 15 This is a schematic diagram illustrating an example of code package size information provided in an embodiment of this application; as shown. Figure 15 As shown, when click Figure 14 When the preview button 14-3 or the real device debugging button 14-4 is pressed, a prompt message 15-11 (“Partial compilation effective, code package 549KB”) will be displayed on page 15-1; a prompt message 15-12 (“Compilation prompt: 173”) will also be displayed on page 15-1; and a QR code 15-13 for previewing and real device debugging will also be displayed on page 15-1.

[0186] S708, End.

[0187] The following description continues to illustrate the exemplary structure of the information compilation device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the information compilation device 455 of the memory 450 may include:

[0188] The control rendering module 4551 is used to render a partial compilation control, wherein the partial compilation control is used to set the page node to be partially compiled;

[0189] The node acquisition module 4552 is used to acquire the page node to be compiled in response to the local compilation operation performed on the local compilation control.

[0190] The node determination module 4553 is used to obtain the code node to be compiled corresponding to the page node to be compiled from the code dependency relationship, wherein the code dependency relationship is a hierarchical relationship between corresponding nodes of code files constructed based on the dependency relationship between code files;

[0191] The code compilation module 4554 is used to compile the code file corresponding to the code node to be compiled, and obtain the compiled code.

[0192] The page presentation module 4555 is used to present the page to be viewed corresponding to the page node to be compiled based on the compiled code.

[0193] In this embodiment, the information compilation device 455 further includes a relationship construction module 4556, used to obtain an application configuration file from an application code file, wherein the application code file is all the code files of the application to be developed; obtain a first code file with the same name as the application configuration file from the application code file, and read the application configuration file to obtain a page configuration file; obtain a second code file with the same name as the page configuration file from the application code file, and obtain the dependent code file corresponding to the code reference information in the second code file; determine a page node based on the name of the page configuration file, and determine the node corresponding to the second code file and the node corresponding to the dependent code file as descendant nodes of the page node; determine an application node based on the name of the application configuration file, and determine the node corresponding to the first code file and the page node as descendant nodes of the application node, wherein the code dependency relationship is a hierarchical relationship between the application node, the node corresponding to the first code file, the page node, the node corresponding to the second code file, and the node corresponding to the dependent code file.

[0194] In this embodiment of the application, the node determination module 4553 is further configured to: determine the target page node corresponding to the page node to be compiled from the code dependency relationship; obtain the descendant nodes of the target page node from the code dependency relationship; obtain the parent node of the target page node to obtain the application node; and obtain the non-page node referenced by the application node from the code dependency relationship to obtain the node corresponding to the first code file with the same name; and determine the descendant nodes of the target page node and the node corresponding to the first code file with the same name as the code node to be compiled.

[0195] In this embodiment of the application, the control presentation module 4551 is further configured to present a local compilation switch control, wherein the local compilation switch control is used to set the compilation mode of the code file; in response to a local compilation enable operation performed on the local compilation switch control, the local compilation control is presented.

[0196] In this embodiment of the application, the control presentation module 4551 is further configured to, in response to a local compilation shutdown operation acting on the local compilation switch control, hide the local compilation control and compile the application code file; and present the page to be viewed based on the compiled application code file.

[0197] In this embodiment of the application, the code compilation module 4554 is further configured to compile the application code file when the local compilation control based on the presentation does not obtain the page node to be compiled, and to present the page to be viewed based on the compiled application code file.

[0198] In this embodiment, the node acquisition module 4552 is further configured to: acquire a main page node to be compiled in response to a main node input operation applied to the main node input control to be compiled; present an associated node input control to be compiled in response to a node addition operation applied to the node addition control; obtain an associated page node to be compiled in response to an associated node input operation applied to the associated node input control to be compiled, wherein the local compilation control includes the main node input control to be compiled and the node addition control, and the local compilation operation includes the main node input operation to be compiled and the node addition operation; and determine the main page node to be compiled and the associated page node to be compiled as the node to be compiled.

[0199] In this embodiment of the application, the information compilation device 455 further includes an information prompting module 4557, which is used to present partial compilation prompt information when compiling based on the page node to be compiled, wherein the partial compilation prompt information includes at least one of partial compilation title prompt information and partial compilation status prompt information.

[0200] In this embodiment of the application, the information compilation device 455 further includes a code packaging module 4558, which is used to present a packaging control, wherein the packaging control is a preview control or a real device debugging control; in response to the packaging operation performed on the packaging control, the compiled code is packaged to obtain a code package; the size information of the code package is presented, and the code package is sent to the service device to preview or debug the code file to be compiled.

[0201] In this embodiment of the application, the page to be viewed is a subroutine page.

[0202] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the information compilation method described in this application.

[0203] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to execute the information compilation method provided in this application, for example... Figure 3 The information compilation method is shown.

[0204] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0205] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0206] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0207] As an example, executable instructions can be deployed to execute on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network.

[0208] In summary, this application's embodiments construct code dependencies by pre-analyzing the dependencies between code files. This allows the compilation of code files to retrieve the necessary code files (the files to be compiled) for displaying the page being viewed from these dependencies. Compiling these necessary code files enables the real-time display of the page, thereby improving the efficiency of information compilation. Furthermore, it reduces the number of code files in the package, improving the efficiency of uploading the code package.

[0209] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. An information compilation method, characterized in that, include: A partial compilation control is presented, wherein the partial compilation control is used to set the page node to be partially compiled; In response to a local compilation operation performed on the local compilation control, obtain the page node to be compiled; From the code dependencies, determine the target page node corresponding to the page node to be compiled; The code dependency relationship is a hierarchical relationship between corresponding nodes in code files, constructed based on the dependency relationships between code files. Obtain the descendant nodes of the target page node from the code dependency relationship; Obtain the parent node of the target page node to get the application node, and obtain the non-page node referenced by the application node from the code dependency relationship to get the node corresponding to the first code file with the same name; The descendant nodes of the target page node and the nodes corresponding to the first code file with the same name are determined as the code nodes to be compiled; Compile the code file corresponding to the code node to be compiled to obtain the compiled code; Based on the compiled code, the page to be viewed corresponding to the page node to be compiled is presented.

2. The method according to claim 1, characterized in that, Before determining the target page node corresponding to the page node to be compiled from the code dependency relationship, the method further includes: Obtain the application configuration file from the application code file, wherein the application code file is all the code files of the application whose functions are to be developed; Obtain a first code file with the same name as the application configuration file from the application code file, and read the application configuration file to obtain the page configuration file; Obtain a second code file with the same name as the page configuration file from the application code file, and obtain the dependent code file corresponding to the code reference information in the second code file with the same name; The page node is determined based on the name of the page configuration file, and the node corresponding to the second code file with the same name and the node corresponding to the dependent code file are determined as the descendant nodes of the page node; The application node is determined based on the name of the application configuration file, and the node corresponding to the first code file with the same name and the page node are determined as descendant nodes of the application node. The code dependency relationship is the hierarchical relationship between the application node, the node corresponding to the first code file with the same name, the page node, the node corresponding to the second code file with the same name, and the node corresponding to the dependent code file.

3. The method according to claim 1 or 2, characterized in that, The presentation of the partial compilation control includes: A partial compilation switch control is presented, wherein the partial compilation switch control is used to set the compilation mode of the code file; In response to a local compilation enable operation applied to the local compilation switch control, the local compilation control is rendered.

4. The method according to claim 3, characterized in that, After the local compilation control is presented in response to a local compilation enable operation performed on the local compilation switch control, the method further includes: In response to a local compilation shutdown operation applied to the local compilation switch control, the local compilation control is hidden, and the application code file is compiled. The page to be viewed is presented based on the compiled application code file.

5. The method according to claim 1 or 2, characterized in that, After presenting the partial compilation control, the method further includes: If the local compilation control fails to obtain the page node to be compiled, the application code file is compiled, and the page to be viewed is presented based on the compiled application code file.

6. The method according to claim 1 or 2, characterized in that, The step of obtaining the page node to be compiled in response to a local compilation operation performed on the local compilation control includes: In response to an input operation on the input control of the main node to be compiled, obtain the main page node to be compiled; In response to a node addition operation applied to the node addition control, the input control for the associated node to be compiled is displayed. In response to an input operation on the input control of the associated node to be compiled, an associated page node to be compiled is obtained, wherein the local compilation control includes the input control of the main node to be compiled and the node adding control, and the local compilation operation includes the input operation of the main node to be compiled and the node adding operation; The main page node to be compiled and the associated page node to be compiled are identified as the page node to be compiled.

7. The method according to claim 1 or 2, characterized in that, After obtaining the page node to be compiled in response to the local compilation operation performed on the local compilation control, the method further includes: When compiling based on the page node to be compiled, local compilation prompts are displayed, wherein the local compilation prompts include at least one of local compilation title prompts and local compilation status prompts.

8. The method according to claim 1 or 2, characterized in that, After presenting the page to be viewed corresponding to the page node to be compiled based on the compiled code, the method further includes: Present a packaging control, wherein the packaging control is a preview control or a real device debugging control; In response to the packaging operation performed on the packaging control, the compiled code is packaged to obtain a code package; The size information of the code package is presented, and the code package is sent to the service device to preview or debug the code file to be compiled on a real device.

9. The method according to claim 1 or 2, characterized in that, The page to be viewed is a subprogram page.

10. An information compilation device, characterized in that, include: The control rendering module is used to render partial compilation controls, wherein the partial compilation controls are used to set the page nodes to be partially compiled; The node acquisition module is used to acquire the page node to be compiled in response to the local compilation operation performed on the local compilation control. A node determination module is used to determine the target page node corresponding to the page node to be compiled from the code dependency relationship, wherein the code dependency relationship is a hierarchical relationship between corresponding nodes of code files constructed based on the dependency relationship between code files; obtain the descendant nodes of the target page node from the code dependency relationship; obtain the parent node of the target page node to obtain the application node; and obtain the non-page node referenced by the application node from the code dependency relationship to obtain the node corresponding to the first code file with the same name; and determine the descendant node of the target page node and the node corresponding to the first code file with the same name as the code node to be compiled. The code compilation module is used to compile the code file corresponding to the code node to be compiled, and obtain the compiled code; The page presentation module is used to present the page to be viewed corresponding to the page node to be compiled, based on the compiled code.

11. The apparatus according to claim 10, characterized in that, The device further includes: A relationship building module is used to obtain an application configuration file from an application code file, wherein the application code file is all the code files of the application to be developed; obtain a first code file with the same name as the application configuration file from the application code file, and read the application configuration file to obtain a page configuration file; obtain a second code file with the same name as the page configuration file from the application code file, and obtain the dependent code files corresponding to the code reference information in the second code file; determine page nodes based on the name of the page configuration file, and determine the nodes corresponding to the second code file and the dependent code files as descendant nodes of the page node; determine application nodes based on the name of the application configuration file, and determine the nodes corresponding to the first code file and the page node as descendant nodes of the application node, wherein the code dependency relationship is a hierarchical relationship between the application node, the node corresponding to the first code file, the page node, the node corresponding to the second code file, and the node corresponding to the dependent code file.

12. The apparatus according to claim 10 or 11, characterized in that, The control rendering module is also used for: A local compilation switch control is presented, wherein the local compilation switch control is used to set the compilation mode of the code file; in response to a local compilation enable operation performed on the local compilation switch control, the local compilation control is presented.

13. The apparatus according to claim 12, characterized in that, The control rendering module is also used for: In response to a local compilation shutdown operation applied to the local compilation switch control, the local compilation control is hidden, and the application code file is compiled; based on the compiled application code file, the page to be viewed is presented.

14. The apparatus according to claim 10 or 11, characterized in that, The code compilation module is also used for: If the local compilation control fails to obtain the page node to be compiled, the application code file is compiled, and the page to be viewed is presented based on the compiled application code file.

15. The apparatus according to claim 10 or 11, characterized in that, The node acquisition module is also used for: In response to an input operation on the input control of the main node to be compiled, obtain the main page node to be compiled; In response to a node addition operation applied to the node addition control, the input control for the associated node to be compiled is displayed. In response to an input operation on the input control of the associated node to be compiled, an associated page node to be compiled is obtained, wherein the local compilation control includes the input control of the main node to be compiled and the node adding control, and the local compilation operation includes the input operation of the main node to be compiled and the node adding operation; The main page node to be compiled and the associated page node to be compiled are identified as the page node to be compiled.

16. The apparatus according to claim 10 or 11, characterized in that, The device further includes: The information prompt module is used to present local compilation prompt information when compiling based on the page node to be compiled, wherein the local compilation prompt information includes at least one of local compilation title prompt information and local compilation status prompt information.

17. The apparatus according to claim 10 or 11, characterized in that, The device further includes: The code packaging module is used to present packaging controls, wherein the packaging controls are preview controls or real device debugging controls; In response to the packaging operation performed on the packaging control, the compiled code is packaged to obtain a code package; The size information of the code package is presented, and the code package is sent to the service device to preview or debug the code file to be compiled on a real device.

18. An information compilation device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the information compilation method according to any one of claims 1 to 9.

19. A computer-readable storage medium, characterized in that, It stores executable instructions for use by a processor to implement the information compilation method according to any one of claims 1 to 9.

20. A computer program product, characterized in that, The device includes computer instructions stored in a computer-readable storage medium; a processor of the information compilation apparatus reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the information compilation apparatus to perform the information compilation method according to any one of claims 1 to 9.