Compatibility analysis method and device, electronic equipment and storage medium
By using compatibility knowledge graphs for intelligent analysis during the code submission phase, personalized repair suggestions are generated, which solves the problems of delayed discovery and low coverage of compatibility issues in client application development, and improves development efficiency and resource utilization efficiency.
Patent Information
- Application Number
- CN202511860841.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-06
AI Technical Summary
Existing technologies in client application development suffer from late discovery of compatibility issues, high repair costs, and low coverage, making it difficult to meet the needs of rapidly iterating internet products. Furthermore, the lack of intelligent decision-making leads to low development efficiency.
By acquiring code differences during the code commit phase, using a compatibility knowledge graph for intelligent analysis, identifying compatibility issues, generating personalized fix suggestions, and integrating them into electronic devices for automated analysis.
It improves the efficiency of client application development, detects compatibility issues in advance, reduces repair costs, increases the coverage of compatibility issue identification and resource investment efficiency, and reduces the cost of manual decision-making.
Smart Images

Figure CN121615740A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a compatibility analysis method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of mobile internet and web applications, the environments that client applications need to adapt to are becoming increasingly complex. Therefore, compatibility analysis is necessary when developing client applications.
[0003] Currently, before the client application is released, testers can manually execute test cases on the test platform to record compatibility issues. Alternatively, they can use automated testing frameworks (such as Appium, Selenium, etc.) to write scripts to simulate user operations and automatically execute tests in a preset test environment.
[0004] However, the above solutions are usually implemented during the development or testing phase, which can easily lead to low efficiency in client application development due to compatibility issues. Summary of the Invention
[0005] This application provides a compatibility analysis method, apparatus, electronic device, and storage medium. By analyzing the compatibility between the submitted code content and the application environment of the application during the code submission stage, the compatibility analysis process is brought forward to improve application development efficiency.
[0006] In a first aspect, embodiments of this application provide a compatibility analysis method, the method comprising: In response to a code commit event, retrieve the first code content committed for the target application; Determine the difference between the first code content and the current second code content of the target application; Obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information being used to describe the compatibility between the corresponding component and each application environment; Based on the compatibility knowledge graph, a compatibility analysis is performed on the first component contained in the differential code content to obtain the compatibility analysis results for the first code content.
[0007] Secondly, embodiments of this application provide a compatibility analysis apparatus, comprising: The content acquisition module is used to retrieve the first code content submitted for the target application in response to a code submission event; The difference extraction module is used to determine the difference code content between the first code content and the current second code content of the target application; The graph acquisition module is used to acquire a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, and the compatibility information is used to describe the compatibility between the corresponding component and each application environment; The analysis module is used to perform compatibility analysis on the first component contained in the differential code content based on the compatibility knowledge graph, and obtain the compatibility analysis results for the first code content.
[0008] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any compatibility analysis method.
[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any compatibility analysis method.
[0010] Fifthly, embodiments of this application also provide a computer program product, including a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any of the compatibility analysis methods provided in embodiments of this application.
[0011] The solution adopted in this application embodiment can obtain the first code content submitted for the target application in response to a code submission event; determine the difference code content between the first code content and the current second code content of the target application; obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information being used to describe the compatibility between the corresponding component and each application environment; and perform compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in which it resides during the code submission stage, the compatibility analysis process is brought forward, thereby improving application development efficiency. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic diagram of an implementation environment scenario for the compatibility analysis method provided in this application embodiment; Figure 2 This is a flowchart illustrating the compatibility analysis method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the specific process of the compatibility analysis method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the compatibility analysis device provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0015] Research has revealed that with the rapid development of mobile internet and web applications, the environments that client applications need to adapt to are becoming increasingly complex. Furthermore, the wide variety of mobile devices on the market and the shortened iteration cycles of operating systems have led to increasingly stringent compatibility requirements for client applications. At the same time, significant differences in the level of support between different browsers (such as Chrome, Safari, and Firefox) and cross-platform frameworks (such as React Native, Android, and iPhone) further complicate compatibility issues.
[0016] Therefore, when developing client applications, it is necessary to analyze the compatibility of the client applications.
[0017] Understandably, client-side application compatibility challenges primarily focus on four dimensions: hardware (including processor architecture, memory capacity, screen parameters, etc.), system (involving operating system type and version), runtime environment (e.g., browser kernel, JavaScript engine, React Native version, etc.), and network (covering network type, bandwidth fluctuations, etc.). Among these four dimensions, Cascading Style Sheets (CSS) rendering, Application Programming Interface (API) calls, and interaction logic are the most frequent areas for compatibility issues.
[0018] Client application compatibility mainly involves four dimensions: hardware level (processor architecture, memory capacity, screen parameters, etc.), system level (operating system type and version), runtime environment level (browser kernel, JavaScript engine, RN version, etc.), and network level (network type, bandwidth fluctuations, etc.). Among these, CSS style rendering, API calls, and interaction logic are the areas most prone to compatibility issues.
[0019] To address these compatibility challenges, the industry has developed three main technical solutions: manual testing, automated testing, and static code analysis. Manual testing relies on testers executing test cases and recording compatibility issues before the client application is released. Automated testing utilizes automated testing frameworks (such as Appium and Selenium) to write scripts that simulate user actions and automatically execute tests in a pre-defined test environment. Static code analysis uses development tool plugins (such as ESLint and StyleLint) to scan the code using a pre-defined rule base to identify known compatibility risk patterns.
[0020] However, the above technical solution has the following problems: Problem 1: Delay: Whether it is manual testing or automated testing, it is executed after the code development is completed. Compatibility issues are discovered late and the cost of fixing them is high.
[0021] Issue 2: Limited coverage: The testing device matrix cannot cover all real user environments, especially for long-tail devices and niche browsers, resulting in some compatibility issues being missed.
[0022] Question 3: Fixed rules: Static code analysis solutions rely on manually preset rules, which cannot identify newly emerging compatibility issues, and the rule update speed lags behind technological development.
[0023] Question 4: Inefficiency: Traditional solutions require a lot of manpower and resources to maintain the testing environment and rule base, which is difficult to meet the efficiency requirements of rapidly iterating Internet products.
[0024] Question 5: Lack of intelligent decision-making: Existing solutions can only identify problems, but cannot provide prioritization and targeted solutions based on factors such as user distribution and the scope of the problem's impact.
[0025] To address at least some of the aforementioned problems, embodiments of this application provide a compatibility analysis method, apparatus, electronic device, and computer-readable storage medium.
[0026] Specifically, this embodiment will be described from the perspective of a compatibility analysis device, which can be integrated into an electronic device; that is, the compatibility analysis method of this application embodiment can be executed by an electronic device. This electronic device can be a server, a terminal, or other similar device.
[0027] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. Terminals can include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. Terminals and servers can be directly or indirectly connected via wired or wireless communication methods; this application does not impose any restrictions.
[0028] Please see Figure 1 Taking the integration of a compatibility analysis device into an electronic device as an example, Figure 1This is a schematic diagram illustrating an implementation scenario of the compatibility analysis method provided in this application. The electronic device can be a terminal device, which, in response to a code submission event, obtains the first code content submitted for the target application; determines the difference between the first code content and the current second code content of the target application; obtains a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information describing the compatibility between the corresponding component and each application environment; and performs compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in the code submission stage, the compatibility analysis process is brought forward to improve application development efficiency.
[0029] It should be noted that, Figure 1 The illustrated scenario of the compatibility analysis method is merely an example. The implementation environment of the compatibility analysis method described in this application is intended to more clearly illustrate the technical solutions of this application and does not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will recognize that, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in this application are equally applicable to similar technical problems.
[0030] The solutions provided in this application are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0031] This embodiment will be described from the perspective of a compatibility analysis device, which can be integrated into an electronic device, which can be a terminal and / or a server, and this application does not limit it.
[0032] This application provides a compatibility analysis method; please refer to [link / reference]. Figure 2 , Figure 2 The specific process of the compatibility analysis method provided in this application embodiment can be summarized in the following steps 101 to 104: Step 101: In response to the code commit event, obtain the first code content committed for the target application.
[0033] The target application refers to an application currently under development. Target applications can include, but are not limited to, native mobile applications (such as applications developed based on the Android or iOS platforms), cross-platform applications (such as applications built based on frameworks such as ReactNative and Flutter), web applications (front-end applications that run through a browser), or hybrid applications.
[0034] Code commit events refer to technical events triggered by developers or automated systems during software development when they commit source code, resource files, configuration scripts, or other application-related digital content (i.e., the initial code content) to a code repository (such as GitHub, GitLab, or an integrated development environment) via a version control system (e.g., Git, SVN) or integrated development environment (IDE). Code commit events can be triggered in various ways, and the specific methods can be adjusted according to the actual situation; no restrictions are placed here. For example, listeners can monitor code changes for one or more applications. When a developer performs a code push, merge request, or commit operation targeting the application, the aforementioned code commit event is triggered. Alternatively, Git repository webhooks can be configured to listen for push and merge events, and message queues can be used to handle high-concurrency requests.
[0035] The first code content refers to the code content submitted for the target application during the code commit event.
[0036] Step 102: Determine the difference between the first code content and the target application's current second code content.
[0037] The second code content refers to the code content of the target application before the code submission event.
[0038] Among them, the difference code content refers to the code content that differs between the first code content and the second code content.
[0039] There are various ways to determine the differences between the code content, and the specific methods can be adjusted according to the actual situation. This application does not impose any limitations on these methods. For example, the `git diff` command can be used to extract the code content that differs between the first and second code content. The differences can include a list of changed files and a detailed comparison of their contents. Alternatively, an abstract syntax tree can be used to extract the differences between the first and second code content.
[0040] Step 103: Obtain the compatibility knowledge graph, which includes at least one component identifier and the compatibility information corresponding to the component indicated by each component identifier. The compatibility information is used to describe the compatibility between the corresponding component and each application environment.
[0041] The compatibility knowledge graph is used to store, index, and query the components contained in an application and their compatibility with various application environments. Specifically, given a component identifier, the compatibility information (i.e., the compatibility of the component with various application environments) can be obtained by querying the compatibility knowledge graph. The compatibility information includes the first application environment where the component is normally compatible, and the second application environment where the component is not compatible.
[0042] Here, "component" refers to content on the application that has compatibility issues, such as CSS feature components, API components, and native mobile function components; there are no restrictions here. "Component identifier" refers to the unique identification information that identifies a component.
[0043] There are various ways to construct a compatibility knowledge graph, and the specific method can be adjusted according to the actual situation; no restrictions are imposed here. For example, one can obtain historical compatibility analysis records for the target application. These records include component identifiers of the components included in the target application, and the compatibility information corresponding to the components indicated by each component identifier. A compatibility knowledge graph can then be constructed based on these component identifiers and compatibility information. Another example is obtaining a first compatibility analysis record for the target application, which includes component identifiers of the components included in the target application and the compatibility information corresponding to the components indicated by each component identifier. An initial compatibility knowledge graph is constructed based on the component identifiers and compatibility information in the first compatibility analysis record. A second compatibility analysis record, distinct from the target application, is then obtained. This second compatibility analysis record includes component identifiers of the components included in the data source, and the compatibility information corresponding to the components indicated by each component identifier. The initial compatibility knowledge graph is updated based on the component identifiers and compatibility information in the second compatibility analysis record to obtain the final compatibility knowledge graph. The at least one data source distinct from the target application includes, but is not limited to, various public data sources and official documentation from various platforms. Updating the initial compatibility knowledge graph includes merging the compatibility information of the third component in the second compatibility analysis record (which has the same component identifier as the first compatibility analysis record) into the compatibility information under the corresponding component identifier of the third component in the initial compatibility knowledge graph, and adding a component identifier for the fourth component in the second compatibility analysis record (which has a different component identifier than the first compatibility analysis record) and the compatibility information under the corresponding component identifier of the fourth component to the initial compatibility knowledge graph.
[0044] For example, compatibility-related data from various public data sources (such as CSS-related data sources, JS-related data sources) and official platform documentation (such as Android official documentation, iOS official documentation) that are distinct from the target application are integrated to obtain the following fields: data source identifier (such as the "Can I Use" website, Android official documentation), data source address, component name (such as specific CSS class, property), component system type (such as Android H5, iPhone H5, Web), and compatibility platform status (such as the first compatible application environment and the second incompatible application environment). Application environments can include, but are not limited to, Chrome, UC, etc. Historical compatibility issues of the current target application are recorded to obtain the following fields: component name (such as crush.photo.camera), function description (such as taking photos), and compatibility platform status (supports iPhone H5, does not support iPhone RN, supports Android H5, does not support Android RN, etc., detailed compatibility status). It is understood that other fields may also be included; no restrictions are placed here. The aforementioned data are linked by component names (which can be understood as component identifiers) and compatibility platform information (which can be understood as compatibility information) to form the compatibility knowledge graph used in this application, so as to facilitate intelligent querying of compatibility information and prediction of compatibility issues based on the compatibility knowledge graph.
[0045] Step 104: Based on the compatibility knowledge graph, perform compatibility analysis on the first component contained in the differing code content to obtain the compatibility analysis results for the first code content.
[0046] The compatibility analysis results are used to describe the compatibility-related results when the target application is updated based on the first code content. The compatibility analysis results may include, but are not limited to, the first analysis results describing compatibility issues, the second analysis results describing suggestions for fixing compatibility issues, the third analysis results indicating the compatibility report for updating the target application based on the first code content, and the fourth analysis results indicating the compatibility risks of updating the target application based on the first code content. The specific results can be adjusted according to the actual situation and are not limited here.
[0047] It should be noted that there are multiple methods for compatibility analysis. For example, a compatibility knowledge graph and the content of the differing code can be input into an intelligent model. The intelligent model, based on the compatibility knowledge graph, performs compatibility analysis on the first component contained in the differing code content, obtaining the compatibility analysis results for the first code content. Here, the intelligent model is a large language model belonging to the vertical domain of application compatibility. Another example is a pre-set model obtained by fine-tuning training using compatibility knowledge corpus as training samples. This pre-set model, based on the compatibility knowledge graph, performs compatibility analysis on the first component contained in the differing code content, obtaining the compatibility analysis results for the first code content.
[0048] When the compatibility analysis results include a first analysis result used to describe compatibility issues, the process of performing compatibility analysis on the first component contained in the divisible code content based on the compatibility knowledge graph to obtain compatibility analysis results for the first code content may include: identifying the target component identifier of the first component contained in the divisible code content and the change content associated with the first component; determining the target compatibility information matching each target component identifier from the compatibility knowledge graph; and performing compatibility issue analysis based on the change content associated with the first component and the target compatibility information to obtain the first analysis result, wherein the first analysis result is used to describe the compatibility issues existing when the target application is updated based on the first code content.
[0049] Here, the first component refers to the component contained in the differing code content. In other words, the first component refers to the component where the first code content and the second code content differ in code content.
[0050] Here, the target component identifier refers to the component identifier of the first component. The changed content refers to the code content corresponding to the first component within the first code content. For example, in the first component... In the case of components, the changes can be... The component's fadeduration property, and the specific changes made to that property.
[0051] Among them, target compatibility information refers to the compatibility information in the compatibility knowledge graph that matches the component identifier of the first component.
[0052] Specifically, a large-scale model can be used to identify the target component identifier of the first component contained in the difference code content, as well as the change content associated with the first component; the large-scale model can be used to determine the target compatibility information matching each target component identifier from the compatibility knowledge graph; and the large-scale model can be used to perform compatibility problem analysis based on the change content associated with the first component and the target compatibility information, to obtain the first analysis result. The process of analyzing compatibility issues based on the changes associated with the first component and the target compatibility information to obtain the first analysis result may include: for each first component, if there is first compatibility information indicating a compatibility anomaly in the target compatibility information that matches the target component identifier of the first component, the first component is determined to be a second component with a compatibility problem; based on the compatibility anomaly indicated by the first compatibility information, the target compatibility problem existing when updating the target application based on the changes of the second component is determined; based on the second component and the target compatibility problem existing in the second component, the first analysis result is obtained.
[0053] The first compatibility information refers to the compatibility information in the target compatibility information that indicates a compatibility anomaly. The second component refers to the first component that has a compatibility problem. The number of second components may be one or more. The target compatibility information refers to the compatibility problem corresponding to the compatibility anomaly indicated by the first compatibility information. For example, the first component is... The component has been changed to include the following: The component's facade attribute, when matched with the target component identifier of the first component, contains the first compatibility information indicating a compatibility anomaly: "Android 6.0 and below are not supported." The component can be considered a second component, and the target compatibility issue is " The component's fadeduration attribute is not supported in Android 6.0 and below.
[0054] If the target compatibility information matching the target component identifier of the first component does not contain any first compatibility information indicating compatibility anomalies, and all of it contains second compatibility information indicating normal compatibility, then it is determined that there are no compatibility issues when updating the target application based on the changes to the first component. Here, the second compatibility information refers to the compatibility information in the target compatibility information that indicates normal compatibility.
[0055] The process of obtaining the first analysis result based on the second component and the target compatibility issues existing in the second component may include: determining the target application environment in which the compatibility issues of the second component occur based on the target compatibility issues existing in the second component. For example, the target compatibility issue is " The component's fadeduration attribute does not support Android 6.0 and below, and the target application environment is Android 6.0 and below. Based on the second component, the target compatibility issues of the second component, and the target application environment where the target compatibility issues occur, the first analysis result is obtained.
[0056] Therefore, the first analysis results also include the target application environment where compatibility issues occur.
[0057] In some embodiments, the above-described compatibility analysis method may further include: determining the compatibility risk value of each compatibility issue included in the first analysis result. The compatibility risk value can be used to assess the risk of the compatibility issue, and its representation includes, but is not limited to, risk level, risk score, etc. For example, the compatibility risk value of a compatibility issue indicates that the risk level of the compatibility issue is severe risk, medium risk, general risk, or slight risk. As another example, if the upper limit of the risk score is 100, the compatibility risk value of a compatibility issue indicates that the risk score of the compatibility issue is 1 point, or 10 points, or 55 points, etc., not exceeding 100.
[0058] There are multiple ways to determine the compatibility risk values of each compatibility issue included in the first analysis results, and the specific methods can be adjusted according to the actual situation. No restrictions are imposed here.
[0059] For example, the first analysis result described above also includes the severity of the compatibility issue in the target application environment. The process of determining the compatibility risk value of each compatibility issue included in the first analysis result may include: determining the compatibility risk value of the compatibility issue based on its severity in the target application environment. For example, the compatibility risk value of the compatibility issue may be determined based on the correspondence between a preset problem severity and a preset compatibility risk value, and the severity of the compatibility issue in the target application environment.
[0060] For example, the process of determining the compatibility risk value of each compatibility issue included in the first analysis results may include: obtaining the percentage of users in the target application environment where each compatibility issue occurs, where the percentage of users is the ratio between the number of users using the target application in the target application environment and the total number of users using the target application; for each second component, determining the compatibility risk value of the target compatibility issue in the target application environment based on the importance of the changes to the second component, the percentage of users in the target application environment where the target compatibility issue occurs, and the severity of the target compatibility issue in the target application environment. For example, determining the support status of each component in the target environment and labeling it as "Supported - Risk 1", "Not Supported - Risk 5", or "Requires Prefix - Risk 3". The compatibility risk value can be calculated using the following weighted formula: Compatibility Risk Value = (1 - Percentage of Supporting Users) × Importance of Changes to the Second Component × Severity of Issue. Wherein, the percentage of supporting users comes from the percentage of users in the target application environment where the compatibility issue occurs. The importance of the changes to the second component can be labeled by the development team (1-5 points), and the severity of the issue can be based on historical data (e.g., 5 points for causing a crash, 3 points for display anomalies). Risk classification: Based on risk value, it is divided into three levels: high risk (>0.7), medium risk (0.3-0.7), and low risk (<0.3).
[0061] In some embodiments, the above compatibility analysis results include a second analysis result for describing recommendations to fix compatibility issues.
[0062] The second analysis result includes remediation recommendations for addressing compatibility issues.
[0063] Based on this, the above compatibility analysis method further includes: obtaining at least one object with repair needs, and the object characteristics of the object; generating repair suggestions that conform to the object characteristics and are used to repair the compatibility issues for each compatibility issue in the first analysis result; and forming a second analysis result for the object based on each repair suggestion that conforms to the same object characteristics.
[0064] Here, "object" refers to the object that participates in the development process of the target application. It may include, but is not limited to, the first object that instructs the developers, the second object that instructs the testers, and the third object that instructs the product personnel. The specific objects can be adjusted according to the actual situation and are not restricted here.
[0065] The object characteristics are used to characterize the personalized features of the object in fixing compatibility issues. These characteristics can be adjusted according to the actual situation and are not limited here. For example, for the first object instructing developers, they prefer to see alternative implementation solutions (which may include specific implementation code) for fixing compatibility issues at the development level. Its object characteristics are used to characterize the provision of development-level and / or alternative implementation solutions. As another example, for the second object instructing testers, they prefer to see recommendations for key tests. Its object characteristics are used to describe the key test content.
[0066] Based on this, the aforementioned compatibility analysis method also includes: using a large model, for each compatibility issue, generating corresponding remediation suggestions at at least one object dimension based on the risk level and issue type of the compatibility issue. For example, generating alternative implementation solutions at the development level (i.e., the developer's dimension), generating key testing suggestions at the testing level (i.e., the tester's dimension), and generating feature trade-off suggestions at the product level (i.e., the product personnel's dimension).
[0067] In one embodiment, the compatibility analysis method further includes: obtaining suggestion generation instructions; and generating target suggestions based on the suggestion generation instructions using a large model, taking into account the compatibility issues existing in each change, the compatibility risk level of the compatibility issues, and the issue type to which the compatibility issues belong. The suggestion generation instructions are directed to at least one target audience. Target audiences include, but are not limited to, developers and testers.
[0068] Based on this, the process of generating target recommendations using a large model, based on recommendation generation instructions, and according to the compatibility issues, compatibility risk levels, and problem types of each change, can include: using a large model, based on recommendation generation instructions and the object characteristics of each recommendation object, and utilizing the compatibility issues and compatibility risk levels of each change, generating target recommendations for each recommendation object.
[0069] Based on this, the above compatibility analysis method also includes: pushing target suggestions to each suggested object.
[0070] In one embodiment, the above-mentioned compatibility analysis method further includes: obtaining output indication instructions, wherein the output indication instructions are used to indicate the type of output data and the data format of each output data; using a large model, based on the output indication instructions, and utilizing the compatibility problem analysis results, determining the target output data, and adjusting the format of the target output data to the corresponding data format.
[0071] The solution adopted in this application embodiment can obtain the first code content submitted for the target application in response to a code submission event; determine the difference code content between the first code content and the current second code content of the target application; obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information being used to describe the compatibility between the corresponding component and each application environment; and perform compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in which it resides during the code submission stage, the compatibility analysis process is brought forward, thereby improving application development efficiency.
[0072] To facilitate understanding of the compatibility analysis method in this application, a specific embodiment is provided below for explanation.
[0073] Its specific process can be as follows: Figure 3 As shown, by taking code submissions as the starting point and using a large model to intelligently analyze code changes, combined with multi-source compatibility data and application user profiles, automatic early warning of client compatibility risks is achieved in the early stages of development. The system monitors code repository commit events, extracts code differences between feature branches and the baseline branch, and uses the large model to identify newly added or modified features (such as CSS properties and API calls). Combining factors such as the user percentage in the target environment, feature usage frequency, and issue severity, a weighted algorithm is used to calculate a risk score, categorizing it into high, medium, and low levels. For different risk levels and issue types, alternative implementation solutions are generated at the development level, key testing suggestions at the testing level, and feature trade-off suggestions at the product level. By integrating with code review tools, development IDEs, or instant messaging tools, warning information and suggestions are pushed to relevant roles.
[0074] The process of using a large model to identify newly added or modified features may include: building a large model agent; analyzing code differences using code variations and existing knowledge bases (searching relevant knowledge bases based on code change differences and returning associated knowledge); and helping the large model identify newly added CSS features, JavaScript APIs, and native mobile functions. The model output is then parsed into structured JSON, containing feature type, scope of impact, and compatibility information.
[0075] For example, the workflow for a large model is as follows: Step 1: Perform code difference analysis. The input to the large model is the code changes; the processing involves analyzing the code differences and extracting key features; the output is a list of changed features (i.e., the first component list).
[0076] Step 2: Perform a knowledge base search. The input to the large model is the change feature; the large model's processing involves searching the compatibility knowledge base (a vectorized database) based on the feature. The output of the large model is relevant compatibility information and historical cases.
[0077] Step 3: Identify compatibility issues. The input to the large model consists of code changes and compatibility knowledge. The large model's processing involves identifying potential compatibility issues. The output of the large model is the issue identification results and risk assessment.
[0078] Step 4: Output the results in a structured format. The input to the large model is the problem identification result, the processing of the large model is to generate a structured JSON format, and the output of the large model is a complete report containing feature type, scope of impact, and compatibility information.
[0079] For example, the following embodiments can be referred to to understand the working process of the large model.
[0080] The instructions for inputting the large model include: "As a technical expert, please analyze this technical code change. The code change is as follows: ****; The compatibility knowledge involved in the current code change is as follows: ****; The historical knowledge involved is as follows: ****; The risk assessment rules are as follows: ****. Based on the risk rules, please return and analyze the risks and causes of the problems brought about by this code change as test suggestions."
[0081] Its output can include specific development and testing recommendations. Development recommendations refer to retrieving alternative implementations from a compatibility database for incompatible features. For example, for environments that do not support CSS grid, the flexbox alternative is recommended, and code examples are provided. Testing recommendations generate testing priorities based on risk level and feature type. High-risk features are recommended to be tested in all target environments, medium-risk features can be tested by sampling, and low-risk features can omit dedicated testing.
[0082] This approach moves compatibility issue detection from the testing phase to the code submission phase, reducing repair costs. Through multi-source data aggregation and large-scale model analysis, it addresses the shortcomings of traditional solutions in supporting long-tail environments and new features, improving the coverage of compatibility issue identification. Risk assessment based on user distribution data enables the team to prioritize issues with a wide impact, improving resource allocation efficiency. (Personalized suggestions are provided for different roles, reducing manual decision-making costs and improving the efficiency of issue remediation. Automated analysis tools are provided for the code submission process without disrupting existing development workflows, increasing team acceptance.)
[0083] Taking a code submission for a React Native application as an example, the system workflow is explained in detail: (1) The developer submitted code and modified it. The component's fadeduration property.
[0084] (2) The WebHook of the code repository triggers the commit hook service to extract code differences.
[0085] (3) The code analysis engine calls the RN feature recognition plugin to identify the use of the fadeduration attribute and determine its application scenario.
[0086] (4) The data aggregation service queries the compatibility database (i.e., the compatibility knowledge graph) and finds that this attribute is not supported in Android 6.0 and below.
[0087] (5) The risk assessment engine combined the user distribution data of the application (3% of users are Android 6.0 and below) and calculated the risk value to be 0.65 (medium risk).
[0088] (6) Suggested module generation development suggestion: "Use custom fade-in animation instead of fadeduration attribute in Android 6.0 and below", and provide code example.
[0089] (7) The early warning push service adds a compatibility check report to the GitLab MR page and pushes a risk warning to the development team's WeChat.
[0090] (8) The developer modifies the code according to the suggestion, and after resubmitting, the system re-analyzes and the risk is eliminated.
[0091] In this way, compatibility issue detection can be moved from the testing phase to the code submission phase, allowing for early problem detection and cost reduction. Secondly, by aggregating multi-source data and analyzing large models, the limitations of traditional solutions in supporting long-tail environments and new features are addressed, improving the coverage of compatibility issue identification. Risk assessment based on user distribution data (user percentage) allows for prioritizing issues with a wide impact, quantifying risk assessment, and improving resource allocation efficiency. Simultaneously, personalized suggestions are provided for different stakeholders, reducing manual decision-making costs and improving problem-solving efficiency. These solutions can be configured in automated analysis tools during the code submission process without disrupting the existing development workflow, achieving seamless integration into the development process.
[0092] This embodiment also provides a compatibility analysis device, which can be integrated into a terminal device. For example, such as Figure 4 As shown, the compatibility analysis device may include: Content acquisition module 201 is used to acquire the first code content submitted for the target application in response to a code submission event; The difference extraction module 202 is used to determine the difference code content between the first code content and the current second code content of the target application; The graph acquisition module 203 is used to acquire a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier. The compatibility information is used to describe the compatibility between the corresponding component and each application environment. Analysis module 204 is used to perform compatibility analysis on the first component contained in the differing code content based on the compatibility knowledge graph, and obtain the compatibility analysis results for the first code content.
[0093] In one embodiment, the above compatibility analysis results include a first analysis result used to describe the compatibility problem.
[0094] Based on this, the aforementioned analysis module 204, using a compatibility knowledge graph, performs compatibility analysis on the first component contained in the differing code content, obtaining compatibility analysis results for the first code content, including: The identification unit is used to identify the target component identifier of the first component contained in the difference code content, as well as the change content associated with the first component; The information determination unit is used to determine the target compatibility information that matches the identifier of each target component from the compatibility knowledge graph; The analysis unit is used to perform compatibility problem analysis based on the changes associated with the first component and the target compatibility information, and obtain a first analysis result. The first analysis result is used to describe the compatibility problems that exist when the target application is updated based on the first code content.
[0095] In some embodiments, the analysis unit performs compatibility problem analysis based on the changes associated with the first component and the target compatibility information to obtain a first analysis result, including: The component determination subunit is used to determine, for each first component, if there is first compatibility information indicating a compatibility anomaly in the target compatibility information that matches the target component identifier of the first component, that the first component is a second component with a compatibility problem; The problem determination subunit is used to determine the target compatibility problem that exists when the target application is updated based on the changes in the second component, based on the compatibility anomaly indicated by the first compatibility information. The result determines the sub-unit, which is used to obtain the first analysis result based on the second component and the target compatibility issues existing in the second component.
[0096] In some embodiments, the first analysis result above also includes: the target application environment in which the compatibility problem occurs, and the severity of the compatibility problem in the target application environment.
[0097] Based on this, the aforementioned compatibility analysis device also includes: The percentage acquisition unit is used to obtain the percentage of users in the target application environment where various compatibility issues occur. The user percentage refers to the ratio of the number of users using the target application in the target application environment to the total number of users using the target application. The risk assessment unit is used to determine the compatibility risk value of each second component based on the importance of the changes to the second component, the percentage of users in the target application environment where the target compatibility issue occurs, and the severity of the target compatibility issue in the target application environment.
[0098] In some embodiments, the above compatibility analysis results include a second analysis result for describing recommendations to fix compatibility issues.
[0099] Based on this, the aforementioned compatibility analysis device also includes: The feature acquisition unit is used to acquire at least one object with repair requirements, and the object features of the object; The suggestion generation unit is used to generate repair suggestions that conform to the object characteristics and are used to fix the compatibility issues in the first analysis results. The result generation unit is used to generate a second analysis result for the object based on various repair suggestions that conform to the same object characteristics.
[0100] In some embodiments, the analysis module 204, based on a compatibility knowledge graph, performs compatibility analysis on the first component contained in the differing code content to obtain compatibility analysis results for the first code content, including: The input unit is used to input the compatibility knowledge graph and difference code content into the intelligent model; The analysis unit is used to perform compatibility analysis on the first component contained in the differing code content through an intelligent model based on a compatibility knowledge graph, and obtain the compatibility analysis results for the first code content.
[0101] In some embodiments, the process of generating the above-mentioned compatibility knowledge graph includes: The first acquisition unit is used to acquire a first compatibility analysis record for the target application, wherein the first compatibility analysis record includes component identifiers of the components contained in the target application, and compatibility information corresponding to the components indicated by each component identifier; The first construction unit of the graph is used to construct an initial compatibility knowledge graph based on the component identifiers and compatibility information in the first compatibility analysis record; The second acquisition unit is used to acquire a second compatibility analysis record that is different from at least one data source of the target application. The second compatibility analysis record includes component identifiers of the components contained in the data source, and compatibility information corresponding to the components indicated by each component identifier. The second construction unit of the graph is used to update the initial compatibility knowledge graph based on the component identifiers and compatibility information in the second compatibility analysis record, so as to obtain the compatibility knowledge graph.
[0102] The solution adopted in this application embodiment can be implemented by the content acquisition module 201 responding to a code submission event to acquire the first code content submitted for the target application; the difference extraction module 202 determines the difference code content between the first code content and the current second code content of the target application; the graph acquisition module 203 acquires a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, and the compatibility information is used to describe the compatibility between the corresponding component and each application environment; the analysis module 204 performs compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in the code submission stage, the compatibility analysis process is brought forward to improve application development efficiency.
[0103] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.
[0104] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0105] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 302, and by calling data stored in the memory 302, it executes various functions and processes data of the electronic device 300, thereby providing overall monitoring of the electronic device 300. The processor 301 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0106] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions, such as: In response to a code commit event, retrieve the first code content committed for the target application; Determine the differences between the first code content and the target application's current second code content; Obtain a compatibility knowledge graph, which includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier. The compatibility information is used to describe the compatibility between the corresponding component and each application environment. Based on the compatibility knowledge graph, a compatibility analysis is performed on the first component contained in the differing code content to obtain the compatibility analysis results for the first code content.
[0107] The electronic device provided in this application embodiment can, in response to a code submission event, obtain first code content submitted for a target application; determine the difference between the first code content and the current second code content of the target application; obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information being used to describe the compatibility between the corresponding component and each application environment; and perform compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in which it resides during the code submission stage, the compatibility analysis process is brought forward, thereby improving application development efficiency.
[0108] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0109] Optional, such as Figure 5As shown, the electronic device 300 also includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0110] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0111] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0112] Audio circuitry 305 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and then processed by processor 301 before being transmitted via radio frequency circuitry 304 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.
[0113] The input unit 306 can be used to receive source audio, reference audio, etc.
[0114] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0115] although Figure 5 As not shown in the diagram, the electronic device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0116] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0117] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0118] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the compatibility analysis methods provided in embodiments of this application. The computer program can perform the following steps of the compatibility analysis method: In response to a code commit event, retrieve the first code content committed for the target application; Determine the differences between the first code content and the target application's current second code content; Obtain a compatibility knowledge graph, which includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier. The compatibility information is used to describe the compatibility between the corresponding component and each application environment. Based on the compatibility knowledge graph, a compatibility analysis is performed on the first component contained in the differing code content to obtain the compatibility analysis results for the first code content.
[0119] Using the computer-readable storage medium provided in the embodiments of this application, in response to a code submission event, the system can obtain first code content submitted for a target application; determine the difference between the first code content and the current second code content of the target application; obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to the component indicated by each component identifier, the compatibility information being used to describe the compatibility between the corresponding component and each application environment; and perform compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content. Thus, by analyzing the compatibility between the submitted code content and the application environment of the application in which it resides during the code submission stage, the compatibility analysis process is brought forward, thereby improving application development efficiency.
[0120] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0121] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0122] Since the computer program stored in the computer-readable storage medium can execute any of the compatibility analysis methods provided in the embodiments of this application, the beneficial effects that any of the compatibility analysis methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0123] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0124] In the above embodiments of the compatibility analysis device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the compatibility analysis device, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the compatibility analysis method in the above embodiments, and will not be repeated here.
[0125] The foregoing has provided a detailed description of a compatibility analysis method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A compatibility analysis method, characterized by, The method comprises: in response to a code submission event, obtaining first code content submitted for a target application; determining difference code content between the first code content and second code content of the target application at present; obtaining a compatibility knowledge graph, wherein the compatibility knowledge graph comprises at least one component identifier, and compatibility information corresponding to components indicated by each component identifier, and the compatibility information is used to describe compatibility between the corresponding components and each application environment; based on the compatibility knowledge graph, performing compatibility analysis on a first component contained in the difference code content to obtain a compatibility analysis result for the first code content.
2. The compatibility analysis method of claim 1, wherein, The compatibility analysis result comprises a first analysis result for describing compatibility problems; the compatibility analysis on the first component contained in the difference code content based on the compatibility knowledge graph to obtain the compatibility analysis result for the first code content comprises: identifying target component identifiers of the first component contained in the difference code content and change content associated with the first component; determining target compatibility information matched with each target component identifier from the compatibility knowledge graph; based on the change content associated with the first component and the target compatibility information, performing compatibility problem analysis to obtain the first analysis result, wherein the first analysis result is used to describe compatibility problems existing in the case of updating the target application based on the first code content.
3. The compatibility analysis method of claim 2, wherein, The compatibility problem analysis based on the change content associated with the first component and the target compatibility information to obtain the first analysis result comprises: for each first component, if there is first compatibility information indicating compatibility exceptions in the target compatibility information matched with the target component identifier of the first component, determining that the first component is a second component with compatibility problems; based on the compatibility exceptions indicated by the first compatibility information, determining target compatibility problems existing in the case of updating the target application based on the change content of the second component; obtaining the first analysis result according to the second component and the target compatibility problems existing in the second component.
4. The compatibility analysis method of claim 3, wherein, The first analysis result further comprises target application environments with compatibility problems and problem severity of the compatibility problems in the target application environments; the method further comprises: obtaining a user proportion in the target application environment with each compatibility problem, wherein the user proportion is a ratio between the number of users using the target application in the target application environment and the total number of users using the target application; for each second component, based on the importance of the change content of the second component, the user proportion in the target application environment with the target compatibility problem, and the problem severity of the target compatibility problem in the target application environment, determining a compatibility risk value of the target compatibility problem in the target application environment.
5. The compatibility analysis method of claim 2, wherein, The compatibility analysis result includes a second analysis result for describing a suggestion for fixing the compatibility problem, and the method further includes: obtaining at least one object with a fixing requirement and object characteristics of the object; generating a fixing suggestion for fixing each of the compatibility problems in the first analysis result and conforming to the object characteristics; forming the second analysis result for the object according to each of the fixing suggestions conforming to the same object characteristics.
6. The compatibility analysis method according to any one of claims 1 to 5, characterized in that, The compatibility knowledge graph is used to perform compatibility analysis on the first component included in the difference code content, to obtain a compatibility analysis result for the first code content, including: inputting the compatibility knowledge graph and the difference code content into an intelligent model; performing compatibility analysis on the first component included in the difference code content based on the compatibility knowledge graph through the intelligent model, to obtain a compatibility analysis result for the first code content.
7. The compatibility analysis method according to any one of claims 1 to 5, characterized in that, The generation process of the compatibility knowledge graph includes: obtaining a first compatibility analysis record for the target application, wherein the first compatibility analysis record includes component identifiers of components included in the target application, and compatibility information corresponding to each of the components indicated by the component identifiers; constructing an initial compatibility knowledge graph based on the component identifiers and the compatibility information in the first compatibility analysis record; obtaining a second compatibility analysis record of at least one data source different from the target application, wherein the second compatibility analysis record includes component identifiers of components included in the data source, and compatibility information corresponding to each of the components indicated by the component identifiers; updating the initial compatibility knowledge graph based on the component identifiers and the compatibility information in the second compatibility analysis record, to obtain the compatibility knowledge graph.
8. A compatibility analysis apparatus characterized by comprising: The device includes: a content acquisition module configured to obtain first code content submitted for a target application in response to a code submission event; a difference extraction module configured to determine difference code content between the first code content and second code content of the target application at present; a graph acquisition module configured to obtain a compatibility knowledge graph, wherein the compatibility knowledge graph includes at least one component identifier and compatibility information corresponding to each of the components indicated by the component identifier, and the compatibility information is used to describe compatibility between the corresponding component and each application environment; an analysis module configured to perform compatibility analysis on a first component included in the difference code content based on the compatibility knowledge graph, to obtain a compatibility analysis result for the first code content.
9. An electronic device, comprising: It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the compatibility analysis method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It includes a computer program, and when the computer program runs on an electronic device, the computer program is used to make the electronic device execute the steps of the compatibility analysis method in any one of claims 1-7.