IP Library Granted Patent US 12,124,825
Granted Patent B2
US 12,124,825 · App. 18/247,176 · Granted Oct 22, 2024

Method and apparatus for compatibility detection, device and non-transitory computer-readable storage medium

Inventor: Jing Shi (Shandong, CN)
Assignee: INSPUR ELECTRONIC INFORMATION INDUSTRY CO., LTD.
G06F8/437
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,124,825
App. No.
18/247,176
Granted
Oct 22, 2024
Kind
B2
Abstract

A method and an apparatus for compatibility detection, a device and a non-transitory computer-readable storage medium. The method includes: a dependency form of an application system and dependency libraries of each of operating systems are acquired; compatibility matching detection is respectively performed on the dependency form and each of the dependency libraries, so as to obtain matching forms corresponding to each of the operating systems; by the matching forms, the operating systems are divided into first operating systems which are in dependency compatibility with the application system, and second operating systems which are not in dependency compatibility with the application system; it is determined that the application system is not compatible with the second operating system; and a compatibility white box test is performed on the first operating system, so as to obtain a compatibility result, which indicates whether the application system is compatible with the first operating system.

Claims (63)

1. A method for compatibility detection, comprising:

acquiring a dependency form of an application system and dependency libraries of each of a plurality of operating systems;

respectively performing compatibility matching detection on the dependency form and each of the dependency libraries, so as to obtain matching forms corresponding to each of the plurality of the operating systems;

dividing, by means of the matching forms, the plurality of the operating systems into first operating systems which are in dependency compatibility with the application system, and second operating systems which are not in dependency compatibility with the application system;

determining that the application system is not compatible with the second operating system; and

performing a compatibility white box test on the first operating system, so as to obtain a compatibility result, which indicates whether the application system is compatible with the first operating system,

wherein dividing, by means of the matching forms, the plurality of the operating systems into the first operating systems which are in dependency compatibility with the application system, and the second operating systems which are not in dependency compatibility with the application system comprises:

counting the number of dependency matching items of each the matching forms; and

dividing the plurality of the operating systems into the first operating systems and the second operating systems by means of the number of the dependency matching items,

wherein dividing the plurality of the operating systems into the first operating systems and the second operating systems by means of the number of the dependency matching items comprises:

dividing the number of the dependency matching items by a total number of dependency items of the dependency form, so as to obtain a compatibility coefficient;

determining to be the first operating system, an operating system of which the compatibility coefficient is greater than a compatibility threshold value; and

determining, to be the second operating system, an operating system of which the compatibility coefficient is not greater than the compatibility threshold value,

wherein dividing the plurality of the operating systems into the first operating systems and the second operating systems by means of the number of the dependency matching items comprises:

sorting the plurality of the operating systems in a descending order of numbers of the dependency matching items; and

determining to be the first operating systems, a specified number of operating systems at a head of a queue, and determining, to be the second operating systems, operating systems excluding the specified number of the operating systems at the head of the queue.

2. The method for compatibility detection according to claim 1 , wherein acquiring the dependency form of the application system and the dependency libraries of each of the plurality of the operating systems comprises:

analyzing the application system by a dependency analysis tool, so as to obtain the dependency form; and

respectively extracting the dependency library of each of the plurality of the operating systems.

3. The method for compatibility detection according to claim 1 , further comprising:

constructing a compatibility report of the application system, and respectively recording, in the compatibility report, mark information indicating whether the application system is compatible with each of the of the plurality of the operating systems.

4. The method for compatibility detection according to claim 1 , wherein respectively performing the compatibility matching detection on the dependency form and each of the dependency libraries, so as to obtain the matching forms corresponding to each of the plurality of the operating systems, comprises:

searching a dependency package which is corresponding from the dependency library of each of the plurality of the operating systems according to a dependency name in the dependency form;

in a case that a type of a dependency is the same as a type of the dependency package, and the dependency is within a compatible version range of the dependency package, determining that the dependency is compatible with and matches the dependency package; and

correspondingly recording, in the matching form, compatible matching information between the dependency and each the dependency package.

5. The method for compatibility detection according to claim 1 , wherein acquiring the dependency form of the application system comprises:

storing the dependency form of the application system in a non-transitory computer-readable storage medium in advance;

obtaining the dependency form by means of reading the non-transitory computer-readable storage medium.

6. The method for compatibility detection according to claim 1 , wherein acquiring the dependency form of the application system comprises:

receiving data information sent by an external device, so as to obtain the dependency form.

7. The method for compatibility detection according to claim 1 , wherein acquiring the dependency form of the application system comprises:

analyzing the application system, so as to obtain the dependency form.

8. The method for compatibility detection according to claim 1 , respectively performing the compatibility matching detection on the dependency form and each of the dependency libraries, comprises:

judging whether each dependency in the dependency form has the corresponding dependency package in the dependency library.

9. The method for compatibility detection according to claim 1 , wherein dividing, by means of the matching forms, the plurality of the operating systems into the first operating systems which are in dependency compatibility with the application system, and the second operating systems which are not in dependency compatibility with the application system comprises:

dividing the plurality of the operating systems into the first operating systems and the second operating systems on a basis of dependency compatibility matching situations recorded in the matching forms.

10. The method for compatibility detection according to claim 1 , before sorting the plurality of the operating systems in a descending order of numbers of the dependency matching items, the method further comprises:

setting in advance, the number of the first operating systems.

11. The method for compatibility detection according to claim 1 , wherein the method further comprises:

constructing a compatibility report of the application system, and marking information indicating whether the application system is compatible with each of the plurality of the operating systems.

12. The method for compatibility detection according to claim 1 , wherein compatibility coefficients are truncated by the compatibility threshold value, and the compatibility coefficients which are truncated are stored as a list of screened operating systems, all of the operating systems corresponding to all of the compatibility coefficients contained in a list of the operating systems.

13. The method for compatibility detection according to claim 1 , wherein the dependency form is used for recording all dependency information of the application system, and the dependency information comprises the name of the dependency, the type of the dependency and a version of the dependency.

14. The method for compatibility detection according to claim 1 , wherein dividing, by means of the matching forms, the plurality of the operating systems into the first operating systems which are in dependency compatibility with the application system, and the second operating systems which are not in dependency compatibility with the application system comprises:

dividing the plurality of the operating systems into the first operating systems which are in dependency compatibility with the application system, and the second operating systems which are not in dependency compatibility with the application system on a basis of number sorting.

15. An electronic device, comprising:

a memory, used for storing a computer program; and

a processor, used for implementing steps of the method for compatibility detection according to claim 1 when executing the computer program.

16. A non-transitory computer-readable storage medium, wherein a computer program is stored on the non-transitory computer-readable storage medium, and when executed by a processor, the computer program is configured to cause the processor to:

acquire a dependency form of an application system and dependency libraries of each of a plurality of operating systems;

respectively perform compatibility matching detection on the dependency form and each of the dependency libraries, so as to obtain matching forms corresponding to each of the plurality of the operating systems;

divide, by means of the matching forms, the plurality of the operating systems into first operating systems which are in dependency compatibility with the application system, and second operating systems which are not in dependency compatibility with the application system;

determine that the application system is not compatible with the second operating system; and

perform a compatibility white box test on the first operating system, so as to obtain a compatibility result, which indicates whether the application system is compatible with the first operating system,

the computer program is configured to cause the processor further to:

count the number of dependency matching items of each of the matching forms; and

divide the plurality of the operating systems into the first operating systems and the second operating systems by means of the number of the dependency matching items,

the computer program is configured to cause the processor further to:

divide the number of the dependency matching items by a total number of dependency items of the dependency form, so as to obtain a compatibility coefficient;

determine, to be the first operating system, an operating system of which the compatibility coefficient is greater than a compatibility threshold value; and

determine, to be the second operating system, an operating system of which the compatibility coefficient is not greater than the compatibility threshold value,

the computer program is configured to cause the processor further to:

sort the plurality of the operating systems in a descending order of numbers of the dependency matching items; and

determine, to be the first operating systems, a specified number of operating systems at a head of a queue, and determine, to be the second operating systems, operating systems excluding the specified number of the operating systems at the head of the queue.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 23, 2024
From: SHI, JING
To: INSPUR ELECTRONIC INFORMATION INDUSTRY CO., LTD.
Reel/Frame 068658/0939 →
Priority Claims (1)
CN 202011352516.4 · Nov 26, 2020 · national
Continuity (1)
Related Publication 20240036841A1 · Feb 1, 2024