Android system application linkage upgrading method and system
By generating an application list configuration file containing installation sequence numbers and dependencies, and combining topology sorting algorithms and session management, the problem of applications not being able to upgrade collaboratively in the Android system was solved, achieving controllability and reliability of system upgrades, and improving the success rate of upgrades and the reliability of data processing.
Patent Information
- Application Number
- CN202510889033.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
In the Android system, multiple interdependent applications cannot be upgraded in a coordinated manner, resulting in inconsistent system functions, chaotic interfaces, and even compatibility issues. Existing technologies cannot ensure that applications are upgraded in the correct order and according to their dependencies.
Generate an application list configuration file containing installation order numbers and dependencies. Analyze dependencies using a topology sorting algorithm, create a session file to record upgrade status, and install applications in order after device reboot. The pre-installation verification process identifies potential conflicts and backs up original application information to ensure system stability.
This ensures that multiple interdependent applications can be upgraded collaboratively, improving the success rate and reliability of system upgrades, reducing the probability of failure and data loss during the upgrade process, and enhancing the controllability and traceability of the system.
Smart Images

Figure CN120803492A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of application upgrade, and particularly relates to a method and system for Android system application linkage upgrade. BACKGROUND
[0002] With the popularity of intelligent devices, the Android operating system has been widely applied to terminal devices such as smart phones and tablet computers. In the Android system, there is a mutual dependency relationship between many applications, for example, a unified interface style is required, or a function involves corresponding modification of multiple system applications. These applications need to be upgraded synchronously when the version is updated to ensure the stability of the system and the integrity of the function. However, due to the openness of the Android system and the independence between applications, the mutually dependent applications cannot be upgraded collaboratively, resulting in inconsistent system functions, chaotic interface styles, and even causing compatibility problems between applications.
[0003] In the related art, the application store upgrade method is usually adopted, and the user downloads and updates each application separately through the application store. This method is relatively simple to operate, and the user can independently select the application to be updated. In addition, the application store usually performs security checks on the application to ensure that the downloaded application has no obvious security risks. When the application needs to be updated, the application store will push an update notification to the user, and the user can complete the upgrade process of the application by clicking the update button. The entire operation process is very friendly to the user.
[0004] However, when multiple mutually dependent system applications need to be updated at the same time to maintain function consistency, the application store can only handle the update of each application separately, and it is difficult to ensure that these applications are upgraded in the correct order and dependency relationship, resulting in the possibility of partial application update success and its dependent application not updated during the upgrade process, thereby causing system function abnormalities, interface chaos, and even device performance degradation. SUMMARY
[0005] The application provides a method and system for Android system application linkage upgrade, which avoids the possibility of partial application update success and its dependent application not updated during the upgrade process in the related art, and solves the problems of system function abnormalities, interface chaos, and even device performance degradation.
[0006] In a first aspect, the application provides a method for Android system application linkage upgrade, generating an application list configuration file, the application list configuration file containing installation order numbers and inter-application dependency relationships of applications to be upgraded; packing the installation package and the corresponding resource file of the application to be upgraded into a linkage upgrade package according to the application list configuration file; Create a session file and record session identification, application identification and upgrade state information; Pre-installation verification of applications in the linkage upgrade package according to installation sequence numbers, and record the verification results in the session file; Backup original applications to obtain backup information, and record the backup information to the session file; After device restart, read the backup information and install the applications in sequence according to the installation sequence numbers; When detecting application installation failure, restore the installed applications to the pre-upgrade state according to the backup information in the session file.
[0007] By adopting the above technical solutions, by generating an application list configuration file containing installation sequence numbers and dependency relationships, the system can install applications in the correct order, avoiding application conflicts and running abnormities caused by improper installation sequence. The creation of a session file to record state information during the upgrade process enables the system to track the upgrade state of each application and quickly locate problems when an abnormality occurs. The pre-installation verification link can detect potential installation conflicts in advance, reducing the failure probability during the upgrade process. By backing up the original application information and recording it to the session file, the system can restore the installed applications to the pre-upgrade state according to the backup information when detecting application installation failure, ensuring the stability of the system. This upgrade scheme based on configuration files and session management enables multiple mutually dependent applications to be upgraded collaboratively, ensuring the controllability of the upgrade process and providing a rollback mechanism in the event of an abnormality, thereby improving the success rate and reliability of system upgrades.
[0008] In combination with some embodiments of the first aspect, in some embodiments, generating the application list configuration file specifically includes: Collecting interface call relationships and resource reference relationships of the applications to be upgraded; Constructing an application dependency directed graph according to the interface call relationships and resource reference relationships; Analyzing the application dependency directed graph based on a topological sorting algorithm to obtain an optimal upgrade sequence; Assigning a unique installation sequence number to each application to be upgraded according to the optimal upgrade sequence to obtain the application list configuration file.
[0009] By adopting the technical scheme, the interface call relationship and the resource reference relationship between applications are collected, and an application dependency directed graph is constructed based on the relationships. The system can comprehensively master the dependency relationship network between the applications. The application dependency directed graph is analyzed by using a topological sorting algorithm, and an optimal upgrade order can be found to ensure that the dependency relationship is satisfied. This graph theory-based method can handle complex multi-level dependency relationships and avoid the deadlock problem caused by circular dependency. A unique installation order number is assigned to each application to be upgraded, so that the upgrade process is deterministic and repeatable. The technical scheme solves the upgrade failure problem caused by improper handling of dependency relationships in the traditional upgrade method through data analysis and algorithm optimization, and improves the scientificity and success rate of the upgrade process.
[0010] In some embodiments of the first aspect, creating a session file specifically includes: parsing the application identification information in the application list configuration file; assigning a session sub-identifier to each application to be upgraded according to the application identification information; setting the session validity period, session state type, and session version information; writing the session identifier, session sub-identifier, session state type, and session version information into the session file.
[0011] By adopting the technical scheme, the application identification information in the application list configuration file is parsed, and a session sub-identifier is assigned to each application to be upgraded. The system establishes an accurate session management mechanism. By setting the session validity period, state type, and version information, the system can comprehensively manage the state and version control of the upgrade session. Writing these information into the session file establishes a complete session management system. This session-based management method enables the system to accurately track the upgrade state of each application, discover abnormal conditions in a timely manner, and restore the session if necessary. Through the session management mechanism, the system improves the controllability and traceability of the upgrade process, reduces the risk of data loss during the upgrade process, and enhances the reliability of the upgrade process.
[0012] In some embodiments of the first aspect, after restoring the installed applications to the pre-upgrade state according to the backup information in the session file, the method further includes: obtaining the data interaction relationship between the applications to be upgraded, and establishing an application data dependency graph according to the data interaction relationship; calculating a data migration priority according to the application data dependency graph; writing the data migration priority into the session file.
[0013] By adopting the technical scheme, the system can accurately grasp the data flow between the applications by obtaining the data interaction relationship between the applications to be upgraded and establishing an application data dependency graph. According to the application data dependency graph, the data migration priority is calculated and written into a session file, so that the system can follow the optimal migration order when performing data migration. This method based on data dependency analysis ensures the continuity of the data migration process and avoids data inconsistency problems in the data migration process. By optimizing the data migration order, the system reduces conflicts and blockages in the data migration process, improves the efficiency of data migration, ensures the integrity and consistency of application data, and enhances the reliability of data processing during the upgrade process.
[0014] In some embodiments of the first aspect, obtaining the data interaction relationship between the applications to be upgraded specifically includes: scanning database access records and shared file operation records between the applications to be upgraded; analyzing process communication interfaces and message queue data between the applications to be upgraded; counting the calling frequency of broadcast receivers and content providers between the applications to be upgraded; obtaining the data interaction relationship between the applications to be upgraded according to the access records, operation records, and calling frequency.
[0015] By adopting the technical scheme, the system can accurately master the specific methods and frequency of data interaction between applications by scanning the database access records and shared file operation records between the applications to be upgraded. Combined with the analysis of process communication interfaces and message queue data, the system can fully understand the channels and data flow of data transmission between applications. By counting the calling frequency of broadcast receivers and content providers, the system can quantify the degree of data dependency between different applications. These detailed data interaction information enable the system to construct a complete data relationship network between applications, thereby accurately assessing the impact range of data migration during the upgrade process. In the event of an upgrade failure, the system can accurately locate the affected data nodes based on these detailed data interaction relationships, implement precise data rollback, and avoid data inconsistency or data damage. At the same time, the complete data interaction relationship also helps the system to reasonably arrange the data migration order during the upgrade process, reduce conflicts and blockages in the data migration process, and improve the upgrade efficiency and success rate.
[0016] In some embodiments of the first aspect, after obtaining the backup information of the original application, the method further includes: determining key data interfaces that need to be monitored according to the data interaction relationship; implanting a data collection probe at the key data interface; collecting data change records through the data collection probe; establishing a data rollback point based on the data change records; writing the data rollback point information into a session file.
[0017] By adopting the technical solution, the system can monitor the data changes in the upgrading process in real time by implanting the data acquisition probe at the key data interface. The change records collected by the data acquisition probe provide the system with complete data operation traces, enabling the system to track the source and influence of each data modification. The rollback point established based on these data change records provides the system with accurate data recovery position markers. When an exception occurs in the upgrading process, the system can accurately locate the specific position of the data change and restore the data to the correct state according to the rollback point information. This rollback mechanism based on real-time data monitoring enables the system to perform the upgrading operation while ensuring data integrity, greatly reducing the risk of damage to system data caused by upgrading failure. Writing the rollback point information into the session file ensures that the position for data recovery can be accurately found even after the system restarts, thereby ensuring the reliability of the upgrading process and the safety of the data.
[0018] In combination with some embodiments of the first aspect, in some embodiments, the key data interface to be monitored is determined according to the data interaction relationship, specifically including: analyzing shared database access interfaces between the applications to be upgraded; identifying file system interaction interfaces between the applications to be upgraded; determining inter-process communication interfaces between the applications to be upgraded; performing priority sorting on the access interfaces, the interaction interfaces and the communication interfaces according to the interface call frequency, and determining the interface with the highest priority as the key data interface.
[0019] By adopting the technical solution, the system can identify the most critical data interaction node by analyzing the shared database access interfaces, the file system interaction interfaces and the inter-process communication interfaces between the applications to be upgraded, and performing priority sorting according to the interface call frequency. This priority sorting method based on the interface call frequency enables the system to concentrate the limited monitoring resources on the most important data interface, ensuring the safety of the key data and avoiding the performance degradation caused by too many monitoring points.
[0020] In the second aspect, the embodiments of the present application provide a system for application linkage upgrading of an Android system, which comprises one or more processors and a memory. The memory is coupled to the one or more processors and is configured to store computer program codes including computer instructions. The one or more processors invoke the computer instructions to enable the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0021] In a third aspect, an embodiment of the present application provides a computer readable storage medium, including instructions, when the instructions are run on a system, causing the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, when the computer program product is run on a system, causing the system to perform the method described in any possible implementation manner of the first aspect.
[0023] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present application provides a method for Android system application linkage upgrade, by generating an application list configuration file containing installation sequence number and dependency relationship, the system can install applications in the correct order, avoiding application conflicts and running abnormally caused by improper installation sequence. Creating a session file to record the state information during the upgrade process, the system can track the upgrade status of each application, and quickly locate the problem when an exception occurs. The pre-installation verification link can detect potential installation conflicts in advance, reducing the failure probability during the upgrade process. By backing up the original application information and recording it to the session file, the system can restore the installed applications to the state before the upgrade according to the backup information when detecting application installation failure, ensuring the stability of the system. This upgrade scheme based on configuration file and session management enables multiple interdependent applications to be upgraded collaboratively, ensuring the controllability of the upgrade process and providing a rollback mechanism when an exception occurs, thereby improving the success rate and reliability of system upgrade.
[0024] 2. The present application provides a method for Android system application linkage upgrade, by obtaining the data interaction relationship between the applications to be upgraded and establishing an application data dependency graph, the system can accurately grasp the data flow between the applications. According to the application data dependency graph, the data migration priority is calculated and written into the session file, so that the system can follow the optimal migration order when performing data migration. This method based on data dependency analysis ensures the continuity of the data migration process and avoids the problem of data inconsistency during data migration. By optimizing the data migration order, the system reduces conflicts and blockages during data migration, improves the efficiency of data migration, and ensures the integrity and consistency of application data, enhancing the reliability of data processing during the upgrade process.
[0025] 3、The application provides a kind of Android system application linkage upgrade method, by implanting data acquisition probe at key data interface, system can monitor the data change in upgrade process in real time.Data acquisition probe collection change record provides complete data operation track for system, so that system can track the source and influence of each data modification.The rollback point established based on these data change records provides accurate data recovery position mark for system.When exception occurs in upgrade process, system can accurately locate the specific position of data change, and according to rollback point information, data is restored to correct state.This rollback mechanism based on real-time data monitoring enables system to perform upgrade operation under the premise of ensuring data integrity, greatly reducing the risk of damage to system data caused by upgrade failure.And write rollback point information into session file, it is ensured that even after system restart, the position of data recovery can still be accurately found, so as to ensure the reliability of upgrade process and the safety of data. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 It is a flowchart of a kind of Android system application linkage upgrade method in the embodiment of the application.
[0027] Figure 2 It is a flowchart of a kind of data migration optimization method based on data interaction relationship in the embodiment of the application.
[0028] Figure 3 It is the entity device structure schematic diagram of a kind of Android system application linkage upgrade system provided in the embodiment of the application. DETAILED DESCRIPTION
[0029] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting to the present application. As used in the specification and the appended claims of the present application, the singular forms "a," "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or" as used herein refers to any or all possible combinations of one or more of the associated listed items.
[0030] Hereinafter, the terms "first", "second" are only for the purpose of description, and cannot be understood as implying or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0031] In the following, an embodiment is used and combined with Figure 1The application discloses an application linkage upgrading method of an Android system. Please refer to Figure 1 A flowchart of the application linkage upgrading method of the Android system is shown in FIG. 1.
[0032] S101, generating an application list configuration file, and packing installation packages and corresponding resource files of the applications to be upgraded into a linkage upgrading package according to the application list configuration file; The application list configuration file contains installation sequence numbers of the applications to be upgraded and dependency relationships among the applications, and the installation packages and corresponding resource files of the applications to be upgraded are packed into a linkage upgrading package according to the application list configuration file. The application list configuration file is generated, and specifically includes: collecting interface call relationships and resource reference relationships of the applications to be upgraded; constructing an application dependency directed graph according to the interface call relationships and the resource reference relationships; obtaining an optimal upgrading sequence based on a topological sorting algorithm; and assigning a unique installation sequence number to each of the applications to be upgraded according to the optimal upgrading sequence to obtain the application list configuration file.
[0033] The system first needs to generate an application list configuration file, which contains installation sequence numbers of the applications to be upgraded and dependency relationships among the applications. The application list configuration file can be generated in various ways, for example, manually configured by a developer or automatically analyzed by the system. In addition to the method of collecting application interface call relationships and resource reference relationships to construct a dependency graph and obtaining an optimal upgrading sequence by using a topological sorting algorithm, the system can also infer the installation sequence and dependency relationships of the applications by analyzing the startup sequence of the applications, the call relationships among the functional modules and other information.
[0034] After the application list configuration file is generated, the system can pack the installation packages of the applications to be upgraded and the required resource files (such as configuration files, data files and the like) into a linkage upgrading package according to the information recorded in the file. The packing process can use a standard compression algorithm such as ZIP or a self-defined packing format. The installation packages and the resource files can also be encrypted and signed during the packing process to improve security.
[0035] In actual applications, if the number of the applications to be upgraded is large, full packing may result in a large package, affecting the distribution and download efficiency. Therefore, the system can divide the applications to be upgraded into multiple small upgrading packages according to the importance and modification of the applications, and each upgrading package only upgrades part of the applications. These upgrading packages can be serially or in parallel delivered to the device to improve the upgrading efficiency. In addition, the system can select a suitable opportunity to trigger the application upgrading according to the network state, power and other conditions of the device, so as to minimize the impact on the user experience.
[0036] S102, create a session file and record session identification, application identification and upgrade state information; The system creates a session file and records session identification, application identification and upgrade state information, wherein the creation of the session file specifically includes: parsing application identification information in the application list configuration file; assigning a session sub-identification to each application to be upgraded according to the application identification information; setting a session validity period, a session state type and session version information; and writing the session identification, session sub-identification, session state type and session version information into the session file.
[0037] The system first creates a session file for persistently saving state data of the upgrade session. The session file can be a local file or one or more records in a database.
[0038] When the system creates a session, it needs to assign a unique session identification to this upgrade for associating with a specific upgrade session in subsequent upgrade steps. At the same time, the system also needs to parse identification information (such as the package name of the application) of each application to be upgraded from the application list configuration file, and assign a unique sub-identification within the session to each application. These session identification and sub-identification can be randomly generated strings or can be obtained by concatenating according to certain rules (such as timestamp, device information, etc.).
[0039] In addition to the identification information, the system also needs to record some metadata in the session file, such as the validity period of the session, the state (such as not started, in progress, completed, rolled back, etc.), the corresponding application version number, etc. These information can help the system understand and manage the life cycle of the entire upgrade session.
[0040] In actual operation, since application upgrade often involves multiple applications and the upgrade process may last for a long time, the upgrade session needs to be able to span multiple device restarts. Therefore, the session file can be saved in the non-volatile memory (such as FLASH) of the device, and the file path and other information can be registered in the system service, so that the upgrade session can be reloaded after the device restarts. In addition, if the upgrade process encounters an exception (such as power failure, user forced shutdown, etc.), the system can also use the state information recorded in the session file to restore the upgrade progress or perform a rollback operation, ensuring the integrity and consistency of the upgrade process.
[0041] S103, pre-installation verification of the applications in the linkage upgrade package according to the installation sequence number, and record the verification result in the session file; Before performing the application upgrade officially, the system needs to check the applications in the upgrade package one by one according to the installation order defined in the application list configuration file. The checking content can include the integrity of the application installation package, the legality of the signature, the compatibility of the version, the matching degree of the running environment, etc. The checking process can use mechanisms such as PackageManager provided by the operating system, or use custom checking tools and rules.
[0042] The purpose of pre-installation checking is to find problems in the upgrade package as early as possible, to avoid system instability or upgrade failure caused by exceptions in the upgrade process. If the checking finds that there is a problem with a certain application, the system can record error information and terminate the upgrade process, and can also send a notification to the user or administrator to prompt the reason why the upgrade cannot be performed.
[0043] The checking result can include information such as whether the checking is passed, the failure reason, etc., and the system records these information in the session file for decision-making and processing in the subsequent upgrade steps. For example, if all applications pass the checking, the system will only perform the actual upgrade operation; if only part of the applications pass the checking, the system can prompt the user to select whether to continue upgrading the remaining applications; if all applications do not pass the checking, the system can directly terminate the upgrade process and roll back the completed operations.
[0044] S104, backup the original application to obtain backup information, and record the backup information to the session file; Since the application upgrade can update or overwrite the original application program and data, it is necessary to make a complete backup of these contents before upgrading, to ensure that the state before upgrading can be restored in case of upgrade failure or introduction of new problems.
[0045] The contents of the backup usually include the installation package (APK file) of the application, the private data directory of the application, and the external data (such as files on the SD card) of the application. The system can perform the backup operation through file copying, data exporting, etc., and save the backup data to the storage space of the device. Considering that the backup data can be large, the backup process can be time-consuming, therefore the system can perform the backup in the background, and notify the user when necessary that the backup is in progress.
[0046] After the backup is completed, the system records the backup information to the upgrade session file, including the backup time, the storage path of the data, the checking, etc. These information can help the system find and use the backup data for recovery in case of upgrade failure. At the same time, the system can also regularly check the integrity of the backup data to prevent the backup data from being damaged and causing recovery failure.
[0047] In practical applications, since the storage space of the device may be limited, the backup data may affect the storage space of the user if it is long-term resident, and therefore the system also needs to develop a cleaning strategy for the backup data. For example, the backup data of an application can be automatically deleted after the application is successfully upgraded and stably runs for a period of time; or a valid period is set for the backup data, and the backup data is cleaned by the system regularly after the valid period expires. At the same time, the system can also dynamically adjust the range and frequency of backup according to the usage of the storage space of the device, so as to meet the recovery demand while minimizing the space occupation.
[0048] S105, after the device is restarted, the backup information is read, and the applications are installed in sequence according to the installation order number; Since the upgrade of some system-level applications or underlying frameworks may need to restart the device to take effect, providing a device restart opportunity can avoid multiple restarts during the upgrade process and improve the upgrade efficiency.
[0049] After the device is restarted, the system first reads the upgrade session file to check the state and progress of the upgrade session. If it is found that there is an unfinished upgrade session, the system will execute the installation and upgrade of the applications one by one according to the application identifier and installation order recorded in the session information. The installation process can use standard components such as PackageInstaller, PackageManager of the Android system, or use a custom installation tool. Before installation, the system needs to check the integrity and signature of the application installation package to ensure that the installed application is verified and authorized.
[0050] During the installation of the application, the system needs to dynamically grant the required permissions of the application according to the requirements of the application, such as storage space access, location information access, etc. For the upgraded and installed applications, the system also needs to migrate the original data and configuration information of the applications to ensure that the functions and data of the applications after the upgrade are not affected. If an error occurs in the installation process of the application (such as installation package damage, inconsistent signature, etc.), the system should record the error information and try to perform recovery operations, such as restoring the installed application or rolling back to the version before the upgrade.
[0051] S106, when it is detected that the application installation fails, the installed application is restored to the state before the upgrade according to the backup information in the session file.
[0052] Since the upgrade process may be affected by various factors, such as network interruption, insufficient storage space, application compatibility problems, etc., the application installation may fail during the upgrade process. In order to ensure the stability of the system and the integrity of the data, it is necessary to detect and handle these exceptions in time to restore the system to the state before the upgrade.
[0053] When the system detects that an application installation fails (such as an installation process abnormal exit, signature verification fails, runtime throws an exception, etc.), the first need to record the failure information (such as application identification, failure time, failure reason, etc.) to the upgrade session file, so as to subsequent analysis and processing. Then, the system needs to find the previous successfully installed application version according to the backup information recorded in the session file, and perform the recovery operation. The recovery operation can include uninstalling the installed new version application, recovering the installation package and data of the old version application from the backup data, reinstalling the old version application, etc. After the recovery is completed, the system also needs to clean up the temporary files and cache data generated during the upgrade process, to ensure that the device environment and before the upgrade are consistent.
[0054] Considering that in the batch upgrade scenario, the installation failure of a single application may not necessarily interrupt the entire upgrade process, the system can also provide some flexible processing strategies. For example, the state can be recorded when the application installation fails, and then the upgrade of the remaining applications is completed before the recovery is performed; or the upgrade installation of the application is performed again after the application is recovered, allowing multiple retries; the user can also manually select to continue upgrading or rollback when the application installation fails. These strategies can be dynamically selected according to the importance of the application, the risk level of the upgrade, etc., to minimize the impact of upgrade failure while ensuring the success rate of the upgrade.
[0055] In the above embodiments, by generating an application list configuration file containing installation sequence numbers and dependency relationships, the system can install applications in the correct order, avoiding application conflicts and running abnormally caused by improper installation order. The session file is created to record the state information during the upgrade process, so that the system can track the upgrade state of each application and quickly locate the problem when an exception occurs. The pre-installation verification link can detect potential installation conflicts in advance, reducing the failure probability during the upgrade process. By backing up the original application information and recording it to the session file, the system can restore the installed application to the state before the upgrade according to the backup information when detecting that the application installation fails, ensuring the stability of the system. This upgrade scheme based on configuration file and session management enables multiple interdependent applications to be upgraded collaboratively, ensuring the controllability of the upgrade process and providing a rollback mechanism when an exception occurs, thereby improving the success rate and reliability of the system upgrade.
[0056] After completing the basic application installation and upgrade process, in order to ensure the continuity and consistency of the data during the upgrade process, the application also provides a data migration optimization method based on data interaction relationship. By analyzing the data interaction mode between applications, a priority system for data migration is established, so that smooth migration of data is realized during the application upgrade process. The following will be described in combination with Figure 2 A data migration optimization method based on data interaction relationship in the embodiments of the application is described: Please refer toFigure 2 FIG. 1 is a flowchart of a data migration optimization method based on data interaction relationship according to an embodiment of the present application.
[0057] S201, scan database access records and shared file operation records between applications to be upgraded; In the Android system, applications can exchange and share data in various ways, such as accessing the databases of other applications using ContentProvider, SharedPreferences, or other mechanisms, or reading and writing shared files through external storage space, file system, etc. These interaction behaviors reflect the data coupling degree between applications and are an important reference for determining the data migration order in the upgrade process.
[0058] The system can use various ways to realize the scanning of database access and file operation. For example, the AndroidManifest file in the application installation package can be statically analyzed to extract the declared ContentProvider components and their access permissions, thereby inferring which other application data the application may access. In addition, the system can also dynamically monitor the file I / O operations of application processes at runtime, record the read and write behaviors of processes on external storage space or files in system directories, especially the access to private directories of other applications. These records can help the system build a global view to understand the data interaction between all applications on the current device.
[0059] S202, analyze process communication interfaces and message queue data between applications to be upgraded; This step is to further understand the interaction and dependency relationship between applications at the logical level by analyzing the inter-process communication (IPC) mode between applications. Unlike data-level interaction, functional calls and message passing between applications usually represent higher-level business logic and reflect the core functions and business processes of the application. In the Android system, common IPC mechanisms include Binder, AIDL, Messenger, BroadcastReceiver, etc. By analyzing the use of these mechanisms, a more comprehensive application interaction relationship diagram can be constructed.
[0060] Specifically, the system can adopt a combination of static analysis and dynamic tracking to collect IPC data between applications. Static analysis mainly targets the installation package of the application, identifies the IPC components defined therein, such as AIDL interfaces, Binder servers and clients, message handlers, etc., through decompilation and parsing of the application code, and generates the IPC topology of the application according to the calling relationship between the components. Dynamic tracking monitors the Binder transactions, message sending and broadcast communication behaviors between processes during application runtime, and records the information of each IPC call, such as the initiator, receiver, calling interface, and transmitted data. By integrating the static and dynamic analysis results, the system can comprehensively master the remote calling and message passing between applications.
[0061] Similar to data interaction analysis, IPC analysis also needs to balance the cost and benefit of data collection. Too frequent dynamic tracking will bring a large performance overhead to the system, while too rough statistics may miss key interaction behaviors. Therefore, the system can filter and abstract appropriately when recording IPC data, focusing on core calls that have an impact on the upgrade process. For example, the IPC calls between system services and applications can be tracked, as they usually involve key functions such as system configuration and permission control; while some frequent but less business-related calls (such as heartbeat detection, log printing, etc.) can be tracked less frequently or ignored.
[0062] S203, statistics of broadcast receiver and content provider call frequency between applications to be upgraded; This step is based on steps S201 and S202, and further quantitatively analyzes the interaction intensity and dependency tightness between applications. By tracking the call frequency of application broadcast receivers and content providers, a quantitative model reflecting the real-time interaction between applications can be established, providing a reference for subsequent dependency relationship calculation and migration optimization.
[0063] Broadcast receivers are a commonly used message distribution mechanism in the Android system, and applications can register broadcast receivers to receive broadcast messages from the system or other applications, thereby triggering corresponding processing logic when a specific event occurs. The broadcast mechanism enables applications to interact in a loosely coupled manner, but it may also introduce some implicit dependencies. For example, if an application frequently sends a certain broadcast, and another application's core function depends on the reception of the broadcast, then during the upgrade process, it must be ensured that the broadcast interface of the sender and the broadcast processing logic of the receiver are compatible, otherwise the receiver's function may be abnormal. Therefore, by tracking the frequency of broadcast sending and receiving between applications, and estimating the dependency strength between applications in terms of broadcast communication, the system can help reasonably arrange the upgrade and migration order, and avoid function abnormalities caused by broadcast interruption.
[0064] Content provider is another commonly used cross-application data sharing mechanism in Android system, which allows an application to expose its own database, file, and other resources to other applications in a structured manner. Similar to broadcast receiver, content provider is also an important carrier of interaction and dependence between applications. Frequent queries to another application's content provider by an application means that it may rely on the data service provided by the latter to a greater extent. During the upgrade process, if the database on the provider side is upgraded and replaced first, it may cause query exceptions, data inconsistency, and other problems on the consumer side using the old version of API. Conversely, if the consumer side is upgraded first to adapt to the new database schema, but the provider side has not completed data migration, data access failures may also occur. Therefore, by tracking the call frequency of content providers and estimating the data dependence strength accordingly, the system can help optimize the data migration process during the upgrade, ensuring data consistency while reducing the impact of the upgrade on business continuity.
[0065] S204、According to the access record, the operation record, and the call frequency, a data interaction relationship between the applications to be upgraded is obtained, and an application data dependency graph is established according to the data interaction relationship; This step is based on the previous steps, and the data interaction relationship between the applications is comprehensively analyzed, and a formal dependency relationship model is constructed. By organically combining different dimensions of interaction data (such as database access, file operation, IPC call, etc.), a more comprehensive and accurate application data dependency relationship graph can be obtained, which intuitively presents the complex data flow and dependency chain between applications. This dependency relationship graph can guide the subsequent migration optimization and scheduling decisions, and also provides an important reference for the optimization and reconstruction of application architecture.
[0066] The first step of constructing the data dependency relationship graph is to normalize the interaction records and statistical data from different sources into a unified data format and representation method. For example, each database access record can be represented as a triple <sourceApp, targetDB, operation>, representing the access initiator, target database, and access operation type, respectively; each content provider call can be represented as <sourceApp, targetProvider, callFrequency>, representing the call initiator, target provider, and call frequency, respectively. This standardized representation method can eliminate the heterogeneity between different data sources, providing a unified data basis for subsequent relationship calculation and graph construction.
[0067] After data normalization, the system can leverage graph theory and data mining algorithms to quantify data interactions between applications across multiple dimensions. For example, the read / write dependency between two applications—that is, the degree to which one application relies on the data of another—can be calculated based on database access records. Functional dependency between two applications—that is, the degree to which one application relies on the services or functions provided by another—can be calculated based on IPC call records. The calculation process can also comprehensively consider factors such as interaction frequency, interaction data volume, and interaction time distribution to construct more refined dependency metrics.
[0068] After calculating the data interactions between applications, the system constructs an application data dependency graph. Each node in the graph represents an application, and directed edges between nodes represent data dependencies between applications. Edge weights represent the strength of these dependencies. Using this graph model, the system can intuitively identify applications with close data interactions and applications whose upgrades may require data migration from multiple applications, enabling better development of upgrade plans and migration strategies. For example, nodes with a high in-degree (i.e., those relied upon by many other applications) require extra caution during the upgrade process, minimizing modifications to their data formats and interface protocols or requiring advance communication and adaptation with dependent parties. For nodes with a high out-degree (i.e., those dependent on data from many other applications), upgrading them can be postponed until the dependent nodes have completed their upgrades and data migrations.
[0069] S205: Calculate the data migration priority according to the application data dependency graph, and write the data migration priority into the session file.
[0070] Because complex data dependencies may exist between applications, blindly migrating data based on the order in which applications are installed can lead to data inconsistencies, functional anomalies, and other issues. Using the application data dependency graph constructed in step S204, the order of data migration can be analyzed and optimized from a global perspective, ensuring the accuracy and efficiency of the migration process.
[0071] The core idea of calculating data migration priority is to minimize the data unavailability time and inconsistency state during migration, and to ensure that the dependent data is always migrated before the dependent party. For example, if application A depends on the data of application B, the data migration of B should be scheduled before A; if there is a circular dependency between A and B, the atomic migration unit needs to be split, and the dependent core data should be migrated first, and then the dependent party data. In addition, due to the large difference in data volume and complexity of different applications, the impact on the upgrade time is also different. Therefore, when determining the migration priority, we also need to consider the application data size, historical migration time, etc. to arrange the long migration time of large applications at the edge of the upgrade to avoid blocking the entire upgrade process.
[0072] Specifically, the system can convert the application data dependency graph into a migration priority list, where each item in the list represents a data migration task of an application, and the tasks with high priority are arranged in front. One way to calculate the priority list is to use the topological sorting algorithm, which can convert a directed acyclic graph into a linear order, ensuring that each node is always located after its dependent nodes. When applied to the data migration scenario, the algorithm can be adjusted based on the following rules: Aggregate each strongly connected component (i.e., loop) in the application dependency graph into a node to eliminate loop dependencies in the graph; Sort the aggregated nodes by in-degree from large to small (i.e., migrate the nodes with the most dependencies first) to form an initial priority queue; Remove the node with an in-degree of 0 (i.e., the node without dependencies on other nodes) from the queue and add it to the migration priority list, and remove all edges pointing to this node from the graph; Repeat step 3 until the queue is empty to get the final migration priority list.
[0073] After obtaining the migration priority list, the system can also fine-tune the priority based on the characteristics of the application itself (such as data volume, upgrade time, functional importance, etc.) to further improve the migration efficiency and availability. For example, for applications with large data volume but relatively independent functions, their migration tasks can be postponed to complete the upgrade of other critical applications first; while for some core applications or basic services (such as login authentication, message pushing, etc.), the migration should be completed as soon as possible to avoid blocking the upgrade progress of other applications.
[0074] Finally, the system writes the optimized data migration priority list into the upgrade session file for subsequent use by the upgrade scheduling and execution module. By reasonably planning the data migration sequence, the system can minimize functional interruptions and data inconsistencies during the upgrade process, improving the smoothness and reliability of the entire upgrade process. At the same time, this migration optimization method based on dependency analysis can also provide some inspiration for application developers, helping them identify potential coupling points in the system, optimize the data architecture and interface design of the application, and improve the maintainability and evolvability of the application.
[0075] In the above embodiment, by obtaining the data interaction relationship between the applications to be upgraded and establishing an application data dependency graph, the system can accurately grasp the data flow between the applications. According to the application data dependency graph, the system calculates the data migration priority and writes it into the session file, so that the system can follow the optimal migration order during data migration. This method based on data dependency analysis ensures the continuity of the data migration process and avoids data inconsistency during data migration. By optimizing the data migration sequence, the system reduces conflicts and blockages during data migration, improves the efficiency of data migration, and ensures the integrity and consistency of application data, enhancing the reliability of data processing during the upgrade process.
[0076] Further, in another embodiment, the key data interfaces that need to be monitored can also be determined according to the data interaction relationship, which specifically includes: analyzing shared database access interfaces between the applications to be upgraded; identifying file system interaction interfaces between the applications to be upgraded; determining inter-process communication interfaces between the applications to be upgraded; prioritizing the access interfaces, interaction interfaces, and communication interfaces according to the interface call frequency, and determining the interface with the highest priority as the key data interface; implanting a data collection probe at the key data interface; collecting data change records through the data collection probe; establishing a data rollback point based on the data change records; and writing the data rollback point information into the session file.
[0077] In this embodiment, the system further optimizes the risk control and fault tolerance capability during data migration. Through the monitoring of key data interfaces and the collection of data change records, the system can achieve data rollback and fault recovery during the upgrade process, improving the stability and reliability of the system. The main steps of this embodiment are analyzed in detail as follows: First, the system needs to identify the key interfaces that have the greatest impact on data consistency and integrity based on the data interaction relationship between applications. Here, three types of interfaces are mainly considered: first, database interfaces shared by applications for access, usually implemented through mechanisms such as ContentProvider, targeting structured data; second, file system-level interaction interfaces between applications, usually read and write operations on the same file or directory; third, inter-process communication interfaces between applications, mainly Binder, Socket, etc., transferring unstructured messages and data. The system can accurately identify these interfaces through static code analysis, dynamic link tracking, and other technical means.
[0078] After identifying all data interaction interfaces, the importance of different interfaces needs to be evaluated to determine the priority of monitoring. Here, the historical call frequency of the interface is mainly used to determine its criticality in the data transmission process. For example, if two applications frequently read and write the same file, the priority of the file interaction interface should be relatively high; if the number of calls to a Binder interface far exceeds that of other interfaces, it is likely that it carries the core data transmission task, and the priority of monitoring should also be higher. By calculating the interface call frequency and sorting, the system can select the top N% interfaces as the focus of monitoring and give special attention during the upgrade and rollback process.
[0079] After determining the key interfaces, the system can insert data collection probes at these interfaces to capture data changes in real time. The probe can be an independent agent module that obtains interface data through Hook or AOP techniques without invading the application program; it can also modify the underlying system framework code to directly embed data collection logic at key nodes such as ContentProvider and Binder; it can also use inotify and other file event monitoring mechanisms at the file system level to track the change history of key files and directories.
[0080] The main task of the data collection probe is to record the values before and after the interface data changes and the metadata of the change operation (such as operation time, operation type, operation source, etc.). These change records can be stored in memory or asynchronously written to files or databases, but need to ensure that they are not lost in the event of process crashes or system abnormalities. All change records are organized into a change history log in chronological order, which can be saved in full or compressed periodically, but must ensure that it can be fully replayed when needed.
[0081] The data change record can be used for data rollback when upgrade fails or system is abnormal. The basic principle of rollback is to replay the change history in reverse direction to restore the data to the state before the upgrade starts. In order to achieve controllable rollback granularity and acceptable rollback time, the system introduces the concept of data rollback point. The rollback point can be set at two levels: one is the transaction layer rollback point, which corresponds to the transaction commit boundary of the database such as Sqlite, and can be quickly rolled back to the state before the transaction starts by using the WAL mechanism; the other is the logical layer rollback point, which is inserted by the kernel data collection module regularly, and identifies a relatively independent and semantically complete data operation set (such as a file synchronization or a message processing flow), and when rolling back, it can be selectively restored to a specific logical rollback point.
[0082] During the monitoring and collection of data changes, the system continuously analyzes and marks possible rollback points, and writes the rollback point information (such as identification number, timestamp, associated data change set, etc.) into the session file for subsequent quick recovery when upgrade fails. When a fault occurs and needs to be rolled back, the system first finds the nearest rollback point in the session file according to the time point when the fault occurs, and then according to the change set recorded in the rollback point information, it replays the data change log from the back to the front until the data is completely restored to the consistent state before the rollback point.
[0083] In the above embodiment, by implanting data collection probes at key data interfaces, the system can monitor the data changes in real time during the upgrade process. The change records collected by the data collection probes provide the system with a complete data operation track, enabling the system to track the source and impact of each data modification. The rollback points established based on these data change records provide the system with precise data recovery location markers. When an exception occurs during the upgrade process, the system can accurately locate the specific position of the data change, and according to the rollback point information, it can restore the data to the correct state. This rollback mechanism based on real-time data monitoring enables the system to perform upgrade operations while ensuring data integrity, greatly reducing the risk of damage to system data caused by upgrade failure. Writing the rollback point information into the session file ensures that even after the system restarts, the data recovery position can still be accurately found, thereby ensuring the reliability of the upgrade process and the safety of the data.
[0084] The system in the embodiments of the present application will be described from the perspective of hardware processing. Please refer to Figure 3 An entity device structure diagram of a system for application linkage upgrade of an Android system provided by the embodiments of the present application.
[0085] It should be noted that, Figure 3 The structure of the system shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0086] AsFigure 3 As shown, the system includes a central processing unit (CPU) 301 which can perform various appropriate actions and processes, such as executing the methods in the above-described embodiments, according to programs stored in a read-only memory (ROM) 302 or loaded from a storage section 308 into a random access memory (RAM) 303. Various programs and data required for operation of the system are also stored in the RAM 303. The CPU 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0087] Connected to the I / O interface 305 are an input section 306 including a camera, an infrared sensor, and the like; an output section 307 including a liquid crystal display (LCD) and a speaker, and the like; the storage section 308 including a hard disk, and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as necessary. A removable media 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 310 as necessary, so that a computer program read therefrom is installed in the storage section 308 as necessary.
[0088] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 309, and / or installed from the removable media 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present application are performed.
[0089] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable computer programs. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
[0090] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Each block in the flowcharts or block diagrams can represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0091] As another aspect, the present application also provides a computer readable storage medium, which can be included in the system described in the above embodiments, or can exist independently without being assembled into the system. The above storage medium carries one or more computer programs, which, when executed by a processor of a system, enable the system to implement the method provided in the above embodiments.
[0092] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make modifications to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0093] In the above embodiments, the term "when" can be interpreted as "if" or "after" or "in response to determining" or "in response to detecting" according to the context. Similarly, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)" according to the context.
[0094] In the above embodiments, all or some of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or some of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium, or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk) and the like.
[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various storage code medium.
Claims
1. A method for linking and upgrading Android system applications, characterized in that: include: Generate an application list configuration file, wherein the application list configuration file includes the installation sequence numbers of the applications to be upgraded and the dependencies between the applications; Packing the installation package of the application to be upgraded and the corresponding resource files into a linkage upgrade package according to the application list configuration file; Create a session file and record the session ID, application ID and upgrade status information; Performing pre-installation verification on the applications in the linkage upgrade package according to the installation sequence number, and recording the verification results in the session file; Backing up the original application to obtain backup information, and recording the backup information to the session file; After the device restarts, the backup information is read and the applications are installed in sequence according to the installation sequence numbers; When an application installation failure is detected, the installed application is restored to a state before the upgrade according to the backup information in the session file.
2. The method according to claim 1, characterized in that The generating of the application list configuration file specifically includes: Collect the interface call relationships and resource reference relationships of the application to be upgraded; Constructing an application dependency directed graph according to the interface call relationship and the resource reference relationship; Analyzing the application dependency directed graph based on a topological sorting algorithm to obtain an optimal upgrade sequence; A unique installation sequence number is assigned to each of the to-be-upgraded applications according to the optimal upgrade sequence to obtain an application list configuration file.
3. The method according to claim 1, characterized in that The creation of the session file specifically includes: Parsing the application identification information in the application list configuration file; Allocating a session sub-identifier to each of the applications to be upgraded according to the application identification information; Set session validity period, session state type, and session version information; The session identifier, the session sub-identifier, the session state type and the session version information are written into a session file.
4. The method according to claim 1, wherein After restoring the installed application to a state before the upgrade according to the backup information in the session file, the method further includes: Acquire data interaction relationships between the applications to be upgraded, and establish an application data dependency graph based on the data interaction relationships; Calculating data migration priority according to the application data dependency graph; The data migration priority is written into the session file.
5. The method according to claim 4, characterized in that The acquiring of the data interaction relationship between the applications to be upgraded specifically includes: Scanning database access records and shared file operation records between the applications to be upgraded; Analyzing process communication interfaces and message queue data between the applications to be upgraded; Counting the calling frequencies of broadcast receivers and content providers among the applications to be upgraded; The data interaction relationship between the applications to be upgraded is obtained according to the access records, the operation records, and the calling frequencies.
6. The method according to claim 1, characterized in that After backing up the original application to obtain the backup information, the method further includes: Determine the key data interfaces that need to be monitored based on data interaction relationships; Implanting a data acquisition probe at the key data interface; Collect data change records through the data collection probe; Establishing a data rollback point based on the data change record; The data rollback point information is written into the session file.
7. The method according to claim 6, characterized in that Determining the key data interfaces that need to be monitored based on the data interaction relationship specifically includes: Analyzing the shared database access interface between the applications to be upgraded; Identifying a file system interaction interface between the applications to be upgraded; Determining an inter-process communication interface between the applications to be upgraded; The access interface, the interactive interface, and the communication interface are prioritized according to the interface call frequency, and the interface with the highest priority is determined as the key data interface.
8. A system for linking and upgrading Android system applications, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to perform the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to perform the method according to any one of claims 1 to 7.