Software deployment method, device, electronic device and storage medium
By analyzing and comparing the metadata in the software deployment request and the interface information of the local public code library, judge the compatibility of the software package and the local software operating environment, solve the problem of function failure caused by the failure of the software package and the operating environment. Realize the reliability and stability of software deployment.
Patent Information
- Application Number
- CN202110979978.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-08-25
AI Technical Summary
In the prior art, the software package does not match the local software running environment, resulting in software functions failure or abnormal crashes, and may even trigger abnormal restart of the running system.
By receiving software deployment requests, analysis of metadata to obtain the interface information of the application interface in the public code library required for deployment software to be deployed, and the interface information of the application interface in the public code library installed in the local public code library Compare whether the software package to be deployed is compatible with the local software operation environment, and then decide whether to respond to the software deployment request.
It effectively avoids software deployment problems caused by incompatibility and ensures compatibility judgment before software deployment, thereby improving the reliability and stability of software deployment.
Smart Images

Figure CN113721940B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and in particular to a software deployment method, device, electronic device and storage medium. Background Art
[0002] Generally, after software developers develop a software package in a software development environment, they deploy the software package to a runtime environment / production environment, which involves the installation / upgrade of the software.
[0003] If the software development has dependencies or requirements on the operating environment, such as the software package is developed based on the dynamic library or static library provided by the operating environment, then during the software installation / upgrade process, if the software package to be deployed does not match the local software operating environment, it will cause the software function to fail or crash abnormally, and may even trigger an abnormal restart of the operating system. Summary of the invention
[0004] The embodiments of the present application provide a software deployment method, device, electronic device and storage medium to solve the software deployment problem caused by incompatibility in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a software deployment method, including:
[0006] receiving a software deployment request, wherein the software deployment request includes a software package to be deployed and metadata, wherein the metadata is used to describe interface information of an application program interface in a public code library required by the software package to be deployed when running;
[0007] Parsing the metadata to obtain the interface information;
[0008] Comparing the interface information with the interface information of the application program interface in the locally installed public code library to determine whether the software package to be deployed is compatible with the local software operating environment;
[0009] Based on the information about whether the software package to be deployed is compatible with the local software running environment, it is determined whether to respond to the software deployment request.
[0010] In some possible implementations, the metadata is generated according to the following steps:
[0011] Parsing the application program interface symbols of the executable file in the software package to be deployed, obtaining the application program interface corresponding to the software package to be deployed, and selecting the application program interface that complies with the preset naming rule from the application program interfaces;
[0012] Parsing a common code library used in developing the software package to be deployed to obtain an application program interface set;
[0013] If any of the screened application program interfaces is included in the application program interface set, determining that the application program interface is an application program interface in a public code library required by the software package to be deployed at runtime;
[0014] The interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain the metadata.
[0015] In some possible implementations, comparing the interface information with the interface information of the application program interface in the locally installed public code library to determine whether the software package to be deployed is compatible with the local software operating environment includes:
[0016] If the application program interface in the public code library required by the software package to be deployed during operation is a subset of the application program interface in the public code library installed locally, then determining that the software package to be deployed is compatible with the local software operating environment;
[0017] If the application program interface in the public code library required by the software package to be deployed during runtime is not a subset of the application program interface in the locally installed public code library, it is determined that the software package to be deployed is incompatible with the local software runtime environment.
[0018] In some possible implementations, determining whether to respond to the software deployment request based on information about whether the software package to be deployed is compatible with the local software runtime environment includes:
[0019] If the software package to be deployed is compatible with the local software operating environment, determining to respond to the software deployment request;
[0020] If the software package to be deployed is incompatible with the local software operating environment, it is determined to reject the software deployment request.
[0021] In some possible implementations, if the software package to be deployed is compatible with the local software operating environment, the steps further include:
[0022] When the software package to be deployed includes a common code library, the common code library in the software package to be deployed is deleted.
[0023] In a second aspect, an embodiment of the present application provides a software deployment device, including:
[0024] A receiving module, used for receiving a software deployment request, wherein the software deployment request includes a software package to be deployed and metadata, wherein the metadata is used for describing interface information of an application program interface in a public code library required by the software package to be deployed at runtime;
[0025] A parsing module, used for parsing the metadata to obtain the interface information;
[0026] A control module, used to compare the interface information with the interface information of the application program interface in the locally installed public code library to determine whether the software package to be deployed is compatible with the local software operating environment;
[0027] The determination module is used to determine whether to respond to the software deployment request based on information about whether the software package to be deployed is compatible with the local software operating environment.
[0028] In some possible implementations, the metadata is generated according to the following steps:
[0029] Parsing the application program interface symbols of the executable file in the software package to be deployed, obtaining the application program interface corresponding to the software package to be deployed, and selecting the application program interface that complies with the preset naming rule from the application program interfaces;
[0030] Parsing a common code library used in developing the software package to be deployed to obtain an application program interface set;
[0031] If any of the screened application program interfaces is included in the application program interface set, determining that the application program interface is an application program interface in a public code library required by the software package to be deployed at runtime;
[0032] The interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain the metadata.
[0033] In some possible implementations, the control module is specifically used to:
[0034] If the application program interface in the public code library required by the software package to be deployed during operation is a subset of the application program interface in the public code library installed locally, then determining that the software package to be deployed is compatible with the local software operating environment;
[0035] If the application program interface in the public code library required by the software package to be deployed during runtime is not a subset of the application program interface in the locally installed public code library, it is determined that the software package to be deployed is incompatible with the local software runtime environment.
[0036] In some possible implementations, the determining module is specifically configured to:
[0037] If the software package to be deployed is compatible with the local software operating environment, determining to respond to the software deployment request;
[0038] If the software package to be deployed is incompatible with the local software operating environment, it is determined to reject the software deployment request.
[0039] In some possible implementations, the determining module is further configured to:
[0040] If the software package to be deployed is compatible with the local software running environment, then when the software package to be deployed includes a public code library, the public code library in the software package to be deployed is deleted.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:
[0042] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the above software deployment method.
[0043] In a fourth aspect, an embodiment of the present application provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the above-mentioned software deployment method.
[0044] In an embodiment of the present application, a software deployment request is received, wherein the software deployment request includes a software package to be deployed and metadata, and the metadata is parsed to obtain the interface information of the application program interface in the public code library required by the software package to be deployed at runtime, and the interface information is compared with the interface information of the application program interface in the public code library installed locally to determine whether the software package to be deployed is compatible with the local software operating environment, and based on the information of whether the software package to be deployed is compatible with the local software operating environment, it is determined whether to respond to the software deployment request. In this way, before deploying the software, the compatibility between the software to be deployed and the local software operating environment is judged, and whether to deploy the software is determined based on the judgment result, which can effectively avoid software deployment problems caused by incompatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 A flowchart of a software deployment method provided in an embodiment of the present application;
[0047] Figure 2 A flowchart of a method for generating metadata provided in an embodiment of the present application;
[0048] Figure 3A schematic diagram of a DevOs provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of the process of making an AppPackage provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of a process of making ELF into AppPackage provided in an embodiment of the present application;
[0051] Figure 6 A flowchart of another software deployment method provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the structure of a software deployment device provided in an embodiment of the present application;
[0053] Figure 8 A schematic diagram of the hardware structure of an electronic device for implementing a software deployment method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to solve the software deployment problem caused by incompatibility in the related art, the embodiments of the present application provide a software deployment method, device, electronic device and storage medium.
[0055] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0056] First of all, it should be noted that the execution subject of the embodiment of the present application can be an electronic device, such as a camera, a video recorder, etc., and a public code library such as a dynamic library or a static library is installed in the electronic device. The software package and the public code library can provide some unique business functions for the electronic device.
[0057] Figure 1 A flowchart of a software deployment method provided in an embodiment of the present application includes the following steps.
[0058] In step S101, a software deployment request is received, wherein the software deployment request includes a software package to be deployed and metadata, wherein the metadata is used to describe interface information of an application program interface in a public code library required by the software package to be deployed during runtime.
[0059] The software deployment request may be a software installation request or a software upgrade request; the interface information of the application program interface may be a function name of the application program interface.
[0060] In specific implementation, it can be based on Figure 2 The process shown generates metadata, including the following steps:
[0061] In step S201a, the application program interface symbols of the executable files in the software package to be deployed are parsed to obtain the application program interface corresponding to the software package to be deployed, and the application program interface that complies with the preset naming rule is screened from the application program interfaces.
[0062] Generally, the application program interfaces in the public code library of the electronic device have a unified naming rule, and this unified naming rule can also be open to the outside. Therefore, by screening the application program interfaces that meet the preset naming rule from the application program interfaces corresponding to the software package to be deployed, some alternative application program interfaces can be obtained.
[0063] In step S202a, a common code library used in developing the software package to be deployed is parsed to obtain an application program interface set.
[0064] Considering that a technician may use the above-mentioned unified naming rule to name a certain application program interface when developing a software package to be deployed, in fact, this application program interface is not an application program interface in a public code library required by the software package to be deployed at runtime.
[0065] To deal with this problem, the public code base used in developing the software package to be deployed can be parsed to obtain an application interface set. The application interfaces in the application interface set are the application interfaces in the public code base that can be used by the software package to be deployed. Subsequently, the application interfaces named by the technicians themselves that conform to the above unified naming rules can be eliminated with the help of the application interface set.
[0066] In step S203a, if any of the screened application program interfaces is included in the application program interface set, the application program interface is determined to be an application program interface in a public code library required by the software package to be deployed at runtime.
[0067] In specific implementation, if any of the screened out application interfaces is included in the application interface set, it means that this application interface is not an application interface named by the technician himself that complies with the above-mentioned unified naming rules. It can be determined that this application interface is an application interface in the public code library required by the software package to be deployed at runtime.
[0068] In step S204a, the interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain metadata.
[0069] Assuming that the application program interfaces in the public code library required by the software package to be deployed at runtime are: API_Func1 and API_Func2, the interface information of each application program interface in the public code library required by the software package to be deployed at runtime can be saved in the following format:
[0070]
[0071] That is, the above information is the metadata of the software package to be deployed.
[0072] In step S102, the metadata is parsed to obtain interface information.
[0073] In step S103, the interface information is compared with the interface information of the application program interface in the locally installed public code library to determine whether the software package to be deployed is compatible with the local software operating environment.
[0074] In specific implementation, based on the interface information of the application program interface in the common code library required by the software package to be deployed at runtime, the application program interface in the common code library required by the software package to be deployed at runtime can be determined; based on the interface information of the application program interface in the locally installed common code library, the application program interface in the locally installed common code library can be determined; further, if the application program interface in the common code library required by the software package to be deployed at runtime is a subset of the application program interface in the locally installed common code library, it can be determined that the software package to be deployed is compatible with the local software running environment; if the application program interface in the common code library required by the software package to be deployed at runtime is not a subset of the application program interface in the locally installed common code library, it can be determined that the software package to be deployed is incompatible with the local software running environment.
[0075] In step S104, based on the information about whether the software package to be deployed is compatible with the local software running environment, it is determined whether to respond to the software deployment request.
[0076] In specific implementation, if the software package to be deployed is compatible with the local software operating environment, the software deployment request can be responded to. When the software deployment request is a software installation request, responding to the software deployment request is to install the software package to be deployed. When the software deployment request is a software upgrade request, responding to the software deployment request is to upgrade the corresponding program using the software package to be deployed. If the software package to be deployed is incompatible with the local software operating environment, the software deployment request can be rejected.
[0077] In an embodiment of the present application, a software deployment request is received, wherein the software deployment request includes a software package to be deployed and metadata, and the metadata is parsed to obtain the interface information of the application program interface in the public code library required by the software package to be deployed at runtime, and the interface information is compared with the interface information of the application program interface in the public code library installed locally to determine whether the software package to be deployed is compatible with the local software operating environment, and based on the information of whether the software package to be deployed is compatible with the local software operating environment, it is determined whether to respond to the software deployment request. In this way, before deploying the software, the compatibility between the software to be deployed and the local software operating environment is judged, and whether to deploy the software is determined based on the judgment result, which can effectively avoid software deployment problems caused by incompatibility.
[0078] In addition, if the software package to be deployed is compatible with the local software operating environment, when the software package to be deployed contains a public code library, the public code library in the software package to be deployed can also be deleted to avoid version conflicts between the public code library in the software package to be deployed and the locally installed public code library, so as to further reduce software deployment problems caused by incompatibility.
[0079] The scheme of the embodiment of the present application is described below in conjunction with specific embodiments.
[0080] The technical solution provided in the embodiment of the present application mainly includes: construction of an operating environment, production of a software package and deployment of a software package. These parts are introduced below respectively.
[0081] Part 1: Construction of the operating environment.
[0082] The operating environment refers to the device operating system (Device Operation System, DevOs) developed based on hardware functions on the hardware platform, such as the operating system of an embedded camera.
[0083] In specific implementation, the construction of the operating environment includes three parts:
[0084] A. General independent operating system, such as file system, posix standard library, etc.
[0085] B. Openly released API implementation components, such as dynamic libraries, etc.
[0086] C. Unified software package deployment component, used to process software installation / upgrade requests.
[0087] Figure 3It is a schematic diagram of a DevOs provided in an embodiment of the present application, including uImage, Sdk.so and a deployment component (Deploy Component), wherein uImage is a general independent operating system built based on a kernel (kernel), Sdk.so is an API implementation component created based on a user application program interface implementation (User Api Implement), and Deploy Component is a deployment component created based on a deployment implementation (Deploy Implement), and DeployComponent is filled with application program interface sets (API Sets), and API Sets is obtained based on User ApiImplement.
[0088] During the specific implementation, the API implementation to be released will be built into an Sdk.so (a public code library) and released together with DevOs. During the API construction process, all APIs to be released will be filled into Deploy Implement, thus ensuring that Deploy Implement contains the APIs supported by DevOS.
[0089] The second part is the production of software package.
[0090] Software package (AppPackage) refers to the functional software developed by technicians based on Sdk.so, such as the face detection function software running in an embedded camera.
[0091] See also Figure 4 , the AppPackage production process mainly includes two parts:
[0092] A. The technician uses the compilation tool (Compile Tool) to compile and link the developed application resources (AppSource) and the Sdk.so used during development to create (Builid) a binary executable file ELF (Executable and Linking Format).
[0093] B. The technicians make ELF into AppPackage based on the supporting software production tool (PackTool).
[0094] Figure 5 A schematic diagram of a process of making ELF into AppPackage provided in an embodiment of the present application includes the following steps:
[0095] The first step is to parse Elf-Apis.
[0096] Elf is linked through Sdk.so. The API symbols of Elf are parsed through Elf parsing tools (such as nm tools) to obtain all APIs. From these APIs, preset naming rules such as APIs that comply with the Dev_Sdk_* rule are selected as primary APIs to be verified.
[0097] Step 2: Filter APIs.
[0098] Since the first step is just a simple summary after API parsing, there may be APIs named by technicians themselves that conform to the Dev_Sdk_* rules, such as Dev_Sdk_MyApi. This kind of API that conforms to the rules but is not provided by OS_SDK needs to be filtered out.
[0099] In order to filter out this kind of API, PackTool can be used to parse the Sdk.so in the development environment to obtain all the APIs in the Sdk.so that can be referenced this time. Only the APIs obtained in the first step will be determined as the OS_SDK_API referenced by AppPackage (that is, the OS_SDK_API required by AppPackage at runtime).
[0100] Step 3: Format the API collection.
[0101] Record the OS_SDK_API information referenced by AppPackage in the format required by DevOs to obtain the metadata of AppPackage.
[0102] Part III: Deployment of software packages.
[0103] Use AppPackage as the software package to be deployed. Figure 6 A flowchart of another software deployment method provided in an embodiment of the present application includes the following steps:
[0104] In step S601, a software deployment request is received, wherein the software deployment request includes a software package to be deployed and metadata.
[0105] In step S602, the metadata is parsed to determine a set 1 of application program interfaces in Sdk.so required by the software package to be deployed at runtime.
[0106] In step S603, a set 2 of application program interfaces in Sdk.so that can be provided by DevOs_Deploy is obtained.
[0107] During specific implementation, a set 2 of application program interfaces in Sdk.so that can be provided by DevOs_Deploy can be obtained from Deploy Component.
[0108] In step S604, it is determined whether set 1 is a subset of set 2. If not, the process proceeds to S605; if yes, the process proceeds to S606.
[0109] In step S605, the software deployment request is rejected.
[0110] When implemented, the specific reasons for rejection can also be displayed.
[0111] In step S606, it is determined whether Sdk.so exists in the software package to be deployed. If so, the process proceeds to S607; if not, the process proceeds to S608.
[0112] In step S607, Sdk.so existing in the software package to be deployed is deleted.
[0113] In this way, the problem that the Sdk.so in the software package to be deployed is carried in the software package to be deployed and the Sdk.so in DevOs conflicts can be avoided.
[0114] In step S608, respond to the software deployment request.
[0115] In addition, it should be noted that the operating system in the electronic device where the software package to be deployed is installed in the embodiment of the present application can be an embedded operating system or a non-embedded operating system, and the solution provided in the embodiment of the present application does not need to scan the source code in the software package to be deployed, so the invasiveness to the software package to be deployed is relatively small.
[0116] Based on the same technical concept, the embodiment of the present application also provides a software deployment device. The principle of solving the problem by the software deployment device is similar to that of the above-mentioned software deployment method. Therefore, the implementation of the software deployment device can refer to the implementation of the software deployment method, and the repeated parts will not be repeated. Figure 7 A structural diagram of a software deployment device provided in an embodiment of the present application includes a receiving module 701, a parsing module 702, a control module 703, and a determination module 704.
[0117] The receiving module 701 is used to receive a software deployment request, wherein the software deployment request includes a software package to be deployed and metadata, wherein the metadata is used to describe interface information of an application program interface in a public code library required by the software package to be deployed at runtime;
[0118] A parsing module 702, used to parse the metadata to obtain the interface information;
[0119] The control module 703 is used to compare the interface information with the interface information of the application program interface in the locally installed public code library to determine whether the software package to be deployed is compatible with the local software operating environment;
[0120] The determination module 704 is used to determine whether to respond to the software deployment request based on the information about whether the software package to be deployed is compatible with the local software running environment.
[0121] In some possible implementations, the metadata is generated according to the following steps:
[0122] Parsing the application program interface symbols of the executable file in the software package to be deployed, obtaining the application program interface corresponding to the software package to be deployed, and selecting the application program interface that complies with the preset naming rule from the application program interfaces;
[0123] Parsing a common code library used in developing the software package to be deployed to obtain an application program interface set;
[0124] If any of the screened application program interfaces is included in the application program interface set, determining that the application program interface is an application program interface in a public code library required by the software package to be deployed at runtime;
[0125] The interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain the metadata.
[0126] In some possible implementations, the control module 703 is specifically used to:
[0127] If the application program interface in the public code library required by the software package to be deployed during operation is a subset of the application program interface in the public code library installed locally, then determining that the software package to be deployed is compatible with the local software operating environment;
[0128] If the application program interface in the public code library required by the software package to be deployed during runtime is not a subset of the application program interface in the locally installed public code library, it is determined that the software package to be deployed is incompatible with the local software runtime environment.
[0129] In some possible implementations, the determining module 704 is specifically configured to:
[0130] If the software package to be deployed is compatible with the local software operating environment, determining to respond to the software deployment request;
[0131] If the software package to be deployed is incompatible with the local software operating environment, it is determined to reject the software deployment request.
[0132] In some possible implementations, the determining module 704 is further configured to:
[0133] If the software package to be deployed is compatible with the local software running environment, then when the software package to be deployed includes a public code library, the public code library in the software package to be deployed is deleted.
[0134] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0135] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device includes a transceiver 801 and a physical device such as a processor 802, wherein the processor 802 can be a central processing unit (CPU), a microprocessor, a dedicated integrated circuit, a programmable logic circuit, a large-scale integrated circuit, or a digital processing unit, etc. The transceiver 801 is used for electronic devices and other devices to transmit and receive data.
[0136] The electronic device may also include a memory 803 for storing software instructions executed by the processor 802, and of course, some other data required by the electronic device may also be stored, such as identification information of the electronic device, encryption information of the electronic device, user data, etc. The memory 803 may be a volatile memory, such as a random access memory (RAM); the memory 803 may also be a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), or the memory 803 may be any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 803 may be a combination of the above memories.
[0137] The specific connection medium between the processor 802, the memory 803 and the transceiver 801 is not limited in the embodiment of the present application. Figure 8 In the example, the memory 803, the processor 802 and the transceiver 801 are connected via the bus 804. Figure 8 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0138] The processor 802 can be dedicated hardware or a processor that runs software. When the processor 802 can run software, the processor 802 reads the software instructions stored in the memory 803 and, driven by the software instructions, executes the software deployment method involved in the aforementioned embodiment.
[0139] An embodiment of the present application further provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the software deployment method involved in the aforementioned embodiment.
[0140] In some possible implementations, various aspects of the software deployment method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the software deployment method involved in the aforementioned embodiments.
[0141] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0142] The program product for software deployment in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0143] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0144] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0145] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0146] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0147] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing 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.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing 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.
[0152] Although the preferred embodiments of the present application 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 falling within the scope of the present application.
[0153] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A software deployment method, characterized in that: include: Receive a software deployment request, wherein the software deployment request includes a software package to be deployed and metadata, wherein the software package to be deployed is developed based on Sdk.so, which is an API implementation component created based on a user application program interface implementation User Api Implement, and the metadata is used to describe interface information of an application program interface in Sdk.so required by the software package to be deployed at runtime, and the software package to be deployed is to be deployed to a local software operating environment, which refers to a device operating system DevOs developed on a hardware platform based on hardware functions; Parse the metadata to obtain a set 1 of application program interfaces in Sdk.so required by the software package to be deployed at runtime, and obtain a set 2 of application program interfaces in Sdk.so that can be provided by DevOs_Deploy; If the set 1 is a subset of the set 2, determining that the software package to be deployed is compatible with the software operating environment; If Sdk.so exists in the software package to be deployed, Sdk.so in the software package to be deployed is deleted, and the software deployment request is responded to.
2. The method according to claim 1, characterized in that The metadata is generated according to the following steps: Parsing the application program interface symbols of the executable file in the software package to be deployed, obtaining the application program interface corresponding to the software package to be deployed, and selecting the application program interface that complies with the preset naming rule from the application program interfaces; Parsing a common code library used in developing the software package to be deployed to obtain an application program interface set; If any of the screened application program interfaces is included in the application program interface set, determining that the application program interface is an application program interface in a public code library required by the software package to be deployed at runtime; The interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain the metadata.
3. The method according to claim 1, characterized in that Also includes: If the set 1 is not a subset of the set 2, it is determined that the software package to be deployed is incompatible with the software running environment, and the software deployment request is rejected.
4. A software deployment device, characterized in that: include: A receiving module, used for receiving a software deployment request, wherein the software deployment request includes a software package to be deployed and metadata, wherein the software package to be deployed is developed based on Sdk.so, which is an API implementation component created based on the user application program interface implementation UserApi Implement, and wherein the metadata is used for describing interface information of the application program interface in Sdk.so required by the software package to be deployed at runtime, and the software package to be deployed is to be deployed to a local software operating environment, wherein the software operating environment refers to a device operating system DevOs developed based on hardware functions on a hardware platform; A parsing module, used to parse the metadata, obtain a set 1 of application program interfaces in Sdk.so required by the software package to be deployed at runtime, and obtain a set 2 of application program interfaces in Sdk.so that DevOs_Deploy can provide; a control module, configured to determine, if the set 1 is a subset of the set 2, that the software package to be deployed is compatible with the software operating environment; The determination module is used to delete Sdk.so in the software package to be deployed if Sdk.so exists in the software package to be deployed, and respond to the software deployment request.
5. The device according to claim 4, characterized in that The metadata is generated according to the following steps: Parsing the application program interface symbols of the executable file in the software package to be deployed, obtaining the application program interface corresponding to the software package to be deployed, and selecting the application program interface that complies with the preset naming rule from the application program interfaces; Parsing a common code library used in developing the software package to be deployed to obtain an application program interface set; If any of the screened application program interfaces is included in the application program interface set, determining that the application program interface is an application program interface in a public code library required by the software package to be deployed at runtime; The interface information of each application program interface in the public code library required by the software package to be deployed at runtime is saved in a preset format to obtain the metadata.
6. The device according to claim 4, characterized in that The control module is further configured to determine that the software package to be deployed is incompatible with the software operating environment if the set 1 is not a subset of the set 2; The determining module is further configured to reject the software deployment request.
7. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 3.
8. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Software dependency package capacity detection method and system and medium
CN110543423A
Software deployment method and device and computer readable storage medium
CN112860277A