Software compatibility optimization method and device based on artificial intelligence and medium
Through artificial intelligence-based methods, combined with the running compatibility and test compatibility of the software, using steps such as test instrumentation, signature, installation and functional testing, the problem of low accuracy of software compatibility judgment is solved and software compatibility is achieved Intelligent optimization and accuracy improvement.
Patent Information
- Application Number
- CN202410742004.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-24
AI Technical Summary
When judging software compatibility, the existing technology fails to combine the running compatibility of the software with the test compatibility, resulting in a reduced accuracy of compatibility judgment and the inability to achieve accurate compatibility optimization.
Adopt an artificial intelligence-based method to obtain the startup instructions input by the user, read the original software, generate test software, perform compatibility tests and run compatibility tests, calculate the compatibility rate, and optimize according to the compatibility level, including embedding into the software Input test instrumentation, signing, installation, functional testing, device usage testing and code optimization.
It improves the accuracy of software compatibility judgment, realizes intelligent optimization of software compatibility, and reduces maintenance costs and user feedback.
Smart Images

Figure CN118689533A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of software and relates to compatibility optimization technology, specifically to a software compatibility optimization method, device and medium based on artificial intelligence. Background Art
[0002] With the development of technology, electronic devices are becoming more and more popular, and various software have emerged. The software market is highly competitive and users have a variety of choices. If the software runs well on a specific platform and integrates seamlessly with other software and systems, it will increase the competitiveness and market share of the software. Software compatibility issues may lead to an increase in user complaints and technical support. By improving the compatibility of software, compatibility-related issues and user feedback can be reduced, and maintenance costs and the workload of technical support work can be reduced. Therefore, it is necessary to optimize software compatibility.
[0003] However, at this stage, when judging the compatibility of software, usually only the compatibility of the software in terms of testing is judged, and the compatibility of the software in terms of operation and testing are not considered comprehensively, which leads to a decrease in the accuracy of judging the software compatibility, and thus the inability to accurately complete the compatibility optimization;
[0004] To this end, we propose software compatibility optimization methods, equipment and media based on artificial intelligence. Summary of the invention
[0005] The purpose of the present invention is to propose a software compatibility optimization method, device and medium based on artificial intelligence to solve the problem raised in the above background technology that when judging the compatibility of software, the compatibility of the software in operation and the compatibility in testing are not combined for comprehensive consideration, resulting in a decrease in the accuracy of judging the software compatibility, and thus the inability to accurately complete the compatibility optimization.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] Software compatibility optimization methods based on artificial intelligence include:
[0008] Step S1, obtaining a startup instruction input by a user, reading the original software to be optimized, and generating a number of test software corresponding to the original software;
[0009] Step S2, the test software performs software compatibility testing and records the compatibility test results corresponding to the test software;
[0010] Step S3, calculating the operation compatibility rate corresponding to the original software;
[0011] Step S4, comprehensively analyzing the original software, obtaining the compatibility optimization level corresponding to the original software, and optimizing the compatibility of the original software.
[0012] Furthermore, the step S1 further includes the following sub-steps:
[0013] Step S11, obtaining software parameters of the original software, the software parameters specifically including the usage path and operating environment of the original software;
[0014] Step S12, implanting test stubs into the original software to obtain multiple sets of transition software in the operating environment corresponding to the original software;
[0015] Step S13, signing the transition software to obtain multiple groups of test software in the operating environment corresponding to the original software.
[0016] Furthermore, the step S2 further includes the following sub-steps:
[0017] Step S21, obtaining multiple sets of test software, and setting corresponding test environments according to the test software;
[0018] Step S22, performing compatibility test;
[0019] Step S23, obtaining an abnormality ratio corresponding to the test software by dividing the number of abnormal API interfaces by the total number of API interfaces;
[0020] Step S24, if the abnormality ratio corresponding to the test software is less than or equal to the first threshold, the compatibility test of the corresponding test software is determined to be qualified; if the abnormality ratio corresponding to the test software is greater than the first threshold, the compatibility test of the corresponding test software is determined to be unqualified;
[0021] Step S25, the remaining test software executes the above steps. When all the test software completes the compatibility test, the number of test software that passes the compatibility test is divided by the total number of test software to obtain the software compatibility rate RJL corresponding to the original software.
[0022] Furthermore, the step S22 further includes the following steps:
[0023] Step S221, installing the test software, if the installation is successful, proceeding to the subsequent steps, if the installation is not successful, terminating the subsequent steps and generating an abnormal signal to send to the user terminal;
[0024] Step S222, perform functional testing, run the test software, send requests to all API interfaces installed on the test software, record the response results and status codes in the operation log, obtain the API interfaces corresponding to the status codes in the abnormal state in the operation log and record them as abnormal API interfaces, and count the number of abnormal API interfaces and record them as the number of abnormal API interfaces;
[0025] Step S223, the functional test is completed, and the test software is uninstalled. If the uninstallation is successful, no operation is performed. If the uninstallation fails, an abnormal signal is generated and sent to the user terminal.
[0026] Furthermore, the step S3 also includes the following sub-steps:
[0027] Step S31, obtaining the usage rates SYLn of the original software corresponding to various devices, where n is the number of different models, n=1, 2, ..., Z, and Z is the upper limit of the number;
[0028] Step S32, setting X groups of test equipment according to the usage rates of various devices corresponding to the original software, ensuring that the ratio of the test equipment is consistent with the usage rate of the corresponding models, where 100≤X, and the test equipment is all normal equipment;
[0029] Step S33, running the original software in the test device, and recording whether the original software corresponding to the test device crashes or quits;
[0030] Step S34: if there is a crash or flash back, the value of the abnormal number YCS corresponding to the original software is increased by one, where the value of the abnormal number is initially 0; if there is no crash or flash back, the similarity between the running image of each test device that has not crashed or flashed back when running the original software and the standard image corresponding to the original software is calculated, and recorded as the device similarity of the corresponding test device;
[0031] Step S35, adding and averaging the similarities of devices of the same model to obtain the comprehensive similarity ZXSn of the corresponding model;
[0032] Step S36, calculating the operation compatibility rate corresponding to the original software by a formula, the specific formula is as follows:
[0033]
[0034] Furthermore, the S33 further includes the following sub-steps:
[0035] Step S331, continuously running the original software for a characteristic duration, and scanning the screen interface of the corresponding test device;
[0036] Step S332, if an error prompt box or a crash prompt box appears on the screen interface within the characteristic time length, it is determined that the original software corresponding to the test device crashes, and the subsequent steps are terminated; if no error prompt box or crash prompt box appears on the screen interface, proceed to the next step;
[0037] Step S333, within the characteristic time length, if the screen interface changes from the running interface of the original software to the standby interface of the corresponding test device, it is determined that the original software crashes, and the subsequent steps are terminated;
[0038] Step S334: within the characteristic time period, if the screen interface always maintains the running interface of the original software, it is determined that the original software has not crashed or flashed back.
[0039] Furthermore, the step S4 further includes the following sub-steps:
[0040] Step S41, obtaining the software compatibility rate RJL and the operation compatibility rate YXL corresponding to the original software, and calculating the compatibility level value corresponding to the original software by a formula, the specific formula is as follows:
[0041] JRD=A1×RJL+A2×YXL, where A1 and A2 are weight coefficients with fixed values, the values of A1 and A2 are both greater than 0, and A1>A2;
[0042] Step S42: if the compatibility level value corresponding to the original software is greater than or equal to the first level threshold, a normal signal is generated and sent to the user terminal; if the compatibility level value corresponding to the original software is less than the first level threshold and greater than or equal to the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as first-level optimization; if the compatibility level value corresponding to the original software is less than the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as second-level optimization; wherein the first level threshold is greater than the second level threshold;
[0043] Step S43: If an optimization signal is received, a software compatibility optimization operation is performed.
[0044] Furthermore, the software compatibility optimization operation is specifically as follows:
[0045] For the original software corresponding to the first-level optimization, obtain the abnormal API interface, reconstruct the abnormal API interface, obtain the abnormal reason of the corresponding API interface according to the status code and response result corresponding to the abnormal API interface, and modify it;
[0046] For the original software corresponding to the second-level optimization, the code of the corresponding original software will be modularly designed, and different modules will be set according to the different functions corresponding to the original software. The modules are independent of each other, and each module is only responsible for a specific function or task. At the same time, independent unit tests are written for each module to verify the correctness of its functions and interfaces, so as to achieve optimization of the corresponding compatibility of the original software.
[0047] The present invention further provides an electronic device, comprising:
[0048] A memory storing a computer program;
[0049] A processor is communicatively connected to the memory, and when the computer program is executed by the processor, a software compatibility optimization method based on artificial intelligence is implemented.
[0050] The present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, an artificial intelligence-based software compatibility optimization method is implemented.
[0051] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0052] The present invention first obtains the startup instruction input by the user, reads the original software to be optimized, and generates several test software corresponding to the original software. On the one hand, the test software executes the software compatibility test, and records the compatibility test results corresponding to the test software to obtain the software compatibility rate corresponding to the original software. On the other hand, the test software executes the operation compatibility test, so that the original software executes the corresponding operation test, thereby calculating the operation compatibility rate corresponding to the original software. Finally, the original software is comprehensively analyzed to obtain the compatibility optimization level corresponding to the original software. The compatibility of the original software is optimized based on the compatibility optimization level. The present invention improves the accuracy of the original software compatibility judgment and realizes intelligent optimization of the original software compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0054] Figure 1 The figure is a flow chart of the method of the present invention.
[0055] Figure 2 It is a flow chart of the testing software in the present invention.
[0056] Figure 3 It is a flow chart of the compatibility test in the present invention.
[0057] Figure 4 The figure is a flow chart of analyzing the compatibility rate in the present invention.
[0058] Figure 5 This is a flow chart of compatibility optimization in the present invention.
[0059] Figure 6 It is a physical structure diagram of the electronic device in the present invention. DETAILED DESCRIPTION
[0060] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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 are within the scope of protection of the present invention.
[0061] Embodiment 1
[0062] See also Figure 1-Figure 5 As shown, the technical solution provided by the present invention is: a software compatibility optimization method based on artificial intelligence, comprising:
[0063] Step S1, obtaining a startup instruction input by a user, reading the original software to be optimized, and generating a number of test software corresponding to the original software;
[0064] The step S1 further comprises the following sub-steps:
[0065] Step S11, obtaining software parameters of the original software;
[0066] The software parameters specifically include the usage and operating environment of the original software. The usage specifically includes PC and mobile terminals. The operating environment specifically includes Windows, Mac, Linux on the PC side and iOS and Android on the mobile side.
[0067] Step S12, implanting test stubs into the original software to obtain multiple sets of transition software in the operating environment corresponding to the original software;
[0068] Among them, different transition software corresponds to operating environments with different version numbers. Taking the operating environment as Android as an example, multiple sets of transition software can correspond to Android 15, Android 14, Android 13, etc.; Software instrumentation refers to the technology of inserting additional code or instructions into the software to collect information during the execution of the software;
[0069] Step S13, signing the transition software to obtain multiple groups of test software in the operating environment corresponding to the original software;
[0070] Software signing is a technology that verifies the integrity and authenticity of software. By writing specific information in a specific field of the software, the software is associated with a specific signature certificate to ensure that the software has not been tampered with or maliciously modified during the release and distribution process. Nowadays, in order to ensure the authenticity and security of the software, all software running on the system needs to be signed and verified.
[0071] It should be noted that for software in different operating environments, test stubs and software signatures vary due to different development environments and programming languages.
[0072] Step S2, the test software performs software compatibility testing and records the compatibility test results corresponding to the test software;
[0073] In specific implementation, step S2 specifically includes the following sub-steps:
[0074] Step S21, obtaining multiple sets of test software, and setting corresponding test environments according to the test software;
[0075] The test environment is specifically the operating environment corresponding to the current version number of the transition software;
[0076] Step S22, performing compatibility testing; wherein the compatibility testing specifically includes the following process:
[0077] Step S221, installing the test software, if the installation is successful, proceeding to the subsequent steps, if the installation is not successful, terminating the subsequent steps and generating an abnormal signal to send to the user terminal;
[0078] Step S222, perform functional testing, run the test software, send requests to all API interfaces installed on the test software, record the response results and status codes in the operation log, obtain the API interfaces corresponding to the status codes in the abnormal state in the operation log and record them as abnormal API interfaces, and count the number of abnormal API interfaces and record them as the number of abnormal API interfaces; wherein the status codes in the abnormal state include 400, 401, 403, 404 and 500, etc.;
[0079] Step S223, after the functional test is finished, the test software is uninstalled. If the uninstallation is successful, no operation is performed. If the uninstallation fails, an abnormal signal is generated and sent to the user terminal;
[0080] Step S23, dividing the number of abnormal API interfaces by the total number of API interfaces to obtain an abnormality ratio corresponding to the test software;
[0081] Step S24, if the abnormality ratio corresponding to the test software is less than or equal to the first threshold, the compatibility test of the corresponding test software is determined to be qualified; if the abnormality ratio corresponding to the test software is greater than the first threshold, the compatibility test of the corresponding test software is determined to be unqualified;
[0082] Step S25, the remaining test software executes the above steps. When all the test software completes the compatibility test, the number of test software that passes the compatibility test is divided by the total number of test software to obtain the software compatibility rate RJL corresponding to the original software.
[0083] Step S3, calculating the operation compatibility rate corresponding to the original software;
[0084] In this embodiment, step S3 specifically includes the following process:
[0085] Step S31, obtaining the usage rates SYLn of the original software corresponding to various devices, where n is the number of different models, n=1, 2, ..., Z, and Z is the upper limit of the number;
[0086] The utilization rate is specifically the ratio of the number of devices of different models corresponding to the original software to the total number of devices. For example, the utilization rate of a certain original software on model A devices is 30%, the utilization rate on model B devices is 20%, the utilization rate on model C devices is 40%, and the utilization rate on model D devices is 10%;
[0087] Step S32, setting X groups of test equipment according to the usage rates of various devices corresponding to the original software, ensuring that the ratio of the test equipment is consistent with the usage rate of the corresponding models, wherein X is a preset number, 100≤X, and the test equipment is all normal equipment;
[0088] Step S33, running the original software in the test device, and recording whether the original software corresponding to the test device crashes or flashes back; the specific process of determining whether the crash or flashes back is as follows:
[0089] Step S331, continuously running the original software for a characteristic duration, and scanning the screen interface of the corresponding test device; it should be noted here that the characteristic duration in this embodiment is preferably 15 hours;
[0090] Step S332, if an error prompt box or a crash prompt box appears on the screen interface within the characteristic time length, it is determined that the original software corresponding to the test device crashes, and the subsequent steps are terminated; if no error prompt box or crash prompt box appears on the screen interface, proceed to the next step;
[0091] Step S333, within the characteristic time length, if the screen interface changes from the running interface of the original software to the standby interface of the corresponding test device, it is determined that the original software crashes, and the subsequent steps are terminated;
[0092] Step S334, if the screen interface always maintains the running interface of the original software within the characteristic time length, it is determined that the original software has not crashed or flashed back;
[0093] Step S34: if there is a crash or flash back, the value of the abnormal number YCS corresponding to the original software is increased by one, where the value of the abnormal number is initially 0; if there is no crash or flash back, the similarity between the running image of each test device that has not crashed or flashed back when running the original software and the standard image corresponding to the original software is calculated, and recorded as the device similarity of the corresponding test device;
[0094] It should be noted that when calculating the similarity between the standard image and the running image, it can be directly obtained through deep learning technology and convolutional neural network, so it will not be repeated here;
[0095] Step S35, adding and averaging the similarities of devices of the same model to obtain the comprehensive similarity ZXSn of the corresponding model;
[0096] Step S36, calculating the operation compatibility rate corresponding to the original software by a formula, the specific formula is as follows:
[0097]
[0098] Furthermore, in step S4, the original software is comprehensively analyzed to obtain the compatibility optimization level corresponding to the original software, and the compatibility optimization of the original software is performed;
[0099] The step S4 specifically includes the following sub-steps:
[0100] Step S41, obtaining the software compatibility rate RJL and the operation compatibility rate YXL corresponding to the original software, and calculating the compatibility level value corresponding to the original software by a formula, the specific formula is as follows:
[0101] JRD=A1×RJL+A2×YXL, where A1 and A2 are weight coefficients with fixed values, and the values of A1 and A2 are both greater than 0. Specifically, A1>A2;
[0102] Step S42: if the compatibility level value corresponding to the original software is greater than or equal to the first level threshold, a normal signal is generated and sent to the user terminal, and it is determined that the corresponding original software does not need to be optimized for compatibility; if the compatibility level value corresponding to the original software is less than the first level threshold and greater than or equal to the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as first-level optimization; if the compatibility level value corresponding to the original software is less than the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as second-level optimization; wherein the first level threshold is greater than the second level threshold;
[0103] Step S43: If an optimization signal is received, a software compatibility optimization operation is performed; specifically:
[0104] For the original software corresponding to the first-level optimization, obtain the abnormal API interface and reconstruct the abnormal API interface. According to the status code and response result corresponding to the abnormal API interface, obtain the abnormal reason of the corresponding API interface and modify it; the status code 400 means that the request parameters are incorrect or incomplete, and the server cannot understand the request, so modify the request-related code; the status code 401 means that the request requires identity authentication, but no valid credentials are provided, so modify the identity authentication-related code; the status code 500 means that an error occurred when the server processed the request, check the server error and correct it;
[0105] For the original software corresponding to the second-level optimization, the code of the corresponding original software will be modularly designed, and different modules will be set according to the different functions corresponding to the original software. The modules are independent of each other, and each module is only responsible for a specific function or task. At the same time, independent unit tests are written for each module to verify the correctness of its functions and interfaces, so as to achieve optimization of the corresponding compatibility of the original software.
[0106] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.
[0107] Embodiment 2
[0108] Figure 6 An example of a physical structure diagram of an electronic device is provided, and the electronic device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The processor may call the logic instructions in the memory to execute a software compatibility optimization method based on artificial intelligence, and the method includes: obtaining a startup instruction input by a user, reading the original software to be optimized, and generating several test software corresponding to the original software, executing a software compatibility test, and recording the compatibility test results corresponding to the test software, calculating the running compatibility rate corresponding to the original software, performing a comprehensive analysis on the original software, obtaining the compatibility optimization level corresponding to the original software, and performing compatibility optimization on the original software.
[0109] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, 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.
[0110] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the software compatibility optimization method based on artificial intelligence provided by the above-mentioned methods, and the method includes: obtaining a startup instruction input by a user, reading the original software to be optimized, and generating several test software corresponding to the original software, performing software compatibility testing, and recording the compatibility test results corresponding to the test software; calculating the running compatibility rate corresponding to the original software; performing a comprehensive analysis on the original software, obtaining the compatibility optimization level corresponding to the original software, and performing compatibility optimization on the original software.
[0111] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned artificial intelligence-based software compatibility optimization methods, the methods comprising: obtaining a startup instruction input by a user, reading the original software to be optimized, and generating a number of test software corresponding to the original software, performing a software compatibility test, and recording the compatibility test results corresponding to the test software, calculating the operating compatibility rate corresponding to the original software, performing a comprehensive analysis on the original software, obtaining the compatibility optimization level corresponding to the original software, and performing compatibility optimization on the original software.
[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A software compatibility optimization method based on artificial intelligence, characterized in that: The software compatibility optimization method includes the following steps: Step S1, obtaining a startup instruction input by a user, reading the original software to be optimized, and generating a number of test software corresponding to the original software; Step S2, the test software performs software compatibility testing and records the compatibility test results corresponding to the test software; Step S3, calculating the operation compatibility rate corresponding to the original software; Step S4, comprehensively analyzing the original software, obtaining the compatibility optimization level corresponding to the original software, and optimizing the compatibility of the original software.
2. The software compatibility optimization method based on artificial intelligence according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, obtaining software parameters of the original software; wherein the software parameters specifically include the usage path and operating environment of the original software; Step S12, implanting test stubs into the original software to obtain multiple sets of transition software in the operating environment corresponding to the original software; Step S13, signing the transition software to obtain multiple groups of test software in the operating environment corresponding to the original software.
3. The software compatibility optimization method based on artificial intelligence according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, obtaining multiple sets of test software, and setting corresponding test environments according to the test software; Step S22, performing compatibility test; Step S23, obtaining an abnormality ratio corresponding to the test software by dividing the number of abnormal API interfaces by the total number of API interfaces; Step S24, if the abnormality ratio corresponding to the test software is less than or equal to the first threshold, the compatibility test of the corresponding test software is determined to be qualified; if the abnormality ratio corresponding to the test software is greater than the first threshold, the compatibility test of the corresponding test software is determined to be unqualified; Step S25, the remaining test software executes the above steps. When all the test software completes the compatibility test, the number of test software that passes the compatibility test is divided by the total number of test software to obtain the software compatibility rate corresponding to the original software.
4. The software compatibility optimization method based on artificial intelligence according to claim 3 is characterized in that: The compatibility test includes the following steps: Step S221, installing the test software, if the installation is successful, proceeding to the subsequent steps, if the installation is not successful, terminating the subsequent steps and generating an abnormal signal to send to the user terminal; Step S222, perform functional testing, run the test software, send requests to all API interfaces installed on the test software, record the response results and status codes in the operation log, obtain the API interfaces corresponding to the status codes in the abnormal state in the operation log and record them as abnormal API interfaces, and count the number of abnormal API interfaces and record them as the number of abnormal API interfaces; Step S223, the functional test is completed, and the test software is uninstalled. If the uninstallation is successful, no operation is performed. If the uninstallation fails, an abnormal signal is generated and sent to the user terminal.
5. The software compatibility optimization method based on artificial intelligence according to claim 1, characterized in that: The step S3 includes the following sub-steps: Step S31, obtaining the usage rates of the original software corresponding to various devices; Step S32, setting multiple groups of test equipment according to the usage rates of the original software corresponding to the various equipment, ensuring that the ratio of the test equipment is consistent with the usage rates of the corresponding models; Step S33, running the original software in the test device, and recording whether the original software corresponding to the test device crashes or quits; Step S34: if there is a crash or flash back, the value of the abnormal number YCS corresponding to the original software is increased by one; if there is no crash or flash back, the similarity between the running image of each test device that has not crashed or flashed back when running the original software and the standard image corresponding to the original software is calculated, and recorded as the device similarity of the corresponding test device; Step S35, adding and averaging the similarities of devices of the same model to obtain the comprehensive similarity of the corresponding model; Step S36, calculating the operation compatibility rate corresponding to the original software.
6. The software compatibility optimization method based on artificial intelligence according to claim 5 is characterized in that: The S33 further comprises the following sub-steps: Step S331, continuously running the original software for a characteristic duration, and scanning the screen interface of the corresponding test device; Step S332, if an error prompt box or a crash prompt box appears on the screen interface within the characteristic time length, it is determined that the original software corresponding to the test device crashes, and the subsequent steps are terminated; if no error prompt box or crash prompt box appears on the screen interface, proceed to the next step; Step S333, within the characteristic time length, if the screen interface changes from the running interface of the original software to the standby interface of the corresponding test device, it is determined that the original software crashes, and the subsequent steps are terminated; Step S334: within the characteristic time period, if the screen interface always maintains the running interface of the original software, it is determined that the original software has not crashed or flashed back.
7. The software compatibility optimization method based on artificial intelligence according to claim 1, characterized in that: The step S4 also includes the following sub-steps: Step S41, obtaining the software compatibility rate and the operation compatibility rate corresponding to the original software, and calculating the compatibility level value corresponding to the original software; Step S42: if the compatibility level value corresponding to the original software is greater than or equal to the first level threshold, a normal signal is generated and sent to the user terminal; if the compatibility level value corresponding to the original software is less than the first level threshold and greater than or equal to the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as first-level optimization; if the compatibility level value corresponding to the original software is less than the second level threshold, an optimization signal is generated and the compatibility optimization level corresponding to the original software is recorded as second-level optimization; Wherein the first level threshold is greater than the second level threshold; Step S43: If an optimization signal is received, a software compatibility optimization operation is performed.
8. The software compatibility optimization method based on artificial intelligence according to claim 7, characterized in that: The software compatibility optimization operation is as follows: For the original software corresponding to the first-level optimization, obtain the abnormal API interface, reconstruct the abnormal API interface, obtain the abnormal reason of the corresponding API interface according to the status code and response result corresponding to the abnormal API interface, and modify it; For the original software corresponding to the second-level optimization, the code of the corresponding original software will be modularly designed, and different modules will be set according to the different functions corresponding to the original software. The modules are independent of each other, and each module is only responsible for a specific function or task. At the same time, independent unit tests are written for each module to verify the correctness of its functions and interfaces, so as to achieve optimization of the corresponding compatibility of the original software.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the software compatibility optimization method described in any one of claims 1-8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the software compatibility optimization method described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Intelligent driver compatible method for cross-operating system
CN121542071A
A method for intelligent driver compatibility across operating systems
CN121542071B
