Single-code multi-platform compiling method and device

Through the compilation method and device of single code and multi-platform, the goal problem of "one code and multiple terminals" in the existing technology is solved, adaptive compatible compilation is achieved, labor costs are reduced, and functional consistency and user experience are ensured.

CN119718335AInactive Publication Date: 2025-03-28永赢金融租赁有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510232396.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing multi-end compilation framework cannot effectively achieve the goal of "one code and multiple ends", which leads to developers need to invest a lot of energy in tedious configuration and compatibility rewriting to ensure the functional consistency and user experience of the code on different clients.

Method used

It provides a single-code multi-platform compilation method and device. By receiving configuration items, building a program running environment, adjusting the framework configuration trigger, converting the preset source code into assembly language, and executing the assembly language based on the program running environment and the optimal configuration trigger, generating the excited product of the specified platform.

Benefits of technology

It realizes adaptive compatible compilation of single code and multi-platforms, without consuming a lot of manpower, ensures consistency of functions and improves user experience, and reduces the compatibility changes of about 30% of the possible design of open source frameworks to less than 5%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718335A_ABST
    Figure CN119718335A_ABST
Patent Text Reader

Abstract

The invention provides a single-code multi-platform compiling method and device, and is suitable for the technical field of software development, the method comprises the following steps: receiving a configuration item, the configuration item at least comprising a plurality of commands and a specified platform; building a program running environment according to the configuration items, and adjusting a framework configuration trigger; a preset source code is converted into an assembly language, and the source code is obtained through compiling by a developer based on an API interface in advance; and based on a program running environment, according to the optimal configuration trigger and the command execution assembly language in the configuration triggers, obtaining an excited state product of the specified platform. According to the method and the device, a developer only needs to pay attention to service logic and set configuration items, self-adaptive compatible compiling of a single code and multiple platforms can be achieved, a large amount of manpower does not need to be consumed, meanwhile, the function consistency is guaranteed, and the user experience feeling is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a single-code multi-platform compilation method and device. Background Art

[0002] In modern application development, clients come in a variety of forms, including WeChat mini-programs, mobile apps, and web-based technologies. Since the technical frameworks and regulations used by various clients are different, the generated code products also need to be optimized for specific platforms. For example, mini-programs need to be compiled using a specific mini-program language, while mobile apps often call native functions through JSBridge.

[0003] There are many multi-terminal compilation frameworks on the market, among which Taro and UniApp are the most popular. However, since they are open source frameworks, cumbersome configuration and compatibility rewriting issues cannot be avoided when performing personalized customization. Developers have to invest a lot of effort to ensure the functional consistency and user experience of the code on different clients.

[0004] Therefore, the current multi-terminal compilation framework has not truly achieved the goal of "one code for multiple terminals", which is also a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a single-code multi-platform compilation method and device to achieve the purpose of "one code for multiple terminals".

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] The first aspect of the present invention discloses a single-code multi-platform compilation method, the method comprising:

[0008] Receiving a configuration item, wherein the configuration item includes at least a plurality of commands and a specified platform;

[0009] Build the program running environment according to the configuration items and adjust the framework configuration trigger;

[0010] Converting a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface;

[0011] Based on the program running environment, the assembly language is executed according to the optimal configuration trigger in the configuration trigger and the command to obtain an excited state product of the designated platform.

[0012] Preferably, after obtaining the excited state product of the designated platform, the method further comprises:

[0013] Determining whether the excited state product needs to be converted according to the configuration item;

[0014] If the excited state product needs to be converted, the assembly language corresponding to the excited state product is converted into a high-level programming language and output.

[0015] Preferably, the step of building a program operating environment according to the configuration items and adjusting a framework configuration trigger includes:

[0016] Building a program running environment according to the function path, global variables, dependencies and security setting information contained in the configuration items;

[0017] The logical trigger in the framework is configured as an optimal configuration trigger corresponding to the program running environment.

[0018] Preferably, converting the preset source code into assembly language includes:

[0019] Use the self-developed compiler to parse the source code and generate an abstract syntax tree;

[0020] The abstract syntax tree is optimized and converted into assembly language.

[0021] Preferably, the step of executing the assembly language based on the program running environment according to the optimal configuration trigger in the configuration trigger and the command to obtain the excited state product of the designated platform includes:

[0022] activating a corresponding code path in the assembly language based on the program running environment and an optimal configuration trigger in the configuration triggers;

[0023] The activated code path is controlled to be executed according to the command to obtain an excited state product of the designated platform.

[0024] A second aspect of the present invention discloses a single-code multi-platform compilation device, the compilation device comprising:

[0025] A receiving unit, configured to receive a configuration item, wherein the configuration item at least includes a plurality of commands and a specified platform;

[0026] A building unit, used to build a program running environment according to the configuration items and adjust the framework configuration trigger;

[0027] A conversion unit, used to convert a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface;

[0028] An execution unit is used to execute the assembly language based on the program running environment, according to the optimal configuration trigger in the configuration trigger and the command, to obtain an excited state product of the specified platform.

[0029] Preferably, the compiling device further comprises:

[0030] A judging unit, configured to judge whether the excited state product needs to be converted according to the configuration item;

[0031] The conversion unit is used for converting the assembly language corresponding to the excited state product into a high-level programming language and outputting the language if the excited state product needs to be converted.

[0032] Preferably, the building unit comprises:

[0033] A building module, used to build a program running environment according to the function path, global variables, dependencies and security setting information contained in the configuration items;

[0034] The configuration module is used to configure the logical trigger in the framework to the optimal configuration trigger corresponding to the program running environment.

[0035] Preferably, the conversion unit comprises:

[0036] The parsing module is used to parse the source code using the self-developed compiler and generate an abstract syntax tree;

[0037] The conversion module is used to optimize the abstract syntax tree and convert it into assembly language.

[0038] Preferably, the execution unit includes:

[0039] an activation module, configured to activate a corresponding code path in the assembly language based on the program running environment and an optimal configuration trigger in the configuration triggers;

[0040] The execution module is used to control the activated code path to execute according to the command to obtain the excited state product of the specified platform.

[0041] A single-code multi-platform compilation method and device based on the above-mentioned embodiment of the present invention includes: receiving configuration items, the configuration items at least include multiple commands and designated platforms; building a program running environment according to the configuration items, and adjusting the framework configuration trigger; converting a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface; based on the program running environment, executing the assembly language according to the optimal configuration trigger and command in the configuration trigger to obtain an excited state product of the designated platform. In the present invention, developers only need to focus on business logic and set configuration items to achieve adaptive and compatible compilation of single-code multi-platforms without consuming a lot of manpower, while ensuring functional consistency and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0043] Figure 1 A flowchart of a single-code multi-platform compilation method provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of a one-code-multiple-terminal framework structure provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of a single-code multi-platform compilation method provided by an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of a product of the WeChat applet platform provided by an embodiment of the present invention;

[0047] Figure 5 A schematic diagram of a product of an H5 webpage platform provided by an embodiment of the present invention;

[0048] Figure 6 A schematic diagram of a product of an APP platform provided in an embodiment of the present invention;

[0049] Figure 7 A structural block diagram of a single-code multi-platform compilation device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0051] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0052] As can be seen from the background technology, since the mainstream multi-terminal compilation framework on the market is an open source framework, cumbersome configuration and compatibility rewriting problems cannot be avoided during personalized customization. Therefore, a lot of manpower is required in the compilation process, and it is easy to have inconsistent functions and low user experience.

[0053] Therefore, an embodiment of the present invention provides a single-code multi-platform compilation method and device, including: receiving configuration items, the configuration items at least including multiple commands and a specified platform; building a program running environment according to the configuration items, and adjusting the framework configuration trigger; converting a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface; based on the program running environment, executing the assembly language according to the optimal configuration trigger and command in the configuration trigger, and obtaining an excited state product of the specified platform. In the present invention, developers only need to focus on business logic and set configuration items to achieve adaptive and compatible compilation of single-code multi-platforms without consuming a lot of manpower, while ensuring functional consistency and improving user experience.

[0054] See also Figure 1 , shows a flowchart of a single-code multi-platform compilation method provided by an embodiment of the present invention, which is applicable to a one-code multi-terminal framework.

[0055] It should be noted that the one-code-multiple-terminal framework consists of a compilation system and other supplementary functions, among which the compilation system is the core part of the framework, responsible for converting the same set of codes written by developers into codes that can be run on different platforms (such as H5, APP, and mini-programs, etc.), without the need to write independent code for each platform. The compilation system is used to handle code optimization, packaging, and generation of corresponding output files to ensure normal operation in each target environment. Supplementary functions are additional functions or tools, such as debugging tools, state management libraries, routing systems, etc., which are designed to improve the development experience and application performance, allowing developers to build and maintain applications more conveniently.

[0056] Understandably, see Figure 2 The schematic diagram of the one-code-multiple-terminal framework structure shown in FIG. 1 uses TypeScript as the programming language and React as the front-end framework during the development process. The platform uses a self-developed compiler to execute a single-code-multiple-platform compilation method provided in an embodiment of the present invention, providing cross-platform support.

[0057] Specifically, the self-developed compiler includes environment judgement, trigger, executor and converter.

[0058] It should be noted that the framework provides a method for encapsulating compatibility, so that developers do not need to worry about the underlying differences, which helps improve the maintainability and readability of the code. The framework also provides a unified interface, allowing developers to call corresponding functions on different platforms through this interface without having to pay attention to the specific implementation of each platform. This approach simplifies the development process, improves the user experience, truly realizes one code for multiple terminals, incorporates more compatibility writing methods, and reduces the approximately 30% compatibility changes that may be designed by the open source framework to less than 5%.

[0059] It is understandable that different environments (such as WeChat applets, H5 web pages, and native applications) have completely different code implementations when executing the same command. Therefore, the framework will manage functions in different environments in a unified manner. Through encapsulation, these functions are integrated into a private function set, such as the MW.xxx function that contains various encapsulated compatibility functions. A unified encapsulation function is used to implement the corresponding method to the result, eliminating the confusion of n to many or many to n, improving development efficiency, implementing jsbridge encapsulation, adapting to the needs of APP, and realizing the customization of the framework.

[0060] A single-code multi-platform compilation method provided by an embodiment of the present invention is specifically described below. The method includes:

[0061] It should be noted that developers pre-write source code using the compatible API interfaces provided by the One Code Multi-Terminal Framework. These API interfaces are designed to simplify interaction with the underlying system while keeping the code readable and maintainable. Developers only need to focus on business logic without having to consider the underlying implementation details.

[0062] Step S101: receiving configuration items, where the configuration items at least include a plurality of commands and a specified platform.

[0063] In the process of implementing step S101, configuration items input by a developer are received, wherein the configuration items at least include a plurality of commands and a designated platform, and the designated platform is a platform applicable to the final excited state product.

[0064] For example, the excited state products include but are not limited to H5 web products, WeChat applet products and APP products. Among them, H5 web products are applicable to browsers; WeChat applet products are applicable to WeChat applet; APP products are applicable to APP embedding.

[0065] It is understandable that the configuration items also include but are not limited to: the function path used in this compilation, global variables, dependency selection, security settings, the products required for this compilation, and dynamic dependency loading configuration.

[0066] In the actual application process, after receiving the configuration item, the output product of the preset source code is determined according to the multiple commands in the configuration item, and the source code is input into the compiler corresponding to the product. Based on this, the developer only needs to modify the corresponding command in the configuration item to control the type of the compiled product.

[0067] It can be understood that the parser is a concept of assembly. For different products, the parser contains common parts and customized parts for specific products. Only by combining and applying these parts can the desired product be finally generated.

[0068] These combinations are pre-customized. For example, the H5 parser consists of a common part (part A) and a customized part (part B and part C) to generate the final H5 product. On the input side, you only need to specify the configuration (i.e., configuration item) of the H5 product to enter the corresponding parser through the logical pipeline to generate the final product.

[0069] Step S102: Building a program running environment according to the configuration items, and adjusting the framework configuration trigger.

[0070] In the specific implementation of step S102, Figure 3 The content shown is that in the self-developed compiler provided by the One-Code Multi-Terminal Framework, an environment judge is used to perform environmental judgment. Specifically, a program running environment is built according to the configuration items entered by the developer, and the framework configuration trigger is adjusted based on the program running environment.

[0071] It should be noted that due to the existence of Linux and Windows systems on the market, there are minor differences in the detailed configuration of different environments. For example, the setting of global variables in Windows uses the command line tool SET, while in Linux it uses the export tool. Therefore, it is necessary to build a program running environment that meets the execution conditions based on the configuration items.

[0072] It is understandable that every logical direction of the parser in the self-developed compiler is pre-written and debugged. During the application process, different configuration items correspond to the most ideal logical direction in the parser. Therefore, it is necessary to adjust the framework configuration trigger based on the program running environment and configuration items to obtain the optimal configuration trigger.

[0073] Specifically, building a program runtime environment based on the configuration items input by developers means building a program runtime environment based on the function paths, global variables, dependencies, and security settings information contained in the configuration items; adjusting the framework configuration trigger based on the program runtime environment means configuring the logical trigger in the framework to the optimal configuration trigger corresponding to the program runtime environment. A trigger can be understood as a "trigger," which actually refers to a trigger mechanism that starts or adjusts the behavior of a program when certain conditions are met. It helps automatically adjust the configuration of the program in different environments to ensure that the program can run efficiently under different conditions.

[0074] It is understandable that building the program running environment according to the configuration items and adjusting the framework configuration triggers ensures the flexibility and adaptability of the framework. According to the results of building the program running environment, the framework will adjust the configuration and prepare all the necessary parameters and settings to support subsequent work.

[0075] Step S103: converting the preset source code into assembly language.

[0076] The source code is pre-written by developers based on the API interface.

[0077] In the process of implementing step S103, an excited state is triggered through a trigger in the self-developed compiler, specifically, a preset source code (such as a readable high-level language typescript) is converted into an assembly language.

[0078] It can be understood that this is an excited state triggered process, which specifically uses the self-developed compiler to parse the source code and generate an abstract syntax tree; then the abstract syntax tree is optimized and converted into assembly language to ensure that the generated code can be effectively executed on the target hardware.

[0079] It should be noted that this streaming expression allows developers to write programs at a higher level of abstraction, while generating low-level, efficient machine code through self-developed compilers.

[0080] Step S104: Based on the program running environment, the assembly language is executed according to the optimal configuration trigger and the command in the configuration trigger to obtain an excited state product of the specified platform.

[0081] In the process of implementing step S104, the executor in the self-developed compiler performs excited state execution. Specifically, based on the program running environment, the streaming code structure in the excited state executes the directional flow program according to the optimal configuration trigger in the configuration trigger. These triggers determine the execution path of the program according to the configuration to ensure the accuracy and efficiency of the logic; until the conversion logic reaches the bottom layer, the excited state product of the specified platform is obtained.

[0082] It can be understood that the optimal configuration trigger in the configuration trigger activates the corresponding code path in the assembly language based on the program running environment; the activated code path is controlled to be executed according to multiple commands in the configuration item to obtain the excited state product of the specified platform.

[0083] It should be noted that see Figure 4 A schematic diagram of the products of the WeChat Mini Program platform is shown, for example Figure 4 As shown, the WeChat mini program platform displays a scrolling advertisement display area, multiple menu display areas, and a video display area corresponding to the assembly language.

[0084] See also Figure 5 , showing a schematic diagram of the product of the H5 webpage platform, for example Figure 5 As shown, the H5 web platform displays a person's business card, which includes name, email address, contact information, address, etc., and also includes but is not limited to an advertising display area.

[0085] See also Figure 6 , shows a schematic diagram of the products of the APP platform, for example Figure 6 As shown, the APP platform displays an advertising area, multiple menu display areas, a title area, and a video display area.

[0086] In some specific embodiments, the excited state products of the specified platform are divided into two types according to the configuration. One is an unreadable production package, in which case the package is usually directly applied to the production environment. The other is a convertible product. When the business needs to carry out secondary development of the excited state product, or expand or adjust the content that is difficult to implement in the framework, the assembly language corresponding to the excited state product can be converted into a high-level programming language and output, so as to facilitate subsequent modification and optimization.

[0087] It can be understood that the specific implementation process of secondary development of excited state products is: execute excited state conversion through the converter in the self-developed compiler, specifically, determine whether the excited state product needs to be converted based on the configuration items; if the excited state product needs to be converted, then convert the corresponding assembly language of the excited state product into a high-level programming language and output it.

[0088] In the embodiment of the present invention, developers only need to focus on business logic and set configuration items to achieve adaptive and compatible compilation of single code for multiple platforms without consuming a lot of manpower, while ensuring functional consistency and improving user experience.

[0089] Corresponding to the single-code multi-platform compilation method provided by the above embodiment of the present invention, see Figure 7, shows a structural block diagram of a single-code multi-platform compilation device provided by an embodiment of the present invention, the compilation device includes: a receiving unit 701, a building unit 702, a conversion unit 703 and an execution unit 704.

[0090] The receiving unit 701 is used to receive configuration items, where the configuration items at least include multiple commands and a specified platform.

[0091] The building unit 702 is used to build a program running environment according to the configuration items and adjust the framework configuration trigger.

[0092] The conversion unit 703 is used to convert the preset source code into assembly language, wherein the source code is pre-written by a developer based on an API interface.

[0093] The execution unit 704 is used to execute the assembly language according to the optimal configuration trigger and the command in the configuration trigger based on the program running environment to obtain the excited state product of the specified platform.

[0094] In the embodiment of the present invention, developers only need to focus on business logic and set configuration items to achieve adaptive and compatible compilation of single code for multiple platforms without consuming a lot of manpower, while ensuring functional consistency and improving user experience.

[0095] Combination Figure 7 The content shown, the compiling device also includes: a judgment unit and a conversion unit.

[0096] The judgment unit is used to judge whether the excited state product needs to be converted according to the configuration item.

[0097] The conversion unit is used to convert the assembly language corresponding to the excited state product into a high-level programming language and output it if the excited state product needs to be converted.

[0098] Combination Figure 7 The content shown, building unit 702, includes: a building module and a configuration module.

[0099] The build module is used to build the program running environment according to the function path, global variables, dependencies, and security settings information contained in the configuration items.

[0100] The configuration module is used to configure the logical triggers in the framework to the optimal configuration triggers corresponding to the program running environment.

[0101] Combination Figure 7 The content shown, the conversion unit 703, includes: a parsing module and a conversion module.

[0102] The parsing module is used to parse the source code using the self-developed compiler and generate an abstract syntax tree.

[0103] The conversion module is used to optimize the abstract syntax tree and convert it into assembly language.

[0104] Combination Figure 7 The content shown, the execution unit 704, includes: an activation module and an execution module.

[0105] The activation module is used to activate the corresponding code path in the assembly language based on the program running environment and the optimal configuration trigger in the configuration trigger.

[0106] The execution module is used to control the activated code path to execute according to the command to obtain the excited state product of the specified platform.

[0107] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0108] Professionals may further 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 the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 the present invention.

[0109] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A single-code multi-platform compilation method, characterized in that: The method comprises: Receiving a configuration item, wherein the configuration item includes at least a plurality of commands and a specified platform; Build the program running environment according to the configuration items and adjust the framework configuration trigger; Converting a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface; Based on the program running environment, the assembly language is executed according to the optimal configuration trigger in the configuration trigger and the command to obtain an excited state product of the designated platform.

2. The method according to claim 1, characterized in that After obtaining the excited state product of the designated platform, the method further includes: Determining whether the excited state product needs to be converted according to the configuration item; If the excited state product needs to be converted, the assembly language corresponding to the excited state product is converted into a high-level programming language and output.

3. The method according to claim 1, characterized in that The step of building a program running environment according to the configuration items and adjusting the framework configuration trigger includes: Building a program running environment according to the function path, global variables, dependencies and security setting information contained in the configuration items; The logical trigger in the framework is configured as an optimal configuration trigger corresponding to the program running environment.

4. The method according to claim 1, characterized in that: The converting of the preset source code into assembly language comprises: Use the self-developed compiler to parse the source code and generate an abstract syntax tree; The abstract syntax tree is optimized and converted into assembly language.

5. The method according to claim 1, characterized in that: The step of executing the assembly language based on the program running environment according to the optimal configuration trigger in the configuration trigger and the command to obtain the excited state product of the designated platform includes: activating a corresponding code path in the assembly language based on the program running environment and an optimal configuration trigger in the configuration triggers; The activated code path is controlled to be executed according to the command to obtain an excited state product of the designated platform.

6. A single-code multi-platform compilation device, characterized in that: The compiling device comprises: A receiving unit, configured to receive a configuration item, wherein the configuration item at least includes a plurality of commands and a specified platform; A building unit, used to build a program running environment according to the configuration items and adjust the framework configuration trigger; A conversion unit, used to convert a preset source code into an assembly language, wherein the source code is pre-written by a developer based on an API interface; An execution unit is used to execute the assembly language based on the program running environment, according to the optimal configuration trigger in the configuration trigger and the command, to obtain an excited state product of the specified platform.

7. The device according to claim 6, characterized in that The compiling device also includes: A judging unit, configured to judge whether the excited state product needs to be converted according to the configuration item; The conversion unit is used for converting the assembly language corresponding to the excited state product into a high-level programming language and outputting the language if the excited state product needs to be converted.

8. The device according to claim 6, characterized in that The construction unit comprises: A building module, used to build a program running environment according to the function path, global variables, dependencies and security setting information contained in the configuration items; The configuration module is used to configure the logical trigger in the framework to the optimal configuration trigger corresponding to the program running environment.

9. The device according to claim 6, characterized in that The conversion unit comprises: The parsing module is used to parse the source code using the self-developed compiler and generate an abstract syntax tree; The conversion module is used to optimize the abstract syntax tree and convert it into assembly language.

10. The device according to claim 6, characterized in that The execution unit comprises: an activation module, configured to activate a corresponding code path in the assembly language based on the program running environment and an optimal configuration trigger in the configuration triggers; The execution module is used to control the activated code path to execute according to the command to obtain the excited state product of the specified platform.

Citation Information

Patent Citations

  • Method for quickly developing heterogeneous parallel program

    CN104035781A

  • System for realizing multi-platform applet and H5 application adaptation based on applet grammar

    CN111124576A

  • Application program development platform and method, electronic equipment and storage medium

    CN114035902A

  • Automatic multi-stream scheduling method for kernel function based on compilation

    CN114549277A

  • Interface testing method and related device

    CN118964182A