WO2018040926A1 - 一种维护软件包依赖关系的方法及系统 - Google Patents

一种维护软件包依赖关系的方法及系统 Download PDF

Info

Publication number
WO2018040926A1
WO2018040926A1 PCT/CN2017/097826 CN2017097826W WO2018040926A1 WO 2018040926 A1 WO2018040926 A1 WO 2018040926A1 CN 2017097826 W CN2017097826 W CN 2017097826W WO 2018040926 A1 WO2018040926 A1 WO 2018040926A1
Authority
WO
WIPO (PCT)
Prior art keywords
version number
interface
dependency
software package
package
Prior art date
Application number
PCT/CN2017/097826
Other languages
English (en)
French (fr)
Inventor
吴旋
陈庆斌
王斌
Original Assignee
福建联迪商用设备有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 福建联迪商用设备有限公司 filed Critical 福建联迪商用设备有限公司
Publication of WO2018040926A1 publication Critical patent/WO2018040926A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present invention relates to the field of software package maintenance, and in particular, to a method and system for maintaining a software package dependency relationship.
  • Most of the current payment terminals use a complex operating system based on Linux or even Android, and support a variety of peripheral drivers including IC cards, magnetic cards, RF cards, various communication methods, and implement GUI, device services, management, and more.
  • peripheral drivers including IC cards, magnetic cards, RF cards, various communication methods, and implement GUI, device services, management, and more.
  • a variety of software features such as applications. These functions are different because of the different bursting departments, so the frequency of upgrades is different, so it is difficult to manage them in a unified manner.
  • the related software is usually managed as a software module. For example: print driver, IC card driver, etc.
  • a common way to maintain software modules is to make software packages, such as: ipkg format packages. These packages are maintained with version information. This enables maintenance on a software package basis. There is a certain dependency between the software packages.
  • the three version requirements are: no less than 0.9, no less than 1.3, no less than 1.0. Only the terminal that meets the above conditions can install the software package of version 1.3.1.
  • a more common dependency is that a program or library in one package calls a library in another package.
  • the current common method is to generate a package, and manually fill in the dependencies of the package on other packages.
  • the method of manually filling out the package dependencies has the following disadvantages: First, if the number of programs and libraries in one package depends on the number of other libraries, the dependencies are easily missed. Second, with the software upgrade, many libraries need to add interfaces, and manual filling is error-prone. Furthermore, the application on the payment terminal is bursted by the client, and the application package is more difficult to control the filling of the dependency, which may cause problems such as the failure to run the program. technical problem
  • the technical problem to be solved by the present invention is to provide a method and system for maintaining a package dependency relationship, and implementing a software package that can automatically acquire a target program association.
  • the present invention provides a method for maintaining a software package dependency relationship, including:
  • the present invention also provides a system for maintaining a software package dependency relationship, including:
  • a parsing module configured to parse a library required by the target program
  • a first allocation module configured to allocate a version number to an interface in the library
  • a first obtaining module configured to acquire software package information that is dependent on the interface
  • a first association module configured to associate a version number of the interface with the software package information to form a dependency relationship
  • a second obtaining module configured to obtain a version number of an interface required by the target program, to obtain a first version number
  • a first adding module configured to add a dependency corresponding to the first version number to the dependency file.
  • the beneficial effects of the present invention are: by assigning a version number to an interface in a library, which facilitates unified management of interfaces in the library; by correlating the version number of the interface in the library with the software dependent on the interface
  • the information of the package is useful for maintaining the dependency of the interface in the library with other software packages; by concentrating the dependencies corresponding to the interfaces required by the target program, forming a dependency file, which is beneficial to knowing that the target program depends on the dependency file.
  • Information about the package the implementation can automatically obtain the destination based on the dependent file The package on which the standard program depends.
  • FIG. 1 is a flow chart of a method for maintaining a package dependency relationship according to the present invention
  • FIG. 2 is a structural block diagram of a system for maintaining a software package dependency relationship according to the present invention
  • the most critical idea of the present invention is to automatically acquire the software package on which the target program depends, by automatically maintaining the information of the software package on which the interface in the target program depends.
  • the present invention provides a method for maintaining a software package dependency relationship, including:
  • the interface having the same dependency relationship can be uniformly managed.
  • the target program requires more libraries, it is beneficial to maintain the software package information that the target program depends on.
  • the software package information includes a software package name and a software package version number.
  • the dependency of the interface can be clarified by the software package name and the software package version number.
  • the software package version number is a minimum version number of a software package capable of supporting an interface running in the library.
  • the software package is generally forward compatible, that is, the later version of the software package contains all the functions of the lower version, so that the minimum version number of the software package dependent on the interface can be learned to support the normal operation of the interface.
  • the version number of all packages is generally forward compatible, that is, the later version of the software package contains all the functions of the lower version, so that the minimum version number of the software package dependent on the interface can be learned to support the normal operation of the interface. The version number of all packages.
  • the method further includes:
  • the dependency file describes the information of the packages that all interfaces in the target program depend on. There may be cases where some interfaces depend on the same package but the package version number is different. Since the package is usually forward compatible, you only need to obtain the dependency. The package in the file that corresponds to the highest required version number will meet the needs of all interfaces that depend on the same package.
  • the method further includes:
  • the target software package can automatically obtain the software package that the target program depends on according to the dependency relationship described in the dependency file.
  • the method further includes:
  • the present invention further provides a system for maintaining a software package dependency relationship, including:
  • parsing module 1 used to parse the library required by the target program
  • a first allocation module 2 configured to allocate a version number to an interface in the library
  • the first obtaining module 3 is configured to acquire software package information that the interface depends on;
  • a first association module 4 configured to associate a version number of the interface with the software package information to form a dependency relationship
  • a second obtaining module 5 configured to obtain a version number of an interface required by the target program, to obtain a first version number
  • a first adding module 6 configured to add a dependency corresponding to the first version number To dependent files.
  • the method further includes:
  • the third obtaining module 7 is configured to obtain a software package version number of the same software package name in the dependent file, to form a software package version number set;
  • the fourth obtaining module 8 is configured to obtain the highest software package version number in the software package version number set, and obtain the optimal version number.
  • the second association module 9 is configured to associate the software package name with the optimal version number to form an optimal dependency relationship
  • a second adding module 10 configured to add the optimal dependency to the dependency file
  • the encapsulation module 11 is configured to encapsulate the target program and the dependent file as a target software package.
  • the method further includes:
  • a new module 12 is configured to add an interface to the library
  • the second allocation module 13 is configured to allocate a version number to the new interface.
  • the fifth obtaining module 14 is configured to obtain software package information that the new interface depends on;
  • the third association module 15 is configured to associate a version number of the newly added interface with the software package information to form a new dependency relationship;
  • a third adding module 16 configured to add the newly added dependency to the dependency file
  • the update module 17 is configured to update the dependency file in the target software package.
  • Embodiment 1 of the present invention is:
  • the version number is a minimum version number of a software package capable of supporting an interface running in the library
  • the embodiment can automatically acquire the software package on which the target program depends by using the dependent file in the target software package.
  • the application scenario of this embodiment is:
  • the target program testapp is parsed by the readelf command, and the library libtestsdkl used by the target program is obtained.
  • the library libtestsdkl.so includes the interface funcl, the interface func2, and the interface func3. Since the above interfaces have the same dependency, they are assigned the same version number TESTSDK1_1.0;
  • the application or application library depends on the package testsdkl , and the package version must be equal to 1.0.
  • Embodiment 2 of the present invention is:
  • this embodiment implements a new interface and automatically maintains a dependency file.
  • Embodiment 3 of the present invention is:
  • an optimal dependency is generated. For example: The target program uses the interface fimc4 and interface funcl, then the highest interface version of the library libtestsdkl.so is TESTSDK1_1.1. In the library dependency file of all SDKs of the SDK, for each library used by testapp, the corresponding dependency is found according to the highest interface version. Obtain the corresponding package according to the dependency of the highest interface version.
  • Embodiment 4 of the present invention is:
  • the parsing module 1 parses the library required by the target program
  • the first allocation module 2 allocates a version number to an interface in the library
  • the first obtaining module 3 acquires software package information that the interface depends on;
  • the first association module 4 associates the version number of the interface with the software package information to form a dependency relationship.
  • the second obtaining module 5 obtains the version number of the interface required by the target program, and obtains the first version number.
  • the first adding module 6 adds a dependency corresponding to the first version number to the dependency file
  • the third obtaining module 7 obtains a software package version number having the same software package name in the dependent file, and forms a software package version number set;
  • the fourth obtaining module 8 obtains the highest software package version number in the software package version number set, and obtains an optimal version number
  • the second association module 9 associates the software package name with the optimal version number to form an optimal dependency relationship
  • the second adding module 10 adds the optimal dependency to the dependency file
  • the new module 12 adds an interface to the library
  • the second allocation module 13 allocates a version number to the new interface
  • the fifth obtaining module 14 acquires software package information that the new interface depends on;
  • the third association module 15 associates the version number of the newly added interface with the software package information to form a new dependency relationship
  • the third adding module 16 adds the newly added dependency to the dependency file
  • the update module 17 updates the dependency file in the target software package
  • the encapsulation module 11 encapsulates the target program and the dependent file as a target software package.
  • the present invention provides a method and system for maintaining a package dependency relationship.
  • a version number By assigning a version number to an interface in a library, it is advantageous to uniformly manage an interface in the library;
  • the version number of the interface and the information of the software package that the interface depends on are beneficial to maintaining the dependency of the interface in the library and other software packages.
  • a dependency file By aggregating the dependencies corresponding to the interfaces required by the target program, a dependency file is formed.
  • the information about the software package on which the target program depends is obtained by using the dependency file; the software package on which the target program depends can be automatically obtained according to the dependency file; further, the interface with the same dependency relationship can be uniformly managed, when the target The program requires more libraries to help maintain the package information that the target program depends on.
  • the interface dependencies can be clarified by the package name and the package version number; further, the package is usually forward compatible. , that is, a later version of the package contains all the features of the earlier version, so The version number of all software packages that support the normal operation of the interface can be obtained through the minimum version number of the software package on which the interface depends; further, the implementation can reduce the number of software packages that the target program depends on; further, the target software includes: The package can automatically obtain the software package that the target program depends on according to the dependencies described in the dependency file; further, when the target program's library adds an interface, the dependency of the newly added interface is automatically updated to the dependency file.

Landscapes

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

Abstract

一种维护软件包依赖关系的方法及系统,该方法通过解析目标程序所需的程序库;为所述程序库中的接口分配版本号;获取所述接口依赖的软件包信息;关联所述接口的版本号和所述软件包信息,形成依赖关系;获取目标程序所需接口的版本号,得到第一版本号;添加与所述第一版本号相应的依赖关系至依赖文件。该方法通过自动维护目标程序中的接口所依赖的软件包的信息,实现可自动获取目标程序所依赖的软件包。

Description

一种维护软件包依赖关系的方法及系统 技术领域
[0001] 本发明涉及软件包维护领域, 尤其涉及一种维护软件包依赖关系的方法及系统 背景技术
[0002] 随着国内电子支付市场和支付技术的发展, 支付终端的软件系统也日益复杂。
目前的支付终端, 大都使用了基于 Linux甚至 Android的复杂操作系统, 并支持包 括 IC卡、 磁卡、 射频卡、 各种通讯方式等多种外设驱动, 并实现了 GUI、 设备服 务、 管理以及多应用等多种软件功能。 这些功能由于涉及不同幵发部门, 升级 频率也不同, 所以难以统一管理。 基于这个特性, 通常把相关一类软件做成软 件模块统一管理。 比如: 打印驱动、 IC卡驱动等。 常用的维护软件模块的方式 是做成软件包, 比如: ipkg格式软件包。 这些软件包通过版本信息进行维护。 这 样就实现了以软件包为单位进行维护。 在软件包之间存在这一定的依赖关系, 所谓软件包依赖关系, 就是一个软件包只有在终端上特定一些软件模块存在且 版本满足一定要求才能安装到该终端上。 以 1.3.1版本的软件包 testapp的依赖关系 为例: testsdkl (>=0.9), testsdk2 (>=1.3) , testsdk3 (>=1.0)。 在这个依赖关系中, 该软件包需要依赖三个软件包: testsdkl、 testsdk2和 testsdk3。 三者版本要求分别 是: 不低于 0.9, 不低于 1.3, 不低于 1.0。 只有满足上面条件的终端才能安装 1.3.1 版本的软件包。
[0003] 比较常见的依赖是一个软件包中的程序或库调用了另外一个软件包中的库。 目 前常见方法是生成软件包吋, 手工填写该软件包对其他软件包的依赖关系。 但 是, 手工填写软件包依赖关系的方法具有如下缺点: 首先, 如果一个软件包中 程序和库依赖于其它库的数量较多, 则依赖关系容易漏填。 其次, 随着软件升 级, 许多库要新增接口, 手工填写易出错。 再者, 支付终端上的应用程序由客 户幵发, 应用软件包对依赖关系的填写更难以控制, 会造成无法正常运行程序 等问题。 技术问题
[0004] 本发明所要解决的技术问题是: 提供一种维护软件包依赖关系的方法及系统, 实现可自动获取目标程序关联的软件包。
问题的解决方案
技术解决方案
[0005] 为了解决上述技术问题, 本发明采用的技术方案为:
[0006] 本发明提供一种维护软件包依赖关系的方法, 包括:
[0007] 解析目标程序所需的程序库;
[0008] 为所述程序库中的接口分配版本号;
[0009] 获取所述接口依赖的软件包信息;
[0010] 关联所述接口的版本号和所述软件包信息, 形成依赖关系;
[0011] 获取目标程序所需接口的版本号, 得到第一版本号;
[0012] 添加与所述第一版本号相应的依赖关系至依赖文件。
[0013] 本发明还提供一种维护软件包依赖关系的系统, 包括:
[0014] 解析模块, 用于解析目标程序所需的程序库;
[0015] 第一分配模块, 用于为所述程序库中的接口分配版本号;
[0016] 第一获取模块, 用于获取所述接口依赖的软件包信息;
[0017] 第一关联模块, 用于关联所述接口的版本号和所述软件包信息, 形成依赖关系
[0018] 第二获取模块, 用于获取目标程序所需接口的版本号, 得到第一版本号; [0019] 第一添加模块, 用于添加与所述第一版本号相应的依赖关系至依赖文件。
发明的有益效果
有益效果
[0020] 本发明的有益效果在于: 通过为程序库中的接口分配版本号, 有利于对程序库 中的接口进行统一管理; 通过关联程序库中的接口的版本号与所述接口依赖的 软件包的信息, 有利于维护程序库中的接口与其它软件包的依赖关系; 通过聚 集与目标程序所需接口相对应的依赖关系, 形成依赖文件, 有利于通过所述依 赖文件获知目标程序所依赖的软件包的信息; 实现可根据依赖文件自动获取目 标程序所依赖的软件包。
对附图的简要说明
附图说明
[0021] 图 1为本发明一种维护软件包依赖关系的方法的流程框图;
[0022] 图 2为本发明一种维护软件包依赖关系的系统的结构框图;
[0023] 标号说明:
[0024] 1、 解析模块; 2、 第一分配模块; 3、 第一获取模块; 4、 第一关联模块; 5、 第二获取模块; 6、 第一添加模块; 7、 第三获取模块; 8、 第四获取模块; 9、 第二关联模块; 10、 第二添加模块; 11、 封装模块; 12、 新增模块; 13、 第二 分配模块; 14、 第五获取模块; 15、 第三关联模块; 16、 第三添加模块; 17、 更新模块。
具体实施方式
[0025] 本发明最关键的构思在于: 通过自动维护目标程序中的接口所依赖的软件包的 信息, 实现可自动获取目标程序所依赖的软件包。
[0026]
[0027] 如图 1所示, 本发明提供一种维护软件包依赖关系的方法, 包括:
[0028] 解析目标程序所需的程序库;
[0029] 为所述程序库中的接口分配版本号;
[0030] 获取所述接口依赖的软件包信息;
[0031] 关联所述接口的版本号和所述软件包信息, 形成依赖关系;
[0032] 获取目标程序所需接口的版本号, 得到第一版本号;
[0033] 添加与所述第一版本号相应的依赖关系至依赖文件。
[0034] 进一步地, 为所述程序库中的接口分配版本号, 具体为:
[0035] 为所述程序库中具有相同依赖关系的接口分配相同的版本号。
[0036] 由上述描述可知, 可对具有相同依赖关系的接口进行统一的管理, 当目标程序 所需的程序库较多吋, 有利于维护目标程序依赖的软件包信息。
[0037] 进一步地, 所述软件包信息, 包括软件包名称和软件包版本号。 [0038] 由上述描述可知, 通过软件包名称和软件包版本号可明确接口的依赖关系。
[0039] 一般地, 在软件包之间存在这一定的依赖关系, 所谓软件包依赖关系, 就是一 个软件包只有在终端上特定一些软件模块存在且版本满足一定要求才能安装到 该终端上。 因此在描述目标程序所需接口的依赖关系吋, 应说明所依赖的软件 包名称及其要求的版本号。
[0040] 进一步地, 所述软件包版本号为能支持所述程序库中的接口正常运行的软件包 的最低版本号。
[0041] 由上述描述可知, 软件包通常可向前兼容, 即更高版本的软件包包含较低版本 的所有功能, 因此通过接口所依赖的软件包的最低版本号可获知可支持接口正 常运行的所有软件包的版本号。
[0042] 进一步地, 还包括:
[0043] 获取依赖文件中具有相同软件包名称的软件包版本号, 形成软件包版本号集合
[0044] 获取软件包版本号集合中最高的软件包版本号, 得到最优版本号;
[0045] 关联所述软件包名称和所述最优版本号, 形成最优依赖关系;
[0046] 添加所述最优依赖关系至所述依赖文件。
[0047] 由上述描述可知, 实现可减少获取目标程序依赖的软件包的数量。 依赖文件描 述的是目标程序中所有接口所依赖的软件包的信息, 可能存在有些接口依赖的 软件包相同但软件包版本号不同的情况, 由于软件包通常可向前兼容, 则只需 获取依赖文件中与最高要求版本号相应的软件包, 即可满足所有依赖同一软件 包的接口的需求。
[0048] 进一步地, 还包括:
[0049] 封装所述目标程序和依赖文件为目标软件包。
[0050] 由上述描述可知, 目标软件包可根据依赖文件中描述的依赖关系自动获取目标 程序依赖的软件包。
[0051] 进一步地, 还包括:
[0052] 新增接口至所述程序库;
[0053] 为所述新增接口分配版本号; [0054] 获取所述新增接口依赖的软件包信息;
[0055] 关联所述新增接口的版本号和所述软件包信息, 形成新增依赖关系;
[0056] 添加所述新增依赖关系至所述依赖文件;
[0057] 更新所述目标软件包中的依赖文件。
[0058] 由上述描述可知, 当目标程序的程序库新增接口吋, 自动将新增接口的依赖关 系更新至依赖文件。
[0059]
[0060] 如图 2所示, 本发明还提供一种维护软件包依赖关系的系统, 包括:
[0061] 解析模块 1, 用于解析目标程序所需的程序库;
[0062] 第一分配模块 2, 用于为所述程序库中的接口分配版本号;
[0063] 第一获取模块 3, 用于获取所述接口依赖的软件包信息;
[0064] 第一关联模块 4, 用于关联所述接口的版本号和所述软件包信息, 形成依赖关 系;
[0065] 第二获取模块 5, 用于获取目标程序所需接口的版本号, 得到第一版本号; [0066] 第一添加模块 6, 用于添加与所述第一版本号相应的依赖关系至依赖文件。
[0067] 进一步地, 还包括:
[0068] 第三获取模块 7, 用于获取依赖文件中具有相同软件包名称的软件包版本号, 形成软件包版本号集合;
[0069] 第四获取模块 8, 用于获取软件包版本号集合中最高的软件包版本号, 得到最 优版本号;
[0070] 第二关联模块 9, 用于关联所述软件包名称和所述最优版本号, 形成最优依赖 关系;
[0071] 第二添加模块 10, 用于添加所述最优依赖关系至所述依赖文件;
[0072] 封装模块 11, 用于封装所述目标程序和依赖文件为目标软件包。
[0073] 进一步地, 还包括:
[0074] 新增模块 12, 用于新增接口至所述程序库;
[0075] 第二分配模块 13, 用于为所述新增接口分配版本号;
[0076] 第五获取模块 14, 用于获取所述新增接口依赖的软件包信息; [0077] 第三关联模块 15, 用于关联所述新增接口的版本号和所述软件包信息, 形成新 增依赖关系;
[0078] 第三添加模块 16, 用于添加所述新增依赖关系至所述依赖文件;
[0079] 更新模块 17, 用于更新所述目标软件包中的依赖文件。
[0080]
[0081] 本发明的实施例一为:
[0082] 解析目标程序所需的程序库;
[0083] 为所述程序库中具有相同依赖关系的接口分配相同的版本号;
[0084] 获取所述接口依赖的软件包的名称和版本号; 所述版本号为能支持所述程序库 中的接口正常运行的软件包的最低版本号;
[0085] 关联所述接口的版本号和所述软件包信息, 形成依赖关系;
[0086] 获取目标程序所需接口的版本号, 得到第一版本号;
[0087] 添加与所述第一版本号相应的依赖关系至依赖文件;
[0088] 封装所述目标程序和依赖文件为目标软件包。
[0089] 由上述描述可知, 本实施例可通过目标软件包中的依赖文件自动获取目标程序 所依赖的软件包。
[0090] 本实施例的应用场景为:
[0091] 通过 readelf命令解析目标程序 testapp, 获取目标程序所用到的程序库 libtestsdkl.
SO ;
[0092] 程序库 libtestsdkl. so中包含接口 funcl、 接口 func2和接口 func3, 由于上述接口 具有相同的依赖关系, 因此为它们分配相同的版本号 TESTSDK1_1.0;
[0093] 关联版本号 TESTSDK1_1.0和依赖的软件包的信息, 具体为:
[0094] [LibName]
[0095] Name=libtestsdkl.so
[0096] [Depends]
[0097] TESTSDKl_1.0=testsdkl(>=1.0); 其中, Name表示对应程序库文件名称, [Dep ends]描述了库的每个接口版本对一些软件包的依赖关系, 一般是该库所在的软 件包, 在库的特定接口版本吋的软件包版本要求。 ; [0098] 库 libtestsdkl.so位于软件包 testsdkl中, 所以上面的写法表明: 如果应用程序或 应用库调用了 libtestsdkl.so中属于接口版本" TESTSDK1_1.0"的函数 (比如 func2
) , 那么, 该应用程序或应用库依赖于软件包 testsdkl , 且该软件包版本必须大 等于 1.0。
[0099] 获取目标程序 testapp所需接口 funcl的版本号, 得到第一版本号 TESTSDK1_1.0
[0100] 添加与所述第一版本号 TESTSDK1_1.0相应的依赖关系至依赖文件;
[0101] 封装所述目标程序和依赖文件为目标软件包。
[0102]
[0103] 本发明的实施例二为:
[0104] 在实施例一的基础上, 新增接口至所述程序库;
[0105] 为所述新增接口分配版本号;
[0106] 获取所述新增接口依赖的软件包信息;
[0107] 关联所述新增接口的版本号和所述软件包信息, 形成新增依赖关系;
[0108] 添加所述新增依赖关系至所述依赖文件;
[0109] 更新所述目标软件包中的依赖文件。
[0110] 由上述描述可知, 本实施例实现新增接口吋自动维护依赖文件。
[0111] 本实施例的应用场景为: 新增接口 fimc4, 为其分配版本号 TESTSDK1_1.1。 获 取接口 fimc4依赖的软件包信息为 teStsdklC>=l. l)。 将新增接口 func4的依赖关系 添加至依赖文件。
[0112]
[0113] 本发明的实施例三为:
[0114] 在实施例一的基础上, 本实施例:
[0115] 获取依赖文件中具有相同软件包名称的软件包版本号, 形成软件包版本号集合
[0116] 获取软件包版本号集合中最高的软件包版本号, 得到最优版本号;
[0117] 关联所述软件包名称和所述最优版本号, 形成最优依赖关系;
[0118] 添加所述最优依赖关系至所述依赖文件。 [0119] 由上述描述可知, 本实施例实现减少获取目标程序依赖的软件包的数量。
[0120] 对于用到的每一个库, 生成最优依赖关系。 比如: 目标程序使用了接口 fimc4 和接口 funcl , 则库 libtestsdkl.so的最高接口版本为 TESTSDK1_1.1。 在 SDK的所 有系统库的库依赖文件中, 对 testapp用到的每个库, 根据最高接口版本找到对应 依赖关系。 根据最高接口版本的依赖关系获取相应的软件包。
[0121]
[0122] 本发明的实施例四为:
[0123] 解析模块 1解析目标程序所需的程序库;
[0124] 第一分配模块 2为所述程序库中的接口分配版本号;
[0125] 第一获取模块 3获取所述接口依赖的软件包信息;
[0126] 第一关联模块 4关联所述接口的版本号和所述软件包信息, 形成依赖关系; [0127] 第二获取模块 5获取目标程序所需接口的版本号, 得到第一版本号;
[0128] 第一添加模块 6添加与所述第一版本号相应的依赖关系至依赖文件;
[0129] 第三获取模块 7获取依赖文件中具有相同软件包名称的软件包版本号, 形成软 件包版本号集合;
[0130] 第四获取模块 8获取软件包版本号集合中最高的软件包版本号, 得到最优版本 号;
[0131] 第二关联模块 9关联所述软件包名称和所述最优版本号, 形成最优依赖关系;
[0132] 第二添加模块 10添加所述最优依赖关系至所述依赖文件;
[0133] 新增模块 12新增接口至所述程序库;
[0134] 第二分配模块 13为所述新增接口分配版本号;
[0135] 第五获取模块 14获取所述新增接口依赖的软件包信息;
[0136] 第三关联模块 15关联所述新增接口的版本号和所述软件包信息, 形成新增依赖 关系;
[0137] 第三添加模块 16添加所述新增依赖关系至所述依赖文件;
[0138] 更新模块 17更新所述目标软件包中的依赖文件;
[0139] 封装模块 11封装所述目标程序和依赖文件为目标软件包。
[0140] 综上所述, 本发明提供的一种维护软件包依赖关系的方法及系统, 通过为程序 库中的接口分配版本号, 有利于对程序库中的接口进行统一管理; 通过关联程 序库中的接口的版本号与所述接口依赖的软件包的信息, 有利于维护程序库中 的接口与其它软件包的依赖关系; 通过聚集与目标程序所需接口相对应的依赖 关系, 形成依赖文件, 有利于通过所述依赖文件获知目标程序所依赖的软件包 的信息; 实现可根据依赖文件自动获取目标程序所依赖的软件包; 进一步地, 可对具有相同依赖关系的接口进行统一的管理, 当目标程序所需的程序库较多 吋, 有利于维护目标程序依赖的软件包信息; 进一步地, 通过软件包名称和软 件包版本号可明确接口的依赖关系; 进一步地, 软件包通常可向前兼容, 即更 高版本的软件包包含较低版本的所有功能, 因此通过接口所依赖的软件包的最 低版本号可获知可支持接口正常运行的所有软件包的版本号; 进一步地, 实现 可减少获取目标程序依赖的软件包的数量; 进一步地, 还包括: 目标软件包可 根据依赖文件中描述的依赖关系自动获取目标程序依赖的软件包; 进一步地, 当目标程序的程序库新增接口吋, 自动将新增接口的依赖关系更新至依赖文件

Claims

权利要求书
一种维护软件包依赖关系的方法, 其特征在于, 包括:
解析目标程序所需的程序库;
为所述程序库中的接口分配版本号;
获取所述接口依赖的软件包信息;
关联所述接口的版本号和所述软件包信息, 形成依赖关系; 获取目标程序所需接口的版本号, 得到第一版本号;
添加与所述第一版本号相应的依赖关系至依赖文件。
根据权利要求 1所述的一种维护软件包依赖关系的方法, 其特征在于
, 为所述程序库中的接口分配版本号, 具体为:
为所述程序库中具有相同依赖关系的接口分配相同的版本号。
根据权利要求 1所述的一种维护软件包依赖关系的方法, 其特征在于
, 所述软件包信息, 包括软件包名称和软件包版本号。
根据权利要求 1所述的一种维护软件包依赖关系的方法, 其特征在于
, 所述软件包版本号为能支持所述程序库中的接口正常运行的软件包 的最低版本号。
根据权利要求 4所述的一种维护软件包依赖关系的方法, 其特征在于 , 还包括:
获取依赖文件中具有相同软件包名称的软件包版本号, 形成软件包版 本号集合;
获取软件包版本号集合中最高的软件包版本号, 得到最优版本号; 关联所述软件包名称和所述最优版本号, 形成最优依赖关系; 添加所述最优依赖关系至所述依赖文件。
根据权利要求 1所述的一种维护软件包依赖关系的方法, 其特征在于 , 还包括:
封装所述目标程序和依赖文件为目标软件包。
根据权利要求 6所述的一种维护软件包依赖关系的方法, 其特征在于 , 还包括: 新增接口至所述程序库;
为所述新增接口分配版本号;
获取所述新增接口依赖的软件包信息;
关联所述新增接口的版本号和所述软件包信息, 形成新增依赖关系; 添加所述新增依赖关系至所述依赖文件;
更新所述目标软件包中的依赖文件。
[权利要求 8] —种维护软件包依赖关系的系统, 其特征在于, 包括:
解析模块, 用于解析目标程序所需的程序库;
第一分配模块, 用于为所述程序库中的接口分配版本号;
第一获取模块, 用于获取所述接口依赖的软件包信息;
第一关联模块, 用于关联所述接口的版本号和所述软件包信息, 形成 依赖关系;
第二获取模块, 用于获取目标程序所需接口的版本号, 得到第一版本 号;
第一添加模块, 用于添加与所述第一版本号相应的依赖关系至依赖文 件。
[权利要求 9] 根据权利要求 8所述的一种维护软件包依赖关系的系统, 其特征在于
, 还包括:
第三获取模块, 用于获取依赖文件中具有相同软件包名称的软件包版 本号, 形成软件包版本号集合;
第四获取模块, 用于获取软件包版本号集合中最高的软件包版本号, 得到最优版本号;
第二关联模块, 用于关联所述软件包名称和所述最优版本号, 形成最 优依赖关系;
第二添加模块, 用于添加所述最优依赖关系至所述依赖文件; 封装模块, 用于封装所述目标程序和依赖文件为目标软件包。
[权利要求 10] 根据权利要求 8所述的一种维护软件包依赖关系的系统, 其特征在于 , 还包括: 新增模块, 用于新增接口至所述程序库;
第二分配模块, 用于为所述新增接口分配版本号;
第五获取模块, 用于获取所述新增接口依赖的软件包信息; 第三关联模块, 用于关联所述新增接口的版本号和所述软件包信息 形成新增依赖关系;
第三添加模块, 用于添加所述新增依赖关系至所述依赖文件; 更新模块, 用于更新所述目标软件包中的依赖文件。
PCT/CN2017/097826 2016-08-31 2017-08-17 一种维护软件包依赖关系的方法及系统 WO2018040926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610784423.6A CN106371838B (zh) 2016-08-31 2016-08-31 一种维护软件包依赖关系的方法及系统
CN201610784423.6 2016-08-31

Publications (1)

Publication Number Publication Date
WO2018040926A1 true WO2018040926A1 (zh) 2018-03-08

Family

ID=57899421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/097826 WO2018040926A1 (zh) 2016-08-31 2017-08-17 一种维护软件包依赖关系的方法及系统

Country Status (2)

Country Link
CN (1) CN106371838B (zh)
WO (1) WO2018040926A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371838B (zh) * 2016-08-31 2019-10-18 福建联迪商用设备有限公司 一种维护软件包依赖关系的方法及系统
CN107193616A (zh) * 2017-06-30 2017-09-22 广州云移信息科技有限公司 一种应用程序升级方法及终端
CN107678776A (zh) * 2017-08-09 2018-02-09 上海壹账通金融科技有限公司 多模块版本依赖关系构建方法、装置、服务器和存储介质
CN108334334B (zh) * 2018-03-07 2022-02-01 政采云有限公司 一种管理依赖包版本的方法和系统
CN108965295B (zh) * 2018-07-17 2021-09-17 郑州云海信息技术有限公司 一种文件压缩合并方法及相关装置
CN109002314A (zh) * 2018-09-29 2018-12-14 深圳市元征科技股份有限公司 软件更新方法、装置、电子设备及存储介质
CN111124526A (zh) * 2018-11-01 2020-05-08 北京奇虎科技有限公司 依赖库管理方法、装置、存储介质和计算机设备
CN111258620B (zh) * 2018-11-30 2022-02-22 中兴通讯股份有限公司 差分升级包的生成方法、装置和设备
CN110008039B (zh) * 2019-03-07 2020-11-03 平安国际智慧城市科技股份有限公司 接口控制方法、装置、计算机可读存储介质和计算机设备
CN110377514A (zh) * 2019-07-12 2019-10-25 中汇信息技术(上海)有限公司 软件构件的管理方法、装置、电子设备和存储介质
CN110737460A (zh) * 2019-09-04 2020-01-31 厦门网宿有限公司 一种平台项目管理方法及装置
CN110990051B (zh) * 2019-11-27 2023-07-21 锐捷网络股份有限公司 软件包依赖关系的维护方法、装置、介质和设备
CN112214408B (zh) * 2020-10-12 2024-05-28 抖音视界有限公司 依赖冲突检测方法、装置、电子设备及计算机可读介质
CN112540775A (zh) * 2020-12-21 2021-03-23 恩亿科(北京)数据科技有限公司 用于程序包兼容性检测的方法及装置、设备
CN115469916B (zh) * 2022-08-19 2023-06-20 武汉烽火技术服务有限公司 一种兼容多版本的南向接口的实现方法、系统和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356910A (ja) * 2000-06-12 2001-12-26 Nec Corp 広域分散資産版管理システム、広域分散資産版管理方法、記録媒体
CN102141922A (zh) * 2010-01-29 2011-08-03 腾讯科技(深圳)有限公司 一种微内核插件化程序应用系统及其实现方法
CN102945155A (zh) * 2012-10-22 2013-02-27 中标软件有限公司 一种Linux操作系统软件包及其依赖关系缺失检测方法
CN103425512A (zh) * 2013-08-19 2013-12-04 曙光信息产业股份有限公司 一种软件包管理方法及系统
CN106371838A (zh) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 一种维护软件包依赖关系的方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8046777B2 (en) * 2005-06-02 2011-10-25 The Mathworks, Inc. Calling of late bound functions from an external program environment
KR101573586B1 (ko) * 2010-09-23 2015-12-01 애플 인크. 논-리프 코드의 컴파일러 기반 벡터화를 위한 시스템들 및 방법들
CN104850401B (zh) * 2015-05-07 2018-04-24 南京大学 一种用PVFS替代Hadoop存储模块的方法
US9430200B1 (en) * 2015-06-04 2016-08-30 Microsoft Technology Licensing Llc Cross-library framework architecture feature sets

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356910A (ja) * 2000-06-12 2001-12-26 Nec Corp 広域分散資産版管理システム、広域分散資産版管理方法、記録媒体
CN102141922A (zh) * 2010-01-29 2011-08-03 腾讯科技(深圳)有限公司 一种微内核插件化程序应用系统及其实现方法
CN102945155A (zh) * 2012-10-22 2013-02-27 中标软件有限公司 一种Linux操作系统软件包及其依赖关系缺失检测方法
CN103425512A (zh) * 2013-08-19 2013-12-04 曙光信息产业股份有限公司 一种软件包管理方法及系统
CN106371838A (zh) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 一种维护软件包依赖关系的方法及系统

Also Published As

Publication number Publication date
CN106371838B (zh) 2019-10-18
CN106371838A (zh) 2017-02-01

Similar Documents

Publication Publication Date Title
WO2018040926A1 (zh) 一种维护软件包依赖关系的方法及系统
EP3051458B1 (en) Dynamic licensing for applications and plugin framework for virtual network systems
US10440138B2 (en) Provisioning IaaS services
JP5992095B2 (ja) ワイヤレスアプリケーションを発行および実行する方法ならびに装置
CN114077462A (zh) 软件操作系统调用Android HIDL接口的方法、装置、设备及介质
CN103608773A (zh) 用于多节点应用的部署系统
CN105657191A (zh) 一种基于Android系统的应用增量升级方法及系统
CN106569880B (zh) 一种Android应用间动态共享资源的方法及系统
CN104750528A (zh) 一种Android程序中的组件管理方法和装置
CN109445783A (zh) 由服务驱动的动态配置应用的构建方法及装置
EP2608585A1 (en) Method, device and system for triggering terminal operation
CN104750555A (zh) 一种Android程序中的进程管理方法和装置
JP2011516987A (ja) モバイル・デバイス・ソフトウェアの管理方法及び装置
WO2020147573A1 (zh) 实例化虚拟网络功能的方法及设备
EP3883183A1 (en) Virtualization management method and device
CN105516154A (zh) 应用于SEAndroid系统的安全策略配置方法及装置
CN108804100B (zh) 创建界面元素的方法、装置、存储介质及移动终端
CN104834541A (zh) 功能模块挂载方法、挂载系统及更新挂载系统的方法
US20070220512A1 (en) Driver-Server for Data or Data Files of Device Drivers, Particularly Printer Drivers in a Computer Network
CN116113923A (zh) 容器集群管理方法及其系统
WO2016029774A1 (zh) 基于虚拟化的应用存储方法、执行方法、装置及系统
US9588947B1 (en) Integrated administrative interface for open network programming applications
CN113835723A (zh) 一种用于车辆电子控制单元的片上系统、升级系统及方法
CN105122209A (zh) 从软件框架提供的网络服务
CN110661852B (zh) 云环境中的业务处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845228

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17845228

Country of ref document: EP

Kind code of ref document: A1