Program file generation method and device, computer device and storage medium

By configuring extensible markup language files and interface templates to generate program files, and combining them with a bytecode framework, the problem of repeated compilation of program files is solved, improving development efficiency and business processing efficiency.

CN115373666BActive Publication Date: 2026-02-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211040073.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2026-02-10
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Under the business processing service framework, the code structure of the program files is fixed, which means that developers need to recompile every time a new service is added, increasing the workload of development and business deployment, and reducing development efficiency.

Method used

By configuring extensible markup language file description service information, the interface template is used to read and generate program files, and combined with the bytecode framework to directly generate program files, reducing the compilation process and enabling fast dynamic refresh of configuration files.

Benefits of technology

It improved development efficiency, reduced the workload of developers and business deployment, and enabled flexible service subscription and registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115373666B_ABST
    Figure CN115373666B_ABST
Patent Text Reader

Abstract

The application relates to a program file generation method and device, computer equipment, a storage medium and a computer program product, and relates to the technical field of distribution. The method comprises the following steps: configuring an extensible markup language file used for describing service information; reading the extensible markup language file through an interface template corresponding to the service information; and generating a program file according to the extensible markup language file. The method can generate a program file by configuring an extensible markup language file, and can quickly generate a program file by dynamically refreshing a configuration file when there is a business demand, so that the development efficiency is improved, and the workload of business production is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for generating program files. Background Technology

[0002] When performing business processing, developers need to write program files. In some business processing service frameworks, the code structure of the program files is often relatively fixed. If developers need to recompile the new program file every time a new service is added, and then implement services such as subscription or registration based on the program file, this repetitive work increases the workload of development and the workload of business deployment, and reduces development efficiency. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve development efficiency in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a method for generating program files. The method includes:

[0005] Configure an extensible markup language file to describe service information;

[0006] Read the extensible markup language file using the interface template corresponding to the service information;

[0007] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0008] In one embodiment, configuring an extensible markup language file for describing service information includes:

[0009] Configure the platform with an extensible markup language file to describe service information.

[0010] In one embodiment, an extensible markup language file for describing service information is configured via a configuration file platform, including:

[0011] Obtain configuration parameters through the configuration file platform;

[0012] Configure an extensible markup language file to describe service information based on the configuration parameters.

[0013] In one embodiment, generating a program file based on an extensible markup language file includes:

[0014] Based on a bytecode framework, program files are generated from extensible markup language files.

[0015] In one embodiment, reading the extensible markup language file through the interface template corresponding to the service information includes:

[0016] The registration and subscription service information can be obtained by reading the extensible markup language file through the interface template corresponding to the service information.

[0017] Generate program files from Extensible Markup Language (EXPLAIN) files, including:

[0018] The program file is generated based on the registration and subscription service information.

[0019] In one embodiment, the method further includes:

[0020] Based on the program files and service registry information, generate an external configuration interface object for the service information;

[0021] Registration or subscription is performed by calling the external configuration interface object.

[0022] Secondly, this application also provides a program file generation apparatus. The apparatus includes:

[0023] The configuration module is used to configure the extensible markup language files used to describe service information;

[0024] The acquisition module is used to read the extensible markup language file through the interface template corresponding to the service information;

[0025] The generation module is used to generate program files from Extensible Markup Language (EXPLAIN) files.

[0026] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0027] Configure an extensible markup language file to describe service information;

[0028] Read the extensible markup language file using the interface template corresponding to the service information;

[0029] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0030] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0031] Configure an extensible markup language file to describe service information;

[0032] Read the extensible markup language file using the interface template corresponding to the service information;

[0033] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0034] Fifthly, this application also provides a computer program product. This computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0035] Configure an extensible markup language file to describe service information;

[0036] Read the extensible markup language file using the interface template corresponding to the service information;

[0037] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0038] The aforementioned program file generation method, apparatus, computer equipment, storage medium, and computer program product first configure a configuration file describing service information, which is represented by an Extensible Markup Language (EML) file. Next, within the service framework, a corresponding interface template is set based on the service information. The EML file is read through this interface template, and finally, the program file is generated based on the read EML file. This application's program file generation method eliminates the need for developers to perform extensive repetitive program compilation work. Instead, it achieves this through configuring an EML file. When business needs arise, program files can be quickly generated by dynamically refreshing the configuration file, offering flexibility, convenience, and effectively improving development efficiency while reducing the workload for business deployment. Attached Figure Description

[0039] Figure 1 This is an application environment diagram of a program file generation method in one embodiment;

[0040] Figure 2 This is a flowchart illustrating a method for generating program files in one embodiment;

[0041] Figure 3 This is a flowchart illustrating a business processing method in one embodiment;

[0042] Figure 4 This is a schematic diagram illustrating the call relationship between the exposure layer and the business layer when configuring an extensible markup language file in one embodiment.

[0043] Figure 5 This is a schematic diagram comparing the exposed layer with the original exposed layer in one embodiment;

[0044] Figure 6 This is a structural block diagram of a program file generation device in one embodiment;

[0045] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0047] The program file generation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. When generating program files, server 104 configures an extensible markup language file to describe service information; reads the extensible markup language file through the interface template corresponding to the service information; and generates program files based on the extensible markup language file. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0048] In one embodiment, such as Figure 2 As shown, a method for generating program files is provided, which can be applied to... Figure 1 The following steps, from 202 to 206, are used as an example to illustrate the application environment.

[0049] Step 202: Configure the extensible markup language file used to describe service information.

[0050] Extensible Markup Language (Extreme Markup Language) files are a subset of standard general-purpose languages, providing a source language that allows users to define their own markup languages. Extreme Markup Language is simple to read and write, and highly extensible. Configuring service information as Extreme Markup Language files makes configuration files simple and flexible, facilitating effective data description and exchange.

[0051] Specifically, the extensible markup language (EXPLAIN) file is configured to generate an EXPLAIN file describing service information. The configured service information mainly includes service registration information and information about the services to be subscribed to, such as service interface name, version number, method name, service object, and service interface object. In configuring the EXPLAIN file, this application customizes the calling relationships between service information described in the EXPLAIN file, ensuring a one-to-one correspondence between service information when generating the program file.

[0052] Step 204: Read the extensible markup language file through the interface template corresponding to the service information.

[0053] The service information is configured according to the service framework, which can be an open-source distributed service framework or other applicable service frameworks. The interface template can be generated based on a fixed template for the service interface. The designed service interface module reads the configured extensible markup language file to obtain the service information described in the extensible markup language file.

[0054] Specifically, after configuring the extensible markup language file, the interface template of this embodiment is designed in the service framework according to the fixed template of the service interface. The extensible markup language file configured by the configuration file platform is read through the interface template, and the information corresponding to the service is obtained through the configured extensible markup language file.

[0055] Step 206: Generate program files based on the Extensible Markup Language file.

[0056] Specifically, a program file is generated based on the service information read from the Extensible Markup Language (EXPLAIN) file. This program file can be generated using a bytecode framework, which eliminates the need to compile the program file and creates it directly in bytecode form. For example, the program file can be generated by modifying a known program file based on a bytecode framework, or by developing an auxiliary framework to add specific code to the written code to achieve a specific purpose.

[0057] In this embodiment's program file generation method, an extensible markup language (EXPLAIN) file, which describes service information, is configured; this EXPLAIN file is also known as a configuration file. After the EXPLAIN file is generated, an interface template is set according to the service information to read the EXPLAIN file, and a program file is generated based on the read EXPLAIN file. This program file generation method, within the service framework, eliminates the need for a complex compilation process. Service subscription and registration can be achieved through the configuration file, making it simple, flexible, and effectively improving development efficiency. It reduces the workload of developers and the workload for business deployment.

[0058] In one embodiment, step 202, configuring an extensible markup language file for describing service information, includes configuring the extensible markup language file for describing service information via a configuration file platform.

[0059] The configuration file platform can be the CMC (Central Management Console) configuration center. This platform allows for the convenient representation of service information using Extensible Markup Language (EXPLAIN) files. For example, the platform can be used to configure information such as the interface name, version number, method name, service object, and service interface object. Configuring through a configuration file platform also makes subsequent modifications to the configuration file very convenient, resulting in highly flexible file configuration.

[0060] Specifically, the configuration file platform configures extensible markup language files based on the protocol templates in the service framework. It also configures information such as interface name, version number, method name, service object, and service interface object in the extensible markup language files according to service requirements. By configuring service-related information into the extensible markup language files through the configuration file platform, the program files are generated based on the configured extensible markup language files. The configuration files can be dynamically refreshed, offering flexibility and convenience.

[0061] In one embodiment, configuring an extensible markup language file for describing service information via a configuration file platform includes: obtaining configuration parameters via the configuration file platform; and configuring the extensible markup language file for describing service information according to the configuration parameters.

[0062] Specifically, in this embodiment, when configuring the extensible markup language (EXPLAIN) file, configuration parameters representing service information are configured in the EXPLAIN file through a configuration file platform. These parameters include interface name, version number, method name, service object provided, and service interface object. The configuration parameters of the EXPLAIN file also include fixed parameters in the specific service protocol template. This embodiment dynamically and flexibly configures the EXPLAIN file. After reading the EXPLAIN file, program files can be directly generated through bytecode and other methods, enabling rapid customization of program files, reducing complex compilation of program files during development, reducing development time, and improving development efficiency.

[0063] In one embodiment, step 206, generating a program file based on an Extensible Markup Language (Extreme Markup Language) file, includes: generating a program file based on an Extensible Markup Language (Extreme Markup Language) file using a bytecode framework.

[0064] The bytecode framework is an auxiliary framework used during program development. By adding specific code to the program code through the bytecode framework, development objectives can be achieved. It can be used to create or modify program files. In this embodiment, during program file generation, the bytecode framework can quickly generate the program file based on the read content of the extensible markup language file, offering flexibility and convenience. The bytecode framework can be any type such as ASM (Java Bytecode Manipulation Framework) or JAVAssist.

[0065] In one embodiment, step 204 reads the extensible markup language file through the interface template corresponding to the service information, including: reading the extensible markup language file through the interface template corresponding to the service information to obtain registration and subscription service information; step 206 generates a program file based on the extensible markup language file, including: generating a program file based on the registration and subscription service information.

[0066] The registration and subscription service information is obtained by reading the configuration extensible markup language file and then using the configuration file to obtain the service framework information required for registration and subscription services. Based on the obtained service framework information, a program file is generated to enable service registration and subscription.

[0067] Specifically, after configuring the extensible markup language (EXPLAIN) file on the configuration platform, the EXPLAIN file is read according to the interface template designed by the service framework. The service information configured in the EXPLAIN file is then read, and the information corresponding to the subscription and registration services is obtained based on this information. Then, a program file is generated based on the bytecode framework, including the service registration and subscription service information. This embodiment does not require a production version during development, reducing complex file compilation, effectively improving code development efficiency, and reducing production workload.

[0068] In one embodiment, the method further includes: generating an external configuration interface object for service information based on program files and service registry information; and registering or subscribing by calling the external configuration interface object.

[0069] The service registry is the system hub within the service framework. It can be a ZooKeeper registry, enabling dynamic service addition without updating configuration files individually, and also facilitating dynamic discovery. Within the service registry, consumers can dynamically detect new configurations, routing rules, and new service providers without restarting the service. They can also dynamically adjust parameters, automatically updating new parameters to all relevant service nodes, achieving unified configuration and avoiding inconsistencies caused by local configurations across different services. External configuration interface objects are used to determine the actions executed by the service framework, such as determining the interface type, service name, and method configuration.

[0070] Specifically, after the program file is generated, the specific execution method is dynamically obtained based on the parameters, combined with information from the service registry. Then, an external configuration interface object for the service information is generated. Application configuration and protocol configuration are performed to determine the service interface and the actual implementation object. The service is published, registered, or subscribed by calling this external configuration interface object. This embodiment provides a flexible service deployment, subscription, and decommissioning method and adds a service emergency mechanism.

[0071] In one embodiment, the above-described program file generation method may involve configuring an Extensible Markup Language (Extreme Markup Language) file to describe Dubbo service information, and then generating program files based on ASM bytecode from the Extreme Markup Language file to achieve Dubbo service registration, subscription, and unbinding. Dubbo, as a distributed service framework, can achieve service input and output through high-performance remote procedure calls, offering flexibility and convenience. Generating program files based on ASM bytecode is advantageous because ASM bytecode is easy to use, efficient, and reliable. This embodiment provides a flexible program file generation method while reducing compilation workload.

[0072] Figure 3 This is a flowchart illustrating the program file generation method in this embodiment, as shown below. Figure 3 As shown, the method specifically includes steps 302 to 310.

[0073] Step 302: Configure the extensible markup language file used to describe Dubbo service information.

[0074] Dubbo service information includes the registration information for both the external interface exposure layer and the actual business code processing layer. The external interface exposure layer is referred to as the "outer layer" below, and the business code processing layer is referred to as the "business layer" below. Service registration information includes the interface name, version number, method name, the service object being provided, and the service interface object.

[0075] The Extensible Markup Language (XML) file, referred to below, is used to configure and describe Dubbo service information. Figure 4 The diagram shows the specific call relationship between the outer layer and the business layer when configuring the XML file, as follows: Figure 4As shown, the outer layer and business layer use DSF (Distributed Service Framework) to define service information. When defining the extensible markup language, the outer layer is associated with the business layer. When a new service is launched or the service version is updated, the outer layer is associated with and the earlier version of the business layer is deleted, and the updated version of the business layer is added. Unlike the configuration files in the traditional Dubbo service framework, this embodiment uses custom XML to describe the calling relationship between the versions of the outer layer and the business layer during configuration, so that the relationship between the two corresponds one-to-one during automatic generation.

[0076] Step 304: Read the extensible markup language file through the interface template corresponding to the Dubbo service.

[0077] Design the interface template for the outer layer based on the fixed template in the Dubbo service framework, and write a program to read the extensible markup language file configured in step 302 to obtain the corresponding information of the registered and subscribed Dubbo services.

[0078] Step 306: Generate program files based on the Extensible Markup Language file using the ASM bytecode framework.

[0079] Based on the ASM bytecode framework, a class file can be directly generated from the read extensible markup language file. This class file is the program file.

[0080] Specifically, after obtaining the configured Extensible Markup Language (EML) file, the specific method is described by a descriptor based on the parameter list in the EML file and the return value of the ASM bytecode. The program file is then generated based on the EML file, reducing the stubs and implementation class coding required in traditional file generation. This eliminates the need for coding and reduces the workload for developers.

[0081] Step 308: Generate an external configuration interface object for service information based on the program file and service registry information; register or subscribe by calling the external configuration interface object.

[0082] When a new service is created, the provider registers it in the service registry, which can also be used to subscribe to other services.

[0083] After generating the program file, the service is located in the service registry, and its information is retrieved. Based on the program file and the Dubbo service protocol, an external configuration interface object is generated. By calling this external configuration interface object, the service is registered or subscribed to in the service registry, becoming a service consumer or subscriber. The external configuration interface can be either `ServiceConfig` or `ReferenceConfig`. The configuration can be initialized directly through the external configuration interface or generated through Spring's configuration parsing.

[0084] After generating the external configuration interface object, the service registry can dynamically register and uninstall services, as well as subscribe to services, by calling it.

[0085] Step 310: Dynamically configure the extensible markup language file from step 302 through the configuration file platform to bring the Dubbo service online and offline.

[0086] When a new service is launched, a new extensible markup language file can be configured in the configuration file platform, or the configured extensible markup language file can be modified, i.e., the extensible markup language file can be dynamically refreshed, and the configuration can be published or canceled by buttons. By calling the service exposure and decommissioning commands in the code, the service can be quickly launched and decommissioned without publishing a version package, simply by modifying the configuration file.

[0087] The program file generation method disclosed in this embodiment is based on the Dubbo service framework. It configures an extensible markup language file to generate program files, generates external configuration interface objects for service information, and integrates with a service registry to implement service subscription and registration. For example... Figure 5 The diagram showing the comparison between the Dubbo service framework exposure layer in this embodiment and the original exposure layer demonstrates that the program file generation in this embodiment does not require additional code writing. Service subscription and registration can be achieved by configuring extensible markup language files, reducing the workload of developers, providing flexibility and convenience, effectively improving development efficiency, and reducing the workload of business deployment.

[0088] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0089] Based on the same inventive concept, this application also provides a program file generation apparatus for implementing the program file generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more program file generation apparatus embodiments provided below can be found in the limitations of the program file generation method described above, and will not be repeated here.

[0090] In one embodiment, such as Figure 6 As shown, a program file generation apparatus is provided, including: a configuration module 602, an acquisition module 604, and a generation module 606, wherein:

[0091] Configuration module 602 is used to configure extensible markup language files used to describe service information;

[0092] Module 604 is used to read the extensible markup language file through the interface template corresponding to the service information;

[0093] Generation module 606 is used to generate program files from extensible markup language files.

[0094] In one embodiment, the configuration module 602 configures an extensible markup language file for describing service information, including: configuring the extensible markup language file for describing service information through a configuration file platform.

[0095] In one embodiment, the configuration module 602 configures an extensible markup language file for describing service information through a configuration file platform, including: obtaining configuration parameters through the configuration file platform; and configuring the extensible markup language file for describing service information according to the configuration parameters.

[0096] In one embodiment, the generation module 606 generates a program file based on an Extensible Markup Language (Extreme Markup Language) file, including: generating a program file based on an Extreme Markup Language (Extreme Markup Language) file using a bytecode framework.

[0097] In one embodiment, the acquisition module 606 reads the extensible markup language file through the interface template corresponding to the service information, including: reading the extensible markup language file through the interface template corresponding to the service information to obtain registration and subscription service information; the generation module 604 generates a program file based on the extensible markup language file, including: generating a program file based on the registration and subscription service information.

[0098] In one embodiment, when the device generates a program file, it also includes generating an external configuration interface object for service information based on the program file and service registry information; and registering or subscribing by calling the external configuration interface object.

[0099] Each module in the aforementioned program file generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0100] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database is used for configuration files. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a program file generation method.

[0101] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0102] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0103] Configure an extensible markup language file to describe service information;

[0104] Read the extensible markup language file using the interface template corresponding to the service information;

[0105] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0106] In one embodiment, when the processor executes the computer program, it further performs the following steps: configuring an extensible markup language file for describing service information, including: configuring the extensible markup language file for describing service information via a configuration file platform.

[0107] In one embodiment, when the processor executes the computer program, it further performs the following steps: configuring an extensible markup language file for describing service information via a configuration file platform, including: obtaining configuration parameters via the configuration file platform; and configuring the extensible markup language file for describing service information according to the configuration parameters.

[0108] In one embodiment, when the processor executes a computer program, it further performs the following steps: generating a program file based on an Extensible Markup Language (Extreme Markup Language) file, including: generating the program file based on the Extreme Markup Language (Extreme Markup Language) file using a bytecode framework.

[0109] In one embodiment, when the processor executes the computer program, it further performs the following steps: reading an Extensible Markup Language (EML) file through an interface template corresponding to the service information, including: reading the EML file through an interface template corresponding to the service information to obtain registration and subscription service information; and generating a program file based on the EML file, including: generating a program file based on the registration and subscription service information.

[0110] In one embodiment, when the processor executes the computer program, it also performs the following steps: generating an external configuration interface object for service information based on the program file and service registry information; and registering or subscribing by calling the external configuration interface object.

[0111] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0112] Configure an extensible markup language file to describe service information;

[0113] Read the extensible markup language file using the interface template corresponding to the service information;

[0114] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0115] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an extensible markup language file for describing service information, including: configuring the extensible markup language file for describing service information via a configuration file platform.

[0116] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an extensible markup language file for describing service information via a configuration file platform, including: obtaining configuration parameters via the configuration file platform; and configuring the extensible markup language file for describing service information according to the configuration parameters.

[0117] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: generating a program file based on an Extensible Markup Language (Extreme Markup Language) file, including: generating the program file based on the Extreme Markup Language (Extreme Markup Language) file using a bytecode framework.

[0118] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: reading an Extensible Markup Language (EML) file through an interface template corresponding to the service information, including: reading the EML file through an interface template corresponding to the service information to obtain registration and subscription service information; generating a program file based on the EML file, including: generating a program file based on the registration and subscription service information.

[0119] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating an external configuration interface object for service information based on the program file and service registry information; and registering or subscribing by calling the external configuration interface object.

[0120] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0121] Configure an extensible markup language file to describe service information;

[0122] Read the extensible markup language file using the interface template corresponding to the service information;

[0123] Generate program files from Extensible Markup Language (EXPLAIN) files.

[0124] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an extensible markup language file for describing service information, including: configuring the extensible markup language file for describing service information via a configuration file platform.

[0125] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring an extensible markup language file for describing service information via a configuration file platform, including: obtaining configuration parameters via the configuration file platform; and configuring the extensible markup language file for describing service information according to the configuration parameters.

[0126] In one embodiment, when the computer program is executed by a processor, it further performs the following steps to generate a program file based on an Extensible Markup Language (Extreme Markup Language) file, including: generating the program file based on the Extensible Markup Language (Extreme Markup Language) file using a bytecode framework.

[0127] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: reading an Extensible Markup Language (EML) file through an interface template corresponding to the service information, including: reading the EML file through an interface template corresponding to the service information to obtain registration and subscription service information; and generating a program file based on the EML file, including: generating a program file based on the registration and subscription service information.

[0128] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating an external configuration interface object for service information based on the program file and service registry information; and registering or subscribing by calling the external configuration interface object.

[0129] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0130] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for generating program files, characterized in that, The method includes: Configure an extensible markup language file to describe service information; The registration and subscription service information is obtained by reading the extensible markup language file through the interface template corresponding to the service information. Based on a bytecode framework, a program file is generated according to the registration and subscription service information. The method further includes: generating an external configuration interface object for the service information based on the program file and the service registry information; Registration or subscription can be performed by calling the external configuration interface object.

2. The method according to claim 1, characterized in that, The configuration is used to describe the extensible markup language file for service information, including: Configure the platform with an extensible markup language file to describe service information.

3. The method according to claim 2, characterized in that, The configuration of the extensible markup language file used to describe service information via the configuration file platform includes: Obtain configuration parameters through the configuration file platform; Configure an extensible markup language file to describe service information according to the configuration parameters.

4. A program file generation device, characterized in that, The apparatus is used to implement the program file generation method according to any one of claims 1-3, and the apparatus comprises: The configuration module is used to configure the extensible markup language files used to describe service information; The acquisition module is used to read the extensible markup language file through the interface template corresponding to the service information; The generation module is used to generate program files based on the extensible markup language file.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Distributed automatic construction method and system

    CN105550001A

  • Program file generation method and device

    CN109375943A