Application direction adaptation optimization method and related apparatus, device and medium
By using automated scene-driven and atlas comparison, application orientation adaptation defects are identified and repaired, solving the bottleneck of manual maintenance of third-party applications on large-screen landscape terminals and achieving efficient orientation adaptation optimization.
Patent Information
- Application Number
- CN202611166719.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-11-20
AI Technical Summary
In existing technologies, third-party applications face orientation adaptation issues on large-screen landscape terminals, making it difficult to improve efficiency and quality. In particular, the reliance on manually maintained configuration files creates bottlenecks in efficiency and quality.
By using automated scenario-driven methods, the system identifies interface screenshots and underlying system records, identifies defect types, writes candidate patches into configuration files, and combines the comparison of images before and after the upgrade to determine the adaptation strategy and achieve automatic closed-loop optimization.
It improves the efficiency and quality of application direction adaptation and optimization, reduces manual intervention, and enhances the automation and accuracy of the adaptation process.
Smart Images

Figure CN123137702A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of application technology, and in particular to an application orientation adaptation and optimization method and related apparatus, devices and media. Background Technology
[0002] Application orientation compatibility issues are common in terminal devices. Taking large-screen landscape terminals such as learning machines as an example, third-party applications that are designed primarily for portrait mode (such as education, office, and reading applications) have orientation compatibility problems on large-screen landscape terminals. These problems include: black bars on the left and right sides of the large screen due to forced portrait mode, page misalignment / stretching / white screen / crash after switching between landscape and portrait modes, abnormal camera preview orientation during landscape / portrait rotation, and abnormal orientation after jumping to subpages.
[0003] Currently, most vendors introduce a "global orientation adaptation framework" into their underlying systems (e.g., Android). This framework describes the adaptation strategy for each third-party application through configuration files such as external JSON files. Hooks are injected into the orientation decision paths of UI components (e.g., Activities) management services, such as AMS (Activity Manager Service), to intercept and hijack the application's original orientation requests at runtime. However, these configuration files typically require continuous maintenance as the third-party application ecosystem evolves, relying entirely on manual intervention, resulting in significant bottlenecks in both efficiency and quality. Therefore, improving the efficiency and quality of application orientation adaptation optimization has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide an application orientation adaptation optimization method and related devices, equipment, and media, which can improve the efficiency and quality of application orientation adaptation optimization.
[0005] To address the aforementioned technical issues, the first aspect of this application provides an application direction adaptation optimization method, comprising: driving a target application on a target terminal in a target direction to enter a test scenario, obtaining interface screenshots and underlying system recording information; identifying, based on the interface screenshots and recording information, the defect type of the target application in the test scenario and direction adaptation; responding to the existence of a defect type corresponding to the test scenario, indicating a defect, writing a candidate patch adapted to the defect type in a configuration file based on the defect type corresponding to the test scenario, and returning to the step of driving the target application on the target terminal in the target direction to enter the test scenario; responding to the absence of a defect type corresponding to the test scenario, indicating a defect, obtaining a baseline image set of the target application based on an interface screenshot of the test scenario in a defect-free state, and comparing the sample image set collected after the target application is upgraded and driven into the test scenario with the baseline image set to obtain the degradation type of the target application after the upgrade, and determining the adaptation strategy of the target application after the upgrade based on the degradation type of the target application after the upgrade.
[0006] To address the aforementioned technical problems, a second aspect of this application provides an application direction adaptation optimization device, comprising: a driver acquisition module, a defect identification module, a defect repair module, and an upgrade adaptation module. The driver acquisition module is used to drive a target application on a target terminal in the target direction into the test scenario, obtaining interface screenshots and underlying system recording information. The defect identification module is used to identify, based on the interface screenshots and recording information, the defect types of the target application related to direction adaptation in the test scenario. The defect repair module is used to, in response to the presence of a defect type characterized as defective in the test scenario, repair the defect based on the defect type characterized in the test scenario. The defect type is defined in the configuration file, which writes candidate patches that are compatible with the defect type and returns the steps for the target application to enter the test scenario on the target terminal in the target direction. The upgrade adaptation module is used to respond to the defect type characterization that does not exist for the test scenario, which is considered defective. Based on the screenshot of the interface of the test scenario without defects, the baseline image set of the target application is obtained. The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type of the target application after the upgrade. Based on the degradation type of the target application after the upgrade, the adaptation strategy of the target application after the upgrade is determined.
[0007] To address the aforementioned technical problems, a third aspect of this application provides a computer device including a display screen, a memory, and a processor. The display screen and the memory are respectively coupled to the processor. The memory stores at least program instructions, and the processor executes the program instructions to implement the application direction adaptation optimization method described in the first aspect.
[0008] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the application direction adaptation optimization method of the first aspect described above.
[0009] The above scheme drives the target application on the target terminal in the target direction to enter the test scenario, obtains interface screenshots and underlying system records, and then identifies the defect types of the target application related to the test scenario and direction adaptation based on the interface screenshots and records. In response to the presence of a defect type corresponding to the test scenario, it is characterized as defective. Based on the defect type corresponding to the test scenario, candidate patches adapted to the defect type are written into the configuration file, and the process returns to the step of driving the target application on the target terminal in the target direction to enter the test scenario. In response to the absence of a defect type corresponding to the test scenario, it is characterized as defective. Based on the interface screenshot of the test scenario without defects, a baseline image set of the target application is obtained. The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type of the target application after the upgrade. By identifying the degradation type and determining the adaptation strategy for the target application after the upgrade, this process, using the target application as input, and employing an automated, scenario-driven approach with core processes including defect identification, writing candidate patches, closed-loop deployment, and re-verification, upgrades the adaptation process from a "developer-driven, manual open-loop" to an "automatic closed-loop process driven by scenarios, visual identification, and post-patch verification." This improves the efficiency and quality of application-oriented adaptation optimization. Furthermore, after the target application upgrades, comparing the baseline image set from successful adaptation before the upgrade with the sample image set after the upgrade determines its degradation type, and based on this, the adaptation strategy for the target application after the upgrade is determined. The baseline image set from successful adaptation before the upgrade serves as a visual gold standard, enabling proactive awareness of the target application upgrade, degradation type awareness, and re-adaptation after the upgrade, further improving the efficiency and quality of application-oriented adaptation optimization after the upgrade. Therefore, this approach enhances the efficiency and quality of application-oriented adaptation optimization. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating an embodiment of the application direction adaptation and optimization method of this application; Figure 2 This is a schematic diagram of a process of an embodiment of the application direction adaptation optimization method of this application; Figure 3a This is a schematic diagram of an embodiment of the granularity adaptive bidirectional state machine of this application; Figure 3b This is a schematic diagram of an embodiment of the shared application cluster configuration propagation in this application; Figure 4This is a schematic diagram of the framework of an embodiment of the application direction adaptation and optimization device of this application; Figure 5 This is a schematic diagram of the framework of an embodiment of the computer device of this application; Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0011] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0012] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0013] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the slash " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper indicates two or more objects.
[0014] Please refer to the following: Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating an embodiment of the application direction adaptation optimization method of this application. Figure 2 This is a schematic diagram illustrating a process of an embodiment of the application direction adaptation optimization method of this application. It should be noted that the process operations in this embodiment can be executed by an electronic device with computing capabilities or related equipment containing electronic devices. For example, the process operations in this embodiment can be executed by a terminal device (e.g., a mobile phone, tablet computer, learning machine, etc.). The specific structure and type of the electronic device and related equipment containing electronic devices are not limited here. Specifically, the embodiments of this disclosure may include the following steps: Step S11: Drive the target application on the target terminal in the target direction to enter the scene to be tested, and obtain the interface screenshot and the recorded information of the underlying system.
[0015] In one implementation scenario, taking a large-screen landscape terminal such as a learning machine as an example, the target orientation can be landscape. Of course, in practical applications, this is not the only possibility. In other application scenarios, the target orientation can also be portrait, such as with portrait terminals like e-book readers. It should be noted that the above examples are merely a few possible examples of target orientation and target terminal in practical applications; no limitations are imposed on target orientation and target terminal here, nor will all examples be provided.
[0016] In one implementation scenario, taking the Android system as an example, the target application can be automatically installed using ADB (Android Debug Bridge), UI (User Interface) Automator, and Accessibility services. It's important to note that in the Android system, ADB, UI Automator, and Accessibility services are three different layers of tools or frameworks used for different purposes. ADB acts as a "debugging bridge" connecting the host (e.g., a computer) and the Android terminal, providing low-level command support for development and testing. UI Automator is an automated testing framework built on top of Accessibility services, specifically designed for writing cross-application UI automated test scripts. Accessibility services are an assistive function framework specifically designed by the Android system to help people with disabilities. For specific implementation details, please refer to the technical details of each of these three systems; they will not be elaborated upon here. Furthermore, in practical applications where the underlying system is not Android, similar functional services in other systems can also be used to automatically install the target application; these will not be listed here either.
[0017] In one implementation scenario, as a possible approach, the scenario to be tested may belong to a predefined set of scenarios. This predefined set of scenarios may include at least one of the following scenarios: homepage, login, camera subpage, after switching between portrait and landscape modes, after restarting, and function pages. Of course, the above examples are merely one possible instance of a predefined set of scenarios; the specific type of the scenario to be tested is not limited here, nor will it be listed in detail.
[0018] In another implementation scenario, as another possible approach, the scenario to be tested can also be obtained by an artificial intelligence model detecting the target application. For example, the AI model can perform visual crawling on the target application to discover new scenarios for the target application, which can then be used as the scenario to be tested, allowing the coverage of the scenario to be tested to continuously evolve.
[0019] In another implementation scenario, as another possible implementation method, the scenario to be tested can first be selected from the aforementioned predefined scenario set (e.g., each scenario in the aforementioned predefined scenario set can be selected as the scenario to be tested), and then the target application can be detected using an artificial intelligence model to discover new scenarios of the target application, and the predefined scenario set can be further expanded using the new scenarios.
[0020] It should be noted that the examples above are only a few possible sources of the scenario under test. Other possible sources of the scenario under test are not limited here, nor will they be listed one by one.
[0021] In an implementation scenario with multiple test scenarios, the target terminal in the target direction can be driven to sequentially enter different test scenarios to obtain interface screenshots and underlying system log information under different test scenarios. For example, the target application can be driven to enter each scenario sequentially according to a predefined scenario set S={s1,s2,…,sm} (i.e., each is a test scenario, such as: homepage, login page, camera subpage, after switching between portrait and landscape modes, after restarting, function pages, etc.), and interface screenshots can be collected in each scenario. At the same time, the underlying system log information can be captured. It should be noted that s1, s2,…,sm represent different scenarios.
[0022] In one implementation scenario, taking the Android system as an example, the information logged by the underlying system may include, but is not limited to, dumpsys window, dumpsys activity, logcat, etc. The specific information logged by the underlying system is not limited here, nor will it be listed in detail. It should be noted that in the Android system, dumpsys window represents dumping the current internal state of WindowManagerService (WMS), such as viewing the hierarchy of all current windows, the focused window, screen resolution, window animation information, etc.; dumpsys activity represents dumping the current internal state of ActivityManagerService (AMS), such as viewing the back stack, process list, memory status, and recent tasks of all Activities in the current system; logcat outputs and records debug logs of the system kernel, various services, and the application layer in real time. Of course, the above examples are only a few possible examples of the information logged by the underlying system. Other possible scenarios are not limited here (e.g., it may also include the fully qualified name of the UI component corresponding to the scene under test, the package name of the target application, the scene label representing the scene under test, the device orientation representing the target direction, etc.), and will not be listed in detail here either.
[0023] Step S12: Based on the screenshots and recorded information, identify the defect types of the target application in the test scenario and direction adaptation.
[0024] In one implementation scenario, as a possible approach, a defect detection model can be pre-trained. This can be achieved by acquiring screenshots of the sample application's interface when a defect is triggered in the sample scenario, as well as sample record information from the underlying system. This data forms the sample training data, which includes both the screenshots and the record information, and is labeled with the defect type. Based on this, the defect detection model can be used to detect the screenshots and record information to obtain the predicted defect type related to the sample application's location and orientation. The model parameters are then adjusted based on the difference between the sample defect type and the predicted defect type. After training the defect detection model, it can be used to identify the defect type of the target application in the tested scenario and its location. It should be noted that the defect detection model can include, but is not limited to, convolutional neural networks; the model architecture is not specified here.
[0025] In another implementation scenario, as another possible approach, a large model instruction can be constructed based on screenshots and recorded information. This instruction instructs the multimodal large model to refer to the screenshots of the target application's interface in the test scenario and the recorded information of the underlying system to determine the defect type of the target application in the test scenario. As a possible example, to facilitate defect determination by the multimodal large model, several defect types can be specified in the large model instruction (e.g., no defect, overflowing pop-up window in landscape mode, UI stretching or misalignment, incorrect landscape / portrait orientation, blank screen and inability to load, crash after landscape / portrait rotation, abnormal camera preview orientation, failed subpage navigation, others, etc.). The multimodal large model can then select one or more of these as the defect type of the target application in the test scenario. Based on this, the defect type of the target application related to orientation adaptation in the test scenario can be obtained from the output of the multimodal large model's response to the large model instruction. It should be noted that a multimodal large model can be an open-source large model, or it can be obtained by fine-tuning the parameters of an open-source large model on a specific training set (such as the sample training data constructed above), or it can be a custom large model. Here, the specific source of the multimodal large model is not limited, nor will it be listed one by one.
[0026] In one implementation scenario, during defect detection, the system can output not only the defect type but also the defect area in the screenshot that reflects the defect type, and the confidence level of the defect type's existence. The specific content of the detection results is not limited here. As a possible example, when using the aforementioned defect detection model, during training, the sample training data can be labeled with sample defect areas in the screenshot that reflect the sample defect type. Furthermore, when detecting sample screenshots and recorded information, the model can output predicted defect areas in the screenshots that reflect the sample defect type. This allows for further parameter adjustments by considering the difference between the predicted and sample defect areas. Based on this, the model can identify the defect type of the target application in the tested scene and orientation adaptation, the defect area in the screenshot reflecting the defect type, and the predicted probability (i.e., confidence level) of the defect type's existence. For example, the model architecture of the defect detection model can refer to the model architecture of object detection models in the field of computer vision, and is not limited here. As another possible example, when using the aforementioned multimodal large model, the large model command can further instruct the multimodal large model to refer to the screenshot of the target application's interface in the test scenario and the recorded information of the underlying system, predicting the defect area and confidence level of the defect type shown in the screenshot. Based on this, the output results of the multimodal large model responding to the large model command can be used to obtain the defect type related to orientation adaptation of the target application in the test scenario, the defect area in the screenshot showing the defect type, and the confidence level of the presence of the defect type in the screenshot.
[0027] Step S13: In response to the existence of a defect type characterization corresponding to the scenario under test being defective, based on the defect type corresponding to the scenario under test, write a candidate patch adapted to the defect type in the configuration file, and return the step of driving the target application on the target terminal in the target direction to enter the scenario under test.
[0028] In an implementation scenario, if there are still defect types corresponding to the scenario under test that are characterized as defective, candidate patches adapted to the defect type can be written into the configuration file based on the defect type corresponding to the scenario under test. It should be noted that candidate patches adapted to the defect type represent patches that can fix this defect type based on past experience or relevant theories.
[0029] In one implementation scenario, to illustrate writing candidate patches in the configuration file, let's take the Android system as an example again. Each element of the GlobalLandscapeAppConfig array in the external JSON configuration file (e.g., a typical filename could be global_landscape_config.json) can describe the adaptation strategy of a third-party application. Each element can contain, but is not limited to, the following fields: (1) appName: Represents the application package name, or a composite format of "package name / fully qualified Activity name". It should be noted that in the Android system, Activity can be regarded as a UI component, and each test scenario corresponds to a different UI component, such as Activity in the Android system.
[0030] (2) appType: indicates the granularity flag. A value of 0 means it applies to the entire application, and a value of 1 means it applies only to the specified Activity.
[0031] (3) landscapeType: indicates the landscape mode strategy. A value of 0 indicates center display with proportion retention, a value of 1 indicates forced full-screen stretching, and a value of 2 indicates no fit.
[0032] (4) devicerotation: indicates the rotation angle of the device.
[0033] (5) relaunchstatus: indicates whether to restart the Activity when rotating.
[0034] (6) usercustom: indicates whether the user can override the default behavior in the settings.
[0035] (7) autoswitch: indicates whether automatic rotation is allowed.
[0036] Of course, the above example is only one possible example of the relevant fields in the configuration file. There are no restrictions on other fields in the configuration file or other configuration files used in other underlying systems, nor will we give examples of them one by one.
[0037] In one implementation scenario, to write candidate patches adapted to defect types into the configuration file, a first mapping relationship between different defect types and patching strategies can be obtained. The patching strategy can include candidate patches sorted by historical success rate. Based on this, for the defect type of the scenario under test, candidate patches can be selected sequentially from the first mapping relationship corresponding to this defect type according to their historical success rate and written into the configuration file; that is, one candidate patch is written and tried each time based on its historical success rate. This method, by obtaining the first mapping relationship between defect types and patching strategies, and then selecting candidate patches sequentially from the first mapping relationship according to their historical success rate and writing them into the configuration file, can improve the success rate of subsequent verification.
[0038] In a specific implementation scenario, the first mapping relationship is obtained by jointly training statistical data on the defect types and patch submissions from different applications during defect fixing. For example, submission data from different applications during defect fixing can be obtained within a statistical period (e.g., November 2023 to May 2026), and tuples (e.g., root_cause text, JSON diff operation set) can be further extracted. Based on the root_cause keyword, multiple types of defects can be clustered (e.g., incorrect screen orientation, camera issues, UI misalignment / stretching, black screen / black border, application crash, white screen, etc.). The frequency of each type of defect on the diff operation set is statistically analyzed, and candidates are ranked according to the success rate. In this way, the first mapping relationship for the corresponding defect type can be obtained.
[0039] In a specific implementation scenario, for ease of explanation, the following example illustrates the first mapping relationship corresponding to several defect types: (1) Horizontal screen centering pop-up overflow: Candidate patch 1 "change the landscapeType field from 0 to 1 (i.e., change to full screen)" and candidate patch 2 "change the landscapeType field from 0 to 2 (i.e., do not fit the bottom)".
[0040] (2) UI stretching or misalignment: Candidate patch 1 "landscapeType field value is 1, and relaunchstatus field value is 2" and candidate patch 2 "landscapeType field value is 0".
[0041] (3) Incorrect screen orientation: Candidate patch 1 "Adjust the devicerotation field", candidate patch 2 "Change the appType field from 0 to 1 (i.e., reduce the granularity)".
[0042] (4) White screen cannot load: Candidate patch 1 "Add complete App-level entry (i.e., application-level entry)" and candidate patch 2 "Add relaunchstatus field with a value of 2".
[0043] (5) Crash after rotation: Candidate patch 1 "relaunchstatus field value is 2", candidate patch 2 "autoswitch field value is false", candidate patch 3 "landscapeType value is 2 (i.e., no intervention at all)".
[0044] (6) Abnormal camera preview orientation: Candidate patch 1 "Add an Activity-level entry (i.e., a component-level entry) for CameraActivity and adjust the devicerotation field.
[0045] (7) Subpage navigation failure: Candidate patch 1 "Split the App-level configuration into multiple Activity-level entries".
[0046] Of course, the above examples are just a few possible examples of the first mapping relationship corresponding to the defect type in actual application. Other possible situations are not limited here, nor will they be listed one by one.
[0047] In a specific implementation scenario, during the process of writing candidate patches to the configuration file, as mentioned earlier, candidate patch 1 (i.e., the candidate patch with the highest historical success rate) can be selected first based on historical success and written to the configuration file. After the candidate patch is written to the configuration file, it can be distributed to the target terminal and the target application can be restarted. This can be done through the MDM (Mobile Device Management) channel or ADB PUSH, and the target application can be restarted. If necessary, the target terminal can also be restarted. Based on this, the steps mentioned above, which drive the target application on the target terminal in the target direction to enter the test scenario, can be returned to, i.e., the aforementioned S11 and S12 are re-executed to re-determine whether there is a defect. If there is no defect, the process can jump to step S14 below. Otherwise, candidate patch 1 can be added to the tried set, and candidate patch 2 (i.e., the candidate patch with the second highest historical success rate) can be selected and written to the configuration file (e.g., to override the writing method of candidate patch 1). The process of distributing the configuration file is then returned to, and this process is repeated until all candidate patches have failed to be tried.
[0048] In one implementation scenario, as mentioned above, if the retry after writing the candidate patch to the configuration file is successful, step S14 can be executed; otherwise, the candidate patch attempt can be considered invalid. As one possible example, the adaptation failure can be directly determined. Alternatively, as another possible example, please refer to [the relevant documentation]. Figure 3a , Figure 3a This is a schematic diagram of an embodiment of the granular adaptive bidirectional state machine of this application. It is also possible to retain old application-level entries and add new component-level entries in the configuration file, or delete old component-level entries and add new application-level entries, based on the application-level and component-level configuration information in the configuration file, and then return to the step of driving the target application on the target terminal in the target direction to enter the test scenario. If the defect type corresponding to the test scenario still indicates a defect, the adaptation failure can be determined. In the above method, when all candidate patches for adapting to the defect type have failed, based on the application-level and component-level configuration information in the configuration file, further attempts are made to retain old application-level entries and add new component-level entries, or delete old component-level entries and add new application-level entries, and then return to the step of driving the target application on the target terminal in the target direction to enter the test scenario. If the defect type corresponding to the test scenario still indicates a defect, the adaptation failure is determined, thus achieving granular adaptation based on the configuration information in the configuration file.
[0049] In a specific implementation scenario, where the application-level configuration information in the configuration file indicates that the configuration file applies to the entire application (e.g., in the Android system, the appType value in the configuration file is 0), the UI components corresponding to the test scenarios for which all candidate patches have failed can be obtained to form a first component set. The old application-level entries are retained in the configuration file, and new component-level entries are added to each UI component in the first component set. It should be noted that a new component-level entry added to any UI component indicates that it applies to that UI component (e.g., in the Android system, a new entry with appType value 1 can be added to the Activity in the configuration file). For example, the first component set can be extracted from the aforementioned test scenarios, containing the Activity class names corresponding to the failed adaptation attempts, such as A = {a1, a2, ..., am}. Then, the app-level entries can be retained as a fallback, and a new entry with appType = 1 can be added to each Activity in A. In the above method, if all candidate patches for the defect type have failed to be tried, and if the configuration information about the application level in the configuration file indicates that the configuration file applies to the entire application, then the interface components corresponding to the test scenarios for which all candidate patches have failed to be tried are obtained to form a first component set. The old application-level entries are retained in the configuration file, and new component-level entries are added to each interface component in the first component set in the configuration file. When splitting downwards, the application-level fallback entries are retained to avoid losing adaptation as much as possible when adding new component-level entries. For ease of description, taking an application from an actual test as an example (appType field value is 0, landscapeType field value is 2), after the above steps S11 and S12, the defect type of the interface component HDIndexActivity corresponding to a certain test scenario can be determined to be "UI stretching". At this time, a candidate patch "landscapeType field adjusted to 1" is written into the configuration file to adapt to it. After distribution, verification is performed again. If the interface component HDIndexActivity passes but other sub-pages degrade, the downward split is triggered again: the application-level entry is retained, and a component-level entry for HDIndexActivity is added, such as the appType field adjusted to 1 and the landscapeType field adjusted to 1. After passing the aforementioned steps S11 and S12 again, the baseline atlas can be archived. In actual testing, if other implementation methods other than the embodiments of this disclosure are used (e.g., manual), it takes 3 days, while using the embodiments of this disclosure only takes about 25 minutes.
[0050] In a specific implementation scenario, if the configuration information for component-level entries in the configuration file indicates that the number of old component-level entries has reached a threshold (e.g., set to 6), and the percentage of the mode of these old component-level entries in a strategy field (e.g., the appType field in Android) has reached a percentage threshold (e.g., 70%), then all old component-level entries can be deleted from the configuration file, and a new application-level entry can be added. The new application-level entry can have its strategy field set to the aforementioned mode. For ease of description, using the Android system as an example, if the number of Activity-level entries in the configuration file reaches a threshold T_prime (e.g., 6), and the percentage of the mode of these entries in a certain strategy field has reached a percentage threshold (e.g., 70%), then all Activity-level entries can be deleted, and a new App-level entry can be added. The strategy field can then be set to the aforementioned mode. The above approach uses the configuration information at the component level in the configuration file to indicate that the number of old entries at the component level has reached a threshold and the proportion of the mode of the values of these old entries at the component level in the strategy field has reached a ratio threshold. An upward merging strategy is adopted, and since upward merging requires the mode proportion to reach a ratio threshold, semantic distortion after merging is avoided as much as possible.
[0051] In a specific implementation scenario, if the adaptation fails, it can be marked as failed and transferred to relevant personnel for processing. Before being transferred to relevant personnel for processing, the last round of interface screenshots and the set of candidate applications that have been tried can be obtained and output to the developers of the target application, etc. There are no restrictions here.
[0052] Step S14: In response to the absence of a defect type characterization corresponding to the test scenario, a baseline image set of the target application is obtained based on the interface screenshot of the test scenario under defect-free conditions. The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type of the target application after the upgrade. Based on the degradation type of the target application after the upgrade, the adaptation strategy of the target application after the upgrade is determined.
[0053] In one implementation scenario, whether it's determined that the target application lacks a defect type representation corresponding to the tested scenario after the first execution of steps S11 and S12 (e.g., the target application's defect type is defect-free in all tested scenarios), or after writing candidate patches (e.g., trying once, trying twice, or trying more than twice), the target application lacks a defect type representation corresponding to the tested scenario, the baseline graph set of the target application can be obtained based on the interface screenshots of the tested scenarios under defect-free conditions (i.e., interface screenshots under defect-free conditions in all tested scenarios). It should be noted that the baseline graph set of the target application can be considered as the visual golden sample set of the target application. For ease of description, the baseline graph set of the target application can be denoted as G(P,C_final), where P represents the target application, and C_final represents the configuration file of the target application under defect-free conditions in all tested scenarios.
[0054] In one implementation scenario, when the target application is upgraded (e.g., versionCode changes), for the upgraded target application, the aforementioned step S11 can be returned to obtain the sample image set collected when the target application is driven into the test scenario after the upgrade, such as the interface screenshots collected when the target application is driven into the test scenario after the upgrade.
[0055] In one implementation scenario, after obtaining the baseline and sample image sets, a comparison can be made between the two to determine the degradation type of the target application after the upgrade. As a possible example, a large model instruction can be constructed based on the sample and baseline image sets. This instruction can instruct the visual large model to compare the sample and baseline image sets and output the degradation type of the target application after the upgrade. Based on this, the degradation type can be obtained from the visual large model's response to the large model instruction's output. It should be noted that, to facilitate the visual large model's determination, various degradation types can be pre-declared in the large model instruction to instruct the visual large model to compare the sample and baseline image sets and determine the degradation type from the pre-declared degradation types based on the comparison results. For example, the pre-declared degradation types may include, but are not limited to: no degradation, requiring re-adaptation, and requiring reverse reversal. "No degradation" indicates that no re-adaptation is needed after the upgrade; "re-adaptation" indicates that the current configuration file is no longer applicable; and "reverse reversal" indicates that the target application has already natively adapted after the upgrade, and the current configuration file is causing interference. In addition, the visual large model can be an open-source large model, or it can be obtained by fine-tuning an open-source large model based on a specific sample dataset, or it can be a custom large model. The specific source of the visual large model is not limited here, nor will examples be given. The above method, by combining a benchmark image set and a sample image set to construct large model instructions, enables the visual large model to determine the degradation type. The benchmark image set serves as a baseline for visual gold samples, which helps improve the convenience of degradation type determination.
[0056] In one implementation scenario, in response to a degradation type indicating a need for reverse reversal, the policy field related to the target direction in the configuration file can be modified to a value indicating incompatibility, and the process returns to the step of driving the target application on the target terminal in the target direction to enter the test scenario. For ease of description, using the Android system as an example, when the degradation type indicates a need for reverse reversal, the `landscapeType` field in the configuration file can be modified to 2 (indicating incompatibility), and the process returns to the aforementioned step S11 for verification. If successful, the application is archived as reversal. This method, by modifying the policy field related to the target direction in the configuration file to a value indicating incompatibility when the degradation type indicates a need for reverse reversal, allows for direct reversal even in cases of over-fitting.
[0057] In one implementation scenario, in response to the degradation type indicating a need for re-adaptation, the process can return to the step of driving the target application on the target terminal in the target direction to enter the test scenario. In other words, when the degradation type indicates a need for re-adaptation, the current configuration file may no longer meet the requirements of the upgraded target application. In this case, the process can directly return to the aforementioned step of driving the target application on the target terminal in the target direction to enter the test scenario (i.e., the aforementioned step S11) to re-adapt.
[0058] In one implementation scenario, the configuration file can be maintained in response to a degradation type characterization of no degradation. That is, when the degradation type characterization is no degradation, the current configuration file can still be used for the upgraded target application, and in this case, the current configuration file can be maintained.
[0059] In one implementation scenario, for ease of description, taking the actual test application "Amblyopia Enhancement Assistant" (com.ruoshizengshi.mapp) as an example, the original Activity-level landscapeType field had a value of 1. After the application launched the native HD version (versionCode upgrade), the newly triggered sample image set was compared with the baseline image set retained after successful adaptation, resulting in a degradation type of "needs reverse reversal". At this point, the landscapeType field was automatically changed to 2, and the verification passed, and the application was archived as a reversal state. Actual testing showed that if other implementation methods besides those disclosed herein were used, such as manual identification, the delay would be approximately 3 weeks, while the embodiments disclosed herein can automatically detect the issue within 24 hours.
[0060] The above scheme drives the target application on the target terminal in the target direction to enter the test scenario, obtains interface screenshots and underlying system records, and then identifies the defect types of the target application related to the test scenario and direction adaptation based on the interface screenshots and records. In response to the presence of a defect type corresponding to the test scenario, it is characterized as defective. Based on the defect type corresponding to the test scenario, candidate patches adapted to the defect type are written into the configuration file, and the process returns to the step of driving the target application on the target terminal in the target direction to enter the test scenario. In response to the absence of a defect type corresponding to the test scenario, it is characterized as defective. Based on the interface screenshot of the test scenario without defects, a baseline image set of the target application is obtained. The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type of the target application after the upgrade. By identifying the degradation type and determining the adaptation strategy for the target application after the upgrade, this process, using the target application as input, and employing an automated, scenario-driven approach with core processes including defect identification, writing candidate patches, closed-loop deployment, and re-verification, upgrades the adaptation process from a "developer-driven, manual open-loop" to an "automatic closed-loop process driven by scenarios, visual identification, and post-patch verification." This improves the efficiency and quality of application-oriented adaptation optimization. Furthermore, after the target application upgrades, comparing the baseline image set from successful adaptation before the upgrade with the sample image set after the upgrade determines its degradation type, and based on this, the adaptation strategy for the target application after the upgrade is determined. The baseline image set from successful adaptation before the upgrade serves as a visual gold standard, enabling proactive awareness of the target application upgrade, degradation type awareness, and re-adaptation after the upgrade, further improving the efficiency and quality of application-oriented adaptation optimization after the upgrade. Therefore, this approach enhances the efficiency and quality of application-oriented adaptation optimization.
[0061] In some publicly disclosed embodiments, a second mapping relationship between interface components and application sets can be constructed based on the second component sets of each application. The second component set can include various interface components within the application, the application set can consist of applications containing the same interface components, and the test scenario can correspond to an interface component. Based on this, in response to successful adaptation of any application, the corresponding application can be selected as a reference application. Candidate patches for the same-named interface components in the application to be optimized can be initialized based on the candidate patches used by the interface components in the reference application and the second mapping relationship. The step of returning to the target application on the target terminal in the target direction to enter the test scenario can be initiated, using the application to be optimized as the new target application. It should be noted that successful adaptation is characterized by the absence of a defect type corresponding to the test scenario, or by a defective type. The application to be optimized is an application other than the reference application but possessing any interface component from the reference application. In the above method, when any application is successfully adapted, the corresponding application is selected as the reference application, and the application cluster configuration is shared for propagation, which helps improve the configuration efficiency of other applications.
[0062] In a specific implementation scenario, please refer to the relevant documents. Figure 3b , Figure 3b This is a schematic diagram of an embodiment of the shared application cluster configuration propagation in this application. For example... Figure 3b As shown, taking the Android system as an example, the set of Activity class names in the APK (Android Application Package) of each application can be parsed to construct a mapping table M of "Activity class name -> set of applications containing that Activity" (i.e., the aforementioned second mapping relationship). When a certain Activity-level entry of application P1 (e.g., P1 / a) passes the adaptation verification, candidate patches (e.g., c_a) of the same name Activity can be automatically generated for all other applications P2, P3, P4, etc. that contain that Activity in M, based on the configuration information of application P1 in this Activity-level entry (e.g., c_a). These patches serve as the initial configuration for applications P2, P3, and P4 and allow them to run independently in the complete closed loop of the aforementioned disclosed embodiment.
[0063] In a specific implementation scenario, during actual testing, an application, having configured xxx.YKCameraActivity for defect type verification in the aforementioned disclosed embodiment, can be automatically extended to other applications that also integrate this interface component. Each application can then independently run the process operations of steps S11 and S12 in the aforementioned disclosed embodiment and pass verification. Actual testing shows that if other implementation methods besides those disclosed (e.g., manual adaptation) are used, each of the three applications would require three days for adaptation, totaling nine days. However, using the adaptation method in this disclosed embodiment, the process can be completed in parallel in approximately one hour.
[0064] In some disclosed embodiments, in response to the direction adaptation optimization instruction of the target application on the terminal to be adapted, based on the configuration file after successful adaptation on the target terminal, candidate patches for the target application in the test scenario are written into the configuration file of the terminal to be adapted. Successful adaptation is characterized by the absence of a defect type corresponding to the test scenario, and defective patches are characterized by the absence of a defect type. Then, the terminal to be adapted is used as the new target terminal, and the step of driving the target application on the target terminal in the target direction to enter the test scenario is returned. For example, taking the target terminal B_src as an example, the configuration file C_src that has been successfully verified on it can not be directly copied to the terminal to be adapted B_dst. Instead, it can be written as the preferred candidate patch for the same application on the terminal to be adapted B_dst. Then, the terminal to be adapted B_dst is used as the new target terminal, and the relevant operations in the aforementioned disclosed embodiments are returned until independent convergence occurs on the terminal to be adapted B_dst. The above method, based on the configuration file after successful adaptation on the target terminal, writes the candidate patch of the target application in the test scenario into the configuration file of the terminal to be adapted, and then uses the terminal to be adapted as the new target terminal, returns to the step of executing the driver to enter the test scenario on the target terminal in the target direction, which can realize cross-terminal and cross-board configuration migration.
[0065] Please see Figure 4 , Figure 4This is a schematic diagram of the framework of an embodiment of the application direction adaptation optimization device of this application. The application direction adaptation optimization device 40 includes: a drive acquisition module 41, a defect identification module 42, a defect repair module 43, and an upgrade adaptation module 44. The drive acquisition module 41 is used to drive the target application on the target terminal in the target direction to enter the test scene and obtain the interface screenshot and the recorded information of the underlying system. The defect identification module 42 is used to identify the defect type of the target application in the test scene and related to direction adaptation based on the interface screenshot and the recorded information. The defect repair module 43 is used to respond to the existence of a defect type characterization corresponding to the test scene as defective, and based on the defect type corresponding to the test scene, upgrade adaptation module 44. The configuration file writes candidate patches adapted to the defect type and returns the steps for the target application on the target terminal in the target direction to enter the test scenario; the upgrade adaptation module 44 is used to respond to the defect type characterization that does not exist for the test scenario as defective, obtain the baseline image set of the target application based on the interface screenshot of the test scenario in the defect-free case, and compare the sample image set collected by the target application after being driven into the test scenario after the upgrade with the baseline image set to obtain the degradation type of the target application after the upgrade, and determine the adaptation strategy of the target application after the upgrade based on the degradation type of the target application after the upgrade.
[0066] The above scheme involves using the application direction adaptation optimization device 40 to drive the target application on the target terminal in the target direction to enter the test scenario, obtaining interface screenshots and underlying system recording information. Based on the screenshots and recording information, it identifies the defect types of the target application related to direction adaptation in the test scenario. If a defect type corresponding to the test scenario exists, it is characterized as defective. Based on the defect type corresponding to the test scenario, candidate patches adapted to the defect type are written into the configuration file, and the process returns to the step of driving the target application on the target terminal in the target direction to enter the test scenario. If a defect type corresponding to the test scenario does not exist, it is characterized as defective. Based on the interface screenshot of the test scenario without defects, a baseline image set of the target application is obtained. The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type of the target application after the upgrade. Furthermore, based on the target... The degradation type after application upgrade determines the adaptation strategy for the target application. On one hand, using the target application as input, and through an automated, scenario-driven process involving defect identification, writing candidate patches, closed-loop deployment, and re-verification, the adaptation process can be upgraded from a "developer-driven, manually open-loop" to an "automatic closed-loop process involving scenario-driven, visual identification, and post-patch verification." This improves the efficiency and quality of application-oriented adaptation optimization. On the other hand, after the target application upgrades, comparing the baseline image set from successful adaptation before the upgrade with the sample image set after the upgrade determines its degradation type, and based on this, the adaptation strategy for the target application after the upgrade is determined. The baseline image set from successful adaptation before the upgrade serves as a visual gold standard, enabling proactive awareness of the target application upgrade, degradation type awareness, and re-adaptation after the upgrade, further improving the efficiency and quality of application-oriented adaptation optimization after the upgrade. Therefore, it can improve the efficiency and quality of application-oriented adaptation optimization.
[0067] In some disclosed embodiments, the defect repair module 43 includes a mapping acquisition submodule, used to acquire a first mapping relationship between different defect types and patch strategies; wherein, the patch strategy includes candidate patches sorted in order of historical success rate; the defect repair module 43 includes a patch writing submodule, used to select candidate patches in order of historical success rate in the first mapping relationship corresponding to the defect type and write them to the configuration file.
[0068] In some public embodiments, the first mapping relationship is obtained by joint statistical training of the defect types and repair patches submitted by different applications during defect repair; and / or, after the candidate patch is written to the configuration file, it is sent to the target terminal and the target application is restarted.
[0069] In some disclosed embodiments, the application direction adaptation optimization device 40 includes a granularity adaptive module, which, in response to the failure of all candidate patches for adapting to the defect type, retains old entries at the application level and adds new entries at the component level in the configuration file based on the configuration information about application level and component level in the configuration file, or deletes old entries at the component level and adds new entries at the application level in the configuration file; the application direction adaptation optimization device 40 includes a return verification module, which returns to the step of driving the target application on the target terminal in the target direction to enter the test scenario, and determines that the adaptation has failed if there is still a defect type characterization corresponding to the test scenario that is defective.
[0070] In some disclosed embodiments, the granularity adaptive module includes a downward splitting submodule, used to respond to the application-level configuration information in the configuration file indicating that the configuration file applies to the entire application, obtain the interface components corresponding to the test scenarios where all candidate patches have failed, obtain a first component set, retain the old application-level entries in the configuration file, and add new component-level entries to each interface component in the first component set in the configuration file; the granularity adaptive module includes an upward merging submodule, used to respond to the component-level configuration information in the configuration file indicating that the number of old component-level entries reaches a threshold and the proportion of the mode value in the policy field reaches a ratio threshold, delete all old component-level entries in the configuration file, and add new application-level entries to the configuration file, with the new application-level entries set to the mode in the policy field.
[0071] In some disclosed embodiments, the application direction adaptation optimization device 40 includes a mapping construction module, used to construct a second mapping relationship between interface components and application sets based on a second component set of each application; wherein, the second component set includes each interface component in the application, the application set consists of applications containing the same interface component, and the scene to be tested corresponds to the interface component; the application direction adaptation optimization device 40 includes a configuration propagation module, used to select the corresponding application as a reference application in response to successful adaptation of any application, and initialize the candidate patch of the same-named interface component in the application to be optimized based on the candidate patch used by the interface component in the reference application and the second mapping relationship, and return to the step of driving the target application on the target terminal in the target direction to enter the scene to be tested, with the application to be optimized as the new target application; wherein, successful adaptation is characterized by the absence of a defect type corresponding to the scene to be tested, and the application to be optimized is an application other than the reference application that has any interface component in the reference application.
[0072] In some disclosed embodiments, the upgrade adaptation module 44 includes an instruction construction submodule for constructing a large model instruction based on a sample image set and a benchmark image set; wherein, the large model instruction is used to instruct the visual large model to compare the sample image set and the benchmark image set and output the degradation type after the target application is upgraded; the upgrade adaptation module 44 includes a degradation recognition submodule for obtaining the degradation type based on the output result of the visual large model responding to the large model instruction.
[0073] In some disclosed embodiments, the upgrade adaptation module 44 includes a first response submodule, configured to, in response to a degradation type indicating a need for reverse reversal, modify the policy field related to the target direction in the configuration file to a field value indicating incompatibility, and return to the step of driving the target application on the target terminal in the target direction to enter the test scenario; the upgrade adaptation module 44 includes a second response submodule, configured to, in response to a degradation type indicating a need for re-adaptation, return to the step of driving the target application on the target terminal in the target direction to enter the test scenario; the upgrade adaptation module 44 includes a third response submodule, configured to, in response to a degradation type indicating no degradation, maintain the configuration file.
[0074] In some disclosed embodiments, the application orientation adaptation optimization device 40 includes a configuration migration module, which, in response to the orientation adaptation optimization instruction of the target application on the terminal to be adapted, writes candidate patches for the target application in the test scenario into the configuration file of the terminal to be adapted based on the configuration file after successful adaptation on the target terminal; wherein, successful adaptation is characterized by the absence of a defect type corresponding to the test scenario, and defectiveness is characterized by the presence of a defect; the application orientation adaptation optimization device 40 includes a configuration verification module, which, using the terminal to be adapted as the new target terminal, returns to the step of driving the target application on the target terminal in the target orientation to enter the test scenario.
[0075] In some publicly available embodiments, the scenario to be tested belongs to a predefined set of scenarios, which includes at least one of the following scenarios: homepage, login, camera subpage, after switching between portrait and landscape modes, after restarting, and function page; and / or, the scenario to be tested is obtained by an artificial intelligence model detecting the target application.
[0076] Please see Figure 5 , Figure 5This is a schematic diagram of a framework of an embodiment of the computer device of this application. The computer device 50 includes a display screen 53, a memory 51, and a processor 52. The display screen 53 and the memory 51 are respectively coupled to the processor 52. The memory 51 stores at least program instructions, and the processor 52 is used to execute the program instructions to implement the steps in any of the above-described application direction adaptation and optimization method embodiments. For details, please refer to the foregoing disclosed embodiments, which will not be repeated here. The computer device 50 can be an electronic device that executes computer program instructions. Exemplarily, the computer device 50 can include, but is not limited to, mobile phones, tablet computers, learning machines, etc., and the specific type of the computer device 50 is not limited here.
[0077] Specifically, processor 52 controls itself, as well as memory 51 and display screen 53, to implement the steps in any of the above-described application direction adaptation and optimization method embodiments. Processor 52 can also be called a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 52 can be implemented using integrated circuit chips.
[0078] The aforementioned solution, using computer device 50 as input, upgrades the adaptation process from a "developer-driven, manually open-loop" approach to an "automatic closed-loop approach involving scene-driven, visual judgment, and post-patch verification" through an automated, scenario-driven process, defect identification, candidate patch writing, and closed-loop deployment followed by re-verification. This improves the efficiency and quality of application-oriented adaptation optimization. Furthermore, after the target application is upgraded, the solution compares its baseline image set from successful adaptation before the upgrade with the sample image set after the upgrade to determine its degradation type. Based on this, the solution determines the adaptation strategy for the target application after the upgrade. The baseline image set from successful adaptation before the upgrade serves as a visual gold standard, enabling proactive awareness of the target application upgrade, degradation type awareness, and re-adaptation after the upgrade. This further enhances the efficiency and quality of application-oriented adaptation optimization after the upgrade. Therefore, it improves the efficiency and quality of application-oriented adaptation optimization.
[0079] Please see Figure 6 , Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 60 stores program instructions 61 that can be executed by a processor. The program instructions 61 are used to implement the steps in any of the above-described application direction adaptation optimization method embodiments.
[0080] The aforementioned solution, using computer-readable storage medium 60, takes the target application as input and, through an automated scenario-driven process involving defect identification, writing candidate patches, and closed-loop deployment and re-verification, upgrades the adaptation process from a "developer-driven, manually open-loop" to an "automatic closed-loop process involving scenario-driven, visual identification, and post-patch verification." This improves the efficiency and quality of application-oriented adaptation optimization. Furthermore, after the target application is upgraded, by comparing the baseline image set from successful adaptation before the upgrade with the sample image set after the upgrade to determine its degradation type, and accordingly determining the adaptation strategy for the target application after the upgrade, the baseline image set from successful adaptation before the upgrade can serve as a visual golden sample baseline. This enables proactive awareness of the target application upgrade, degradation type awareness, and re-adaptation after the upgrade, further improving the efficiency and quality of application-oriented adaptation optimization after the upgrade. Therefore, it enhances the efficiency and quality of application-oriented adaptation optimization.
[0081] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0082] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0084] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0085] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0087] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. An application direction adaptation optimization method, characterized in that, include: Drive the target application on the target terminal in the target direction to enter the scene under test, and obtain the interface screenshot and the recorded information of the underlying system; Based on the screenshots and the recorded information, the defect types of the target application related to the adaptation of the direction in the test scenario are identified. In response to the existence of a defect type characterization corresponding to the scene under test, a candidate patch adapted to the defect type is written into the configuration file based on the defect type corresponding to the scene under test, and the step of the target application on the target terminal where the driver is in the target direction entering the scene under test is returned. In response to the absence of a defect type characterization corresponding to the test scenario, a baseline image set of the target application is obtained based on the interface screenshot of the test scenario under defect-free conditions. The baseline image set is then compared with the sample image set collected after the target application is upgraded and driven into the test scenario to obtain the degradation type of the target application after the upgrade. Based on the degradation type of the target application after the upgrade, the adaptation strategy of the target application after the upgrade is determined.
2. The method according to claim 1, characterized in that, The step of writing candidate patches adapted to the defect type in the configuration file based on the defect type corresponding to the scenario under test includes: Obtain a first mapping relationship between different defect types and patching strategies; wherein, the patching strategy includes candidate patches sorted in order of historical success rate; In the first mapping relationship corresponding to the defect type, the candidate patches are selected sequentially according to the historical success rate and written into the configuration file.
3. The method according to claim 2, characterized in that, The first mapping relationship is obtained by joint statistical training of the defect types and repair patches submitted by different applications during defect repair; And / or, after the candidate patch is written to the configuration file, it is sent to the target terminal and the target application is restarted.
4. The method according to claim 1, characterized in that, After the step of returning the target application to the test scenario on the target terminal where the driver is in the target direction, the method further includes: In response to the failure of all candidate patches adapted to the defect type, based on the application-level and component-level configuration information in the configuration file, either the old application-level entries are retained and new component-level entries are added in the configuration file, or the old component-level entries are deleted and new application-level entries are added in the configuration file. Return to the step of the target application entering the test scenario on the target terminal in the target direction, and if there is still a defect type characterization corresponding to the test scenario that is defective, determine that the adaptation has failed.
5. The method according to claim 4, characterized in that, The step of retaining old application-level entries and adding new component-level entries in the configuration file based on the application-level and component-level configuration information in the configuration file, or deleting old component-level entries and adding new application-level entries in the configuration file, includes at least one of the following: In response to the application-level configuration information in the configuration file indicating that the configuration file applies to the entire application, the interface components corresponding to the test scenarios for which each of the candidate patches has failed are obtained to obtain a first component set. The old application-level entries are retained in the configuration file, and new component-level entries are added to each of the interface components in the first component set in the configuration file. In response to the configuration information in the configuration file indicating that the number of old entries at the component level has reached a threshold and the proportion of the mode value in the policy field has reached a threshold, all old entries at the component level are deleted from the configuration file, and new entries at the application level are added to the configuration file, with the new entries at the application level having the mode value set in the policy field.
6. The method according to claim 1, characterized in that, The method further includes: Based on the second component set of each application, a second mapping relationship between interface components and application set is constructed; wherein, the second component set includes each of the interface components in the application, the application set consists of applications containing the same interface components, and the scene to be tested corresponds to the interface component; In response to successful adaptation of any application, the corresponding application is selected as a reference application. Based on the candidate patches used by the interface components in the reference application and the second mapping relationship, candidate patches for the interface components with the same name in the application to be optimized are initialized. The application to be optimized is then used as the new target application, and the step of driving the target application on the target terminal in the target direction to enter the test scenario is returned. Herein, successful adaptation is characterized by the absence of a defect type corresponding to the test scenario, and the application to be optimized is an application other than the reference application that has any of the interface components in the reference application.
7. The method according to claim 1, characterized in that, The sample image set collected after the target application is upgraded and driven into the test scenario is compared with the baseline image set to obtain the degradation type after the target application upgrade, including: Based on the sample image set and the benchmark image set, a large model instruction is constructed; wherein, the large model instruction is used to instruct the visual large model to compare the sample image set and the benchmark image set, and output the degradation type after the target application upgrade; The degradation type is obtained based on the output of the visual large model in response to the large model instruction.
8. The method according to claim 1, characterized in that, The determination of the adaptation strategy for the target application after the upgrade, based on the degradation type of the target application after the upgrade, includes at least one of the following: In response to the degradation type indicating that reverse reversal is required, the policy field related to the target direction in the configuration file is modified to a field value indicating incompatibility, and the step of driving the target application on the target terminal in the target direction to enter the test scenario is returned. In response to the degradation type indicating that re-adaptation is required, the step of returning the target application on the target terminal in the target direction to enter the test scenario is resumed. In response to the degradation type being characterized as no degradation, the configuration file is maintained.
9. The method according to claim 1, characterized in that, The method further includes: In response to the directional adaptation optimization instruction of the target application on the terminal to be adapted, based on the configuration file after successful adaptation on the target terminal, the candidate patch of the target application in the test scenario is written into the configuration file of the terminal to be adapted; wherein, successful adaptation is characterized by the absence of a defect type corresponding to the test scenario, and defect is characterized by the presence of a defect. Using the terminal to be adapted as the new target terminal, return to the step of driving the target application on the target terminal in the target direction to enter the scene to be tested.
10. The method according to claim 1, characterized in that, The scenario to be tested belongs to a predefined scenario set, which includes at least one of the following scenarios: homepage, login, camera subpage, after switching between portrait and landscape modes, after restarting, and function page. And / or, the scenario to be tested is obtained by an artificial intelligence model detecting the target application.
11. A computer device, characterized in that, The device includes a display screen, a memory, and a processor. The display screen and the memory are respectively coupled to the processor. The memory stores at least program instructions. The processor is used to execute the program instructions to implement the application direction adaptation optimization method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the application orientation adaptation optimization method according to any one of claims 1 to 10.
