Software compatibility evaluation method, system, terminal and storage medium
By generating input parameter vectors of function items and calculating function similarity, the compatibility of software on different servers is evaluated, and the problem of developing software for different servers in the development process in the existing technology is solved, and efficient compatibility evaluation is achieved and development efficiency.
Patent Information
- Application Number
- CN202210883620.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The prior art is difficult to effectively evaluate the compatibility of software on different servers, which leads to the need to develop software for different types of servers during the development process, which increases the development volume and complexity.
By generating the input parameter vector of the function items, the functional similarity of the function items on different servers is calculated, and the compatibility evaluation value of the software product is generated based on the similarity. After sorting, select a server with high compatibility for development, reducing the amount of code modification.
It improves software development efficiency, reduces human resources investment, simplifies the development process, and improves code compatibility and reusability.
Smart Images

Figure CN115080447B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software development, and in particular relates to a software compatibility evaluation method, system, terminal and storage medium. Background Art
[0002] At present, server management system software configures and manages servers by calling server interfaces. As business grows, new business needs may need to be developed. A business includes multiple basic functions. For different models, these functions may be different, resulting in differences in business development. The difference in functions is mainly in input parameters and output results. For business, in addition to input parameters and output results, there are also differences in the transmission of intermediate parameters.
[0003] Due to the large number of server types, a software product that works on one type of server may not work on other types of servers. Therefore, software compatibility assessment is an important part of software development. Otherwise, developing corresponding software products for different types of servers will greatly increase the development workload. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a software compatibility evaluation method, system, terminal and storage medium to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a software compatibility evaluation method, comprising:
[0006] Generate a function vector based on the function items of the software product;
[0007] Generate input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers;
[0008] Calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers;
[0009] According to the functional similarity of each functional item in the functional vector on different servers, the compatibility evaluation value of the software product on different servers is generated.
[0010] Further, according to the input parameters required by each function item in the function vector on different servers, the input parameter vectors of each function item on different servers are generated, including:
[0011] Analyze the implementation method of the function item on the first server to obtain a first input parameter set;
[0012] Parsing the implementation method of the same function item on the second server to obtain a second input parameter set;
[0013] An input parameter vector representing the similarity between the first input parameter set and the second input parameter set is generated according to the same elements being represented as 1, different elements being represented as 0, and parameters that are the same elements and output by other function items being represented as other function item identifiers.
[0014] Furthermore, the functional similarity of each functional item on different servers is calculated according to the input parameter vectors of each functional item on different servers, including:
[0015] Based on the input parameter vector, calculate the similarity of function items on different servers:
[0016]
[0017] Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector.
[0018] Furthermore, based on the functional similarity of each functional item in the functional vector on different servers, the compatibility evaluation value of the software product on different servers is generated, including:
[0019] The formula for calculating the compatibility evaluation value of software products on different servers is:
[0020]
[0021] Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, r i is the functional similarity of the i-th functional item.
[0022] Furthermore, after generating the compatibility evaluation values of the software product on different servers, the method further includes:
[0023] The compatibility evaluation values of the software products on the target server and other servers are sorted from large to small. The higher the compatibility evaluation value, the better the compatibility of the software product on the corresponding two servers.
[0024] In a second aspect, the present invention provides a software compatibility evaluation system, comprising:
[0025] A function analysis unit, used to generate a function vector according to the function items of the software product;
[0026] A parameter parsing unit, used to generate input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers;
[0027] A similarity calculation unit, used to calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers;
[0028] The compatibility evaluation unit is used to generate compatibility evaluation values of software products on different servers according to the functional similarity of each functional item in the function vector on different servers.
[0029] Furthermore, the similarity calculation unit is specifically used for:
[0030] Based on the input parameter vector, calculate the similarity of function items on different servers:
[0031]
[0032] Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector.
[0033] Furthermore, the compatibility assessment unit is specifically used for:
[0034] The formula for calculating the compatibility evaluation value of software products on different servers is:
[0035]
[0036] Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, r i is the functional similarity of the i-th functional item.
[0037] In a third aspect, a terminal is provided, including:
[0038] processor, memory, wherein:
[0039] The memory is used to store computer programs.
[0040] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0041] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0042] The beneficial effect of the present invention is that the software compatibility evaluation method, system, terminal and storage medium provided by the present invention enable upper-level software developers to intuitively understand the differences in business functions to be developed between servers and select servers with small differences for development, which can reduce the amount of code development, improve code efficiency, improve compatibility efficiency, and save manpower.
[0043] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0046] Figure 2 FIG. 4 is an exemplary service diagram of server S1 of a method according to an embodiment of the present invention.
[0047] Figure 3 FIG. 4 is an exemplary business diagram of server S2 of a method according to an embodiment of the present invention.
[0048] Figure 4 is a schematic block diagram of a system according to an embodiment of the present invention.
[0049] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0051] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution entity may be a software compatibility evaluation system.
[0052] like Figure 1 As shown, the method includes:
[0053] Step 110, generating a function vector according to the function items of the software product;
[0054] Step 120, generating input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers;
[0055] Step 130, calculating the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers;
[0056] Step 140 , generating compatibility evaluation values of the software product on different servers according to the functional similarity of each functional item in the functional vector on different servers.
[0057] To facilitate understanding of the present invention, the software compatibility evaluation method provided by the present invention is further described below based on the principle of the software compatibility evaluation method of the present invention and in combination with the process of evaluating software compatibility in the embodiment.
[0058] For details, please refer to Figure 2 and Figure 3 , the software compatibility evaluation method comprises:
[0059] S1. Generate a function vector based on the function items of the software product.
[0060] The management software first obtains the functions required by the business, that is, the business vector B = {f1, f2, ..., fn}, for example, the business vector B = {f1, f2, f3}, and selects a server S1 for development. Then, the compatibility evaluation value of the developed software on the server S2 is calculated.
[0061] S2. Generate input parameter vectors for each function item on different servers according to the input parameters required by each function item in the function vector on different servers.
[0062] Assume that the input parameters of implementation method 1 of function F on server S1 are {a,b,c,d}, and the output parameters are {x,y,z}, and the input parameters of implementation method 2 on server S2 are {a,b,c}, and the output parameters are {x,y,z}, where abd require external input, c is the output of function F2, and the similarity of function F2 is r2, and xy is a valid output, and z is an invalid output. The parameters that the two methods have the same input parameters and require external input are a and b, the same parameter that is the output of other functions is c, and the different parameter is d (only 1 has it).
[0063] Then the corresponding input parameter vector is generated, and the generation algorithm is: if the parameters are the same and are elements in I, the vector element is 1; if the parameter is not included, the vector element is 0; if the parameters are the same and are the output of another function f2, the vector element is rf2, that is, the similarity of function f2.
[0064] According to the algorithm, the input parameter vector of implementation method 1 and implementation method 2 is I = {1, 1, r2, 0}.
[0065] S3. Calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers.
[0066] Based on the input parameter vector, calculate the similarity of function items on different servers:
[0067]
[0068] Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector.
[0069] Calculate the similarity of all functions and get the server similarity vector
[0070] R={r1,r2,…,r n}
[0071] according to Figure 2 Figure 3 For the business shown, the input parameter vectors of the three functional items can be obtained as follows:
[0072] I1={1,0},I2={1,r1},I3={0,r2}
[0073] The functional similarity of the three functional items on the two servers is:
[0074] r1=0.5, r2=0.75, r3=0.375
[0075] S4. Generate compatibility evaluation values of software products on different servers based on the functional similarity of each functional item in the functional vector on different servers.
[0076] The formula for calculating the compatibility evaluation value of software products on different servers is:
[0077]
[0078] Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, and ri is the function similarity of the i-th function item.
[0079] For example, calculate S = 1 / 9 * (0.5 + 0.75 + 0..375) = 0.18
[0080] If the compatibility assessment value of a software product on two servers is 1, it means that the two servers are exactly the same, and are exactly the same in these functions, and the code can be directly and completely reused.
[0081] The server group is sorted according to the compatibility evaluation value S. The server with a higher S value has more reused code and requires less modification.
[0082] Select the server S2 with the smallest difference from S1 for development. After development is completed, calculate the differences between the remaining groups and S1 and S2 respectively. R1={r2,r3,…,rk}R2={r2,r3,…,rk}
[0083] Select the group corresponding to the value with the smallest difference between the two vectors MAX(R1, Rx) for development, and so on. After completing the development of S2, recalculate the similarity of the remaining servers, and sort them to obtain the next group for development. And so on, each time the development amount is the smallest, which can reduce the workload.
[0084] like Figure 4 As shown, the system 400 includes:
[0085] A function analysis unit 410, configured to generate a function vector according to function items of a software product;
[0086] A parameter parsing unit 420, configured to generate input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers;
[0087] A similarity calculation unit 430, configured to calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers;
[0088] The compatibility evaluation unit 440 is used to generate compatibility evaluation values of the software product on different servers according to the functional similarity of each function item in the function vector on different servers.
[0089] Optionally, as an embodiment of the present invention, the similarity calculation unit is specifically used for:
[0090] Based on the input parameter vector, calculate the similarity of function items on different servers:
[0091]
[0092] Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector.
[0093] Optionally, as an embodiment of the present invention, the compatibility assessment unit is specifically used for:
[0094] The formula for calculating the compatibility evaluation value of software products on different servers is:
[0095]
[0096] Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, r iis the functional similarity of the i-th functional item.
[0097] Figure 5 The present invention provides a schematic diagram of the structure of a terminal 500 provided in an embodiment of the present invention. The terminal 500 can be used to execute the software compatibility evaluation method provided in an embodiment of the present invention.
[0098] The terminal 500 may include: a processor 510, a memory 520 and a communication unit 530. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0099] The memory 520 can be used to store the execution instructions of the processor 510. The memory 520 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 520 are executed by the processor 510, the terminal 500 can execute some or all of the steps in the following method embodiments.
[0100] The processor 510 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 520, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 510 can include only a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0101] The communication unit 530 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0102] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0103] Therefore, the present invention enables upper-level software developers to intuitively understand the differences in business functions to be developed between servers and select servers with small differences for development, which can reduce the amount of code development, improve code efficiency, improve compatibility efficiency, and save manpower. The technical effects that can be achieved by this embodiment can be found in the description above and will not be repeated here.
[0104] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.
[0105] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0106] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0109] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A software compatibility evaluation method, characterized in that: include: Generate a function vector based on the function items of the software product; Generate input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers; Calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers; Generate compatibility evaluation values of software products on different servers based on the functional similarity of each functional item in the functional vector on different servers; According to the input parameters required by each function item in the function vector on different servers, the input parameter vectors of each function item on different servers are generated, including: Analyze the implementation method of the function item on the first server to obtain a first input parameter set; Parsing the implementation method of the same function item on the second server to obtain a second input parameter set; An input parameter vector representing the similarity between the first input parameter set and the second input parameter set is generated according to the same elements being represented as 1, different elements being represented as 0, and the same elements and parameters output by other function items being represented as other function item identifiers; The functional similarity of each functional item on different servers is calculated based on the input parameter vectors of each functional item on different servers, including: Based on the input parameter vector, calculate the similarity of function items on different servers: Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector; Based on the functional similarity of each function item in the function vector on different servers, the compatibility evaluation value of the software product on different servers is generated, including: The formula for calculating the compatibility evaluation value of software products on different servers is: Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, r i is the functional similarity of the i-th functional item.
2. The method according to claim 1, characterized in that After generating the compatibility evaluation values of the software product on different servers, the method further includes: The compatibility evaluation values of the software products on the target server and other servers are sorted from large to small. The higher the compatibility evaluation value, the better the compatibility of the software product on the corresponding two servers.
3. A software compatibility evaluation system, characterized in that: include: A function analysis unit, used to generate a function vector according to the function items of the software product; A parameter parsing unit, used to generate input parameter vectors of each function item on different servers according to the input parameters required by each function item in the function vector on different servers; A similarity calculation unit, used to calculate the functional similarity of each functional item on different servers according to the input parameter vectors of each functional item on different servers; A compatibility evaluation unit, used to generate compatibility evaluation values of software products on different servers according to the functional similarity of each functional item in the function vector on different servers; According to the input parameters required by each function item in the function vector on different servers, the input parameter vectors of each function item on different servers are generated, including: Analyze the implementation method of the function item on the first server to obtain a first input parameter set; Parsing the implementation method of the same function item on the second server to obtain a second input parameter set; An input parameter vector representing the similarity between the first input parameter set and the second input parameter set is generated according to the same elements being represented as 1, different elements being represented as 0, and the same elements and parameters output by other function items being represented as other function item identifiers; The similarity calculation unit is specifically used for: Based on the input parameter vector, calculate the similarity of function items on different servers: Among them, r is the similarity of the function items in different servers, n is the number of elements in the input parameter vector, and a k is the kth element of the input parameter vector; The compatibility assessment unit is specifically used for: The formula for calculating the compatibility evaluation value of software products on different servers is: Among them, x is the number of function items with function similarity of 1 and the minimum value of x is 1, N is the number of function items in the function vector, r i is the functional similarity of the i-th functional item.
4. A terminal, characterized in that: include: processor; A memory for storing execution instructions of the processor; The processor is configured to execute the method according to any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
