Software package processing method and device, electronic equipment and storage medium

CN116680057BActive Publication Date: 2026-09-22CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310716244.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2026-09-22
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

[0003]本公开提供一种软件包的处理方法、装置、电子设备、计算机可读存储介质和计算机程序产品,以至少解决相关技术中大多依靠人工进行待删除的软件包的判别,耗费了大量人力物力,且存在效率低、准确性低的问题

Benefits of technology

[0024]根据本公开实施例的第五方面,提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如前第一方面所述的软件包的处理方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680057B_ABST
    Figure CN116680057B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a software package processing method and device, electronic equipment and storage medium, and belongs to the technical field of financial technology and information technology. The method comprises: determining a first software package and a second software package with the same name from a set of software packages to be processed; identifying whether the first software package or the second software package meets a preset deletion condition based on a business dimension to which a calling method in the first software package belongs and a business dimension to which a calling method in the second software package belongs; and deleting a target software package from the set of software packages if the target software package in the first software package or the second software package meets the preset deletion condition. Thus, the business dimensions to which the calling methods in the two software packages with the same name belong can be considered, the target software package to be deleted can be determined from the two software packages with the same name, the automatic discrimination of the target software package to be deleted can be realized, and the processing efficiency and accuracy of the software package are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of financial technology and information technology industries, and in particular to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for processing software packages. Background Technology

[0002] Currently, with the continuous development of internet technology, software packages are being developed and iterated frequently. Different software packages may conflict, and to ensure the normal operation of the program, conflicting packages need to be removed. However, most related technologies rely on manual identification of packages to be deleted, which consumes a lot of manpower and resources and suffers from low efficiency and low accuracy. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for processing software packages, to at least solve the problems of low efficiency and low accuracy in related technologies, which mostly rely on manual identification of software packages to be deleted, consuming a lot of manpower and resources. The technical solution of this disclosure is as follows:

[0004] According to a first aspect of the present disclosure, a method for processing software packages is provided, comprising: determining a first software package and a second software package with the same name from a set of software packages to be processed; identifying whether the first software package or the second software package meets a preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs; and deleting the target software package from the set of software packages if the target software package in the first software package or the second software package meets the preset deletion condition.

[0005] In one embodiment of this disclosure, identifying whether the first software package or the second software package meets a preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs includes: obtaining a first business dimension set based on the business dimension to which the calling method in the first software package belongs; obtaining a second business dimension set based on the business dimension to which the calling method in the second software package belongs; and identifying that the first software package meets a first deletion condition if the first business dimension set is a subset of the second business dimension set.

[0006] In one embodiment of this disclosure, the step of identifying whether the first software package or the second software package meets the preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs further includes: if the first business dimension set is a subset of the second business dimension set, identifying whether the calling method in the first software package under the i-th business dimension of the first business dimension set and the calling method in the second software package under the i-th business dimension are consistent; if the calling methods in the first software package under N business dimensions of the first business dimension set are consistent with the calling methods in the second software package, identifying that the first software package meets the second deletion condition; wherein, i is a positive integer not greater than N, and N is a positive integer.

[0007] In one embodiment of this disclosure, the step of identifying whether the first software package or the second software package meets the preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs further includes: if the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension of the first business dimension set is inconsistent with the calling method in the second software package; identifying whether the calling method in the first software package exists in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identifying that the first software package meets the third deletion condition.

[0008] In one embodiment of this disclosure, the step of identifying whether the first software package or the second software package meets the preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs further includes: if the first business dimension set is not a subset of the second business dimension set, identifying whether the calling method in the first software package exists in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identifying that the first software package meets the fourth deletion condition.

[0009] In one embodiment of this disclosure, removing the target software package from the software package set includes: identifying whether there is a dependency relationship between the target software package and other software packages besides the target software package; if there is no dependency relationship between the target software package and other software packages besides the target software package, removing the target software package from the software package set.

[0010] In one embodiment of this disclosure, identifying whether there is a dependency relationship between the target software package and other software packages besides the target software package includes: identifying whether there is a calling relationship between a calling method in the target software package and a calling method in other software packages besides the target software package; if there is a calling relationship between at least one calling method in the target software package and a calling method in other software packages besides the target software package, identifying that there is a dependency relationship between the target software package and other software packages besides the target software package; if there is no calling relationship between each calling method in the target software package and a calling method in other software packages besides the target software package, identifying that there is no dependency relationship between the target software package and other software packages besides the target software package.

[0011] In one embodiment of this disclosure, before identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, the method further includes: identifying that the versions of the first software package and the second software package are inconsistent.

[0012] In one embodiment of this disclosure, the method further includes: identifying that the versions of the first software package and the second software package are the same, and deleting either the first software package or the second software package from the software package set.

[0013] According to a second aspect of the present disclosure, a software package processing apparatus is provided, comprising: a determining module configured to determine a first software package and a second software package with identical names from a set of software packages to be processed; an identifying module configured to identify whether the first software package or the second software package meets a preset deletion condition based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs; and a deletion module configured to delete the target software package from the software package set if the target software package in the first software package or the second software package meets the preset deletion condition.

[0014] In one embodiment of this disclosure, the identification module is further configured to: obtain a first set of business dimensions based on the business dimension to which the calling method in the first software package belongs; obtain a second set of business dimensions based on the business dimension to which the calling method in the second software package belongs; and if the first set of business dimensions is a subset of the second set of business dimensions, identify that the first software package satisfies the first deletion condition.

[0015] In one embodiment of this disclosure, the identification module is further configured to: if the first business dimension set is a subset of the second business dimension set, identify whether the calling methods in the first software package under the i-th business dimension of the first business dimension set and the calling methods in the second software package under the i-th business dimension are consistent; if the calling methods in the first software package under N business dimensions of the first business dimension set are consistent with the calling methods in the second software package, identify that the first software package satisfies the second deletion condition; wherein i is a positive integer not greater than N, and N is a positive integer.

[0016] In one embodiment of this disclosure, the identification module is further configured to: if the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension of the first business dimension set is inconsistent with the calling method in the second software package; identify whether the calling method in the first software package exists in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identify that the first software package satisfies the third deletion condition.

[0017] In one embodiment of this disclosure, the identification module is further configured to: if the first business dimension set is not a subset of the second business dimension set, identify whether the calling methods in the first software package exist in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identify that the first software package satisfies the fourth deletion condition.

[0018] In one embodiment of this disclosure, the deletion module is further configured to: identify whether there is a dependency relationship between the target software package and other software packages besides the target software package; if there is no dependency relationship between the target software package and other software packages besides the target software package, delete the target software package from the software package set.

[0019] In one embodiment of this disclosure, the deletion module is further configured to: identify whether there is a calling relationship between the calling methods in the target software package and the calling methods in other software packages besides the target software package; if there is a calling relationship between at least one calling method in the target software package and the calling methods in other software packages besides the target software package, identify that there is a dependency relationship between the target software package and the other software packages besides the target software package; if there is no calling relationship between each calling method in the target software package and the calling methods in other software packages besides the target software package, identify that there is no dependency relationship between the target software package and the other software packages besides the target software package.

[0020] In one embodiment of this disclosure, before identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, the identification module is further configured to: identify that the versions of the first software package and the second software package are inconsistent.

[0021] In one embodiment of this disclosure, the deletion module is further configured to: identify that the versions of the first software package and the second software package are the same, and delete the first software package or the second software package from the software package set.

[0022] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the software package processing method as described in the first aspect above.

[0023] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the software package processing method as described in the first aspect above.

[0024] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the software package processing method as described in the first aspect above.

[0025] The technical solution provided by the embodiments of this disclosure brings at least the following beneficial effects: it can take into account the business dimension to which the calling methods in two software packages with the same name belong, determine the target software package to be deleted from the two software packages with the same name, and delete the target software package from the software package set. It can realize the automatic identification of the target software package to be deleted. Compared with the related technologies, which mostly rely on manual identification of the target software package to be deleted, it saves a lot of manpower and material resources, improves the processing efficiency and accuracy of software packages, and is suitable for application scenarios where two software packages with the same name conflict.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0028] Figure 1 This is a flowchart illustrating a software package processing method according to a first embodiment of the present disclosure.

[0029] Figure 2 This is a schematic flowchart of a software package processing method according to a second embodiment of the present disclosure.

[0030] Figure 3 This is a flowchart illustrating a software package processing method according to a third embodiment of the present disclosure.

[0031] Figure 4 This is a flowchart illustrating a software package processing method according to the fourth embodiment of this disclosure.

[0032] Figure 5 This is a flowchart illustrating a software package processing method according to the fifth embodiment of this disclosure.

[0033] Figure 6 This is a schematic flowchart of a software package processing method according to the sixth embodiment of this disclosure.

[0034] Figure 7 This is a block diagram of a software processing apparatus according to a first embodiment of the present disclosure.

[0035] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0036] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0037] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0038] The acquisition, storage, use, and processing of data in this disclosed technical solution all comply with the relevant provisions of national laws and regulations.

[0039] Figure 1 This is a flowchart illustrating a software package processing method according to a first embodiment of the present disclosure.

[0040] like Figure 1 As shown, the software package processing method of the first embodiment of this disclosure includes the following steps:

[0041] S101, determine the first and second packages with the same name from the set of packages to be processed.

[0042] It should be noted that the software package processing method of this disclosure is executed by an electronic device. The software package processing method of this disclosure can be executed by the software package processing device of this disclosure, which can be configured in any electronic device to execute the software package processing method of this disclosure.

[0043] It should be noted that a package set includes multiple packages, and there are no strict restrictions on the packages in the package set. For example, it may include packages that the development framework depends on, packages that the application depends on, third-party packages, and JAR (Java Archive) packages.

[0044] In one implementation, determining a first software package and a second software package with matching names from a set of software packages to be processed includes obtaining the names of the software packages in the set, comparing the names of any two software packages, and if the names of any two software packages match, determining one of the two software packages as the first software package and the other software package as the second software package.

[0045] In some examples, retrieving the names of packages within a package set involves obtaining the GAV (GroupId-ArtifactId-Version) coordinates of the packages, extracting the values ​​of the GroupId and ArtifactId fields from the GAV coordinates, and then using these values ​​to derive the package name. For instance, the values ​​of the GroupId and ArtifactId fields can be concatenated to obtain the package name.

[0046] S102, based on the business dimension to which the calling method in the first software package belongs, and the business dimension to which the calling method in the second software package belongs, identify whether the first software package or the second software package meets the preset deletion conditions.

[0047] It should be noted that there are no restrictions on the calling methods in the first and second software packages. For example, the first software package may contain 10 calling methods and the second software package may contain 5 calling methods. There are also no restrictions on the business dimension to which the calling methods belong. For example, the business dimension may include speech recognition, voice interaction, image processing, instant messaging, mini-programs, mobile payment, etc.

[0048] It is understandable that different calling methods may belong to the same or different business dimensions.

[0049] It should be noted that there are no excessive restrictions on the preset deletion conditions.

[0050] In one implementation, based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, it is determined whether the first software package or the second software package meets the preset deletion conditions. This includes obtaining a first number of business dimensions to which the calling method in the first software package belongs and a second number of business dimensions to which the calling method in the second software package belongs, and determining whether the first software package or the second software package meets the preset deletion conditions based on the first number and the second number.

[0051] In some examples, based on a first quantity and a second quantity, it is determined whether the first software package or the second software package meets the preset deletion conditions, including if the first quantity is greater than or equal to the second quantity, the second software package is determined to meet the preset deletion conditions, and if the first quantity is less than the second quantity, the first software package is determined to meet the preset deletion conditions.

[0052] In one implementation, based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, it is identified whether the first software package or the second software package meets the preset deletion conditions. This includes identifying the second software package as meeting the preset deletion conditions if the business dimension to which the calling method in the first software package belongs includes each of the business dimensions to which the calling method in the second software package belongs, or identifying the first software package as meeting the preset deletion conditions if the business dimension to which the calling method in the second software package belongs includes each of the business dimensions to which the calling method in the first software package belongs.

[0053] In one implementation, based on the business dimension to which the calling methods in the first software package belong and the business dimension to which the calling methods in the second software package belong, it is identified whether the first software package or the second software package meets the preset deletion conditions. This includes identifying the first software package as meeting the preset deletion conditions if the business dimension to which each calling method in the first software package belongs is a sub-business of the business dimension to which the calling methods in the second software package belong, and identifying the second software package as meeting the preset deletion conditions if the business dimension to which each calling method in the second software package belongs is a sub-business of the business dimension to which the calling methods in the first software package belong.

[0054] S103, if the target package in the first package or the second package meets the preset deletion conditions, the target package is deleted from the package set.

[0055] It should be noted that the target software package is either the first software package or the second software package.

[0056] In one implementation, removing a target software package from the package set includes identifying whether there are dependencies between the target software package and other software packages besides the target software package. If there are no dependencies between the target software package and other software packages besides the target software package, the target software package is removed from the package set. Therefore, this method only removes the target software package from the package set when there are no dependencies between the target software package and other software packages besides the target software package, avoiding the problem of other software packages becoming unusable after the target software package is removed, thus improving the reliability of program operation.

[0057] It should be noted that the other packages besides the target package may include packages in the package set, or packages outside the package set; no further restrictions are imposed here.

[0058] In some cases, if the target package has dependencies on at least one other package besides the target package, the target package is retained.

[0059] For example, if a package set includes packages A, B, C, and D, and the target package is package A, it can identify whether there are dependencies between package A and packages B, C, and D. If there are no dependencies between package A and packages B, C, and D, package A is removed from the package set. If there are dependencies between package A and package B, package A is retained.

[0060] It should be noted that identifying whether there are dependencies between software packages can be achieved using any method from the relevant technologies, and no further restrictions are imposed here.

[0061] In some examples, identifying whether a dependency exists between a target software package and other software packages besides the target package includes identifying whether there is a calling relationship between methods in the target package and methods in other software packages besides the target package. If at least one calling method in the target package has a calling relationship with methods in other software packages besides the target package, a dependency exists between the target package and other software packages besides the target package. If no calling relationship exists between any calling method in the target package and methods in other software packages besides the target package, no dependency exists between the target package and other software packages besides the target package. Therefore, this method can consider whether there is a calling relationship between calling methods in two software packages to identify whether a dependency exists between the two software packages.

[0062] It should be noted that identifying whether a calling relationship exists between calling methods can be achieved using any of the relevant technologies, and no further restrictions are imposed here.

[0063] For example, if the package set includes packages A, B, C, and D, and the target package is package A, package A includes calling methods 1 to 10, and package B includes calling methods 11 to 15, it can be identified whether there is a calling relationship between calling methods 1 to 10 and calling methods 11 to 15. If there is a calling relationship between calling method 2 and calling method 12, it can be identified that there is a dependency relationship between package A and package B. If there is no calling relationship between each calling method 1 to 10 and calling methods 11 to 15, it can be identified that there is no dependency relationship between package A and package B.

[0064] In summary, according to the software package processing method provided in this disclosure, a first software package and a second software package with the same name are determined from the software package set to be processed. Based on the business dimension to which the calling methods in the first software package belong, and the business dimension to which the calling methods in the second software package belong, it is identified whether the first software package or the second software package meets the preset deletion conditions. If the target software package in the first software package or the second software package meets the preset deletion conditions, the target software package is deleted from the software package set. Therefore, considering the business dimensions to which the calling methods in two software packages with the same name belong, the target software package to be deleted is determined from the two software packages with the same name and deleted from the software package set. This achieves automatic identification of the target software package to be deleted. Compared with related technologies that mostly rely on manual identification of the target software package to be deleted, this saves a lot of manpower and resources, improves the processing efficiency and accuracy of software packages, and is suitable for application scenarios where two software packages with the same name conflict.

[0065] In the above embodiments, identifying the content in the first software package that meets the preset deletion conditions can be combined with Figures 2 to 5 For further understanding, it should be noted that the relevant content for identifying whether the second software package meets the preset deletion conditions can be referred to the relevant content for identifying whether the first software package meets the preset deletion conditions, and will not be repeated here.

[0066] Figure 2 This is a schematic flowchart of a software package processing method according to a second embodiment of the present disclosure.

[0067] like Figure 2 As shown, the software package processing method of the second embodiment of this disclosure includes the following steps:

[0068] S201, Identify the first and second packages with matching names from the set of packages to be processed.

[0069] The details of step S201 can be found in the above embodiments and will not be repeated here.

[0070] S202, based on the business dimension to which the calling method in the first software package belongs, obtain the first business dimension set.

[0071] S203. Based on the business dimension to which the calling method in the second software package belongs, obtain the second business dimension set.

[0072] S204, if the first business dimension set is a subset of the second business dimension set, identify that the first software package satisfies the first deletion condition.

[0073] It should be noted that the first deletion condition in this embodiment is a preset deletion condition.

[0074] For example, if the software package includes software packages A, B, C, and D, the first software package is software package B, the second software package is software package A, software package A includes calling methods 1 to 10, software package B includes calling methods 11 to 15, the business dimension to which calling methods 1 to 3 belong is image processing, the business dimension to which calling methods 4 to 5 belong is instant messaging, the business dimension to which calling methods 6 to 10 belong is mini-program, and the business dimension to which calling methods 11 to 15 belong is mini-program.

[0075] Based on the business dimensions to which methods 11 to 15 belong, a first business dimension set can be obtained, which includes mini-programs. Based on the business dimensions to which methods 1 to 10 belong, a second business dimension set can be obtained, which includes image processing, instant messaging, and mini-programs. At this time, the first business dimension set is a subset of the second business dimension set, and the identification package B satisfies the first deletion condition.

[0076] S205, Remove the first software package from the software package set.

[0077] The details of step S205 can be found in the above embodiments and will not be repeated here.

[0078] In summary, according to the software package processing method provided in the embodiments of this disclosure, a first business dimension set is obtained based on the business dimension to which the calling method in the first software package belongs, and a second business dimension set is obtained based on the business dimension to which the calling method in the second software package belongs. If the first business dimension set is a subset of the second business dimension set, the first software package is identified as meeting the first deletion condition. Whether the first business dimension set is a subset of the second business dimension set can be taken into account to achieve automatic identification of the first software package as the target software package to be deleted.

[0079] Figure 3 This is a flowchart illustrating a software package processing method according to a third embodiment of the present disclosure.

[0080] S301, determine the first and second packages with the same name from the set of packages to be processed.

[0081] S302, based on the business dimension to which the calling method in the first software package belongs, obtain the first business dimension set.

[0082] S303, based on the business dimension to which the calling method in the second software package belongs, obtain the second business dimension set.

[0083] The relevant content of steps S301-S303 can be found in the above embodiments, and will not be repeated here.

[0084] S304, if the first business dimension set is a subset of the second business dimension set, identify whether the calling methods in the first software package under the i-th business dimension of the first business dimension set and the calling methods in the second software package under the i-th business dimension are consistent.

[0085] S305, if the calling methods in the first software package under the N business dimensions of the first business dimension set are all the same as the calling methods in the second software package, the first software package is identified as meeting the second deletion condition.

[0086] It should be noted that i is a positive integer not greater than N, N is a positive integer, and N is the number of business dimensions in the first business dimension set.

[0087] It should be noted that the second deletion condition in this embodiment is a preset deletion condition.

[0088] For example, if the software package includes software packages A, B, C, and D, the first software package is software package B, the second software package is software package A, software package A includes calling methods 1 to 10, software package B includes calling methods 11 to 15, the business dimension to which calling methods 1 to 3 belong is image processing, the business dimension to which calling methods 4 to 5 belong is instant messaging, the business dimension to which calling methods 6 to 10 belong is mini-program, and the business dimension to which calling methods 11 to 15 belong is mini-program.

[0089] The first business dimension set can be obtained based on the business dimension to which methods 11 to 15 belong, that is, the first business dimension set includes mini-programs. The second business dimension set can be obtained based on the business dimension to which methods 1 to 10 belong, that is, the second business dimension set includes image processing, instant messaging and mini-programs. At this time, the first business dimension set is a subset of the second business dimension set.

[0090] Identify whether calling methods 11 to 15 in package B under the mini-program are consistent with calling methods 6 to 10 in package A under the mini-program. If calling methods 11 to 15 are consistent with calling methods 6 to 10, for example, calling method 11 is consistent with calling method 6, calling method 12 is consistent with calling method 7, calling method 13 is consistent with calling method 8, calling method 14 is consistent with calling method 9, and calling method 15 is consistent with calling method 10, then package B is identified as meeting the second deletion condition.

[0091] S306, Remove the first software package from the software package set.

[0092] The details of step S306 can be found in the above embodiments and will not be repeated here.

[0093] In summary, according to the software package processing method provided in the embodiments of this disclosure, if the first business dimension set is a subset of the second business dimension set, it is identified whether the calling methods in the first software package under the i-th business dimension and the calling methods in the second software package under the i-th business dimension are consistent. If the calling methods in the first software package under N business dimensions of the first business dimension set are consistent with the calling methods in the second software package, it is identified that the first software package meets the second deletion condition. That is, when the first business dimension set is a subset of the second business dimension set, it is further considered whether the calling methods in the two software packages under the same business dimension are consistent, so as to realize the automatic identification of the first software package as the target software package to be deleted.

[0094] Figure 4 This is a flowchart illustrating a software package processing method according to the fourth embodiment of this disclosure.

[0095] S401, determine the first and second packages with the same name from the set of packages to be processed.

[0096] S402, based on the business dimension to which the calling method in the first software package belongs, obtain the first business dimension set.

[0097] S403, based on the business dimension to which the calling method in the second software package belongs, obtain the second business dimension set.

[0098] The details of steps S401-S403 can be found in the above embodiments and will not be repeated here.

[0099] S404, if the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension in the first business dimension set is inconsistent with the calling method in the second software package.

[0100] S405, identify whether the calling method in the first package exists in other packages besides the first package.

[0101] S406, if each calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the third deletion condition.

[0102] It should be noted that the remaining software packages, other than the first software package, may include software packages within the software package set, or software packages outside the software package set; no further restrictions are imposed here.

[0103] It should be noted that the third deletion condition in this embodiment is a preset deletion condition.

[0104] For example, if the software package includes software packages A, B, C, and D, the first software package is software package B, the second software package is software package A, software package A includes calling methods 1 to 10, software package B includes calling methods 11 to 15, the business dimension to which calling methods 1 to 3 belong is image processing, the business dimension to which calling methods 4 to 5 belong is instant messaging, the business dimension to which calling methods 6 to 10 belong is mini-program, and the business dimension to which calling methods 11 to 15 belong is mini-program.

[0105] The first business dimension set can be obtained based on the business dimension to which methods 11 to 15 belong, that is, the first business dimension set includes mini-programs. The second business dimension set can be obtained based on the business dimension to which methods 1 to 10 belong, that is, the second business dimension set includes image processing, instant messaging and mini-programs. At this time, the first business dimension set is a subset of the second business dimension set.

[0106] Identify whether calling methods 11 to 15 in package B under the mini-program are consistent with calling methods 6 to 10 in package A under the mini-program. If calling methods 11 to 15 are inconsistent with calling methods 6 to 10, identify whether calling methods 11 to 15 exist in packages A, C, and D. If calling methods 11 to 15 all exist in package C, identify that package B meets the third deletion condition.

[0107] S407, Remove the first software package from the software package set.

[0108] The details of step S407 can be found in the above embodiments and will not be repeated here.

[0109] In summary, according to the software package processing method provided in this disclosure embodiment, if the first business dimension set is a subset of the second business dimension set, and the calling methods in the first software package under at least one business dimension of the first business dimension set are inconsistent with the calling methods in the second software package, it is identified whether the calling methods in the first software package exist in other software packages besides the first software package. If each calling method in the first software package exists in other software packages besides the first software package, it is identified that the first software package meets the third deletion condition, that is, when the first business dimension set is a subset of the second business dimension set, and the calling methods in the two software packages under the same business dimension are inconsistent, it is further considered whether each calling method in the first software package exists in other software packages, that is, whether each calling method in the first software package exists only in the first software package, so as to realize the automatic identification of the first software package as the target software package to be deleted.

[0110] Figure 5 This is a flowchart illustrating a software package processing method according to the fifth embodiment of this disclosure.

[0111] S501, determine the first and second packages with the same name from the set of packages to be processed.

[0112] S502, based on the business dimension to which the calling method in the first software package belongs, obtain the first business dimension set.

[0113] S503, based on the business dimension to which the calling method in the second software package belongs, obtain the second business dimension set.

[0114] The relevant content of steps S501-S503 can be found in the above embodiments, and will not be repeated here.

[0115] S504, if the first business dimension set is not a subset of the second business dimension set, identify whether the calling method in the first software package exists in other software packages besides the first software package.

[0116] S505, if each calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the fourth deletion condition.

[0117] It should be noted that the fourth deletion condition in this embodiment is a preset deletion condition.

[0118] For example, if the software package includes software packages A, B, C, and D, the first software package is software package B, the second software package is software package A, software package A includes calling methods 1 to 10, software package B includes calling methods 11 to 15, the business dimension to which calling methods 1 to 3 belong is image processing, the business dimension to which calling methods 4 to 5 belong is instant messaging, the business dimension to which calling methods 6 to 10 belong is mini-program, and the business dimension to which calling methods 11 to 15 belong is mobile payment.

[0119] The first business dimension set can be obtained based on the business dimensions to which methods 11 to 15 belong, that is, the first business dimension set includes mobile payment. The second business dimension set can be obtained based on the business dimensions to which methods 1 to 10 belong, that is, the second business dimension set includes image processing, instant messaging and mini-programs. At this time, the first business dimension set is not a subset of the second business dimension set.

[0120] Identify whether methods 11 to 15 exist in packages A, C, and D. If methods 11 to 15 all exist in package C, identify that package B meets the fourth deletion condition.

[0121] S506, Remove the first software package from the software package set.

[0122] The details of step S506 can be found in the above embodiments and will not be repeated here.

[0123] In summary, according to the software package processing method provided in the embodiments of this disclosure, if the first business dimension set is not a subset of the second business dimension set, it is identified whether each calling method in the first software package exists in all other software packages except the first software package. If each calling method in the first software package exists in all other software packages except the first software package, it is identified that the first software package meets the fourth deletion condition. That is, when the first business dimension set is not a subset of the second business dimension set, it is further considered whether each calling method in the first software package exists in other software packages, that is, whether each calling method in the first software package exists only in the first software package, so as to realize the automatic identification of the first software package as the target software package to be deleted.

[0124] Figure 6 This is a schematic flowchart of a software package processing method according to the sixth embodiment of this disclosure.

[0125] S601, determine the first and second packages with the same name from the set of packages to be processed.

[0126] S602 identifies whether the versions of the first software package and the second software package are the same.

[0127] If no, meaning the versions of the first software package and the second software package are inconsistent, then proceed to step S603; if yes, meaning the versions of the first software package and the second software package are consistent, then proceed to step S605.

[0128] S603, based on the business dimension to which the calling method in the first software package belongs, and the business dimension to which the calling method in the second software package belongs, identify whether the first software package or the second software package meets the preset deletion conditions.

[0129] S604, if the target package in the first package or the second package meets the preset deletion conditions, the target package is deleted from the package set.

[0130] S605, remove the first or second software package from the software package set.

[0131] In one implementation, removing the first or second software package from the package set includes removing third-party packages within the first or second software package from the package set. Therefore, in this method, when two software packages with the same name conflict, the third-party packages can be removed first, meaning that packages dependent on the development framework and packages dependent on the application are retained.

[0132] For example, if a software package set includes software packages A, B, C, and D, with software package B as the first package and software package A as the second package, it can identify whether the versions of software packages A and B are consistent. If the versions of software packages A and B are inconsistent, it can further consider the business dimension to which the calling methods in the two software packages with the same name belong, so as to realize the automatic identification of the target software package to be deleted.

[0133] If packages A and B have the same version, remove either package A or package B from the package set. In some cases, if package A is a third-party package and package B is a package that the development framework depends on, package A can be removed from the package set.

[0134] In one implementation, obtaining the software package version includes obtaining the GAV coordinates of the software package, extracting the value of the Version field from the GAV coordinates, and obtaining the software package version based on the value of the Version field. For example, the value of the Version field can be used as the software package version.

[0135] In summary, according to the software package processing method provided in this disclosure embodiment, it is identified whether the versions of the first software package and the second software package are consistent. If the versions of the two software packages are inconsistent, the business dimension to which the calling methods in the two software packages belong is further considered to achieve automatic identification of the target software package to be deleted. If the versions of the two software packages are consistent, it indicates that the two software packages are duplicated, and one of the software packages is directly deleted, thereby improving the processing efficiency and accuracy of software packages.

[0136] Figure 7 This is a block diagram of a software processing apparatus according to a first embodiment of the present disclosure.

[0137] like Figure 7 As shown, the software package processing apparatus 700 of this embodiment includes: a determination module 701, an identification module 702, and a deletion module 703.

[0138] The determination module 701 is configured to determine a first software package and a second software package with matching names from the set of software packages to be processed;

[0139] The identification module 702 is configured to identify whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs.

[0140] The deletion module 703 is configured to delete the target package from the package set if the target package in the first package or the second package meets the preset deletion conditions.

[0141] In one embodiment of this disclosure, the identification module 702 is further configured to: obtain a first set of business dimensions based on the business dimension to which the calling method in the first software package belongs; obtain a second set of business dimensions based on the business dimension to which the calling method in the second software package belongs; and if the first set of business dimensions is a subset of the second set of business dimensions, identify that the first software package satisfies the first deletion condition.

[0142] In one embodiment of this disclosure, the identification module 702 is further configured to: if the first business dimension set is a subset of the second business dimension set, identify whether the calling methods in the first software package under the i-th business dimension of the first business dimension set and the calling methods in the second software package under the i-th business dimension are consistent; if the calling methods in the first software package under N business dimensions of the first business dimension set are consistent with the calling methods in the second software package, identify that the first software package satisfies the second deletion condition; wherein i is a positive integer not greater than N, and N is a positive integer.

[0143] In one embodiment of this disclosure, the identification module 702 is further configured to: if the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension of the first business dimension set is inconsistent with the calling method in the second software package; identify whether the calling method in the first software package exists in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identify that the first software package satisfies the third deletion condition.

[0144] In one embodiment of this disclosure, the identification module 702 is further configured to: if the first business dimension set is not a subset of the second business dimension set, identify whether the calling methods in the first software package exist in other software packages besides the first software package; if each calling method in the first software package exists in other software packages besides the first software package, identify that the first software package satisfies the fourth deletion condition.

[0145] In one embodiment of this disclosure, the deletion module 703 is further configured to: identify whether there is a dependency relationship between the target software package and other software packages besides the target software package; if there is no dependency relationship between the target software package and other software packages besides the target software package, delete the target software package from the software package set.

[0146] In one embodiment of this disclosure, the deletion module 703 is further configured to: identify whether there is a calling relationship between the calling methods in the target software package and the calling methods in other software packages besides the target software package; if there is a calling relationship between at least one calling method in the target software package and the calling methods in other software packages besides the target software package, identify that there is a dependency relationship between the target software package and the other software packages besides the target software package; if there is no calling relationship between each calling method in the target software package and the calling methods in other software packages besides the target software package, identify that there is no dependency relationship between the target software package and the other software packages besides the target software package.

[0147] In one embodiment of this disclosure, before identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, the identification module 702 is further configured to: identify that the versions of the first software package and the second software package are inconsistent.

[0148] In one embodiment of this disclosure, the deletion module 703 is further configured to: identify that the versions of the first software package and the second software package are the same, and delete the first software package or the second software package from the software package set.

[0149] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0150] In summary, the software package processing apparatus provided in this disclosure can take into account the business dimension of the calling methods in two software packages with the same name, determine the target software package to be deleted from the two software packages with the same name, and delete the target software package from the software package set. It can realize the automatic identification of the target software package to be deleted. Compared with the related technologies, which mostly rely on manual identification of the target software package to be deleted, it saves a lot of manpower and resources, improves the processing efficiency and accuracy of software packages, and is suitable for application scenarios where two software packages with the same name conflict.

[0151] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0152] like Figure 8 As shown, the above-mentioned electronic device 800 includes:

[0153] The present invention includes a memory 810 and a processor 820, and a bus 830 connecting different components (including the memory 810 and the processor 820). The memory 810 stores a computer program, and when the processor 820 executes the program, it implements the software package processing method described in the embodiments of the present disclosure.

[0154] Bus 830 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0155] Electronic device 800 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 800, including volatile and non-volatile media, removable and non-removable media.

[0156] The memory 810 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 840 and / or cache memory 850. The electronic device 800 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 860 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 830 via one or more data media interfaces. Memory 810 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0157] A program / utility 880 having a set (at least one) of program modules 870 may be stored, for example, in memory 810. Such program modules 870 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 870 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0158] Electronic device 800 can also communicate with one or more external devices 890 (e.g., keyboard, pointing device, display 891, etc.), and with one or more devices that enable a user to interact with the electronic device 800, and / or with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 892. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 893. Figure 8 As shown, network adapter 893 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0159] The processor 820 performs various functional applications and data processing by running programs stored in the memory 810.

[0160] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the processing method of the software package in the embodiments of this disclosure, and will not be repeated here.

[0161] In summary, the electronic device provided in this disclosure can execute the software package processing method described above. It can take into account the business dimension of the calling methods in two software packages with the same name, determine the target software package to be deleted from the two software packages with the same name, and delete the target software package from the software package set. It can realize the automatic identification of the target software package to be deleted. Compared with related technologies, which mostly rely on manual identification of the target software package to be deleted, it saves a lot of manpower and resources, improves the processing efficiency and accuracy of software packages, and is suitable for application scenarios where two software packages with the same name conflict.

[0162] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium.

[0163] When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device is able to perform the processing method of the software package described above, or perform the processing method of the software package described above. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0164] To implement the above embodiments, this disclosure also provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the software package processing method as described above.

[0165] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0166] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for processing software packages, characterized in that, include: Identify the first and second packages with matching names from the set of packages to be processed; Based on the business dimension to which the calling method in the first software package belongs, and the business dimension to which the calling method in the second software package belongs, identify whether the first software package or the second software package meets the preset deletion conditions; If the target package in the first package or the second package meets the preset deletion condition, the target package will be deleted from the package set; The step of identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs includes: Based on the business dimension to which the calling methods in the first software package belong, a first business dimension set is obtained; Based on the business dimension to which the calling methods in the second software package belong, a second business dimension set is obtained; If the first business dimension set is a subset of the second business dimension set, the first software package is identified as satisfying the first deletion condition.

2. The method according to claim 1, characterized in that, The step of identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs also includes: If the first business dimension set is a subset of the second business dimension set, identify whether the calling methods in the first software package under the i-th business dimension of the first business dimension set and the calling methods in the second software package under the i-th business dimension are consistent; If the calling methods in the first software package under N business dimensions in the first business dimension set are all consistent with the calling methods in the second software package, then the first software package is identified as meeting the second deletion condition; wherein... i is a positive integer not greater than N, and N is a positive integer.

3. The method according to claim 2, characterized in that, The step of identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs also includes: If the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension in the first business dimension set is inconsistent with the calling method in the second software package; Identify whether the calling method in the first software package exists in other software packages besides the first software package; If every calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the third deletion condition.

4. The method according to claim 1, characterized in that, The step of identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs also includes: If the first business dimension set is not a subset of the second business dimension set, identify whether the calling method in the first software package exists in other software packages besides the first software package; If every calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the fourth deletion condition.

5. The method according to any one of claims 1-4, characterized in that, The step of removing the target software package from the software package set includes: Identify whether there are any dependencies between the target software package and other software packages besides the target software package; If the target software package has no dependencies on any other software packages, the target software package is removed from the software package set.

6. The method according to claim 5, characterized in that, The step of identifying whether there are dependencies between the target software package and other software packages besides the target software package includes: Identify whether there is a calling relationship between the calling methods in the target software package and the calling methods in other software packages besides the target software package; If at least one calling method in the target software package has a calling relationship with calling methods in other software packages besides the target software package, a dependency relationship is identified between the target software package and the other software packages besides the target software package; If there is no calling relationship between each calling method in the target software package and the calling methods in other software packages besides the target software package, it is identified that there is no dependency relationship between the target software package and the other software packages besides the target software package.

7. The method according to any one of claims 1-4, characterized in that, Before identifying whether the first or second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, the method further includes: The versions of the first software package and the second software package are identified as inconsistent.

8. The method according to claim 7, characterized in that, Also includes: If the versions of the first software package and the second software package are found to be the same, either the first software package or the second software package will be removed from the software package set.

9. A software package processing apparatus, characterized in that, include: The determination module is configured to determine a first and second software package with matching names from the set of software packages to be processed; The identification module is configured to identify whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs. The deletion module is configured to delete the target package from the package set if the target package in the first package or the second package meets the preset deletion conditions; The identification module is further configured as follows: Based on the business dimension to which the calling methods in the first software package belong, a first business dimension set is obtained; Based on the business dimension to which the calling methods in the second software package belong, a second business dimension set is obtained; If the first business dimension set is a subset of the second business dimension set, the first software package is identified as satisfying the first deletion condition.

10. The apparatus according to claim 9, characterized in that, The identification module is further configured to: If the first business dimension set is a subset of the second business dimension set, identify whether the calling methods in the first software package under the i-th business dimension of the first business dimension set and the calling methods in the second software package under the i-th business dimension are consistent; If the calling methods in the first software package under N business dimensions in the first business dimension set are all consistent with the calling methods in the second software package, then the first software package is identified as meeting the second deletion condition; wherein... i is a positive integer not greater than N, and N is a positive integer.

11. The apparatus according to claim 10, characterized in that, The identification module is further configured to: If the first business dimension set is a subset of the second business dimension set, and the calling method in the first software package under at least one business dimension in the first business dimension set is inconsistent with the calling method in the second software package; Identify whether the calling method in the first software package exists in other software packages besides the first software package; If every calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the third deletion condition.

12. The apparatus according to claim 9, characterized in that, The identification module is further configured to: If the first business dimension set is not a subset of the second business dimension set, identify whether the calling method in the first software package exists in other software packages besides the first software package; If every calling method in the first package exists in other packages besides the first package, the first package is identified as satisfying the fourth deletion condition.

13. The apparatus according to any one of claims 9-12, characterized in that, The deletion module is also configured to: Identify whether there are any dependencies between the target software package and other software packages besides the target software package; If the target software package has no dependencies on any other software packages, the target software package is removed from the software package set.

14. The apparatus according to claim 13, characterized in that, The deletion module is also configured to: Identify whether there is a calling relationship between the calling methods in the target software package and the calling methods in other software packages besides the target software package; If at least one calling method in the target software package has a calling relationship with calling methods in other software packages besides the target software package, a dependency relationship is identified between the target software package and the other software packages besides the target software package; If there is no calling relationship between each calling method in the target software package and the calling methods in other software packages besides the target software package, it is identified that there is no dependency relationship between the target software package and the other software packages besides the target software package.

15. The apparatus according to any one of claims 9-12, characterized in that, Before identifying whether the first software package or the second software package meets the preset deletion conditions based on the business dimension to which the calling method in the first software package belongs and the business dimension to which the calling method in the second software package belongs, the identification module is further configured to: The versions of the first software package and the second software package are identified as inconsistent.

16. The apparatus according to any one of claims 9-12, characterized in that, The deletion module is also configured to: If the versions of the first software package and the second software package are found to be the same, either the first software package or the second software package will be removed from the software package set.

17. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the software package processing method as described in any one of claims 1-8.

18. A computer-readable storage medium, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform a processing method of a software package as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Conflict-based method for checking dependency of software package

    CN102073582A

  • Multi-software package management method and device

    CN112558980A