CN112558983A - Executable file generation and execution method, device, electronic terminal and medium - Google Patents

Executable file generation and execution method, device, electronic terminal and medium Download PDF

Info

Publication number
CN112558983A
CN112558983A CN202011550399.2A CN202011550399A CN112558983A CN 112558983 A CN112558983 A CN 112558983A CN 202011550399 A CN202011550399 A CN 202011550399A CN 112558983 A CN112558983 A CN 112558983A
Authority
CN
China
Prior art keywords
layer
code blocks
executable file
service interface
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011550399.2A
Other languages
Chinese (zh)
Inventor
黄传亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weiyiyun Hangzhou Holding Co ltd
Original Assignee
Weiyiyun Hangzhou Holding Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weiyiyun Hangzhou Holding Co ltd filed Critical Weiyiyun Hangzhou Holding Co ltd
Priority to CN202011550399.2A priority Critical patent/CN112558983A/en
Publication of CN112558983A publication Critical patent/CN112558983A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device, an electronic terminal and a medium for generating and executing an executable file, wherein the method for generating the executable file comprises the following steps: receiving a generation instruction carrying a scene identifier; selecting target code blocks corresponding to the scene identification from preset code blocks, and configuring the dependency relationship among the target code blocks; and packaging the target code blocks with the configured dependency relationship, and outputting an executable file. By defining the source code as the preset code blocks which can be independently packed, the selection and configuration of each preset code block can be realized according to different scene identifiers, so that the output of executable files of different scenes based on the same set of source code is realized, and the code consistency is ensured. When the codes corresponding to the general service need to be updated, the updated executable files of different scenes can be generated only by updating the corresponding preset code blocks, so that the development resource investment can be saved, the development efficiency is improved, and the codes are more convenient to maintain.

Description

Executable file generation and execution method, device, electronic terminal and medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a method and a device for generating and executing an executable file, an electronic terminal and a medium.
Background
An executable file refers to a file that may be loaded for execution by an operating system, such as an executable application file. The same executable file may be divided into versions of different scenes, for example, a cloud version deployed in a cloud network and a local version deployed in a local network according to a network deployment manner.
In the prior art, executable files of each version are independent of each other, and a set of codes needs to be written respectively. The defects of the prior art at least comprise the problems of repeated investment of development resources such as time, manpower and the like, low development efficiency and difficult code maintenance when updating iteration is carried out on codes corresponding to general services in different versions.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, an electronic terminal, and a medium for generating and executing an executable file, which can save development resource investment, improve development efficiency, and make code maintenance more convenient.
In a first aspect, an embodiment of the present invention provides a method for generating an executable file, including:
receiving a generation instruction, wherein the generation instruction carries a scene identifier;
selecting target code blocks corresponding to the scene identifiers from preset code blocks, and configuring the dependency relationship among the target code blocks;
and packaging the target code blocks with the configured dependency relationship, and outputting a packaged executable file.
In a second aspect, an embodiment of the present invention provides an executable file executing method, configured to execute an executable file generated by the generating method provided in any embodiment of the present invention, where the executable file executing method includes:
presenting a user interface in response to a launch instruction of the executable file;
responding to the triggering operation of a service interface in the user interface, and generating an execution instruction;
and executing the relevant code blocks for realizing the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file.
In a third aspect, an embodiment of the present invention further provides an executable file generating apparatus, including:
a generation instruction receiving module, configured to receive a generation instruction, where the generation instruction carries a scene identifier;
the dependency configuration module is used for selecting target code blocks corresponding to the scene identifiers from preset code blocks and configuring the dependency between the target code blocks;
and the code block packaging module is used for packaging the target code blocks with the configured dependency relationship and outputting a packaged executable file.
In a fourth aspect, an embodiment of the present invention further provides an executable file executing apparatus, configured to execute an executable file generated by the generation method provided in any embodiment of the present invention, where the executable file includes:
the interface presentation module is used for responding to the starting instruction of the executable file and presenting a user interface;
the interface triggering module is used for responding to the triggering operation of the service interface in the user interface and generating an execution instruction;
and the interface implementation module is used for executing the relevant code blocks for implementing the service interface according to the execution instruction and the dependency relationship among the code blocks configured in the executable file.
In a fifth aspect, an embodiment of the present invention further provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a method for generating an executable file according to any embodiment of the present invention when executing the program, or implements a method for executing an executable file according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement a method for generating an executable file according to any embodiment of the present invention, or implement an execution method of an executable file according to any embodiment of the present invention.
The embodiment of the invention provides a method, a device, an electronic terminal and a medium for generating and executing an executable file, wherein the method for generating the executable file comprises the following steps: receiving a generation instruction, wherein the generation instruction carries a scene identifier; selecting target code blocks corresponding to the scene identification from preset code blocks, and configuring the dependency relationship among the target code blocks; and packaging the target code blocks with the configured dependency relationship, and outputting a packaged executable file. By defining the source code as the preset code blocks which can be independently packed, the selection and configuration of each preset code block can be realized according to different scene identifiers, so that the output of executable files of different scenes based on the same set of source code is realized, and the code consistency is ensured. When the codes corresponding to the general service need to be updated, the updated executable files of different scenes can be generated only by updating the corresponding preset code blocks, so that the development resource investment can be saved, the development efficiency is improved, and the codes are more convenient to maintain.
Drawings
Fig. 1 is a schematic flowchart of a method for generating an executable file according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a preset code layer in a method for generating an executable file according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an executable file execution method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an executable file generation apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an execution apparatus for an executable file according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic terminal according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through embodiments with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1 is a flowchart illustrating a method for generating an executable file according to an embodiment of the present invention. The embodiment can be applied to the situation of generating executable files, in particular to the situation of generating executable files of different scenes. The method can be executed by the executable file generation device provided by the embodiment of the invention, the generation device is realized in a software and/or hardware mode, and the executable file generation device can be configured in an electronic terminal, such as a server.
Referring to fig. 1, the method for generating an executable file provided by this embodiment includes the following steps:
and S110, receiving a generation instruction, wherein the generation instruction carries a scene identifier.
In the embodiment of the invention, the scene identifier can uniquely correspond to the executable files of different scene versions and can be composed of any one or more elements such as numbers, letters, special symbols and the like. The scene identifier may include, but is not limited to, a cloud version identifier and a local version identifier. The cloud version identification can correspond to the executable file of the cloud version, and the local version identification can correspond to the executable file of the local version.
Taking a Hospital Information System (HIS) as an example, the HIS System may have two scenes, namely a cloud version and a local version, and the two scenes may be considered to be divided in a deployment angle. Specifically, the cloud version can be regarded as a version deployed on a cloud network of an HIS system provider, the scene version can cover all-department business services and can be accessed to other consulting rooms, hospitals, internet hospitals and the like, and the business functions of the version are richer; the local version can be regarded as a version deployed in a local network of an organization such as a hospital, and the scene version can be combined with the local customization requirement to customize a specific business service.
In this embodiment, generation instructions can be received in a unified manner for generation of executable files corresponding to different scene identifiers. By analyzing the scene identification carried in the generating instruction, a foundation can be laid for subsequently generating executable files with different scene versions by one set of source codes.
S120, selecting target code blocks corresponding to the scene identification from the preset code blocks, and configuring the dependency relationship among the target code blocks.
In the embodiment of the invention, the source codes used for generating the executable files with different scene versions can be the same set of source codes. Moreover, the source code may be divided in advance to obtain preset code blocks that can be individually packaged, for example, code blocks that can be packaged into individual jar packets. The function of each preset code block is different, for example, a code block defining each service interface is provided, or a code block implementing each service interface is provided.
The service covered by the executable files corresponding to different scene identifiers has a common service part and also has a different part. The information such as the preset code blocks required by the executable file and the dependency relationship between the preset code blocks can be respectively set in advance for different scene identifiers, so that the business service covering the corresponding scene can be realized based on the set information.
Accordingly, after receiving the generation instruction and analyzing the scene identifier therein, the target code blocks corresponding to the scene identifier may be selected from the preset code blocks based on preset information, and the dependency relationship between the target code blocks may be configured.
And S130, packaging the target code blocks with the configured dependency relationship, and outputting a packaged executable file.
In the embodiment of the invention, aiming at the same set of source codes for generating the executable file, the general service capabilities of different scene versions are extracted, the preset code blocks corresponding to the general services are divided, and the preset code blocks corresponding to the specific services are divided according to the differentiated service capabilities of the different scene versions. Therefore, the executable files under different scenes can be packaged and output based on the same set of source codes according to the scene identification, and the code consistency is ensured. When the codes corresponding to the general service need to be updated, the updated executable files of different scenes can be generated only by updating the corresponding preset code blocks, so that the development resource investment can be saved, the development efficiency is improved, and the codes are more convenient to maintain.
In some optional embodiments, the preset code block is subordinate to different preset code layers, and for example, fig. 2 is a schematic structural diagram of a preset code layer in a method for generating an executable file according to an embodiment of the present invention. Referring to fig. 2, the preset code layer includes: the system comprises an interface layer, an application layer, a field layer, an anti-corrosion adaptation layer and a storage layer;
the system comprises an interface layer, a preset code block and a service interface, wherein the preset code block in the interface layer is used for defining a service interface and an implementation method of the service interface; the preset code block in the application layer is used for defining a general service interface, a specific service interface and a first service interface of the warehouse layer; the preset code block in the domain layer is used for realizing a general service interface and defining a second service interface of the warehouse layer; the preset code in the anticorrosion adaptive layer is used for realizing a specific service interface; and the preset code block in the warehouse layer is used for realizing the first service interface and the second service interface of the warehouse layer.
Fig. 2 shows an architecture diagram of preset code layers of the source code. As shown in fig. 2 in detail, the source code may further include a scene layer, where the scene layer may be configured to execute the method for generating the executable file provided in this embodiment, that is, may receive the generation instruction, aggregate and configure different lower layer code blocks and their dependency relationships according to the scene identifier carried in the generation instruction, and finally package and output the executable file.
In the figure, the interface layer may also be called an API layer, and may include a preset code block Share and a preset code block Impl, where Share may be used to define a service interface, such as a query list (medical record) service interface; the Impl may be used to define the implementation of the service interface.
In the figure, the application layer has the details of codes for implementing the service interface, and may include but is not limited to: a preset code block Manager, transform, a preset code block facade, a preset code block query and the like. The Manager can be used for defining the universal service interfaces and defining the implementation method of each universal service interface. Transform is used to define a transformation tool class, specifically, a tool interface for transforming each layer of objects in the architecture diagram, for example, a tool interface for transforming between a business object (bo) of an application layer, an entity class object (entity) of a domain layer, and a persistent object (po) of a repository layer. The facade can be used for defining a specific service interface so as to ensure that different versions of different service interfaces keep uniform interface names at an application layer. Wherein the query may be used to define a first business interface of the repository, such as a query interface of the repository.
In the figure, the domain layer is used for realizing a general service interface and is also responsible for defining a second service interface of the warehouse layer so as to realize the storage of data in the warehouse layer database, and the domain layer is used for realizing the decoupling of the domain layer and the warehouse layer and improving the flexibility of accessing the warehouse layer. Wherein, the domain layer includes but not limited to: the system comprises a preset code block Entity, a preset code block Value, a preset code block repository, a preset code block service, a preset code block factor and the like. Wherein, Entity is a concept in the domain layer, and may include a service for encapsulating entities, for example, a patient is defined as one Entity, and the service of the Entity may include medical record information query, addition, modification, and the like. Value is a Value object, wherein no service is implemented, but is used to define the encapsulation of inter-layer corresponding data in the architecture diagram, for example, data of a database object po of a warehouse layer may be converted into a Value object and used at a domain layer. Wherein, the repository can be used for defining a second service interface of the warehouse layer, such as an interface of an operation database of the warehouse layer, and is used for realizing the decoupling of the domain layer and the warehouse layer. The service can be used for aggregating the entity services to provide the application layer for calling, so that the application layer does not need to rely on multiple entities to realize the service interface. The factor is a factory model, and may be used to obtain an entity of a value object, an entity, or an object of a repository through a factory.
In the figure, the implementation of the anticorrosion adaptation layer may include a preset code block facade.
In the figure, the warehouse layer can store database models (such as mysql database or es database model) under different scene versions, and implement a first service interface and a second service interface of the database under different scene versions. Wherein, the repository layer may include, but is not limited to, a preset code block, preset. Impl can implement the defined interface in the domain layer repository; transform can implement an interface that transforms pos in a database; the query can realize a first service interface of a reservoir layer defined by an application layer, and the first service interface can be regarded as a service interface of which the dependency relationship does not need to pass through a domain layer; dal can implement the access layer of the database; po is an object in the database.
On the basis of the architecture of the preset code layer, correspondingly, selecting a target code block corresponding to the scene identifier from the preset code blocks, and configuring a dependency relationship among the target code blocks, including: selecting a target code block corresponding to the scene identifier from preset code blocks of a preset code layer; and configuring the dependency relationship among the target code blocks based on the dependency relationship among the preset code layers.
In these alternative embodiments, the preset code blocks of different preset code layers implement the definition and implementation of different interfaces respectively. Target code blocks corresponding to the scene identifiers are selected from preset code blocks of the preset code layers, and the dependency relationship among the target code blocks is configured based on the dependency relationship among the preset code layers, so that packing output of executable files under different scenes is facilitated.
In some further embodiments, selecting a target code block corresponding to the scene identifier from preset code blocks in a preset code layer includes: and taking all code blocks of the interface layer, the application layer and the field layer, and code blocks corresponding to the scene identifiers in the anticorrosion adaptation layer and the storage layer as target code blocks.
The code blocks in the domain layer are code blocks which can be reused by executable files of different scene versions and realize a universal service interface, and the code blocks in the domain layer can be used as target code blocks. The interface layer and the application layer are usually code blocks defined by an interface, and different scenes are not particularly distinguished, so the code blocks in the interface layer and the application layer can be used as target code blocks. The code blocks in the anti-corrosion adaptation layer are code blocks of different specific service interfaces, so that the corresponding code blocks can be selected as target code blocks according to the scene identifiers. The warehouse layer comprises database models used in different scenes, so that the corresponding code blocks can be selected as target code blocks according to scene identifiers.
In some further embodiments, the dependency relationship between the preset code layers includes: the interface layer depends on the application layer to realize the realization method of the service interface; the application layer depends on the field layer, the anticorrosion adaptation layer and the storage layer to respectively realize a general service interface, a specific service interface and a first service interface of the storage layer; the domain layer relies on the reservoir layer to implement a second service interface of the reservoir layer.
The API layer can aggregate the capability of the application layer, provides access service interface definition and implementation for the outside, and can realize the self service capability by depending on the application layer. Wherein, the application layer can aggregate the general service capability provided by the field layer through the tool class depending on the field layer; meanwhile, a specific service interface can be realized by depending on the anticorrosion adaptation layer, so that the service capability is provided for the API layer; and by relying on the reservoir stratum, implementing a first business interface of the reservoir stratum. The field layer can realize the second service interface of the warehouse layer database by depending on the warehouse layer, so that the field layer can be prevented from depending on the specific warehouse layer to realize, and the flexibility of accessing the warehouse layer is improved. Referring also to fig. 2, in some specific scenarios, the scenario layer may also optionally rely on an anti-corrosion adaptation layer and a reservoir layer.
The method for generating the executable file provided by the embodiment of the invention receives a generation instruction, wherein the generation instruction carries a scene identifier; selecting target code blocks corresponding to the scene identification from preset code blocks, and configuring the dependency relationship among the target code blocks; and packaging the target code blocks with the configured dependency relationship, and outputting a packaged executable file. By defining the source code as the preset code blocks which can be independently packed, the selection and configuration of each preset code block can be realized according to different scene identifiers, so that the output of executable files of different scenes based on the same set of source code is realized, and the code consistency is ensured. When the codes corresponding to the general service need to be updated, the updated executable files of different scenes can be generated only by updating the corresponding preset code blocks, so that the development resource investment can be saved, the development efficiency is improved, and the codes are more convenient to maintain.
Example two
Fig. 3 is a flowchart illustrating an execution method of an executable file according to a second embodiment of the present invention. The present embodiment may be applied to the case of executing an executable file, and is particularly applied to the case of executing an executable file generated by the generation method provided in any embodiment of the present invention. The method can be executed by an execution device of the executable file provided by the embodiment of the invention, the execution device is realized in a software and/or hardware mode, and the execution device can be configured in an electronic terminal, such as a mobile phone and a computer.
Referring to fig. 3, the method for generating an executable file according to this embodiment is used to execute an executable file generated by the generating method according to any embodiment of the present invention, and includes:
and S310, responding to the starting instruction of the executable file, and presenting a user interface.
In the embodiment of the present invention, the executable file generated by the method for generating an executable file according to any embodiment of the present invention may be installed in an electronic terminal. And may launch the executable file according to a launch instruction input by the user, such as clicking an icon of the executable file, to present a user interface of the executable file.
And S320, responding to the trigger operation of the service interface in the user interface, and generating an execution instruction.
In the embodiment of the invention, the API layer can present some external services in the user interface in a mode of button control and the like. When a user triggers a control corresponding to the service interface, an execution instruction of the service interface can be generated.
S330, executing the relevant code blocks for realizing the service interface according to the execution instruction and the dependency relationship among the code blocks configured in the executable file.
In the embodiment of the invention, the generated executable file is a set of executable files under a specific application scene, and the executable files comprise related code blocks and dependency relations thereof required by specific realization of a service interface. According to the configured dependency relationship in the executable file, executing a relevant code block for implementing the service interface, which may specifically be:
the implementation method of the service interface of the API layer can realize the self service capability by depending on the relevant code block in the application layer. The application layer can aggregate the general service capability provided by the field layer through the related code blocks in the dependency field layer; meanwhile, a specific service interface can be realized by depending on a related code block in the anticorrosion adaptation layer, so that specific service capability is provided for the API layer; and implementing a first business interface of the repository tier by relying on the associated code blocks in the repository tier. The domain layer may implement a second business interface of the repository database by relying on the associated code blocks in the repository.
And after the service interface is realized, the result of executing the relevant code blocks of the service interface and the realization method of the service interface can be fed back, for example, the execution result is presented in the user interface.
An executable file execution method provided in an embodiment of the present invention is a method for executing an executable file generated by a generation method provided in any embodiment of the present invention, and includes: presenting a user interface in response to a launch instruction of the executable file; responding to the triggering operation of a service interface in a user interface, and generating an execution instruction; and executing the service interface and the related code block of the implementation method of the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file. Because the executed executable file is generated by the generation method provided by the above embodiment, the code blocks of the executable file have configured dependency relationships, and during the implementation of the service interface, the code blocks can be called according to the configured dependency relationships, thereby implementing the service interfaces. In addition, the execution method provided by the embodiment of the present invention has the same inventive concept as the generation method provided by the above embodiment, and the technical details that are not described in detail can be referred to the generation method of the executable file provided by the embodiment of the present invention, and has the same advantageous effects.
EXAMPLE III
Fig. 4 is a schematic structural diagram of an executable file generation apparatus according to a third embodiment of the present invention. The executable file generation device can realize the executable file generation method provided by the embodiment of the invention.
Referring to fig. 4, the apparatus for generating an executable file provided by the present invention includes:
a generation instruction receiving module 410, configured to receive a generation instruction, where the generation instruction carries a scene identifier;
a dependency configuration module 420, configured to select a target code block corresponding to the scene identifier from preset code blocks, and configure a dependency between the target code blocks;
and the code block packaging module 430 is configured to package the target code blocks configured with the dependency relationship, and output a packaged executable file.
In some optional embodiments, the preset code blocks are subordinate to different preset code layers, and the preset code layers include: the system comprises an interface layer, an application layer, a field layer, an anti-corrosion adaptation layer and a storage layer;
the system comprises an interface layer, a preset code block and a service interface, wherein the preset code block in the interface layer is used for defining a service interface and an implementation method of the service interface; the preset code block in the application layer is used for defining a general service interface, a specific service interface and a first service interface of the warehouse layer; the preset code block in the domain layer is used for realizing a general service interface and defining a second service interface of the warehouse layer; the preset code in the anticorrosion adaptive layer is used for realizing a specific service interface; the system comprises a preset code block in a warehouse layer, a first service interface and a second service interface, wherein the preset code block is used for realizing the first service interface and the second service interface of the warehouse layer;
accordingly, a dependency configuration module, comprising:
the target code selecting unit is used for selecting a target code block corresponding to the scene identifier from preset code blocks of a preset code layer;
and the dependency relationship configuration unit is used for configuring the dependency relationship among the target code blocks based on the dependency relationship among the preset code layers.
In some optional embodiments, the object code selecting unit is specifically configured to:
and taking all code blocks of the interface layer, the application layer and the field layer, and code blocks corresponding to the scene identifiers in the anticorrosion adaptation layer and the storage layer as target code blocks.
In some optional embodiments, the dependency relationship between the preset code layers includes:
the interface layer depends on the application layer to realize the realization method of the service interface; the application layer depends on the field layer, the anticorrosion adaptation layer and the storage layer to respectively realize a general service interface, a specific service interface and a first service interface of the storage layer; the domain layer relies on the reservoir layer to implement a second service interface of the reservoir layer.
In some optional embodiments, the scene identifier includes a cloud version identifier and a local version identifier.
The device for generating the executable file, which is provided by the embodiment of the invention, can execute the method for generating the executable file, and has the corresponding functional modules and beneficial effects for executing the method for generating the executable file. The details of the technology that are not described in detail can be referred to the generation method of the executable file provided by the embodiment of the present invention.
Example four
Fig. 5 is a schematic structural diagram of an execution apparatus for an executable file according to a fourth embodiment of the present invention. The execution device applying the executable file can realize the execution method of the executable file provided by the embodiment of the invention.
Referring to fig. 5, an executable file execution apparatus provided by the present invention is configured to execute an executable file generated by a generation method provided by any embodiment of the present invention, and includes:
an interface presentation module 510, configured to present a user interface in response to a start instruction of the executable file;
an interface triggering module 520, configured to generate an execution instruction in response to a triggering operation of a service interface in a user interface;
and the interface implementation module 530 is configured to execute the relevant code blocks for implementing the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file.
The executable file execution device provided by the embodiment of the invention can execute the executable file execution method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the executable file execution method. Technical details that are not described in detail may be referred to in the execution method of the executable file provided by the embodiment of the present invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic terminal according to a fifth embodiment of the present invention. Fig. 6 illustrates a block diagram of an exemplary electronic terminal 12 suitable for use in implementing embodiments of the present invention. The electronic terminal 12 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention. The device 12 is typically an electronic terminal that undertakes the generation of executable files.
As shown in fig. 6, the electronic terminal 12 is embodied in the form of a general purpose computing device. The components of the electronic terminal 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
The electronic terminal 12 typically includes a variety of computer readable media. Such media may be any available media that is accessible by electronic terminal 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic terminal 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product 40, with program product 40 having a set of program modules 42 configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The electronic terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with the electronic terminal 12, and/or any device (e.g., network card, modem, etc.) that enables the electronic terminal 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic terminal 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), etc.) and/or a public Network (e.g., the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic terminal 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic terminal 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by executing the program stored in the memory 28, for example, implementing the executable file generation method provided by the above-described embodiment of the present invention, including:
receiving a generation instruction, wherein the generation instruction carries a scene identifier; selecting target code blocks corresponding to the scene identification from preset code blocks, and configuring the dependency relationship among the target code blocks; packing the target code blocks with the configured dependency relationship, and outputting a packed executable file;
or, the method for executing the executable file provided by the above embodiment of the present invention is used to execute the executable file generated by the generating method provided by the above embodiment of the present invention, and includes:
presenting a user interface in response to a launch instruction of the executable file; responding to the triggering operation of a service interface in a user interface, and generating an execution instruction; and executing the relevant code blocks for realizing the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file.
Of course, those skilled in the art can understand that the processor may also implement the technical solution of the method for generating an executable file provided by the embodiment of the present invention.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for generating an executable file according to the sixth embodiment of the present invention, where the method includes:
receiving a generation instruction, wherein the generation instruction carries a scene identifier; selecting target code blocks corresponding to the scene identification from preset code blocks, and configuring the dependency relationship among the target code blocks; packing the target code blocks with the configured dependency relationship, and outputting a packed executable file;
or, the method for executing the executable file provided by the above embodiment of the present invention is used to execute the executable file generated by the generating method provided by the above embodiment of the present invention, and includes:
presenting a user interface in response to a launch instruction of the executable file; responding to the triggering operation of a service interface in a user interface, and generating an execution instruction; and executing the relevant code blocks for realizing the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file.
Of course, the computer program stored on the computer-readable storage medium provided by the embodiment of the present invention is not limited to the above method operations, and may also execute the method for generating the executable file provided by the embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for generating an executable file, comprising:
receiving a generation instruction, wherein the generation instruction carries a scene identifier;
selecting target code blocks corresponding to the scene identifiers from preset code blocks, and configuring the dependency relationship among the target code blocks;
and packaging the target code blocks with the configured dependency relationship, and outputting a packaged executable file.
2. The method of claim 1, wherein the pre-set code blocks are subordinate to different pre-set code layers, and wherein the pre-set code layers comprise: the system comprises an interface layer, an application layer, a field layer, an anti-corrosion adaptation layer and a storage layer;
the preset code block in the interface layer is used for defining a service interface and an implementation method of the service interface; the preset code block in the application layer is used for defining a general service interface, a specific service interface and a first service interface of the warehouse layer; the preset code block in the domain layer is used for realizing the universal service interface and defining a second service interface of the storage layer; the preset code in the anticorrosion adaptive layer is used for realizing the specific service interface; the preset code block in the warehouse layer is used for realizing a first service interface and a second service interface of the warehouse layer;
correspondingly, the selecting a target code block corresponding to the scene identifier from preset code blocks and configuring a dependency relationship between the target code blocks includes:
selecting a target code block corresponding to the scene identifier from preset code blocks of the preset code layer; and configuring the dependency relationship between the target code blocks based on the dependency relationship between the preset code layers.
3. The method according to claim 2, wherein the selecting a target code block corresponding to the scene identifier from preset code blocks in the preset code layer comprises:
and taking all code blocks of the interface layer, the application layer and the field layer, and code blocks corresponding to the scene identifiers in the anticorrosion adaptation layer and the storage layer as target code blocks.
4. The method according to claim 2, wherein the dependency relationship between the preset code layers comprises:
the interface layer depends on the application layer to realize the implementation method of the service interface; the application layer depends on the field layer, the anticorrosion adaptation layer and the storage layer to respectively realize a general service interface, a specific service interface and a first service interface of the storage layer; the domain layer relies on the reservoir layer to implement a second service interface of the reservoir layer.
5. The method of any one of claims 1-4, wherein the scene identifier comprises a cloud version identifier and a local version identifier.
6. An executable file executing method for executing an executable file generated by the generating method of any one of claims 1 to 5, comprising:
presenting a user interface in response to a launch instruction of the executable file;
responding to the triggering operation of a service interface in the user interface, and generating an execution instruction;
and executing the relevant code blocks for realizing the service interface according to the execution instruction and the dependency relationship between the code blocks configured in the executable file.
7. An executable file generation apparatus, comprising:
a generation instruction receiving module, configured to receive a generation instruction, where the generation instruction carries a scene identifier;
the dependency configuration module is used for selecting target code blocks corresponding to the scene identifiers from preset code blocks and configuring the dependency between the target code blocks;
and the code block packaging module is used for packaging the target code blocks with the configured dependency relationship and outputting a packaged executable file.
8. An executable file execution apparatus, for executing an executable file generated by the generation method of any one of claims 1 to 5, comprising:
the interface presentation module is used for responding to the starting instruction of the executable file and presenting a user interface;
the interface triggering module is used for responding to the triggering operation of the service interface in the user interface and generating an execution instruction;
and the interface implementation module is used for executing the relevant code blocks for implementing the service interface according to the execution instruction and the dependency relationship among the code blocks configured in the executable file.
9. An electronic terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a method for generating an executable file according to any of claims 1-5 or a method for executing an executable file according to claim 6 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for generating an executable file according to any one of claims 1 to 5, or a method for executing an executable file according to claim 6.
CN202011550399.2A 2020-12-24 2020-12-24 Executable file generation and execution method, device, electronic terminal and medium Pending CN112558983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011550399.2A CN112558983A (en) 2020-12-24 2020-12-24 Executable file generation and execution method, device, electronic terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011550399.2A CN112558983A (en) 2020-12-24 2020-12-24 Executable file generation and execution method, device, electronic terminal and medium

Publications (1)

Publication Number Publication Date
CN112558983A true CN112558983A (en) 2021-03-26

Family

ID=75033387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011550399.2A Pending CN112558983A (en) 2020-12-24 2020-12-24 Executable file generation and execution method, device, electronic terminal and medium

Country Status (1)

Country Link
CN (1) CN112558983A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115857956A (en) * 2022-11-24 2023-03-28 北京中知智慧科技有限公司 Multi-site deployment processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815052A (en) * 2017-01-10 2017-06-09 南威软件股份有限公司 A kind of method of the rapid deployment system for being adapted to multi-environment configuration
CN106990960A (en) * 2017-03-28 2017-07-28 阿里巴巴集团控股有限公司 Code dispositions method and device
CN110531984A (en) * 2019-08-08 2019-12-03 金蝶软件(中国)有限公司 Code compiling method, device, system, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815052A (en) * 2017-01-10 2017-06-09 南威软件股份有限公司 A kind of method of the rapid deployment system for being adapted to multi-environment configuration
CN106990960A (en) * 2017-03-28 2017-07-28 阿里巴巴集团控股有限公司 Code dispositions method and device
CN110531984A (en) * 2019-08-08 2019-12-03 金蝶软件(中国)有限公司 Code compiling method, device, system, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115857956A (en) * 2022-11-24 2023-03-28 北京中知智慧科技有限公司 Multi-site deployment processing method and system

Similar Documents

Publication Publication Date Title
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN109145025B (en) Multi-data-source integrated data query method and device and service server
US20140081615A1 (en) Virtual systems testing
US9736272B2 (en) Generation and distribution of named, definable, serialized tokens
CN109634587B (en) Method and equipment for generating warehousing script and warehousing data
WO2018083558A1 (en) Storing and retrieving restricted datasets to and from a cloud network with non-restricted datasets
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium
CN111813418A (en) Distributed link tracking method, device, computer equipment and storage medium
CN112558983A (en) Executable file generation and execution method, device, electronic terminal and medium
CN114358742A (en) Workflow execution method, device, equipment and storage medium
CN112000491B (en) Application program interface calling method, device, equipment and storage medium
US20200175195A1 (en) Data transfer management system and data transfer management method
US10168999B2 (en) Software object definition and integration
US11640281B2 (en) Tool for introspection in object-oriented source code
CN113434217B (en) Vulnerability scanning method, vulnerability scanning device, computer equipment and medium
CN115185599A (en) Project deployment method, system and storage medium based on Golang
CN114237871A (en) Arranging method and device of cloud resources, computer equipment and storage medium
CN115658276B (en) Service development method, device, electronic equipment and readable storage medium
CN115098077B (en) Method and platform for IT application access platform
KR102428928B1 (en) Method and system for managing resource for game engine
CN116820354B (en) Data storage method, data storage device and data storage system
US20230222107A1 (en) Database record bit
CN109766246B (en) Method and apparatus for monitoring applications
EP4216052A1 (en) Method for developing mvvm architecture-based application, and terminal
CN114968209A (en) Page management method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination