Software package generation method and device, software operation method and device, electronic equipment and storage medium

By compiling interpreted source code files into instruction files and generating mapping description files during software development, the problem of slow software running speed is solved, and faster startup and interface response is achieved.

CN119473373APending Publication Date: 2025-02-18LOONGSON TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311014322.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When the software contains a large amount of source code that needs to be executed while translating, the software runs slowly, especially if the cache file is not generated or not loaded.

Method used

By obtaining the interpreted source code file in the software development file, compiling it into the corresponding instruction file, and generating a mapping description file of the interpreted source code file and the instruction file, generating a software package. When the software is running, the corresponding instruction file is loaded according to the mapping description file to reduce instant compilation.

Benefits of technology

The software startup speed and interface switching display speed are improved, so users can see application feedback faster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473373A_ABST
    Figure CN119473373A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a software package generation method and device, a software operation method and device, equipment and a storage medium, and the method comprises the steps that an interpreted source code file in a software development file is acquired, the interpreted source code file is compiled into a corresponding instruction file, and a mapping description file of the interpreted source code file and the corresponding instruction file is generated, and generating a software package according to the software development file, the instruction file and the mapping description file, so that an interpreted source code file which is executed while being translated is compiled into the instruction file to be stored in a compiling stage, and the instruction file is directly loaded during software running, so that the starting speed is obviously increased, and the starting efficiency is improved. And the interface switching display is quicker, and meanwhile, the user can see the application feedback more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software package generation method, a software running method, a software package generation device, a software running device, an electronic device and a readable storage medium. Background Art

[0002] QML (Qt Meta-object Language) is an interpreted language that can be executed faster to see specific results during program development. It can be translated and executed at runtime, instead of requiring the entire project to be fully compiled before execution like a common static compiler.

[0003] In certain circumstances, such as when the software contains many add-ons that need to be translated and executed at the same time, the software will run more slowly. Even if QML has its own caching mechanism, the cache file has not been generated when the software is first started, and the running speed will be even slower. Moreover, the cache file may not be loaded, and the problem of repeated compilation will still occur, and the software will run inefficiently. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present invention is to provide a software package generation method, a software running method, an apparatus, an electronic device and a readable storage medium, so as to solve the problem of slow running speed when the software contains a large number of source code add-ons that need to be translated and executed at the same time.

[0005] In order to solve the above problem, the present invention provides a method for generating a software package, comprising:

[0006] Get the interpreted source code files in the software development files;

[0007] Compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file;

[0008] A software package is generated according to the software development file, the instruction file and the mapping description file.

[0009] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file.

[0010] The present invention also provides a software running method, comprising:

[0011] Installing a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file;

[0012] During the software operation, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the real-time compilation of the interpreted source code file during the software operation.

[0013] Optionally, the method further comprises:

[0014] If loading the corresponding instruction file fails, the interpreted source code file is loaded to ensure that the software runs normally.

[0015] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file, and before loading the corresponding instruction file according to the mapping description file, the method further includes:

[0016] According to the mapping description file, it is determined that the interpreted source code file has not changed during the software running process.

[0017] The present invention also provides a software package generating device, comprising:

[0018] A file acquisition module is used to obtain the interpreted source code files in the software development files;

[0019] A compiling module, used to compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file;

[0020] A generation module is used to generate a software package according to the software development file, the instruction file and the mapping description file.

[0021] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file.

[0022] The present invention also provides a software running device, comprising:

[0023] An installation module, used for installing a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file;

[0024] The instruction file loading module is used to load the corresponding instruction file according to the mapping description file when the interpreted source code file needs to be loaded during the software operation, so as to reduce the real-time compilation of the interpreted source code file during the software operation.

[0025] Optionally, the device further comprises:

[0026] The source code loading module is used to load the interpreted source code file if the loading of the corresponding instruction file fails, so as to ensure the normal operation of the software.

[0027] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file, and the device further includes:

[0028] The change determination module is used to determine, based on the mapping description file, before loading the corresponding instruction file according to the mapping description file, that the interpreted source code file has not changed during the software running process.

[0029] The embodiment of the present invention further discloses an electronic device, characterized in that it includes a processor;

[0030] The memory is used to store a computer program, and when the computer program is executed by the processor, the processor implements the method steps described above.

[0031] The embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute one or more methods described in the embodiment of the present invention.

[0032] According to an embodiment of the present invention, an interpreted source code file in a software development file is obtained, the interpreted source code file is compiled into a corresponding instruction file, and a mapping description file between the interpreted source code file and the corresponding instruction file is generated. A software package is generated based on the software development file, the instruction file and the mapping description file, so that the interpreted source code file that is translated and executed at the same time is compiled into an instruction file and stored during the compilation stage, so that the instruction file can be directly loaded when the software is running, thereby significantly improving the startup speed, and the interface switching display will be faster. At the same time, the user can also see the application feedback faster. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart showing the steps of a method for generating a software package provided by an embodiment of the present invention is shown;

[0034] Figure 2 A flowchart showing a method for running software according to an embodiment of the present invention is shown;

[0035] Figure 3 A structural block diagram of an embodiment of a software package generating device provided by an embodiment of the present invention is shown;

[0036] Figure 4 A structural block diagram of a software running device embodiment provided by an embodiment of the present invention is shown;

[0037] Figure 5 A structural block diagram of an electronic device for software package generation or software operation according to an exemplary embodiment is shown. DETAILED DESCRIPTION

[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] Reference Figure 1 , shows a flowchart of a method for generating a software package provided by an embodiment of the present invention, which may specifically include the following steps:

[0040] Step 101, obtaining the interpreted source code file in the software development file.

[0041] In the embodiment of the present invention, for the software currently under development, the software development files refer to the files required by the uncompiled and unpackaged software, and are files generated or associated with the software during the software development process, for example, the software development files of a software project developed based on QML.

[0042] In the embodiment of the present invention, the interpreted source code file refers to a source code file that is translated and executed at runtime, for example, dynamically scanning all the interpreted source code files in qml format and js (JavaScript) format under the specified software project.

[0043] Step 102, compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file.

[0044] In an embodiment of the present invention, the interpreted source code files are compiled in advance to obtain corresponding instruction files. For example, each interpreted source code file is compiled separately to obtain corresponding binary instruction files, and put into a default or specified cache directory.

[0045] In the embodiment of the present invention, during the software running process, when it is necessary to load an interpreted source code file, it is necessary to let the runtime interpreter know that the interpreted source code file already has a corresponding instruction file and no longer needs to be compiled in real time. Therefore, it is necessary to generate a file describing the mapping relationship between the interpreted source code file and the corresponding instruction file, which is recorded as a mapping description file. For example, in the above software project, a file in qrc format is generated and used as a mapping description file.

[0046] In an optional embodiment of the present invention, the mapping description file includes description information that uniquely identifies the interpreted source code file.

[0047] The description information refers to information that uniquely identifies an interpreted source code file, for example, a character string consisting of the timestamp of the last modification of the interpreted source code file, the file name of the interpreted source code file, the path of the interpreted source code file, etc. It can also be a hash value of the aforementioned character string, etc., and can specifically include any applicable description information, which is not limited in this embodiment of the present invention.

[0048] The interpreted source code file may change during the software running process. For example, during the software running process, due to the user's operation, it is necessary to write the modification of certain data into an interpreted source code file, that is, the interpreted source code file has been modified. Then the modified interpreted source code file is no longer the original interpreted source code file.

[0049] Step 103: Generate a software package according to the software development file, the instruction file and the mapping description file.

[0050] In the embodiment of the present invention, without changing the source code of the software project, the software development file and the mapping description file are first compiled to obtain the target file, and the mapping description file is also compiled into the target file. Then, the target file and the instruction file are packaged together to obtain a software package.

[0051] For example, after the above-mentioned qrc format file (qmlc.qrc file) is generated, without changing the project source code, the newly added mapping description file needs to be compiled into the final target file, and the qmake "RESOURCE+=qmlc.qrc" command is used to generate the target file of the final software project, and then the target file and the instruction file are packaged together to obtain the software package and released.

[0052] The software package generation method of the embodiment of the present invention can use a custom qmlccompiler compilation tool to implement the compilation of interpreted source code files. For example, add the "qmlc-compiler" compilation option in configure.json (configuration file for modules that support the Qml language) in the Qt source code (development library, graphics library, etc.), so that the custom compilation tool corresponding to the option is compiled when compiling the qt source code. In the tools directory of the qtdeclarative submodule of the Qt source code, a new folder corresponding to the option (qmlccompiler folder) is created, and a custom generateQmlc function is added. The function implements the function of retrieving the interpreted source code file and compiling it into the target file, and recording the specific information in the mapping description file. The Qt source code is compiled, so that the custom compilation tool is also compiled. After starting QtCreator (Qt's own integrated development environment), configure the path of the compiled custom qmlccompiler compilation tool and the path of the modified Qt source code into QtCreator, so as to be integrated into QtCreator in the form of a plug-in for use in software development.

[0053] The software package needs to be packaged according to the requirements of the software package manager on the release platform. For example, it will be packaged into ipk format on an embedded platform. The packaging can be implemented by an existing packaging tool.

[0054] According to an embodiment of the present invention, an interpreted source code file in a software development file is obtained, the interpreted source code file is compiled into a corresponding instruction file, and a mapping description file between the interpreted source code file and the corresponding instruction file is generated. A software package is generated based on the software development file, the instruction file and the mapping description file, so that the interpreted source code file that is translated and executed at the same time is compiled into an instruction file and stored during the compilation stage, so that the instruction file can be directly loaded when the software is running, thereby significantly improving the startup speed, and the interface switching display will be faster. At the same time, the user can also see the application feedback faster.

[0055] Reference Figure 2 , shows a flowchart of a software running method provided by an embodiment of the present invention, which may specifically include the following steps:

[0056] Step 201, installing the software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file.

[0057] In the embodiment of the present invention, after the software package is released, the user first installs the software package, for example, directly installing the software package to the target directory, so that the interpreted source code file and the corresponding instruction file are all installed to the target directory.

[0058] Step 202, during the software running process, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the real-time compilation of the interpreted source code file during the software running process.

[0059] In the embodiment of the present invention, after the operation is started, when a certain interpreted source code file needs to be loaded, the corresponding instruction file can be found according to the mapping description file, and the instruction file can be directly loaded.

[0060] For example, each time the runtime interpreter needs to load an interpreted source code file, it first determines whether there is a corresponding instruction file based on the mapping description file. If so, it will directly call the binary instruction file to load and display it, without the need for translation and execution again and again.

[0061] In an optional embodiment of the present invention, the method may further include: if loading the corresponding instruction file fails, loading the interpreted source code file to ensure that the software runs normally.

[0062] Since the software package contains both interpreted source code files and instruction files, when loading the corresponding instruction file fails, the interpreted source code file can be loaded, that is, the interpreted source code file is loaded in a translation-while-execution manner, thereby ensuring normal software operation.

[0063] In an optional embodiment of the present invention, the mapping description file includes descriptive information that uniquely identifies the interpreted source code file. Before loading the corresponding instruction file according to the mapping description file, it may also include: determining, according to the mapping description file, that the interpreted source code file has not changed during the software running process.

[0064] As mentioned above, the interpreted source code file may change during the software operation. When the interpreted source code file changes during the software operation, the pre-compiled instruction file can no longer be directly loaded. When the interpreted source code file does not change during the software operation, the pre-compiled instruction file can be directly loaded.

[0065] According to the descriptive information that uniquely identifies the interpreted source code file in the mapping description file, the description information of the changed interpreted source code file will be inconsistent with the original description information in the mapping description file. Therefore, it can be determined whether the interpreted source code file currently required to be loaded during software operation has changed.

[0066] According to an embodiment of the present invention, a software package is installed, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file. The instruction file and the mapping description file are generated according to the software development file. During the running of the software, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the just-in-time compilation of the interpreted source code file during the running of the software, so that the interpreted source code file that is translated and executed at the same time is compiled into an instruction file and stored in the compilation stage, so that the instruction file can be directly loaded when the software is running, thereby significantly improving the startup speed, and the interface switching display will be faster, and the user can also see the application feedback faster.

[0067] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0068] Reference Figure 3 , shows a structural block diagram of an embodiment of a software package generation device provided by another embodiment of the present invention, which may specifically include the following modules:

[0069] The file acquisition module 301 is used to acquire the interpreted source code files in the software development files;

[0070] A compiling module 302, used to compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file;

[0071] The generating module 303 is used to generate a software package according to the software development file, the instruction file and the mapping description file.

[0072] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file.

[0073] According to an embodiment of the present invention, an interpreted source code file in a software development file is obtained, the interpreted source code file is compiled into a corresponding instruction file, and a mapping description file between the interpreted source code file and the corresponding instruction file is generated. A software package is generated based on the software development file, the instruction file and the mapping description file, so that the interpreted source code file that is translated and executed at the same time is compiled into an instruction file and stored during the compilation stage, so that the instruction file can be directly loaded when the software is running, thereby significantly improving the startup speed, and the interface switching display will be faster. At the same time, the user can also see the application feedback faster.

[0074] Reference Figure 4 , shows a structural block diagram of a software running device embodiment provided by another embodiment of the present invention, which may specifically include the following modules:

[0075] An installation module 401 is used to install a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file;

[0076] The instruction file loading module 402 is used to load the corresponding instruction file according to the mapping description file when the interpreted source code file needs to be loaded during the software running process, so as to reduce the real-time compilation of the interpreted source code file during the software running process.

[0077] Optionally, the device further comprises:

[0078] The source code loading module is used to load the interpreted source code file if the loading of the corresponding instruction file fails, so as to ensure the normal operation of the software.

[0079] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file, and the device further includes:

[0080] The change determination module is used to determine, based on the mapping description file, before loading the corresponding instruction file according to the mapping description file, that the interpreted source code file has not changed during the software running process.

[0081] According to an embodiment of the present invention, a software package is installed, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file. The instruction file and the mapping description file are generated according to the software development file. During the running of the software, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the just-in-time compilation of the interpreted source code file during the running of the software, so that the interpreted source code file that is translated and executed at the same time is compiled into an instruction file and stored in the compilation stage, so that the instruction file can be directly loaded when the software is running, thereby significantly improving the startup speed, and the interface switching display will be faster, and the user can also see the application feedback faster.

[0082] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0083] Figure 5 1 is a block diagram of an electronic device 700 for software package generation or software operation according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0084] Reference Figure 5 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0085] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0086] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0087] The power component 704 provides power to various components of the electronic device 700. The power component 704 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.

[0088] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0089] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0090] I / O interface 712 provides an interface between processing component 702 and peripheral interface components, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0091] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of contact between the user and the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0092] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 714 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 714 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0093] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0094] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0095] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a terminal, enables the terminal to execute a software package generation method, the method comprising:

[0096] Get the interpreted source code files in the software development files;

[0097] Compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file;

[0098] A software package is generated according to the software development file, the instruction file and the mapping description file.

[0099] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file.

[0100] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal, enables the terminal to execute a software running method, the method comprising:

[0101] Installing a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file;

[0102] During the software operation, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the real-time compilation of the interpreted source code file during the software operation.

[0103] Optionally, the method further comprises:

[0104] If loading the corresponding instruction file fails, the interpreted source code file is loaded to ensure that the software runs normally.

[0105] Optionally, the mapping description file includes description information that uniquely identifies the interpreted source code file, and before loading the corresponding instruction file according to the mapping description file, the method further includes:

[0106] According to the mapping description file, it is determined that the interpreted source code file has not changed during the software running process.

[0107] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0108] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0109] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0112] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0113] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0114] The software package generation method, software running method, software package generation device, software running device, electronic device, and readable storage medium provided by the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for generating a software package, characterized in that: include: Get the interpreted source code files in the software development files; Compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file; A software package is generated according to the software development file, the instruction file and the mapping description file.

2. The method according to claim 1, characterized in that The mapping description file includes description information that uniquely identifies the interpreted source code file.

3. A software operation method, characterized in that: include: Installing a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file; During the software operation, when the interpreted source code file needs to be loaded, the corresponding instruction file is loaded according to the mapping description file to reduce the real-time compilation of the interpreted source code file during the software operation.

4. The method according to claim 3, characterized in that The method further comprises: If loading the corresponding instruction file fails, the interpreted source code file is loaded to ensure that the software runs normally.

5. The method according to claim 3, characterized in that: The mapping description file includes description information that uniquely identifies the interpreted source code file. Before loading the corresponding instruction file according to the mapping description file, the method further includes: According to the mapping description file, it is determined that the interpreted source code file has not changed during the software running process.

6. A software package generating device, characterized in that: include: A file acquisition module is used to obtain the interpreted source code files in the software development files; A compiling module, used to compile the interpreted source code file into a corresponding instruction file, and generate a mapping description file between the interpreted source code file and the corresponding instruction file; A generation module is used to generate a software package according to the software development file, the instruction file and the mapping description file.

7. The device according to claim 6, characterized in that The mapping description file includes description information that uniquely identifies the interpreted source code file.

8. A software running device, characterized in that: include: An installation module, used for installing a software package, wherein the software package is obtained by obtaining an interpreted source code file in a software development file, compiling the interpreted source code file into a corresponding instruction file, and generating a mapping description file between the interpreted source code file and the corresponding instruction file, wherein the instruction file and the mapping description file are generated according to the software development file; The instruction file loading module is used to load the corresponding instruction file according to the mapping description file when the interpreted source code file needs to be loaded during the software operation, so as to reduce the real-time compilation of the interpreted source code file during the software operation.

9. The device according to claim 8, characterized in that The device also includes: The source code loading module is used to load the interpreted source code file if the loading of the corresponding instruction file fails, so as to ensure the normal operation of the software.

10. The device according to claim 8, characterized in that The mapping description file includes description information that uniquely identifies the interpreted source code file, and the device further includes: The change determination module is used to determine, based on the mapping description file, before loading the corresponding instruction file according to the mapping description file, that the interpreted source code file has not changed during the software running process.

11. An electronic device, characterized in that: include: processor; A memory for storing a computer program, wherein when the computer program is executed by the processor, the processor implements the method steps described in any one of claims 1 to 5.

12. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform one or more of the methods described in method claims 1-5.