An application migration method, device, apparatus and storage medium
By acquiring and utilizing the target application's page description documents and data, and leveraging the native functions of the operating system and host runtime environment, rapid migration and synchronization of cross-platform applications were achieved. This solved the problem of code refactoring on different platforms, reduced costs, and improved development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2020-12-08
- Publication Date
- 2026-04-28
AI Technical Summary
Developing the same application on different platforms requires writing code for each platform, which leads to high manpower and time costs for application migration and synchronization, making it impossible to achieve rapid migration and synchronization.
Obtain the target application's page description documents, configuration data, and resource data. Based on this data, migrate the application to a second platform. Utilize the native functions of the operating system and host runtime environment to generate cross-platform migration pages without requiring extensive code refactoring.
It enables the rapid and synchronized deployment of target applications across multiple platforms, reducing time and manpower costs and improving development efficiency.
Smart Images

Figure CN114610384B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to an application migration method, apparatus, device, and storage medium. Background Technology
[0002] With the continuous advancement of internet technology, a new application ecosystem has emerged. This new ecosystem eliminates the need for users to download and install applications; users can enjoy the performance experience of native applications simply by clicking and using them, making it highly popular among users and application developers. Currently, many platforms provide runtime environments for these new application ecosystems, such as Quick App platforms and WeChat Mini Program platforms. These platforms offer host environments for implementing these new applications, providing users with a convenient and fast application experience. However, different platforms typically have different application configurations, development languages, or implementation code formats. When developing the same application on different platforms, developers need to write separate application code for each platform. This means that switching platforms requires a complete code refactoring, hindering rapid application migration and synchronization, and wasting manpower and time.
[0003] Therefore, there is a need to provide an effective application migration solution to overcome the problems in the existing technologies mentioned above. Summary of the Invention
[0004] This disclosure provides an application migration method, apparatus, device, and storage medium that can quickly achieve cross-platform application migration, effectively reduce time and manpower costs, shorten application development cycles, and enable applications to be quickly synchronized across multiple platforms.
[0005] On the one hand, this disclosure provides an application migration method, the method comprising:
[0006] Obtain the page description document of the target application in the first platform, wherein the page description document is generated based on the elements to be migrated corresponding to the target application;
[0007] Determine the configuration data and resource data of the target application;
[0008] The target application is migrated to the second platform based on the page description document, the configuration data, and the resource data.
[0009] On the other hand, an application migration apparatus is provided, the apparatus comprising:
[0010] Document Acquisition Module: Used to acquire the page description document of the target application in the first platform, wherein the page description document is generated based on the elements to be migrated corresponding to the target application;
[0011] Information determination module: used to determine the configuration data and resource data of the target application;
[0012] Application migration module: used to migrate the target application to the second platform based on the page description document, the configuration data, and the resource data.
[0013] On the other hand, an application migration device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the application migration method as described above.
[0014] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the application migration method as described above.
[0015] On the other hand, a terminal is provided, the terminal including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the application migration method as described above.
[0016] The application migration method, apparatus, device, terminal, and storage medium provided in this disclosure have the following technical effects:
[0017] This disclosure first obtains the page description document of the target application in the first platform, and determines the configuration data and resource data of the target application. Then, based on the page description document, the configuration data and the resource data, the target application is migrated to the second platform. It can achieve rapid cross-platform migration of the target application by leveraging the native functions of the operating system and / or the host runtime environment of the second platform through the generated page description document, without the need for extensive code refactoring of the elements to be migrated. This improves the application development efficiency on different platforms, reduces time and manpower costs, and enables the rapid synchronous launch of the target application on multiple platforms. Attached Figure Description
[0018] To more clearly illustrate the technical solutions and advantages in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of an application environment provided by an embodiment of this disclosure;
[0020] Figure 2 This is a flowchart illustrating an application migration method provided in an embodiment of this disclosure;
[0021] Figure 3 This is a flowchart illustrating an application migration method provided in an embodiment of this disclosure;
[0022] Figure 4 This is a schematic diagram of the framework structure of a target application provided in one embodiment of this disclosure;
[0023] Figure 5 This is an example image of a live video display page provided in one embodiment of this disclosure;
[0024] Figure 6 This is an example diagram of a live streaming room display element page provided in one embodiment of this disclosure;
[0025] Figure 7 This is an example diagram of a host element display page provided in one embodiment of this disclosure;
[0026] Figure 8 This is a schematic diagram of the structure of an application migration device provided in an embodiment of this disclosure;
[0027] Figure 9 This is a hardware structure block diagram of a device for executing an application migration method provided in an embodiment of this disclosure. Detailed Implementation
[0028] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0030] Please see Figure 1 , Figure 1This is a schematic diagram of an application environment provided by an embodiment of this disclosure, such as... Figure 1 As shown, the application environment may include two nodes: terminal 01 and server 02. In practical applications, terminal 01 and server 02 can be directly or indirectly connected via wired or wireless communication to enable interaction between terminal 01 and server 02. This disclosure does not impose any limitations on this.
[0031] In this embodiment, terminal 01 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Specifically, terminal 01 can include a physical device, which may include a network communication unit, processor, and memory, etc., and may also include software running on the physical device, which may include applications, etc. Specifically, terminal 01 can obtain the page description document of the target application, and determine the configuration data and resource data of the target application based on the application migration instruction, and migrate the target application to the second platform according to the page description document, configuration data, and resource data. The page description document is generated based on the elements to be migrated corresponding to the target application, and the interface description document includes attribute tags, execution conditions, and display status information corresponding to the elements to be migrated.
[0032] In this embodiment, server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Specifically, server 02 can include physical devices, such as network communication units, processors, and memory, and can also include software running on the physical devices, such as applications.
[0033] In this embodiment of the disclosure, server 02 can run a second platform, which is used to provide a host runtime environment for the migrated target application.
[0034] In this embodiment of the disclosure, users can access the target application through the display interface corresponding to the second platform, and then trigger the operation of the target application through the access operation. Through the display interface corresponding to the second platform, users can use the target application instantly without downloading and installing a separate application program (APP) for the target application.
[0035] It should be noted that, Figure 1 This is merely a schematic diagram of an application environment. In actual applications, this application environment may include more or fewer nodes, and this disclosure does not impose any limitations.
[0036] The following describes one application migration method disclosed herein. Figure 2 This is a flowchart illustrating an application migration method provided in this disclosure. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive methods, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 2 As shown, the method may include:
[0037] S201: Obtain the page description document of the target application in the first platform. The page description document is generated based on the elements to be migrated corresponding to the target application.
[0038] In this embodiment of the disclosure, the first platform is the platform that currently provides the host runtime environment for the target application. Users can obtain the access entry of the target application through the display interface corresponding to the first platform, and then trigger the operation of the target application in the first platform through the access operation.
[0039] In practical applications, the page description document may include attribute tags, execution conditions, and display status information corresponding to the element to be migrated. In some embodiments, attribute tags may correspond to the interface data of the element to be migrated, the executable file may correspond to the executable code segment of the element to be migrated, and the display status information may correspond to the style description file of the element to be migrated.
[0040] In one embodiment, the page description document can be an HTML document, such as an HTML5 document.
[0041] In some embodiments, obtaining the page description document of the target application in the first platform may include:
[0042] S2011: Obtain the network address of the page description document.
[0043] S2012: Obtain page description documents based on network addresses.
[0044] In this embodiment of the disclosure, the network address of the page description document is used to locate the storage location of the page description document. Specifically, the page description document can be stored on the server of the second platform, or it can be stored on a server other than the server of the second platform. The IP address of the server storing the page description document can be obtained based on the aforementioned network address, thereby retrieving the page description document from that server.
[0045] S203: Determine the configuration and resource data of the target application.
[0046] In this embodiment of the disclosure, the configuration data refers to the data required to construct the host component set. This may include component configuration data and data communication configuration data for the native functions of the operating system and / or the host runtime environment of the second platform required when migrating the target application to the second platform. For example, this includes interface information data to be called and functional module information data to be utilized. Specifically, the resource data refers to the data required to construct the resource display page, and may include resource component data for constructing the resource display page of the target application.
[0047] In practical applications, before step S203, the application migration method may further include: receiving an application data packet of the target application, the application data packet including configuration data and resource data. Correspondingly, step S203 can be: determining the configuration data and resource data of the target application from the application data packet. The application data packet can be stored in a preset location on the server of the second platform.
[0048] S205: Migrate the target application to a second platform based on page description documents, configuration data, and resource data.
[0049] In this embodiment, the page description document of the target application in the first platform is first obtained, and the configuration data and resource data of the target application are determined. Then, based on the page description document, configuration data and resource data, the target application is migrated to the second platform. It can realize the cross-platform rapid migration of the target application by leveraging the native functions of the operating system and / or the host runtime environment of the second platform through the generated page description document, without the need for extensive code refactoring of the elements to be migrated. This improves the application development efficiency on different platforms, reduces time and manpower costs, and enables the rapid synchronous online deployment of the target application on multiple platforms.
[0050] Based on some or all of the above embodiments, in this embodiment of the disclosure, after step S203, the application migration method may further include:
[0051] S301: Construct a host component set based on configuration data.
[0052] In practical applications, constructing a host component set based on configuration data can be specifically achieved by using a preset engine to execute the configuration data, thereby constructing the host component set and obtaining the host base layer. Specifically, the preset engine is the execution engine provided by the host runtime environment of the second platform; for example, it could be a JavaScript engine used to interpret and execute instructions in the application data package.
[0053] S303: Generate a resource display page based on resource data.
[0054] In practical applications, generating a resource display page based on resource data can be specifically done by using a preset engine to process the resource data and generate the resource display page.
[0055] S305: Load the page description document to obtain the attribute tags, execution conditions, and display status information of the element to be migrated.
[0056] S307: Generate the migration element page corresponding to the element to be migrated based on the attribute tag, execution conditions, and display status information.
[0057] S309: Generate the target application on the second platform based on the host component set, resource display page, and migration element page.
[0058] In practical applications, a page description document can be loaded using a page network view control and then parsed. The page description document includes attribute tags corresponding to the elements to be migrated, execution conditions for those attribute tags, and display status information. By parsing the page description document, the instructions corresponding to the execution conditions, or the executable files (e.g., JavaScript files) corresponding to the execution conditions, can be obtained, as well as the display status files (e.g., CSS files) corresponding to the display status information. Accordingly, step S307 can be specifically as follows: Parsing and rendering the attribute tags, execution conditions, and display status information using the page network view control yields the migration element page corresponding to the elements to be migrated, and then generating the target application based on the host component collection, the resource display page, and the migration element page.
[0059] Based on some or all of the above embodiments, in this embodiment of the disclosure, after step S309, the application migration method may further include:
[0060] S311: Display resource display page and migration element page.
[0061] S313: In response to a target instruction triggered based on a migrated element page, execute the target operation corresponding to the target instruction based on the host component collection.
[0062] In practical applications, the host component collection can be used to display resource display pages and migration element pages. The host component collection can be run through a preset engine to realize the display of resource display pages and migration element pages.
[0063] In practical applications, the host component collection can communicate data with both the resource display page and the migration element page, and detect target commands originating from the migration element page, thereby executing corresponding operations. Specifically, target commands can be triggered by user interaction with the migration element page, and the host component collection will then execute the target operation corresponding to the target command. For example, if a user clicks an input box or the play button on the migration element page, the user's click operation triggers a corresponding keyboard display command or video playback command. The host component collection responds to the keyboard display command or video playback command by executing the corresponding keyboard display operation and video playback operation.
[0064] Based on the above-described solution of this disclosure, by obtaining the page description document of the target application in the first platform, and determining the configuration data and resource data of the target application, and then migrating the target application to the second platform based on the page description document, configuration data, and resource data, it is possible to achieve rapid cross-platform migration of the target application based on the native functions of the operating system and / or the host runtime environment of the second platform, through the generated page description document, without the need for extensive code refactoring of the elements to be migrated, thereby improving the application development efficiency on different platforms, reducing time and manpower costs, and enabling the rapid synchronous online deployment of the target application on multiple platforms.
[0065] It should be noted that in some cases, when the elements of the target application to be migrated in the first platform are implemented in the second platform, incompatibility or poor display performance may occur. Therefore, this disclosure also provides another application migration method, including:
[0066] S401: Obtain the page description document of the target application in the first platform. The page description document is generated based on the elements to be migrated corresponding to the target application.
[0067] S403: Determine the configuration and resource data of the target application.
[0068] S405: Construct a host component set based on configuration data.
[0069] S407: Generate a resource display page based on resource data.
[0070] S409: Load the page description document to obtain the attribute tags, execution conditions, and display status information of the element to be migrated.
[0071] S411: Generate the migration element page corresponding to the element to be migrated based on the attribute tag, execution conditions, and display status information.
[0072] S413: Generate the target application on the second platform based on the host component set, resource display page, and migration element page.
[0073] In practical applications, the implementation methods of steps S401 and S403 are similar to those of the aforementioned steps S201 and S203, and the implementation methods of steps S405 and S413 are similar to those of the aforementioned steps S301 and S309, and will not be repeated here.
[0074] After step S413, please refer to Figure 3 Application migration methods also include:
[0075] S415: Determine the display performance results of the element to be migrated on the migration element page.
[0076] In practical applications, the migration element page obtained based on the page description document of the target application in the first platform, and the target application generated on the second platform based on the host component set and resource display page, can enable the unupdated target application to run on the second platform. This allows the display performance results of the elements to be migrated on the migration element page to be obtained, including but not limited to display effects and operation performance results.
[0077] S417: Determine the target element to be migrated from the elements to be migrated based on the display performance results.
[0078] In practical applications, when the display performance of the element to be migrated does not meet the preset conditions, that is, when the element to be migrated does not meet the performance requirements of the target application implemented on the second platform, the element to be migrated will be designated as the target element to be migrated. Specifically, the preset conditions can be set according to actual needs. For example, the keyboard input box element should be displayed below the page of the migrated element, and the border of the keyboard input box should be aligned with the border of the page of the migrated element.
[0079] S419: Determine the target host element corresponding to the target element to be migrated in the second platform.
[0080] In practical applications, a host element with the same function as the target element to be migrated is identified in the second platform, thus obtaining the target host element.
[0081] S421: Update the page description document based on the target element to be migrated.
[0082] In some embodiments, step S421 above may include:
[0083] S4211: Delete or hide the attribute tags corresponding to the target element to be migrated in the page description document to obtain the target page description document;
[0084] S4212: Update the page description document based on the target page description document.
[0085] In a specific embodiment, the attribute tags corresponding to the target element to be migrated are deleted or hidden in the page description document so that the target element to be migrated is not displayed on the migration element page.
[0086] S423: Generate a host element document based on the attribute tags of the target host element.
[0087] In practical applications, the host element document can include the attribute tags of the target host element, as well as the execution conditions and display status information corresponding to the attribute tags of the target host element.
[0088] S425: Migrate the target application to a second platform based on the updated page description document, host element document, configuration data, and resource data.
[0089] In some embodiments, after step S425, the application migration method may further include:
[0090] S427: Generate the corresponding updated migration element page based on the updated page description document.
[0091] In practical applications, the implementation of step S427 is similar to that of steps S305 to S307 described above, and will not be repeated here.
[0092] S429: Generate the corresponding host element page based on the host element document.
[0093] In practical applications, generating the corresponding host element page based on the host element document can be specifically done as follows: load the host element document using a preset engine, and further parse and execute the corresponding rendering operations on the host element document to obtain the host element page.
[0094] S431: Generate the target application on the second platform based on the host component set, resource display page, updated migration element page, and host element page.
[0095] Accordingly, please refer to Figure 4 , Figure 4 The diagram shows a schematic of the framework structure of a target application provided in an embodiment. The framework structure of the target application may include at least a host base layer 1 corresponding to the host component set, a resource layer 2 corresponding to the resource display page, and a migrated layer 3 corresponding to the migrated element page.
[0096] The host layer 1 is used to handle the interface display corresponding to the resource layer 2 and the portable layer 3, detect and implement the native call capabilities of the portable layer 3, and conduct data communication with the resource layer 2 and the portable layer 3. For example, the host layer 1 can detect the call to the target protocol (such as the JsBridge format protocol) in the link jump to implement the native capabilities that the portable layer 3 expects to call.
[0097] Resource layer 2 is used to display resource data, such as playing live streams, displaying text or images, etc. In one embodiment, when the target application is a live streaming application, resource layer 2 is a live stream layer, which can be implemented using the video tag of the Quick App platform.
[0098] Among them, the portable layer 3 is used to load portable elements that can be quickly migrated to various terminals across platforms, i.e., common elements; in some cases, page elements on the portable layer 3 can be implemented by loading HTML5 format page description documents through Webview.
[0099] In some embodiments, when a portable element in the portable layer 3 fails to meet preset performance requirements in the current platform's host runtime environment, it can be replaced by a corresponding host element. Accordingly, in addition to the three layers mentioned above, the framework structure of the target application may also include a host element layer 4. Please refer to [reference needed]. Figure 4 The host element layer 4 is used to replace incompatible or poorly performing elements in the portable layer 3 during the cross-platform migration of the target application. For example, when the target application is a live streaming application, the input tag of the Quick App platform can be used to replace the chat input box tag in the HTML5 format page description document, making it easier to implement keyboard pop-up and character input. Another example is that a full-screen overlay can be used to detect clicks from unlogged-in users and prompt them to log in.
[0100] In this embodiment, after generating the migration element page based on the page description document of the target application in the first platform, and the target application in the second platform based on the host component set and resource display page, the display performance results of the elements to be migrated on the migration element page are determined. Based on the performance results, target elements to be migrated that do not meet preset conditions are identified. The attribute tags of the target elements to be migrated in the page description document are then hidden and deleted, thereby achieving the hiding and deletion of the target elements to be migrated in the migration element page. Simultaneously, a host element document is generated based on the host element corresponding to the target elements to be migrated, so as to replace the target elements to be migrated with the host elements, improving the display effect and performance of the target application in the second platform and enhancing the user experience.
[0101] The following describes the application migration method disclosed herein for live streaming applications, specifically, the application migration method may include:
[0102] 1) Obtain the page description document of the live streaming application in the first platform. The page description document is generated based on the elements to be migrated on the corresponding live streaming page of the live streaming application. The elements to be migrated are the page display elements of the live streaming page, such as the input bar, message sending button, text display box, function bar, interface border or bullet screen display box on the live streaming page.
[0103] 2) Determine the configuration data and live streaming resource data for the live streaming application;
[0104] 3) Construct a host component collection based on the configuration data;
[0105] 4) Generate the live stream video display page based on the live stream resource data; please refer to... Figure 5 , Figure 5 An example diagram of a live video display page provided in one embodiment is shown, which corresponds to a live video streaming scenario.
[0106] 5) Load the page description document to obtain the attribute tags, execution conditions, and display status information corresponding to the page display elements of the live broadcast page;
[0107] 6) Generate the live stream display element page corresponding to the element to be migrated based on the attribute tags, execution conditions, and display status information; please refer to... Figure 6 , Figure 6 An example diagram of a live streaming room display element page provided in one embodiment is shown, which corresponds to a portable layer implemented in the platform host runtime environment.
[0108] 7) Generate a live streaming application on the second platform based on the host component collection, the live streaming video display page, and the live streaming display element page.
[0109] Furthermore, the application migration method may also include:
[0110] 8) Determine the display performance results of the page display elements of the live broadcast page on the live broadcast room display element page;
[0111] 9) Determine the target page display elements among the page display elements of the live streaming page based on the display performance results;
[0112] 10) Determine the target host display element corresponding to the target page display element in the second platform; please refer to... Figure 7 , Figure 7 An example diagram of a host element display page provided in one embodiment is shown. This page corresponds to the host element layer where the target host display element is located in the platform host runtime environment, such as... Figure 7 As shown, the chat input box in the portable layer was replaced by the chat input box in the host element layer to achieve a better performance experience;
[0113] 11) Update the page description document based on the target page display elements. The updated page description document is the page description document with the target page display element tags deleted or hidden.
[0114] 12) Generate host element documents based on the attribute tags of the target host display elements;
[0115] 13) Migrate the live streaming application to the second platform based on the updated page description document, host element document, configuration data, and live streaming resource data.
[0116] In practical applications, the technical solutions disclosed herein enable the following for cross-platform migration of live streaming applications: Based on configuration data, the native functions of the operating system and / or different platform host environments can be obtained; based on live streaming resource data, live video streams and related pages can be reproduced; and based on page description documents, the migration of numerous display elements on the live streaming application page between different platforms can be quickly achieved without extensive code refactoring of display elements, effectively reducing the reimplementation cost of live streaming application migration. Furthermore, by simply deleting or modifying the page display documents and generating corresponding host element documents, the replacement of page display elements can be quickly achieved, improving the adaptability and performance of the live streaming application across different platforms. In summary, the technical solutions disclosed herein effectively reduce the time and manpower costs of cross-platform application migration, enabling the rapid and synchronized deployment of live streaming applications on multiple platforms.
[0117] This disclosure also provides an application migration device, such as... Figure 8 As shown, the device includes:
[0118] Document Acquisition Module 10: Used to acquire the page description document of the target application in the first platform. The page description document is generated based on the elements to be migrated corresponding to the target application.
[0119] Information determination module 20: Used to determine the configuration data and resource data of the target application;
[0120] Application migration module 30: Used to migrate the target application to the second platform based on page description documents, configuration data, and resource data.
[0121] In some embodiments, the apparatus may further include:
[0122] Host component building module: used to build host components based on the configuration data after the configuration data and resource data of the target application are determined;
[0123] Resource display page generation module: used to generate resource display pages based on resource data;
[0124] Document parsing module: used to load the page description document and obtain the attribute tags, execution conditions and display status information of the elements to be migrated;
[0125] Migration Element Page Generation Module: Used to generate migration element pages corresponding to the elements to be migrated based on attribute tags, execution conditions, and display status information;
[0126] Target application generation module: Used to generate target applications on the second platform based on the host component collection, resource display page, and migration element page.
[0127] In some embodiments, the apparatus may further include:
[0128] Performance Result Determination Module: After the target application is generated on the second platform based on the host component set, resource display page, and migration element page, the module determines the display performance of the elements to be migrated on the migration element page.
[0129] Target element to be migrated determination module: used to determine the target element to be migrated from the elements to be migrated based on the display performance results;
[0130] Target Host Element Determination Module: Used to determine the target host element corresponding to the target element to be migrated in the second platform;
[0131] Page description document update module: Used to update the page description document based on the target element to be migrated;
[0132] Host element document generation module: used to generate host element documents based on the attribute tags of the target host element;
[0133] Correspondingly, the application migration module 30 can be used to migrate the target application to a second platform based on the updated page description document, host element document, configuration data, and resource data.
[0134] In some embodiments, the page description document update module may include:
[0135] Target page description document acquisition unit: used to delete or hide the attribute tags corresponding to the target element to be migrated in the page description document, and obtain the target page description document;
[0136] Document Update Unit: Used to update the page description document based on the target page description document.
[0137] In some embodiments, the method further includes:
[0138] Page Display Module: Used to display the resource display page and migration element page after the target application is generated on the second platform based on the host component collection, resource display page and migration element page;
[0139] Target operation execution module: Used to respond to target instructions triggered based on the migrated element page, and execute the target operation corresponding to the target instruction based on the host component collection.
[0140] In some embodiments, the document acquisition module 10 includes:
[0141] Network address retrieval unit: used to retrieve the network address of the page description document;
[0142] Network address unit: Used to retrieve page description documents based on network addresses.
[0143] In some embodiments, when the target application is a live streaming application, the page description document is generated based on the elements to be migrated from the corresponding live streaming page of the live streaming application, and the elements to be migrated are the page display elements of the live streaming page.
[0144] The apparatus and method embodiments in this disclosure are based on the same application concept.
[0145] This disclosure provides an application migration device, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the application migration method provided in the above method embodiments.
[0146] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.
[0147] The method embodiments provided in this disclosure can be executed in a mobile terminal, computer terminal, server or similar computing device. Figure 9 This is a hardware structure block diagram of a device for implementing an application migration method, provided in an embodiment of this application. For example... Figure 9As shown, the device 900 can vary considerably depending on its configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on a server. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the device 900. The device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0148] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module for wireless communication with the Internet.
[0149] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, device 900 may also include... Figure 9 The more or fewer components shown, or having the same Figure 9 The different configurations shown.
[0150] Embodiments of this disclosure also provide a computer-readable storage medium, which may be disposed in a device to store at least one instruction or at least one program related to implementing an application migration method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the application migration method provided in the above method embodiments.
[0151] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0152] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0153] As can be seen from the embodiments of the application migration method, apparatus, device, or storage medium provided in this disclosure above, this disclosure first obtains the page description document of the target application in the first platform, and determines the configuration data and resource data of the target application. Then, based on the page description document, the configuration data, and the resource data, the target application is migrated to the second platform. It can achieve rapid cross-platform migration of the target application based on the native functions of the operating system and / or the host runtime environment of the second platform through the generated page description document, without the need for extensive code refactoring of the elements to be migrated. This improves the application development efficiency on different platforms, reduces time and manpower costs, and enables the rapid synchronous online deployment of the target application on multiple platforms.
[0154] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than those shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0155] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, servers, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0156] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0157] The above are merely preferred embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. An application migration method, characterized in that, The method includes: Obtain the page description document of the target application in the first platform, wherein the page description document is generated based on the elements to be migrated corresponding to the target application; Determine the configuration data and resource data of the target application; Construct a host component set based on the configuration data; Generate a resource display page based on the resource data; Load the page description document to obtain the attribute tags, execution conditions, and display status information corresponding to the element to be migrated; Generate the migration element page corresponding to the element to be migrated based on the attribute tags, the execution conditions, and the display status information; The target application is generated on the second platform based on the host component set, the resource display page, and the migration element page.
2. The method according to claim 1, characterized in that, After the target application is generated on the second platform based on the host component set, the resource display page, and the migration element page, the method further includes: Determine the display performance results of the element to be migrated on the page to be migrated; The target element to be migrated among the elements to be migrated is determined based on the display performance results; Determine the target host element corresponding to the target element to be migrated in the second platform; Update the page description document based on the target element to be migrated; Generate a host element document based on the attribute tags of the target host element; The target application is migrated to the second platform based on the updated page description document, the host element document, the configuration data, and the resource data.
3. The method according to claim 2, characterized in that, The step of updating the page description document based on the target element to be migrated includes: Delete or hide the attribute tags corresponding to the target element to be migrated in the page description document to obtain the target page description document; Update the page description document based on the target page description document.
4. The method according to any one of claims 1-3, characterized in that, After the target application is generated on the second platform based on the host component set, the resource display page, and the migration element page, the method further includes: Display the resource display page and the migration element page; In response to a target instruction triggered based on the migrated element page, a target operation corresponding to the target instruction is executed based on the host component set.
5. The method according to claim 1, characterized in that, The process of obtaining the page description document of the target application in the first platform includes: Obtain the network address of the page description document; The page description document is obtained based on the network address.
6. The method according to any one of claims 1-3 and 5, characterized in that, When the target application is a live streaming application, the page description document is generated based on the elements to be migrated on the corresponding live streaming page of the live streaming application, and the elements to be migrated are the page display elements of the live streaming page.
7. An application migration device, characterized in that, The device includes: Document Acquisition Module: Used to acquire the page description document of the target application in the first platform, wherein the page description document is generated based on the elements to be migrated corresponding to the target application; Information determination module: used to determine the configuration data and resource data of the target application; Host component building module: used to build a set of host components based on the configuration data; Resource display page generation module: used to generate a resource display page based on the resource data; Document parsing module: used to load the page description document and obtain the attribute tags, execution conditions and display status information corresponding to the element to be migrated; Migration Element Page Generation Module: Used to generate a migration element page corresponding to the element to be migrated based on the attribute tags, the execution conditions, and the display status information; Target application generation module: used to generate a target application on the second platform based on the host component set, the resource display page, and the migration element page.
8. The apparatus according to claim 7, characterized in that, The device further includes: Performance result determination module: used to determine the display performance result of the element to be migrated on the migration element page after the target application is generated on the second platform based on the host component set, the resource display page and the migration element page; Target element to be migrated determination module: used to determine the target element to be migrated among the elements to be migrated based on the display performance results; Target Host Element Determination Module: Used to determine the target host element corresponding to the target element to be migrated in the second platform; Page description document update module: used to update the page description document based on the target element to be migrated; Host element document generation module: used to generate host element documents based on the attribute tags of the target host element; Application migration module: used to migrate the target application to the second platform based on the updated page description document, the host element document, the configuration data, and the resource data.
9. The apparatus according to claim 8, characterized in that, The page description document update module includes: Target page description document acquisition unit: used to delete or hide the attribute tags corresponding to the target element to be migrated in the page description document, so as to obtain the target page description document; Document update unit: used to update the page description document based on the target page description document.
10. The apparatus according to any one of claims 7-9, characterized in that, The device further includes: Page display module: used to display the resource display page and the migration element page after the target application is generated on the second platform based on the host component set, the resource display page and the migration element page; Target operation execution module: In response to a target instruction triggered based on the migrated element page, execute the target operation corresponding to the target instruction based on the host component set.
11. The apparatus according to claim 7, characterized in that, The document acquisition module includes: Network address acquisition unit: used to acquire the network address of the page description document; Network address unit: used to obtain the page description document based on the network address.
12. The apparatus according to any one of claims 7-9 and 11, characterized in that, When the target application is a live streaming application, the page description document is generated based on the elements to be migrated on the corresponding live streaming page of the live streaming application, and the elements to be migrated are the page display elements of the live streaming page.
13. An application migration device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the application migration method as described in any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the application migration method as described in any one of claims 1 to 6.
15. A computer program product, characterized in that, The computer program product or computer program includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the application migration method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for making CSS style in Hybrid APP compatible with different platforms
CN107463383A