Application compilation method, device, product, equipment and medium

By configuring compilation plug-ins for multiple development languages ​​in the compilation client, the target development language is obtained and standardized compilation is performed, which solves the problem of small program developers having difficulty writing in non-standard development languages, improves writing flexibility and reduces difficulty. Implemented automated compilation.

CN118259922BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410688088.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-06
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for small program developers to use other development languages ​​other than standardized development languages ​​to write, resulting in greater flexibility and difficulty in writing.

Method used

Provides a compilation method for applications. By configuring compilation plug-ins for multiple development languages ​​in the compilation client, the target development language is obtained, standardized compilation processing of the program source code package is performed, and a program specification package is generated to support developers in flexibly selecting development languages. and automate compilation.

Benefits of technology

It improves the flexibility of writing small programs, reduces the difficulty of writing, allows developers to choose a development language according to their needs, without the need to build an additional third-party framework, and achieves automated and standardized compilation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118259922B
    Figure CN118259922B
Patent Text Reader

Abstract

The present application discloses a method, device, product, equipment and medium for compiling an application, the method comprising: a compilation client is configured with compilation plug-ins corresponding to a plurality of development languages ​​for writing an application, the compilation client can respond to the configuration operation for the development language, and obtain the target development language configured for the compilation of the application; the target development language is at least one of the plurality of development languages; the program source code package of the application written in the target development language is obtained; the compilation plug-in corresponding to the target development language is called, the program source code package is standardized and compiled, and a program specification package is generated; the program specification package adopts the specification language of the application, and the program specification package is used to run the written application. The use of this application can improve the flexibility of writing small programs and reduce the difficulty of writing small programs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of program compilation, and in particular to a method, apparatus, product, device and medium for compiling an application program. Background Art

[0002] The mini program may have a public developer tool, and developers may write the mini program in the developer tool. The mini program usually has its own standard development language, so the developer needs to use the mini program's standard development language to write the mini program in the developer tool.

[0003] If developers want to use other development languages ​​other than the standard development language to write mini programs, they need to build a third-party framework for writing mini programs in other development languages. It can be seen that in this case, it is very difficult to write mini programs in other development languages. Therefore, how to improve the flexibility of writing mini programs and reduce the difficulty of writing mini programs is an urgent problem to be solved. Summary of the invention

[0004] The present application provides a method, apparatus, product, device and medium for compiling an application program, which can improve the flexibility of writing mini-programs and reduce the difficulty of writing mini-programs.

[0005] On one hand, the present application provides a method for compiling an application program, the method being applied to a compiling client, wherein the compiling client is configured with compiling plug-ins corresponding to a plurality of development languages ​​for writing the application program, the method comprising:

[0006] In response to the configuration operation for the development language, obtaining a target development language configured for application compilation; the target development language is at least one of the multiple development languages;

[0007] Obtain the program source code package of the application written in the target development language;

[0008] The compilation plug-in corresponding to the target development language is called to perform standardized compilation processing on the program source code package to generate a program specification package; the program specification package adopts the standard language of the application program, and the program specification package is used to run the written application program.

[0009] On one hand, the present application provides a compiling device for an application program, which is applied to a compiling client, and the compiling client is configured with compiling plug-ins corresponding to a plurality of development languages ​​for writing the application program, and the compiling device for the application program comprises:

[0010] A response module, used to respond to the configuration operation for the development language, and obtain the target development language configured for application compilation; the target development language is at least one of the multiple development languages;

[0011] An acquisition module, used to acquire a program source code package of an application program written in a target development language;

[0012] The compilation module is used to call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the program source code package, and generate a program specification package; the program specification package adopts the standard language of the application program, and the program specification package is used to run the written application program.

[0013] Optionally, the compilation plug-in corresponding to any development language among the multiple development languages ​​is defined with at least one of the following data:

[0014] Hook functions that are compatible with the source code of any development language for standardized compilation; the conversion correspondence between each file type in any development language and the file type in the standard language; thread configuration information for the corresponding compilation plug-in in any development language;

[0015] Among them, the hook function is used to call the compilation program related to the corresponding compilation plug-in when standardizing the compilation of the source code of any development language; the thread configuration information of the compilation plug-in corresponding to any development language is used to indicate whether the plug-in task of the compilation plug-in corresponding to any development language needs to start the compilation sub-thread for execution.

[0016] Optionally, the program source code package includes source code files of multiple file types in the target development language;

[0017] The compilation module calls the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0018] Calling the compilation plug-in corresponding to the target development language, according to the conversion correspondence between each file type under the target development language and the file type under the standard language, converting each source code file in the program source code package into a standard file of the corresponding file type under the standard language;

[0019] Generate a program specification package based on the specification files corresponding to each source code file in the program source code package.

[0020] Optionally, the plug-in task corresponding to the compilation plug-in of the target development language includes a file conversion task, and the file conversion task is used to convert each source code file in the program source code package into a standard file of a corresponding file type under the standard language;

[0021] The compilation module calls the compilation plug-in corresponding to the target development language, and converts each source code file in the program source code package into a standard file of the corresponding file type under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language, including:

[0022] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task needs to start a compilation sub-thread for execution, a compilation sub-thread is created for the compilation main thread of the compilation plug-in corresponding to the target development language, and the created compilation sub-thread is called to execute the file conversion task;

[0023] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task does not need to start a compilation sub-thread for execution, the compilation main thread is called to execute the file conversion task.

[0024] Optionally, the compilation module calls a compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0025] Call the compilation plug-in corresponding to the target development language to filter the key source code files used to build the application from the program source code package;

[0026] Perform standardized compilation on key source code files to generate key specification files corresponding to the key source code files;

[0027] Obtain additional files that need to be called by key source code files, integrate the additional files with key specification files, and generate a program specification package; additional files are non-code files.

[0028] Optionally, the compilation module calls a compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0029] Call the compilation plug-in corresponding to the target development language, perform syntax analysis on the program source code package, and generate a syntax tree for the program source code package;

[0030] The syntax tree is parsed and a program specification package is generated based on the result of the syntax parsing.

[0031] Optionally, the compiling device for the application further includes a disk storage module, and the disk storage module is used to:

[0032] Write the obtained program source code package to the client disk of the compiling client;

[0033] Among them, the program source code package stored in the client disk includes the source code main package of the written application and N source code sub-packages, N is a positive integer, the source code main package is used to run the main program of the written application, and the N source code sub-packages are used to run the sub-programs of the written application.

[0034] Optionally, a simulator is configured in the compilation client, and the simulator is used to simulate the running of the application program; the compilation device of the above application program further includes a simulation running module, and the simulation running module is used to:

[0035] In response to the simulation operation of the written application, the simulator is called to read the source code main package from the client disk;

[0036] Call the simulator to submit the read source code main package to the compilation plug-in corresponding to the target development language;

[0037] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the source code main package, and generate a standardized main package corresponding to the source code main package;

[0038] Call the simulator to simulate and run the main program of the written application based on the specification main package;

[0039] The compiled standard main package is used to cache in the memory of the compilation client.

[0040] Optionally, during the simulation running of the main program, the simulation running module is also used to:

[0041] When a trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-package corresponding to the sub-program triggered by the trigger operation from the client disk;

[0042] Call the simulator to package the read source code and submit it to the compilation plug-in corresponding to the target development language;

[0043] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the read source code subpackage, and generate a standardized subpackage corresponding to the read source code subpackage;

[0044] Call the simulator to subpackage based on the specification and simulate the subprograms corresponding to the written application;

[0045] The compiled specification sub-packages are used to cache in the memory of the compiling client.

[0046] Optionally, the response module responds to the configuration operation for the development language, and obtains the target development language configured for application compilation, including:

[0047] Respond to the configuration operation and obtain configuration information for the development language;

[0048] The configuration information is parsed to determine the target development language configured for application compilation.

[0049] Optionally, the compiling device of the above application further includes an uploading module, and the uploading module is used to:

[0050] Upload the program specification package to the backend server to which the compiling client belongs, so that the backend server stores the program specification package in the server disk of the backend server;

[0051] After the program specification package is stored in the server disk, the target terminal is used to send a program running request to the background server, and the background server is used to read the program specification package from the server disk according to the program running request and return the read program specification package to the target terminal;

[0052] The object terminal is used to run the written application in the application's running environment based on the program specification package returned by the background server.

[0053] In one aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes a method in one aspect of the present application.

[0054] In one aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the method in the above aspect.

[0055] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional modes such as the above-mentioned one aspect.

[0056] The compilation client of the present application can be configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications. The compilation client can respond to configuration operations for the development language and obtain the target development language configured for application compilation; the target development language is at least one of the multiple development languages; and the program source code package of the application written based on the target development language can be obtained; thus, the compilation plug-in corresponding to the target development language can be called to perform standardized compilation processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application, and the program specification package is used to run the written application. The method proposed in the present application, since the compilation client is configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications, supports developers to flexibly select the target development language they need to adopt from the multiple development languages, so that developers can use the selected target development language to write applications. Subsequently, the compilation client can also use the compilation plug-in corresponding to the target development language to automatically realize the standardized compilation of the program source code package written by the developer in the target development language, thereby obtaining a program specification package using the standard language of the application, and the written mini-program can be run through the program specification package; it can be seen that the present application can flexibly select the development language for writing the application according to the actual needs of the developer, and there is no need to build an additional third-party framework for writing the application for the selected development language. Therefore, the flexibility of writing the mini-program is improved and the difficulty of writing the mini-program is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] Figure 1 It is a schematic diagram of the structure of a network architecture for compiling and running an application program provided in an embodiment of the present application;

[0059] Figure 2 It is a schematic diagram of a scenario of compiling an application program provided in an embodiment of the present application;

[0060] Figure 3 It is a flowchart of a method for compiling an application program provided in an embodiment of the present application;

[0061] Figure 4 It is a schematic diagram of the architecture of a compiled application provided in an embodiment of the present application;

[0062] Figure 5This is a schematic diagram of the effect of a compilation interface of a compilation client provided in an embodiment of the present application;

[0063] Figure 6 It is a flowchart of a method for simulating running an application program provided in an embodiment of the present application;

[0064] Figure 7 It is a schematic diagram of a scenario of a simulated running application program provided in an embodiment of the present application;

[0065] Figure 8 It is a schematic diagram of a framework of application compilation provided by an embodiment of the present application;

[0066] Fig. 9 It is a structural diagram of a compiling device for an application provided in an embodiment of the present application;

[0067] Fig.10 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] Here, the relevant technical concepts involved in this application are explained:

[0070] Mini Program: An application that can be used without downloading and installing, and can be run independently in other applications (such as traffic platforms).

[0071] Mini games: a new form of game product that relies on traffic platforms and uses mini programs as carriers. In addition to not requiring downloads, they also meet players' needs for a light, click-and-play experience. Among them, mini games are a specific type of mini program.

[0072] Development language: It is a professional language used in computer programming.

[0073] Mini program standard code file: a code file that uses the standard language of the mini program. The code file can include four categories: JS type code files (script files), WXSS type code files (style files), JSON type code files (configuration files), and WXML type code files (page structure files).

[0074] Js: JavaScript is an advanced, interpreted programming language and the core technology for mini-program development.

[0075] WXSS: uses a style definition language similar to CSS (a computer language) to describe the style of the applet page. The file suffix is ​​wxss.

[0076] JSON: is a lightweight data exchange format.

[0077] WXML: A code that uses a tag language similar to HTML (a markup language) to describe the page structure of a small program. The file suffix is ​​wxml.

[0078] AST: abstract syntax code, an abstract syntax tree, is a tree representation of the abstract syntax structure of the source code.

[0079] Ts: TypeScript is an open source programming language and a superset of JavaScript that extends the syntax of JavaScript.

[0080] Less: It can be regarded as a high-level language based on CSS. Its purpose is to make CSS development more flexible and powerful. It is a dynamic style language.

[0081] Sass: Similar to Less, it can also be regarded as a high-level language based on CSS. Its purpose is also to make CSS development more flexible and powerful. It is also a dynamic style language.

[0082] First of all, it should be noted that all data collected by this application (such as the program source code package written for the application, the program specification package compiled from the program source code package, and other related data) are collected with the consent and authorization of the object to which the data belongs (such as the user, organization or enterprise), and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions.

[0083] See also Figure 1 , Figure 1 Schematic diagram of a network architecture for compiling and running applications provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a compiling terminal, a backend server and an object device cluster, and the object terminal cluster may include one or more terminal devices, and the number of terminal devices is not limited here. The compiling terminal and each object terminal may be connected to the backend server through a network, so that the compiling terminal and each object terminal may exchange data with the backend server through the network connection.

[0084] like Figure 1 The background server shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (content distribution network), and big data and artificial intelligence platforms. The terminal device can be: smart phones, tablet computers, laptops, desktop computers, smart TVs, car terminals, smart homes and other smart terminals.

[0085] The above-mentioned compiling terminal may have a compiling client, which may be a client for writing and compiling an application (such as a small program), and the compiling terminal may be a terminal of an application writer (such as a developer), and the background server is the server of the compiling client. The object terminal in the object terminal cluster may be a user terminal that can run the application compiled by the compiling client.

[0086] Therefore, it can be understood that the application writer can write the application in the compilation client of the compilation terminal, the compilation client can perform corresponding compilation processing on the application written by the writer, and can upload the compiled application (such as the code package obtained after compiling the written application) to the background server. Subsequently, each object terminal can pull the compiled code package from the background server, thereby running the application written by the application writer through the code package.

[0087] Please also see Figure 2 , Figure 2 Schematic diagram of a scenario of compiling an application provided by an embodiment of the present application. Figure 2 As shown, the above-mentioned compilation client can be configured with compilation plug-ins corresponding to multiple development languages ​​​​for writing applications (including development language y1~development language ym here, a total of m development languages), including compilation plug-ins b1 corresponding to development language y1~compilation plug-in bm corresponding to development language ym, a total of m compilation plug-ins, m is a positive integer, and the specific value of m can be determined according to the actual application scenario, and this application does not impose any restrictions on this.

[0088] The writer of the application can select the development language that he wants to use to write the application in the compilation client, and the development language selected by the writer can be called the target development language. Thus, the writer of the application can use the selected target development language to write the application to obtain the program source code package of the written application. Furthermore, the compilation client can automatically call the compilation plug-in corresponding to the target development language, and perform standardized compilation processing on the program source code package using the target development language to compile the program source code package into a program specification package using the standard language of the application. The program specification package is a code package for running the written application, and the compilation client can upload the program specification package to the background server, so that the subsequent object terminal can obtain the program specification package from the background server, and run the written application through the obtained program specification package. The specific process can also be referred to the relevant description in the following embodiments.

[0089] By adopting the method provided by the present application, application writers can flexibly choose the development language they want to use when writing applications. Application writers only need to focus on the development language they choose, and the compilation client can seamlessly realize the automatic and standardized compilation processing of applications written by application writers in the development language they choose, thereby improving the flexibility and experience of application writers in writing applications. Since application writers can choose to write applications in the development language they are familiar with, the difficulty of application writers in writing applications is also reduced.

[0090] See also Figure 3 , Figure 3 1 is a flow chart of a method for compiling an application program provided in an embodiment of the present application. Figure 3 As shown, the method may include:

[0091] Step S101, in response to a configuration operation for a development language, obtaining a target development language configured for application compilation; the target development language is at least one of a plurality of development languages.

[0092] Specifically, the execution subject in the embodiment of the present application may be a compiling client, which may be used to develop and compile an application. Optionally, the application may be any program that needs to be compiled, such as a mini-program. The compiling client may exist in a terminal device of a user (such as a writer of a mini-program). If the application that needs to be compiled is a mini-program, the compiling client may also be a mini-program developer tool.

[0093] The compilation client of the present application may be configured with compilation plug-ins (also called compilers) corresponding to a plurality of development languages ​​for writing applications. One development language may correspond to one compilation plug-in. The compilation plug-in corresponding to a development language is a plug-in specifically configured for the development language and capable of compiling code files written in the development language into code files of the standard language of the application. As the name implies, the standard language of an application (such as the standard language of a mini-program) is a specific standardized development language required for the application to run.

[0094] The above-mentioned multiple development languages ​​may include multiple other high-level languages ​​other than the standard language of the application, such as the above-mentioned high-level languages ​​such as Ts, Less, Sass, etc. Of course, the compilation client may also be configured with a writing plug-in corresponding to the standard language of the application, and the writing plug-in is a plug-in used to directly write the mini-program in the standard language of the application.

[0095] Among them, the standard language of the application is a relatively basic development language, and the method provided by this application can support the application programmer to select one or more development languages ​​he wants to use from the more abundant and diverse development languages ​​mentioned above according to his actual needs, so that the application programmer can use the development language of his choice to write the application. In this way, the development language used by the application programmer when writing the application is no longer limited, which improves the flexibility and convenience of the programmer in writing the application.

[0096] Specifically, the compilation client can respond to the configuration operation for the development language and obtain the target development language configured for the application compilation. The target development language can be at least one of the above-mentioned multiple development languages. The target development language is the development language configured (i.e., selected) by the application writer in the compilation client for application writing.

[0097] For example, the compiling client may respond to the configuration operation and obtain configuration information for the development language. The configuration information may be information for selecting a development language configured in the compiling client by the application writer, and the configuration information includes the development language configured by the writer for writing the application.

[0098] Therefore, the compilation client can parse the configuration information to obtain at least one development language configured by the application writer for application writing, and the at least one development language obtained by the analysis is the target development language configured for application compilation.

[0099] Optionally, when writing an application, there may be one or more code files that need to be written. Different code files may be written in different or the same development languages. Therefore, there may be one or more target development languages.

[0100] Furthermore, the process of compiling a code file written in a non-standard language (such as a development language other than the standard language among the above-mentioned multiple development languages) into a code file in the standard language of the application is called standardized compilation of the code file written in the non-standard language.

[0101] It should be noted that there can be multiple types of code files under one development language, that is, there can be multiple file types (i.e., multiple file formats) under one development language. Based on this, the compilation plug-in corresponding to any one of the above multiple development languages ​​(hereinafter referred to as any development language) can be defined (also understood as configured) with at least one of the following data:

[0102] A hook function adapted to the source code of the standardized compilation of any development language; a conversion correspondence between each file type under the any development language and the file type under the standard language; and thread configuration information of the plug-in corresponding to the compilation of the any development language.

[0103] Among them, the above hook function is used to call the compiler program (an internal program of the compilation client) related to the compilation plug-in corresponding to the any development language when the source code of the any development language (i.e., the code file written in the any development language) is compiled in a standardized manner. The relevant compiler program is a program used to compile the source code of the any development language in the corresponding compilation stage where the hook function is located. It can be understood that there may be multiple compilation stages for the source code of the any development language in the compilation plug-in, and corresponding hook functions may be configured at the multiple compilation stages respectively, so as to call the required compiler program in the corresponding compilation stage to perform corresponding compilation processing on the source code of the any development language.

[0104] There can be multiple hook functions defined for the compilation plug-in corresponding to any development language. The hook function defined for the compilation plug-in corresponding to any development language reflects the method and logic of standardizing the compilation of the source code of any development language in the compilation plug-in, that is, the hook function defined for the compilation plug-in corresponding to any development language is used to implement the standardization compilation of the source code of any development language in the compilation plug-in. Therefore, the hook functions defined for the compilation plug-ins corresponding to different development languages ​​can be different.

[0105] As shown in the following code, this code defines a series of hook functions (i.e. pluginHooks) for the compiled plug-in:

[0106] export interface pluginHooks{

[0107] load: loadHook;

[0108] transform:TransformHook;

[0109] generate: GenerateHook;

[0110] optimize:OptimizeHook;

[0111] compress: CompressHook;

[0112] sealed: SealedHook;

[0113] }

[0114] Among them, load, transform, generate, optimize and sealed are all hook functions defined for the compilation plug-in. The hook function load can be used to convert the source code file into a syntax tree (AST); the hook function transform can be used to process the converted syntax tree; the hook function generate can be used to generate the standard code file of the application (that is, the code file of the standard language) through the information-processed syntax tree; the hook function optimize can be used for code optimization; the hook function compress can be used for code compression; the hook function sealed can be used for code packaging.

[0115] It should be noted that the writer of the application in the present application only needs to focus on the writing process of the application using the target development language of his or her choice, and does not need to focus on the compilation process of standardizing the source code of the target development language. That is, the compilation process can be imperceptible to the user. Therefore, the compilation plug-in, the compilation program, and the hook function defined by the compilation plug-in can all be imperceptible to the user and do not need to be understood.

[0116] The conversion correspondence between each file type under any of the above development languages ​​and the file type under the standard language is to define which file type of code file under the standard language the code file of each file type under the development language needs to be converted into. For example, if there is a conversion correspondence between the file type W1 under the development language (which can be any of the multiple file types under the development language) and the file type W2 under the standard language, it means that when the code file of the file type W1 under the development language is compiled and processed in a standardized manner, the code file of the file type W1 needs to be compiled and converted into the code file of the file type W2.

[0117] Optionally, the conversion correspondence can be defined by the suffix of the code file. For example, the conversion correspondence between the above-mentioned file type W1 and file type W2 can be defined by the file suffix of the code file of the file type W1 and the file suffix of the code file of the file type W2. For example, the conversion correspondence can be defined as: the file suffix of the code file with the file suffix of the file type W1 needs to be converted to the file suffix of the code file of the file type W2.

[0118] Exemplarily, the conversion correspondence may be defined by the ResolveExt field (a field used to perform suffix conversion between file types), as shown in the following code:

[0119] ResolveExt{

[0120] js: 'ts',

[0121] }

[0122] This code segment defines the need to convert a Js type code file (file suffix is ​​js) into a Ts type code file (file suffix is ​​ts).

[0123] The thread configuration information of the compilation plug-in corresponding to any of the above development languages ​​is used to indicate whether the plug-in task of the compilation plug-in corresponding to any of the development languages ​​needs to start a compilation sub-thread (i.e., a single thread started additionally in addition to the compilation main thread) for execution.

[0124] Exemplarily, the thread configuration information may be defined through a WorkerMethods field (a field used to define a working method) and a supportWorker field (a field used to define support for single-threaded work).

[0125] Step S102, obtaining a program source code package of an application program written in a target development language.

[0126] Specifically, after the application programmer selects (ie configures) the target development language to be used, the application programmer can use the selected target development language in the compilation client to write the application.

[0127] Therefore, the compiling client can obtain the program source code package of the application program written in the target development language. The program source code package is the code package of the application program written in the target development language in the compiling client by the writer of the application program.

[0128] Step S103, calling the compilation plug-in corresponding to the target development language, performing standard compilation processing on the program source code package, and generating a program standard package; the program standard package adopts the standard language of the application program, and the program standard package is used to run the written application program.

[0129] Specifically, after obtaining the program source code package of an application written in the target development language, the compilation client can automatically call the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package, that is, compile the program source code package into a code package in the standard language of the application to generate a program standard package.

[0130] The program specification package is a code package that uses the specification language of the application program. The program specification package is used to run the application program written by the application program writer.

[0131] The process in which the compiling client calls the compiling plug-in corresponding to the target development language to perform standardized compiling processing on the program source code package to generate a program standard package may include:

[0132] The compilation client can call the compilation plug-in corresponding to the target development language to filter the key source code files used to build the application from the program source code package. It can be understood that the program source code package usually contains some code files that are not used to build the application (such as some intermediate code files generated by the intermediate process). Therefore, the compilation client can identify and filter out the code files used to build the application from the program source code package. The filtered code files used to build the application can be called key source code files.

[0133] Thus, the compilation client can perform standardized compilation processing on the key source code file to generate a key specification file corresponding to the key source code file. The key specification file is a code file obtained after compiling the key source code file into the standard language of the application.

[0134] In addition, the above-mentioned key source code files can also be used to call some non-code files (which can be called additional files). For example, the non-code files can be callable, non-code files such as pictures, icons, product lists, etc. The non-code files can be provided by the application programmer in the compilation client (such as uploaded).

[0135] Therefore, the compilation client can obtain the additional file called by the above-mentioned key source code file, and can integrate the additional file with the compiled key specification file to generate a program specification package. The program specification package can include the compiled key specification file and the additional file, so that when the application program written by the program specification package is subsequently run, the corresponding additional file can also be called by the compiled key specification file.

[0136] Furthermore, the process in which the compilation client calls the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package may also include:

[0137] The program source code package may include source code files of multiple file types under the target development language. Therefore, the compilation client can call the compilation plug-in corresponding to the target development language, and convert each source code file in the program source code package (that is, the code file of each file type under the target development language in the program source code package) into a standard file of the corresponding file type under the standard language of the application program according to the conversion correspondence between each file type under the target development language and the file type under the standard language. The standard file is a code file using the standard language.

[0138] It can be understood that in the process of converting the source code files in the target development language in the program source code package into standard files of a file type with a conversion correspondence in the standard language, it is necessary to compile and convert the file suffix of the source code files in the target development language into a file suffix of a file type with a conversion correspondence in the standard language.

[0139] Among them, the source code files in the above-mentioned program source code package that need to be converted into corresponding standard files may include the above-mentioned key source code files (the key source code files may include source code files of multiple file types under the target development language), that is, when the compilation client calls the compilation plug-in corresponding to the target development language, according to the conversion correspondence between each file type under the target development language and the file type under the standard language, each source code file in the program source code package is converted into the corresponding standard file. The converted source code files may only include the key source code files in the program source code package used to build the application program.

[0140] Furthermore, the compiling client can generate a program specification package of the written application program through the specification file obtained by the above conversion (such as the specification file obtained by converting the key source code file).

[0141] Optionally, the plug-in task of compiling the plug-in corresponding to the target development language may include a file conversion task, which is a task of converting the source code file of the target development language in the program source code package into a standard file of the corresponding file type under the standard language.

[0142] Therefore, the process in which the compilation client calls the compilation plug-in corresponding to the target development language and converts each source code file in the program source code package into a corresponding standard file according to the conversion correspondence between each file type in the target development language and the file type in the standard language may also include:

[0143] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task needs to start a compilation sub-thread for execution, the compilation client can create a new compilation sub-thread for the compilation main thread of the compilation plug-in corresponding to the target development language, so that the compilation client can call the created compilation sub-thread to execute the file conversion task, so as to convert each source code file in the program source code package into a corresponding standard file under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language.

[0144] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task does not need (i.e., there is no need) to start a compilation sub-thread for execution, the compilation client can directly call the compilation main thread of the compilation plug-in to execute the file conversion task, so as to convert each source code file in the program source code package into a corresponding standard file under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language.

[0145] In addition, the process in which the compilation client calls the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package may also include:

[0146] The compilation client can call the compilation plug-in corresponding to the target development language to perform syntax analysis on the program source code package to generate a syntax tree (AST) of the program source code package. Here, the syntax analysis of the program source code package can be performed only on the above-mentioned key source code files in the program source code package, and the generated syntax tree of the program source code package can be the syntax tree of the key source code files.

[0147] Furthermore, the compiling client can perform syntax parsing on the syntax tree, and can generate (i.e., construct) the above-mentioned program source code package based on the result of syntax parsing (such as the parsed syntax). The process of generating the program source code package based on the result of syntax parsing can be the process of converting the source code files (such as key source code files) to which the syntax tree belongs into corresponding standard files under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language based on the result of syntax parsing.

[0148] See also Figure 4 , Figure 4 Schematic diagram of the architecture of a compiled application provided by an embodiment of the present application. Figure 4 As shown, the data represented by the oval in the figure can be the relevant hook function used in the compilation process. The process of normalizing the compilation of the program source code package may include the operation of buildStart (a hook function for starting compilation), the operation of AppStruct (obtaining the structure of the application, that is, obtaining the code file used to build the application), the operation of collectEntryFiles (collecting the entry file of the application), the operation of Resolve&loadFile&transform (representing the path of the local file to be parsed & the code written by the writer to be loaded in the compilation plug-in & the format conversion of the code file, which is the conversion of the above file type), and the operation of buildEnd (a hook function for ending the compilation). codeFiles can be the initial code package obtained after normalized compilation, and the code package can be a code package that has undergone privacy processing (such as obfuscation processing).

[0149] In the present application, a series of optimization processes can also be performed on the initial code package obtained by the standardized compilation to obtain the final program specification package. Here, the series of optimization processes may include the operations of BundleAsset (a hook function used for resource packaging, such as packaging of the compiled standard language code and non-code files that need to be called), optimize (a hook function used to perform specific optimization operations, and the specific optimization operations can be set according to actual needs, such as code compression optimization operations, code deletion optimization operations, or / and code obfuscation optimization operations, etc.), beforeUpload (a hook function before uploading files, such as a hook function used to check the relevant basic information of the written application before uploading the program specification package), and afterUpload (a hook function used for callback after the file is uploaded).

[0150] In addition, the Watcher in the figure is a monitor used to monitor the compilation process of the program source code package, such as monitoring whether the program source code package written during the compilation process has changed (onFileChanges), whether the changed program source code package needs to be recompiled (AddWatchFiles), etc. fileUtils is a program unit used to start the monitor.

[0151] Through the above process, the compilation and optimization of the program source code package are realized, and the final program standard package can be obtained.

[0152] See also Figure 5 , Figure 5 1 is a schematic diagram of the effect of a compilation interface of a compilation client provided in an embodiment of the present application. Figure 5 As shown, the compilation interface may be a related interface for the application writer to compile the application in the compilation client, and the compilation interface may include multiple development languages ​​that the application writer can select. The compilation interface here may include configuration information entered by the application writer, and the configuration information may be the above-mentioned information for selecting the target development language required for application compilation, and the target development language configured here may include TypeScript and Less.

[0153] Taking the application as a small program as an example, the compilation interface can also include a simulated running small program interface, which is a program interface for simulating the running of the above-written application. Figure 6 Corresponding to the relevant description in the embodiment.

[0154] The compilation client can also upload the program specification package compiled above to the backend server to which the compilation client belongs, so that the backend server can store the received program specification package on the server disk of the backend server, that is, the backend server can store the program specification package on its server disk.

[0155] After the program specification package is saved to the server disk, the target terminal (user terminal) can initiate (send) a program running request to the backend server. The program running request is used to request the running of the application program written by the author of the above application program. After receiving the program running request, the backend server can read the program specification package saved to the server disk and return the read program specification package to the target terminal.

[0156] After receiving the program specification package returned by the background server, the target terminal can use the program specification package to run the above-mentioned application in the application's operating environment (such as the applet operating environment), thereby enabling the user to run the application written by the application's writer.

[0157] The application written by the application writer can be oriented to (i.e., open to) a wide range of users, so that the user can run the application written by the writer. In an exemplary application scenario, the application written by the application writer is an application for an online store of a merchant, so the application can be oriented to a wide range of buyers, and the target terminal can be the user terminal of the buyer.

[0158] This application has transformed the overall compilation process of the developer tool (i.e., the compilation client), and expanded the compilation capabilities of the developer tool through plug-ins, so that users do not need to rely on third-party tools and frameworks (tools and frameworks used to write applications in high-level languages ​​other than the standard language), so that users are unaware of the standard language and directly use the selected high-level language (such as the target development language) to develop applications. Users do not need to pay attention to the content of the intermediate product of converting high-level language files (i.e., source code files written in the target development language) into standard format files (such as code files using standard languages), but only need to pay attention to the code content of the high-level language they use, thereby improving the user's application development efficiency and reducing the user's application development cost, and greatly reducing the user's understanding cost of the entire development process of the application. At the same time, this application also provides a series of hook functions in the compilation process, which enables more customized compilation process processing of applications in developer tools, thereby also ensuring the compilation effect of the application.

[0159] In one embodiment, the compilation client modified in this application can also be used in the scenario of writing and compiling mini-games, such as the mini-program written above can be the mini-game written by the developer. In this application, developers who support mini-games can flexibly choose the development language they are familiar with (such as TypeScript) in the compilation client modified in this application to quickly write mini-games. After the developer completes the writing of the program source code package of the mini-game, the compilation client can also automatically implement the standardized compilation processing of the mini-game written by the developer (this process can be imperceptible to the developer) to quickly generate the program specification package of the mini-game. Thus, the program specification package generated for the mini-game can realize the click-and-play of the written mini-game.

[0160] It can be seen that the application of the method provided in the present application in the development scenario of mini-games has excellent application effects. The use of the compilation client modified in the present application can realize fast and flexible writing of mini-games, as well as automated standardized compilation, which greatly reduces the difficulty of mini-game development for developers. Developers can easily develop various types of mini-games for the public to play instantly without downloading them according to their actual needs, which can also gradually improve the popularity and playability of mini-games in the application market.

[0161] The compilation client of the present application can be configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications. The compilation client can respond to configuration operations for the development language and obtain the target development language configured for application compilation; the target development language is at least one of the multiple development languages; and the program source code package of the application written based on the target development language can be obtained; thus, the compilation plug-in corresponding to the target development language can be called to perform standardized compilation processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application, and the program specification package is used to run the written application. The method proposed in the present application, since the compilation client is configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications, supports developers to flexibly select the target development language they need to adopt from the multiple development languages, so that developers can use the selected target development language to write applications. Subsequently, the compilation client can also use the compilation plug-in corresponding to the target development language to automatically realize the standardized compilation of the program source code package written by the developer in the target development language, thereby obtaining a program specification package using the standard language of the application, and the written mini-program can be run through the program specification package; it can be seen that the present application can flexibly select the development language for writing the application according to the actual needs of the developer, and there is no need to build an additional third-party framework for writing the application for the selected development language. Therefore, the flexibility of writing the mini-program is improved and the difficulty of writing the mini-program is reduced.

[0162] In another embodiment, after obtaining the above-mentioned program source code package, the compiling client can write the program source code package to the client disk of the compiling client, without writing the program specification package that can be compiled by the program source code package to the client disk. When it is necessary to simulate the running of the written application program in the compiling client, the program source code package written to the disk can be read in real time on the client disk, and the read program source code package can be standardized and compiled in real time, so as to simulate the running of the written application program in the compiling client through the compiled specification file.

[0163] Among them, the program source code package stored in the client disk may include a source code main package of the written application and N source code sub-packages, where N is a positive integer. The source code main package can be used to run the main program of the written application (i.e., the main program, such as the entry program of the written application), and the N source code sub-packages can be used to run the sub-programs of the written application. Different source code sub-packages can be used to run different sub-programs of the written application. Optionally, different sub-programs of the written application can correspond to different application functions of the written application, and the application function can also be called an application task of the written application.

[0164] Therefore, the program specification package submitted (i.e., sent) to the background server can be generated after the application writer determines that the program source code package of the application written is correct, triggers the upload operation of the program source code package in the compilation client, and the compilation client calls the compilation plug-in corresponding to the target development language to perform overall standardized compilation processing on the program specification package.

[0165] For example, the program specification package submitted to the backend server may be a code package obtained by the compilation client calling the compilation plug-in corresponding to the target development language, and performing standardized compilation processing on the source code main package and N source code sub-packages of the above-mentioned application program. The code package may include a standard main package under the standard language compiled from the source code main package, and N standard sub-packages under the standard language compiled from the N source code sub-packages.

[0166] Before the upload operation of the program source code package is triggered in the compilation client, the compilation client does not need to perform overall standardized compilation processing on the program source code package of the written application, that is, there is no need to perform standardized compilation processing on the main source code package and N source code sub-packages of the application. Instead, it only needs to compile the main source code package of the written application when it is necessary to simulate the running of the written application, so as to run the main program of the written application first, and when it is necessary to simulate the running of a sub-program of the written application (such as the author of the application triggers the simulated running of a sub-program of the written application based on the running main program), then read the source code sub-package corresponding to the sub-program from the disk, and compile the source code sub-package corresponding to the sub-program in real time to simulate the running of the sub-program. For details, please refer to the following Figure 7 Corresponding to the relevant description in the embodiment, Figure 7 The corresponding embodiment describes the relevant process of simulating the running of the written application program on the compiling client.

[0167] See also Figure 6 , Figure 61 is a flow chart of a method for simulating the running of an application program provided in an embodiment of the present application. A simulator may be configured in the compilation client, and the simulator may be used to simulate the running of the written application program. Figure 6 As shown, the method may include:

[0168] Step S201, in response to a simulated running operation for the written application, the simulator is called to read a source code main package from a client disk.

[0169] Specifically, the simulated operation for the written application can be triggered by the writer of the application in the compiling client. The compiling client can respond to the simulated operation for the written application and call the simulator to read the source code main package of the written application from the client disk.

[0170] In other words, when the compiling client receives the simulated running operation triggered for the written application, it can read the source code main package of the written application from the client disk.

[0171] Step S202, calling the simulator to submit the read source code main package to the compilation plug-in corresponding to the target development language.

[0172] Specifically, the compilation client can call the simulator to submit (i.e., transfer) the read source code main package to the compilation plug-in corresponding to the target development language to request the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the source code main package, as described below.

[0173] Step S203, calling the compilation plug-in corresponding to the target development language, performing standardized compilation processing on the source code main package, and generating a standardized main package corresponding to the source code main package.

[0174] Specifically, the compilation client can call the compilation plug-in corresponding to the target development language to perform real-time standardized compilation processing on the source code main package submitted by the simulator to generate a standard main package corresponding to the source code main package. The standard main package uses the standard language of the application program. The standard main package is the code package obtained after compiling the source code main package of the target development language into the standard language. In this application, the standard main package obtained by real-time compilation can be cached in the memory of the compilation client, and the standard main package does not need to be stored on the client disk of the compilation client.

[0175] The specific principle of compiling the source code main package into a standard main package can be found in the above Figure 3 The relevant compilation process described in the corresponding embodiment.

[0176] Step S204, calling the simulator to simulate running the main program of the written application based on the standard main package.

[0177] Specifically, the compilation client can call the simulator to obtain the standard main package through the above compilation, and simulate the operation of the main program of the written application. In the process of simulating the operation of the main program of the written application, the author of the application can also trigger the simulation operation of the subprogram of the written application, as described below.

[0178] When the compilation client obtains the trigger operation for the main program of the simulated operation, it can call the simulator to identify and parse the subprogram that the trigger operation wants to trigger the operation of the written application, and can read the source code subpackage corresponding to the subprogram from the client disk. The trigger operation is triggered by the application programmer in the compilation client. For example, the trigger operation can be a click operation on the program interface of the simulated main program by the application programmer.

[0179] The compilation client can call the simulator to submit (i.e., transfer) the source code subpackage that it has read to the compilation plug-in corresponding to the target development language, so that the compilation plug-in corresponding to the target development language can be called to perform real-time standardized compilation processing on the source code subpackage that has been read to generate a standard subpackage corresponding to the source code subpackage that has been read. The standard subpackage is the code package obtained after compiling and converting the source code subpackage that has been read into the standard language. Similarly, the standard subpackage obtained by real-time compilation can also be cached in the memory of the compilation client without being stored on the client disk of the compilation client.

[0180] Thus, the compilation client can call the standard subpackage obtained by the simulator through compilation to simulate the running of the subprogram corresponding to the written application (that is, the subprogram to which the source code subpackage read above belongs). This subprogram is the subprogram that the application writer wants to simulate running through the above trigger operation.

[0181] See also Figure 7 , Figure 7 1 is a schematic diagram of a scenario of simulating the operation of an application program written in an embodiment of the present application. Figure 7 As shown, the program source code package written by the application programmer in the target development language can be stored in the client disk of the compiling client. The program source code package can include the source code main package of the written application and N source code sub-packages (which can include source code sub-package 1 to source code sub-package N here).

[0182] When triggering the simulation run of the written application in the compilation client, the compilation client can call the simulator to first read the source code main package of the written application from the client disk, and can call the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the read source code main package to obtain the standard main package corresponding to the source code main package. The compilation client can cache the standard main package in the client memory of the compilation client, and can run the main program of the written application through the cached standard main package. The corresponding program interface of the running main program can also be displayed in the compilation interface of the compilation client.

[0183] Furthermore, the writer of the application can also trigger (it can be triggered in the corresponding program interface of the running main program, or triggered in the relevant program interface of the currently running subprogram) the running of the subprogram of the written application, such as triggering the running of subprogram 2 of the written application here. Then, the compilation client can call the simulator to read the source code subpackage 2 corresponding to the subprogram 2 from the client disk, and can call the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the read source code subpackage 2 to obtain the standard subpackage 2 corresponding to the source code subpackage 2, and the standard subpackage 2 can also be cached in the client memory of the compilation client. The compilation client can call the simulator to run the subprogram 2 of the written application on the basis of the running main program of the written application through the cached standard subpackage 2.

[0184] Through the above process of the present application, the real-time compilation and real-time running of the written application is realized in the compilation client, and during the running process, the subroutine that needs to be run currently can be compiled on demand without compiling all the subroutine of the written application at the same time, thereby reducing the compilation calculation amount when simulating the running of the written application and saving the overhead of simulating the running of the written application.

[0185] See also Figure 8 , Figure 8 Schematic diagram of a framework for application compilation provided by an embodiment of the present application. Figure 8 As shown, the framework may include multiple execution modules (may be referred to as modules for short, specifically including modules M1 to M6).

[0186] Among them, module M1 means that the user (i.e., the writer of the above application) can use the selected target development language to write the application to obtain the high-level language source code, and the high-level language source code can be the program source code package obtained by the above writing. Module M2 can mean that the compilation client can perform built-in compilation processing on the high-level language source code written by the user, that is, perform standardized compilation processing internally, and the compilation process can be imperceptible to the user, and the user only needs to focus on the process of writing the application in the target development language selected by the user.

[0187] Module M3 means that during the period when the user writes the application, the compiling client can detect whether the user has modified the code (i.e., source code) written in the target development language for the application, that is, detect whether the code written for the application has changed. If no change has occurred, the compiling client does not need to recompile the high-level language source code written by the user. If a change has occurred, the compiling client needs to recompile the high-level language source code written by the user. Module M4 is a standard code file (i.e., the compiled code here, such as the above-mentioned standard main package, standard sub-package, program standard package, etc.) compiled from the high-level language source code written by the user, which can be stored in the client memory (which can be referred to as memory) of the compiling client.

[0188] Furthermore, module M5 refers to the ability to call a simulator to preview and run the compiled code, such as previewing and running the main program of the application program written through the compiled specification main package, or previewing and running the subprogram of the application program written through the compiled specification subpackage, etc. Module M6 refers to the ability to cache the code (such as the program specification package) compiled from the high-level language source code written by the user in the client memory of the compiling client. After the high-level language source code is confirmed to be correctly written (such as after the writer of the application program triggers the confirmation and upload operation of the high-level language source code), the compiling client can upload the program specification package in the client memory to the backend server for subsequent object terminals to call.

[0189] Through the above modules of this application, it is possible to accurately write, compile, preview, run and upload the application.

[0190] Through the implementation of the above-mentioned scheme of the present application, users can directly use the desired high-level language to develop applications without having to learn and use third-party compilation tools and development frameworks for applications. Users do not need to deal with trivial events such as the environment installation required for the high-level language. At the same time, the entire compilation process is uniformly managed and controlled by the developer tools, and the compilation performance is minimized. Through the various hook functions and configurable options provided (such as configuration options for the target development language to be selected), customizable compilation scenarios for application code can also be achieved, so that flexible and user-imperceptible compilation processing can be achieved for applications written in high-level languages.

[0191] See also Fig. 9 , Fig. 9 1 is a schematic diagram of a structure of a compiling device for an application provided in an embodiment of the present application. The compiling device for the application can be applied to a compiling client, and the compiling client is configured with compiling plug-ins corresponding to multiple development languages ​​for writing application programs. Fig. 9 As shown, the application compilation device 90 may include: a response module 901 , an acquisition module 902 and a compilation module 903 .

[0192] A response module 901 is used to respond to the configuration operation for the development language and obtain the target development language configured for application compilation; the target development language is at least one of the multiple development languages;

[0193] An acquisition module 902 is used to acquire a program source code package of an application program written in a target development language;

[0194] The compilation module 903 is used to call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the program source code package, and generate a program specification package; the program specification package adopts the standard language of the application program, and the program specification package is used to run the written application program.

[0195] Optionally, the compilation plug-in corresponding to any development language among the multiple development languages ​​is defined with at least one of the following data:

[0196] Hook functions that are compatible with the standardized compilation of source code in any development language; the conversion correspondence between each file type in any development language and the file type in the standard language; thread configuration information for compiling plug-ins in any development language;

[0197] Among them, the hook function is used to call the compilation program related to the corresponding compilation plug-in when standardizing the compilation of the source code of any development language; the thread configuration information of the compilation plug-in corresponding to any development language is used to indicate whether the plug-in task of the compilation plug-in corresponding to any development language needs to start the compilation sub-thread for execution.

[0198] Optionally, the program source code package includes source code files of multiple file types in the target development language;

[0199] The compilation module 903 calls the compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0200] Calling the compilation plug-in corresponding to the target development language, according to the conversion correspondence between each file type under the target development language and the file type under the standard language, converting each source code file in the program source code package into a standard file of the corresponding file type under the standard language;

[0201] Generate a program specification package based on the specification files corresponding to each source code file in the program source code package.

[0202] Optionally, the plug-in task corresponding to the compilation plug-in of the target development language includes a file conversion task, and the file conversion task is used to convert each source code file in the program source code package into a standard file of a corresponding file type under the standard language;

[0203] The compilation module 903 calls the compilation plug-in corresponding to the target development language, and converts each source code file in the program source code package into a standard file of the corresponding file type under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language, including:

[0204] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task needs to start a compilation sub-thread for execution, a compilation sub-thread is created for the compilation main thread of the compilation plug-in corresponding to the target development language, and the created compilation sub-thread is called to execute the file conversion task;

[0205] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task does not need to start a compilation sub-thread for execution, the compilation main thread is called to execute the file conversion task.

[0206] Optionally, the compilation module 903 calls a compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0207] Call the compilation plug-in corresponding to the target development language to filter the key source code files used to build the application from the program source code package;

[0208] Perform standardized compilation on key source code files to generate key specification files corresponding to the key source code files;

[0209] Obtain additional files that need to be called by key source code files, integrate the additional files with key specification files, and generate a program specification package; additional files are non-code files.

[0210] Optionally, the compilation module 903 calls a compilation plug-in corresponding to the target development language to perform standardized compilation processing on the program source code package to generate a program standard package, including:

[0211] Call the compilation plug-in corresponding to the target development language, perform syntax analysis on the program source code package, and generate a syntax tree for the program source code package;

[0212] The syntax tree is parsed and a program specification package is generated based on the result of the syntax parsing.

[0213] Optionally, the application compilation device 90 further includes a disk storage module 904, and the disk storage module 904 is used to:

[0214] Write the obtained program source code package to the client disk of the compiling client;

[0215] Among them, the program source code package stored in the client disk includes the source code main package of the written application and N source code sub-packages, N is a positive integer, the source code main package is used to run the main program of the written application, and the N source code sub-packages are used to run the sub-programs of the written application.

[0216] Optionally, a simulator is configured in the compilation client, and the simulator is used to simulate the running of the application program; the compilation device 90 of the application program further includes a simulation running module 905, and the simulation running module 905 is used to:

[0217] In response to the simulation operation of the written application, the simulator is called to read the source code main package from the client disk;

[0218] Call the simulator to submit the read source code main package to the compilation plug-in corresponding to the target development language;

[0219] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the source code main package, and generate a standardized main package corresponding to the source code main package;

[0220] Call the simulator to simulate and run the main program of the written application based on the specification main package;

[0221] The compiled standard main package is used to cache in the memory of the compilation client.

[0222] Optionally, during the simulation running of the main program, the simulation running module 905 is further used to:

[0223] When a trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-package corresponding to the sub-program triggered by the trigger operation from the client disk;

[0224] Call the simulator to package the read source code and submit it to the compilation plug-in corresponding to the target development language;

[0225] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the read source code subpackage, and generate a standardized subpackage corresponding to the read source code subpackage;

[0226] Call the simulator to subpackage based on the specification and simulate the subprograms corresponding to the written application;

[0227] The compiled specification sub-packages are used to cache in the memory of the compiling client.

[0228] Optionally, the response module 901 responds to the configuration operation for the development language and obtains a method of the target development language configured for application compilation, including:

[0229] Respond to the configuration operation and obtain configuration information for the development language;

[0230] The configuration information is parsed to determine the target development language configured for application compilation.

[0231] Optionally, the application compilation device 90 further includes an upload module 906, and the upload module 906 is used to:

[0232] Upload the program specification package to the backend server to which the compiling client belongs, so that the backend server stores the program specification package in the server disk of the backend server;

[0233] After the program specification package is stored in the server disk, the target terminal is used to send a program running request to the background server, and the background server is used to read the program specification package from the server disk according to the program running request and return the read program specification package to the target terminal;

[0234] The object terminal is used to run the written application in the application's running environment based on the program specification package returned by the background server.

[0235] According to one embodiment of the present application, Figure 3 The steps involved in the compilation method of the application shown can be obtained by Fig. 9 The various modules in the compiling device 90 of the application shown in the figure are executed. For example, Figure 3 The step S101 shown in FIG. 1 can be performed by Fig. 9 The response module 901 in is executed, Figure 3 The step S102 shown in FIG. 1 can be performed by Fig. 9 The acquisition module 902 is executed; Figure 3 The step S103 shown in FIG. 1 can be performed by Fig. 9 The compilation module 903 in is used for execution.

[0236] The compilation client of the present application can be configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications. The compilation client can respond to configuration operations for the development language and obtain the target development language configured for application compilation; the target development language is at least one of the multiple development languages; and the program source code package of the application written based on the target development language can be obtained; thus, the compilation plug-in corresponding to the target development language can be called to perform standardized compilation processing on the program source code package to generate a program specification package; the program specification package adopts the specification language of the application, and the program specification package is used to run the written application. The device proposed in the present application, since the compilation client is configured with compilation plug-ins corresponding to multiple development languages ​​for writing applications, supports developers to flexibly select the target development language they need to adopt from the multiple development languages, so that developers can use the selected target development language to write applications. Subsequently, the compilation client can also use the compilation plug-in corresponding to the target development language to automatically realize the standardized compilation of the program source code package written by the developer in the target development language, thereby obtaining a program specification package using the standard language of the application, and the written mini-program can be run through the program specification package. It can be seen that the present application can flexibly select the development language for writing the application according to the actual needs of the developer, and there is no need to build an additional third-party framework for writing the application for the selected development language. Therefore, the flexibility of writing the mini-program is improved and the difficulty of writing the mini-program is reduced.

[0237] According to one embodiment of the present application, Fig. 9 The various modules in the compilation device 90 of the application shown can be separately or completely combined into one or several units to constitute, or one (some) of the units can be further divided into multiple functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of a module can also be implemented by multiple units, or the functions of multiple modules can be implemented by one unit. In other embodiments of the present application, the compilation device 90 of the application can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0238] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0239] According to one embodiment of the present application, a computer program capable of executing the steps involved in the corresponding methods shown in the embodiments of the present application can be run on a general-purpose computer device (the computer device may include processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM)) to construct the following. Fig. 9 The compiling device 90 of the application program shown in FIG. The computer program may be recorded on a computer-readable recording medium, and may be loaded into the computer device through the computer-readable recording medium and run therein.

[0240] See also Fig.10 , Fig.10 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.10 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, in some embodiments, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0241] exist Fig.10In the computer device 1000 shown, the network interface 1004 can provide a network communication function; and the user interface 1003 is mainly used to provide an input interface for the user; the computer device 1000 can be applied to a compilation client, and the compilation client is configured with compilation plug-ins corresponding to multiple development languages ​​for writing application programs, and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0242] In response to the configuration operation for the development language, obtaining a target development language configured for application compilation; the target development language is at least one of the multiple development languages;

[0243] Obtain the program source code package of the application written in the target development language;

[0244] The compilation plug-in corresponding to the target development language is called to perform standardized compilation processing on the program source code package to generate a program specification package; the program specification package adopts the standard language of the application program, and the program specification package is used to run the written application program.

[0245] In a feasible implementation, the compilation plug-in corresponding to any development language among the multiple development languages ​​is defined with at least one of the following data:

[0246] Hook functions that are compatible with the standardized compilation of source code in any development language; the conversion correspondence between each file type in any development language and the file type in the standard language; thread configuration information for compiling plug-ins in any development language;

[0247] Among them, the hook function is used to call the compilation program related to the corresponding compilation plug-in when standardizing the compilation of the source code of any development language; the thread configuration information of the compilation plug-in corresponding to any development language is used to indicate whether the plug-in task of the compilation plug-in corresponding to any development language needs to start the compilation sub-thread for execution.

[0248] In a feasible implementation, the program source code package includes source code files of multiple file types in the target development language;

[0249] The processor 1001 may also be used to call the device control application stored in the memory 1005 to implement:

[0250] Calling the compilation plug-in corresponding to the target development language, according to the conversion correspondence between each file type under the target development language and the file type under the standard language, converting each source code file in the program source code package into a standard file of the corresponding file type under the standard language;

[0251] Generate a program specification package based on the specification files corresponding to each source code file in the program source code package.

[0252] In a feasible implementation, the plug-in task corresponding to the compilation plug-in of the target development language includes a file conversion task, and the file conversion task is used to convert each source code file in the program source code package into a standard file of a corresponding file type under the standard language;

[0253] The processor 1001 may also be used to call the device control application stored in the memory 1005 to implement:

[0254] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task needs to start a compilation sub-thread for execution, a compilation sub-thread is created for the compilation main thread of the compilation plug-in corresponding to the target development language, and the created compilation sub-thread is called to execute the file conversion task;

[0255] If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task does not need to start a compilation sub-thread for execution, the compilation main thread is called to execute the file conversion task.

[0256] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0257] Call the compilation plug-in corresponding to the target development language to filter the key source code files used to build the application from the program source code package;

[0258] Perform standardized compilation on key source code files to generate key specification files corresponding to the key source code files;

[0259] Obtain additional files that need to be called by key source code files, integrate the additional files with key specification files, and generate a program specification package; additional files are non-code files.

[0260] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0261] Call the compilation plug-in corresponding to the target development language, perform syntax analysis on the program source code package, and generate a syntax tree for the program source code package;

[0262] The syntax tree is parsed and a program specification package is generated based on the result of the syntax parsing.

[0263] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0264] Write the obtained program source code package to the client disk of the compiling client;

[0265] Among them, the program source code package stored in the client disk includes the source code main package of the written application and N source code sub-packages, N is a positive integer, the source code main package is used to run the main program of the written application, and the N source code sub-packages are used to run the sub-programs of the written application.

[0266] In a feasible implementation manner, a simulator is configured in the compilation client, and the simulator is used to simulate the running of the application program; the processor 1001 can also be used to call the device control application program stored in the memory 1005 to implement:

[0267] In response to the simulation operation of the written application, the simulator is called to read the source code main package from the client disk;

[0268] Call the simulator to submit the read source code main package to the compilation plug-in corresponding to the target development language;

[0269] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the source code main package, and generate a standardized main package corresponding to the source code main package;

[0270] Call the simulator to simulate and run the main program of the written application based on the specification main package;

[0271] The compiled standard main package is used to cache in the memory of the compilation client.

[0272] In a feasible implementation, during the simulation of running the main program, the processor 1001 may also be used to call the device control application stored in the memory 1005 to implement:

[0273] When a trigger operation for the main program of the simulation operation is obtained, the simulator is called to read the source code sub-package corresponding to the sub-program triggered by the trigger operation from the client disk;

[0274] Call the simulator to package the read source code and submit it to the compilation plug-in corresponding to the target development language;

[0275] Call the compilation plug-in corresponding to the target development language, perform standardized compilation processing on the read source code subpackage, and generate a standardized subpackage corresponding to the read source code subpackage;

[0276] Call the simulator to subpackage based on the specification and simulate the subprograms corresponding to the written application;

[0277] The compiled specification sub-packages are used to cache in the memory of the compiling client.

[0278] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0279] Respond to the configuration operation and obtain configuration information for the development language;

[0280] The configuration information is parsed to determine the target development language configured for application compilation.

[0281] In a feasible implementation manner, the processor 1001 may also be used to call a device control application stored in the memory 1005 to implement:

[0282] Upload the program specification package to the backend server to which the compiling client belongs, so that the backend server stores the program specification package in the server disk of the backend server;

[0283] After the program specification package is stored in the server disk, the target terminal is used to send a program running request to the background server, and the background server is used to read the program specification package from the server disk according to the program running request and return the read program specification package to the target terminal;

[0284] The object terminal is used to run the written application in the application's running environment based on the program specification package returned by the background server.

[0285] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the description of the compiling method of the above application in each embodiment of the present application, and can also execute the above Fig. 9 The description of the compiling device 90 of the above application program in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0286] In addition, it should be pointed out here that: the present application also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium. When the processor executes the computer program, the description of the method for compiling the application in each embodiment of the present application can be performed, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in the present application, please refer to the description of the method embodiment of the present application.

[0287] As an example, the above-mentioned computer program may be deployed on one computer device for execution, or deployed on multiple computer devices located at one location for execution, or executed on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.

[0288] The computer-readable storage medium may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may include both an internal storage unit and an external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0289] The present application provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the description of the compilation method of the above-mentioned application in each embodiment of the present application, and therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in the present application, please refer to the description of the method embodiment of the present application.

[0290] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0291] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0292] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for compiling an application program, It is characterized in that The method is applied to a compiling client, wherein the compiling client is configured with compiling plug-ins corresponding to a plurality of development languages ​​for writing application programs; the method comprises: In response to the configuration operation for the development language, obtaining a target development language configured for application compilation; the target development language is at least one of the multiple development languages; Obtaining a program source code package of an application program written in the target development language; Calling the compilation plug-in corresponding to the target development language, performing standardized compilation processing on the program source code package, and generating a program specification package; the program specification package adopts the specification language of the application program, the program specification package is used to run the written application program, the program source code package is stored in the client disk of the compilation client, the program source code package includes a source code main package corresponding to the main program of the written application program and N source code sub-packages corresponding to N sub-programs, N is a positive integer, and the compilation client is configured with a simulator for simulating the running of the application program; In response to the simulated running operation for the written application, the simulator is called to read the source code main package from the client disk, and the read source code main package is submitted to the compilation plug-in corresponding to the target development language, so as to call the compilation plug-in corresponding to the target development language to perform real-time standardized compilation processing on the source code main package, generate a standard main package corresponding to the source code main package, and cache the standard main package in the memory of the compilation client, call the simulator to simulate the running of the main program based on the standard main package cached in the memory, and display the program interface of the main program when being simulated and run; When a trigger operation for the main program of the simulated operation is obtained, the simulator is called to read the source code subpackage corresponding to the subprogram triggered by the trigger operation from the client disk, and the read source code subpackage is submitted to the compilation plug-in corresponding to the target development language, so as to call the compilation plug-in corresponding to the target development language to perform real-time standardized compilation processing on the read source code subpackage, generate a standard subpackage corresponding to the read source code subpackage, and cache the generated standard subpackage in the memory of the compilation client, call the simulator to simulate the operation of the corresponding subprogram based on the standard subpackage cached in the memory, and display the program interface of the subprogram when it is simulated.

2. The method according to claim 1, It is characterized in that The compilation plug-in corresponding to any development language of the multiple development languages ​​is defined with at least one of the following data: A hook function adapted to the source code of the standardized compilation of any development language; a conversion correspondence between each file type under any development language and the file type under the standardized language; thread configuration information of the plug-in compiled corresponding to any development language; Among them, the hook function is used to call the compilation program related to the corresponding compilation plug-in when the source code of any development language is compiled in a standardized manner; the thread configuration information of the compilation plug-in corresponding to any development language is used to indicate whether the plug-in task of the compilation plug-in corresponding to any development language needs to start the compilation sub-thread for execution.

3. The method according to claim 2, It is characterized in that The program source code package includes source code files of multiple file types in the target development language; The calling of the compiling plug-in corresponding to the target development language to perform standardized compiling processing on the program source code package to generate a program standard package includes: Calling a compiling plug-in corresponding to the target development language, and converting each source code file in the program source code package into a standard file of a corresponding file type under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language; The program specification package is generated based on the specification files respectively corresponding to each source code file in the program source code package.

4. The method according to claim 3, It is characterized in that The plug-in task corresponding to the compilation plug-in of the target development language includes a file conversion task, and the file conversion task is used to convert each source code file in the program source code package into a standard file of a corresponding file type under the standard language; The calling of the compiling plug-in corresponding to the target development language, and converting each source code file in the program source code package into a standard file of a corresponding file type under the standard language according to the conversion correspondence between each file type under the target development language and the file type under the standard language, comprises: If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task needs to start a compilation sub-thread for execution, then a compilation sub-thread is created for the compilation main thread of the compilation plug-in corresponding to the target development language, and the created compilation sub-thread is called to execute the file conversion task; If the thread configuration information of the compilation plug-in corresponding to the target development language is used to indicate that the file conversion task does not need to start a compilation sub-thread for execution, the compilation main thread is called to execute the file conversion task.

5. The method according to claim 1, It is characterized in that The calling of the compiling plug-in corresponding to the target development language to perform standardized compiling processing on the program source code package to generate a program standard package includes: Calling a compile plug-in corresponding to the target development language to select key source code files for building an application from the program source code package; Performing standardized compilation processing on the key source code files to generate key specification files corresponding to the key source code files; The additional files required to be called by the key source code files are obtained, and the additional files are integrated with the key specification files to generate the program specification package; the additional files are non-code files.

6. The method according to claim 1, It is characterized in that The calling of the compiling plug-in corresponding to the target development language to perform standardized compiling processing on the program source code package to generate a program standard package includes: Calling a compile plug-in corresponding to the target development language, performing syntax analysis on the program source code package, and generating a syntax tree of the program source code package; The syntax tree is subjected to syntax parsing processing, and the program specification package is generated based on the result of the syntax parsing.

7. The method according to claim 1, It is characterized in that The response is directed to the configuration operation of the development language, and obtaining the target development language configured for application compilation includes: In response to the configuration operation, obtaining configuration information for the development language; The configuration information is parsed to determine the target development language configured for application compilation.

8. The method according to claim 1, It is characterized in that The method further comprises: Uploading the program specification package to the backend server to which the compiling client belongs, so that the backend server stores the program specification package in a server disk of the backend server; After the program specification package is written to the server disk, the target terminal is used to send a program running request to the background server, and the background server is used to read the program specification package from the server disk according to the program running request, and return the read program specification package to the target terminal; The object terminal is used to run the written application in the application running environment based on the program specification package returned by the background server.

9. A compiling device for an application program, It is characterized in that The device is applied to a compiling client, wherein the compiling client is configured with compiling plug-ins corresponding to a plurality of development languages ​​for writing application programs; the device comprises: A response module, used to respond to the configuration operation for the development language, and obtain a target development language configured for application compilation; the target development language is at least one of the multiple development languages; An acquisition module, used to acquire a program source code package of an application program written in the target development language; A compiling module is used to call the compiling plug-in corresponding to the target development language, perform standardized compiling processing on the program source code package, and generate a program specification package; the program specification package adopts the standard language of the application program, the program specification package is used to run the written application program, the program source code package is stored in the client disk of the compiling client, the program source code package includes a source code main package corresponding to the main program of the written application program and N source code sub-packages corresponding to N sub-programs, N is a positive integer, and the compiling client is configured with a simulator for simulating the running of the application program; the compiling device is also used to: In response to the simulated running operation for the written application, the simulator is called to read the source code main package from the client disk, and the read source code main package is submitted to the compilation plug-in corresponding to the target development language, so as to call the compilation plug-in corresponding to the target development language to perform real-time standardized compilation processing on the source code main package, generate a standard main package corresponding to the source code main package, and cache the standard main package in the memory of the compilation client, call the simulator to simulate the running of the main program based on the standard main package cached in the memory, and display the program interface of the main program when being simulated and run; When a trigger operation for the main program of the simulated operation is obtained, the simulator is called to read the source code subpackage corresponding to the subprogram triggered by the trigger operation from the client disk, and the read source code subpackage is submitted to the compilation plug-in corresponding to the target development language, so as to call the compilation plug-in corresponding to the target development language to perform real-time standardized compilation processing on the read source code subpackage, generate a standard subpackage corresponding to the read source code subpackage, and cache the generated standard subpackage in the memory of the compilation client, call the simulator to simulate the operation of the corresponding subprogram based on the standard subpackage cached in the memory, and display the program interface of the subprogram when it is simulated.

10. A computer program product, It is characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 8 when being executed by a processor.

11. A computer device, It is characterized in that The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 8.