Method and device for generating cross-platform installation package of application program, medium and terminal
By receiving and processing the target information of the terminal device, generating and adjusting the user interface layout code, and performing consistency detection in the terminal device simulator, the problem of low compatibility of cross-platform installation packages in the existing technology is solved, and the problem of low compatibility of cross-platform installation packages is realized. Consistent user experience and high quality on different end devices.
Patent Information
- Application Number
- CN202411448443.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-11
AI Technical Summary
The prior art has low compatibility when generating cross-platform installation packages for applications, making it difficult to ensure consistency of user experience in different terminal devices.
By receiving the target device information of each terminal device, matching the user interface template, and adjusting the interface layout code according to operating habits and terminal device style information, generating the user interface layout code. Deploy the application logic and user interface layout code into the terminal device simulator separately, perform consistency detection, generate installation packages for each terminal device, and combine them into cross-platform installation packages.
Improve the compatibility of the application cross-platform installation package, ensure the consistency and high quality of user experience in different terminal devices, and improve the user experience.
Smart Images

Figure CN119415146A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a method, device, medium, and terminal for generating a cross-platform installation package for an application. Background Art
[0002] With the advancement of technology, internet applications are available on a growing number of devices, including mobile phones, tablets, watches, and computers. These devices run on a variety of operating systems, including Android, iOS, Windows, and macOS. When developing applications, compatibility between these different operating systems must be considered to ensure a seamless user experience. Traditionally, developers have developed separate versions of their applications for each operating system, significantly increasing their workload.
[0003] To improve this situation, currently, during the application development process, responsive design frameworks such as Bootstrap and Foundation are usually used, and media queries and fluid layout methods are used to adapt the interactive interface across devices. Then, cross-platform development tools such as React Native and Flutter are used to run a set of codes on multiple terminal devices across platforms for consistency adjustments, and then a cross-platform installation package of the application is generated to achieve the goal of reducing the workload of developers.
[0004] However, due to the limited interactive interfaces available in media queries, it is difficult to ensure matching with new device information; and because the code needs to be run consistently in multiple terminal devices across platforms, it is difficult to ensure a consistent user experience across all terminal devices, resulting in low compatibility of the generated application cross-platform installation package. Summary of the Invention
[0005] In view of this, the present application provides a method and device, medium, and terminal for generating a cross-platform installation package for an application, the main purpose of which is to improve the low compatibility problem of the cross-platform installation package for the application generated based on the existing method.
[0006] According to one aspect of the present application, a method for generating a cross-platform installation package for an application is provided, comprising:
[0007] Receive target device information of each terminal device, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information;
[0008] matching a user interface template for a corresponding terminal device according to the target hardware information, and adjusting elements contained in the user interface template according to the target operating habit information and the target terminal device style information to generate a user interface layout code, wherein the user interface template is pre-configured according to the predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model for which model training has been completed;
[0009] The application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulators, the application is run in each of the terminal device simulators, the consistency of the application in different terminal device simulators is tested to generate an installation package corresponding to each of the terminal devices, and the various installation packages are combined to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
[0010] Preferably, the method further comprises:
[0011] Generate test cases for the application based on business requirements;
[0012] Based on a distributed architecture, the test cases are run simultaneously on each terminal device tester, and the running results of the test cases in each terminal device tester are recorded to generate a multi-dimensional comparison report to optimize the cross-platform installation package of the application based on the multi-dimensional comparison report. The multi-dimensional comparison report includes at least background operation data and device performance indicator data.
[0013] Preferably, the steps of deploying the application logic and each of the user interface layout codes to corresponding terminal device simulators, running the application in each of the terminal device simulators, detecting the consistency of the application in different terminal device simulators, generating installation packages corresponding to each of the terminal devices, and combining the installation packages to generate a cross-platform installation package for the application include:
[0014] Pre-setting a plurality of detection breakpoints in the application logic of the application program;
[0015] Deploying the application logic after setting the detection breakpoints and each of the user interface layout codes into corresponding terminal device simulators, and running the application program simultaneously in each of the terminal device simulators to perform consistency detection based on multiple detection breakpoints;
[0016] When the application is run to a detection breakpoint, the application in each terminal device simulator is paused, and the running results in each terminal device simulator are compared to see whether they are consistent, the running results including the current user interface and background running data in the terminal device simulator, and the consistent running results including the consistency of the current user interface and the consistency of the background running data;
[0017] If they are consistent, continue to run the application in each of the terminal device simulators simultaneously, and generate an installation package corresponding to each of the terminal devices when it is determined that the running results of each of the terminal device simulators corresponding to all the detection breakpoints are consistent;
[0018] If the running results of the terminal device simulators corresponding to any detection breakpoint are inconsistent, modify the application logic and the user interface layout codes, and re-perform consistency testing based on the modified application logic and user interface layout codes, until the consistency test passes, and generate an installation package corresponding to each terminal device;
[0019] The installation packages are combined to generate a cross-platform installation package for the application.
[0020] Preferably, before matching the user interface template for the corresponding terminal device according to the target hardware information, the method further includes:
[0021] Acquire current device information of each terminal device, wherein the current device information includes at least current hardware information, current operation habit information, and current terminal device style information;
[0022] performing prediction processing based on each of the current device information based on the corresponding device information prediction models that have completed model training, thereby obtaining predicted device information corresponding to each of the terminal devices, wherein the device information prediction models are obtained by model training based on the historical device information of each of the terminal devices, and the predicted device information includes at least predicted hardware information, predicted operating habit information, and predicted terminal device style information;
[0023] A user interface template is configured for each of the predicted device information.
[0024] Preferably, before performing prediction processing based on each of the current device information using the device information prediction models that have completed model training to obtain the predicted device information corresponding to each of the terminal devices, the method further includes:
[0025] Acquire multiple sets of historical device information of each terminal device respectively, and divide the information into a training set and a test set;
[0026] Constructing initial device information prediction models corresponding to each of the terminal devices respectively;
[0027] Performing model training on the matched initial device information prediction model based on each of the training sets to obtain multiple intermediate device information prediction models;
[0028] The model parameters of the matched intermediate device information prediction model are optimized based on each of the test sets to obtain multiple device information prediction models that have completed model training, so as to perform device information prediction operations based on the corresponding device information prediction models that have completed model training.
[0029] Preferably, the target operation habit information includes at least target interaction logic operation habit information, target gesture control operation habit information, and target interaction preference operation habit information.
[0030] Preferably, the target terminal device style information at least includes target interface text display style information, target interface color display style information, target interface virtual key style information, and target animation display style information.
[0031] According to another aspect of the present application, a device for generating a cross-platform installation package for an application is provided, comprising:
[0032] A target device information receiving module is used to receive target device information of each terminal device, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information;
[0033] a user interface layout code generation module, configured to match a user interface template for a corresponding terminal device based on the target hardware information, and to adjust elements contained in the user interface template based on the target operating habit information and the target terminal device style information to generate user interface layout code, wherein the user interface template is pre-configured based on predicted device information, which is predicted based on a corresponding device information prediction model for which model training has been completed;
[0034] A cross-platform installation package generation module is used to deploy the application logic of the application and each of the user interface layout codes to the corresponding terminal device simulators, run the application in each of the terminal device simulators, detect the consistency of the application in different terminal device simulators to generate installation packages corresponding to each of the terminal devices, and combine the various installation packages to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
[0035] Preferably, the device further comprises a testing module for:
[0036] Generate test cases for the application based on business requirements;
[0037] Based on a distributed architecture, the test cases are run simultaneously on each terminal device tester, and the running results of the test cases in each terminal device tester are recorded to generate a multi-dimensional comparison report to optimize the cross-platform installation package of the application based on the multi-dimensional comparison report. The multi-dimensional comparison report includes at least background operation data and device performance indicator data.
[0038] Preferably, the cross-platform installation package generation module is specifically used to:
[0039] Pre-setting a plurality of detection breakpoints in the application logic of the application program;
[0040] Deploying the application logic after setting the detection breakpoints and each of the user interface layout codes into corresponding terminal device simulators, and running the application program simultaneously in each of the terminal device simulators to perform consistency detection based on multiple detection breakpoints;
[0041] When the application is run to a detection breakpoint, the application in each terminal device simulator is paused, and the running results in each terminal device simulator are compared to see whether they are consistent, the running results including the current user interface and background running data in the terminal device simulator, and the consistent running results including the consistency of the current user interface and the consistency of the background running data;
[0042] If they are consistent, continue to run the application in each of the terminal device simulators simultaneously, and generate an installation package corresponding to each of the terminal devices when it is determined that the running results of each of the terminal device simulators corresponding to all the detection breakpoints are consistent;
[0043] If the running results of the terminal device simulators corresponding to any detection breakpoint are inconsistent, modify the application logic and the user interface layout codes, and re-perform consistency testing based on the modified application logic and user interface layout codes, until the consistency test passes, and generate an installation package corresponding to each terminal device;
[0044] The installation packages are combined to generate a cross-platform installation package for the application.
[0045] Preferably, before the user interface layout code generation module, the device further includes a user interface template configuration module, which is used to:
[0046] Acquire current device information of each terminal device, wherein the current device information includes at least current hardware information, current operation habit information, and current terminal device style information;
[0047] performing prediction processing based on each of the current device information based on the corresponding device information prediction models that have completed model training, thereby obtaining predicted device information corresponding to each of the terminal devices, wherein the device information prediction models are obtained by model training based on the historical device information of each of the terminal devices, and the predicted device information includes at least predicted hardware information, predicted operating habit information, and predicted terminal device style information;
[0048] A user interface template is configured for each of the predicted device information.
[0049] Preferably, in the user interface template configuration module, before performing prediction processing based on each of the current device information based on the corresponding device information prediction model that has completed model training to obtain the predicted device information corresponding to each of the terminal devices, the user interface template configuration module is further configured to:
[0050] Acquire multiple sets of historical device information of each terminal device respectively, and divide the information into a training set and a test set;
[0051] Constructing initial device information prediction models corresponding to each of the terminal devices respectively;
[0052] Performing model training on the matched initial device information prediction model based on each of the training sets to obtain multiple intermediate device information prediction models;
[0053] The model parameters of the matched intermediate device information prediction model are optimized based on each of the test sets to obtain multiple device information prediction models that have completed model training, so as to perform device information prediction operations based on the corresponding device information prediction models that have completed model training.
[0054] Preferably, the target operation habit information includes at least target interaction logic operation habit information, target gesture control operation habit information, and target interaction preference operation habit information.
[0055] Preferably, the target terminal device style information at least includes target interface text display style information, target interface color display style information, target interface virtual key style information, and target animation display style information.
[0056] According to another aspect of the present application, a storage medium is provided, in which at least one executable instruction is stored. The executable instruction enables a processor to execute operations corresponding to the above-mentioned method for generating a cross-platform installation package for an application.
[0057] According to another aspect of the present application, there is provided a terminal, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0058] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned method for generating a cross-platform installation package for an application.
[0059] By means of the above technical solution, the technical solution provided by the embodiment of the present application has at least the following advantages:
[0060] The present application provides a method and apparatus, medium, and terminal for generating a cross-platform installation package for an application. First, target device information of each terminal device is received, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information. Secondly, a user interface template is matched for the corresponding terminal device according to the target hardware information, and elements contained in the user interface template are adjusted according to the target operation habit information and the target terminal device style information to generate a user interface layout code. The user interface template is pre-configured according to predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model that has completed model training. Finally, the application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulator, the application is run in each of the terminal device simulators, and the consistency of the application in different terminal device simulators is detected to generate an installation package corresponding to each of the terminal devices, and each of the installation packages is combined to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple terminal devices across platforms. Compared with the prior art, the embodiment of the present application predicts the device information development trend of each terminal device in advance through a device information prediction model to obtain predicted device information, and pre-configures the user interface template according to the predicted device information, so that when generating the installation package, the corresponding user interface template is directly matched according to the target device information, thereby ensuring the matching degree with the new device information; then, the elements contained in the user interface template are adjusted according to the user's operating habit information on each terminal device and the terminal device style information, thereby ensuring the consistency of the style and behavior of the application in each terminal device and improving the user experience; further, by deploying the application logic and each user interface layout code of the application to the corresponding terminal device simulator for simulating the operating environment of different terminal devices, instead of running in multiple terminal devices across platforms, the problem of inconsistent user experience caused by cross-platform specificity is avoided, and the compatibility of the application's cross-platform installation package is guaranteed.
[0061] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0063] Figure 1 A flow chart of a method for generating a cross-platform installation package for an application provided in an embodiment of the present application is shown;
[0064] Figure 2 A flow chart of another method for generating a cross-platform installation package for an application provided in an embodiment of the present application is shown;
[0065] Figure 3 A block diagram of a device for generating a cross-platform installation package for an application provided in an embodiment of the present application is shown;
[0066] Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0067] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0068] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0069] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0070] Based on this, in one embodiment, Figure 1 As shown, a method for generating a cross-platform installation package for an application is provided. The method is described by taking the application of the method to a computer device such as a server as an example. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, such as smart medical systems and digital medical platforms. The above method includes the following steps:
[0071] 101. Receive target device information of each terminal device.
[0072] Among them, terminal devices include but are not limited to mobile phones, tablets, watches, computers, etc., which can be divided into Android system, IOS system, Windows system, macOS system, etc., for example, Android system mobile phones, IOS system mobile phones, Windows system computers, macOS system computers, etc.; target device information at least includes target hardware information (such as screen size, resolution, processor performance, memory capacity, etc.), target operation habit information, target terminal device style information; target operation habit information at least includes target interactive logic operation habit information (such as the left swipe back gesture in the IOS system, the virtual or physical return key in the Android system, etc.), target gesture control operation habit information (such as IOS The activation time of the long-press control in the system is 500ms, the activation time of the long-press control in the Android system is 400ms, etc.), target interaction preference operation habit information (such as the Android system user preference to use the top navigation menu, the IOS system user preference to use the right top navigation menu, etc.); the target terminal device style information at least includes the target interface text display style information (such as the text interface page margins and white space, font size, line height, character spacing, etc.), target interface color display style information (such as theme color, screen brightness, etc.), target interface virtual button style information (such as displaying rounded virtual buttons in the IOS system, rectangular virtual buttons in the Android system, etc.), target animation display style information (such as the frame rate and execution time of the animation, etc.). In an embodiment of the present application, the current execution end can be an application adaptive development module, which receives target device information of different terminal devices uploaded by developers, wherein the target device information can be existing device information or predicted future device information.
[0073] 102. Match a user interface template for the corresponding terminal device according to the target hardware information, and adjust the elements included in the user interface template according to the target operation habit information and the target terminal device style information to generate a user interface layout code.
[0074] The user interface template is pre-configured based on the predicted device information; the predicted device information is predicted based on the corresponding device information prediction model for which model training has been completed. In the embodiment of the present application, based on the target hardware information of each terminal device (such as screen size, resolution, processor performance, memory capacity, etc.), appropriate predicted device information is matched from multiple corresponding predicted device information, and the user interface template pre-configured with the predicted device information is called as the user interface template that matches the target hardware information. Furthermore, the elements contained in the user interface template are adjusted according to the target operation habit information and the target terminal device style information, so as to generate the user interface layout code. Specifically, on the one hand, the elements contained in the user interface template are adjusted according to the target operation habit information. For example, the left swipe back gesture is supported in the IOS system, the virtual or physical return key is supported in the Android system, the long press control activation time is set to 500ms in the IOS system, the long press control activation time is set to 400ms in the Android system, the top navigation menu is configured in the Android system, and the right top navigation menu is configured in the IOS system, etc.; on the other hand, the elements contained in the user interface template are adjusted according to the target terminal device style information. For example, more margins and white space are set in the IOS system, and a more compact layout is set in the Android system, the font size, line height, character spacing, etc. are adjusted to keep the display consistent in each terminal device, the original brightness is maintained in the IOS system, and the brightness is reduced in the Android system, rounded virtual buttons are set to be displayed in the IOS system, and rectangular virtual buttons are set in the Android system, elastic transition effects are set in the IOS system, and advance transition effects are set in the Android system, etc.
[0075] In addition, the user interface template can be adjusted according to user feedback information. For example,
[0076] A user submitted feedback on a certain interface, reporting that the page loads too slowly, a button doesn't respond promptly, or that the user frequently leaves a page (possibly indicating a page load time or poor layout), or that a button doesn't respond when clicked, or that the user clicks the same button multiple times (possibly indicating an interaction issue). Based on this feedback, adjustments can be made as follows: in low-bandwidth networks, the app can automatically load lower-quality news images or videos based on real-time network conditions, speeding up page loads and preventing users from abandoning the app due to long wait times.
[0077] 103. Deploy the application logic and each user interface layout code of the application to the corresponding terminal device simulator respectively, run the application in each terminal device simulator, check the consistency of the application in different terminal device simulators to generate an installation package corresponding to each terminal device, and combine the various installation packages to generate a cross-platform installation package for the application.
[0078] Among them, the terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple terminal devices across platforms. It should be noted that the existing method requires deploying and running applications in multiple terminal devices across platforms to perform consistency testing. However, due to the independence between platforms, it is difficult to ensure that the user experience is consistent in all terminal devices. Compared with the existing method, the embodiment of the present application uses a terminal device simulator that simulates the operating environment of different terminal devices to replace multiple terminal devices across platforms to centrally perform consistency testing, thereby avoiding the problem of inconsistent user experience caused by cross-platform. Furthermore, in the embodiment of the present application, after consistency testing, a corresponding installation package will be generated for each terminal device, and then all installation packages will be combined to generate a cross-platform installation package for the application, so that when the user installs the application, he can select the corresponding installation package from the cross-platform installation package based on the device information of the current terminal device.
[0079] Compared with the prior art, the embodiment of the present application predicts the device information development trend of each terminal device in advance through a device information prediction model to obtain predicted device information, and pre-configures the user interface template according to the predicted device information, so that when generating the installation package, the corresponding user interface template is directly matched according to the target device information, thereby ensuring the matching degree with the new device information; then, the elements contained in the user interface template are adjusted according to the user's operating habit information on each terminal device and the terminal device style information, thereby ensuring the consistency of the style and behavior of the application in each terminal device and improving the user experience; further, by deploying the application logic and each user interface layout code of the application to the corresponding terminal device simulator for simulating the operating environment of different terminal devices, instead of running in multiple terminal devices across platforms, the problem of inconsistent user experience caused by cross-platform specificity is avoided, and the compatibility of the application's cross-platform installation package is guaranteed.
[0080] The present application embodiment provides another method for generating a cross-platform installation package for an application, such as Figure 2 As shown, the method includes:
[0081] 201. Construct a device information prediction model corresponding to each terminal device that has completed model training.
[0082] Specifically, multiple sets of historical device information are obtained for each terminal device. This historical device information can come from application usage logs, device API data, third-party data sources, and more. For example, operating system update records and information about new devices released on the market are also available. The multiple sets of historical device information for each terminal device are then divided into training and test sets. Preferably, before dividing the training sets, the collected historical device information can be cleaned and feature extracted to remove abnormal data. The historical device information after removing abnormal data is then converted into feature vectors to improve the accuracy of model training. For example, device hardware information can be represented by characteristics such as screen resolution, processor performance, and memory size. Furthermore, an initial device information prediction model is constructed for each terminal device. For example, the prediction of device hardware information can be based on a regression model or a time series analysis model. The matching initial device information prediction model is trained based on each training set to obtain multiple intermediate device information prediction models. The intermediate device information prediction model is used to represent the device information prediction model trained with the training set. The model parameters of the matched intermediate device information prediction model are optimized based on each test set respectively to obtain multiple device information prediction models that have completed model training, and device information prediction operations are performed based on the corresponding device information prediction models that have completed model training. Among them, the device information prediction model that has completed model training is obtained by secondary training using the test set on the basis of the above-mentioned intermediate device information prediction model.
[0083] It should be noted that in the process of training the device information prediction model using historical device information as a training set, by continuously optimizing the model, it is possible to accurately identify the correlation between device information and the development trend of device information, thereby more accurately predicting future device information, and thus making the user interface template configured according to the predicted future device information more compatible with the new device information.
[0084] 202. Configure a user interface template for each predicted device information.
[0085] Specifically, the current device information of each terminal device is obtained, wherein the current device information is used to represent the existing device information, and at least includes the current hardware information, the current operating habit information, and the current terminal device style information. Based on the corresponding device information prediction model that has completed model training, prediction processing is performed based on each current device information to obtain the predicted device information corresponding to each terminal device, wherein the predicted device information is obtained by predicting the device information development trend of each terminal device through the device information prediction model, and at least includes the predicted hardware information, the predicted operating habit information, and the predicted terminal device style information. A user interface template is configured for each predicted device information. It is understandable that the device information development trend of each terminal device is predicted in advance through the device information prediction model to obtain the predicted device information, and the user interface template is configured in advance based on the predicted device information, so that when the installation package is generated, the corresponding user interface template is directly matched according to the target device information, thereby ensuring the matching degree with the new device information and avoiding the situation where the matching degree with the new device information is reduced due to the limited number of templates.
[0086] 203. Receive target device information of each terminal device.
[0087] The steps of this embodiment have been described in detail in step 101 of the above embodiment and will not be repeated here.
[0088] 204 : Match a user interface template to the corresponding terminal device according to the target hardware information, and adjust the elements included in the user interface template according to the target operation habit information and the target terminal device style information to generate a user interface layout code.
[0089] The steps of this embodiment have been described in detail in step 102 of the above embodiment and will not be repeated here.
[0090] 205. Set multiple detection breakpoints in the application logic of the application in advance.
[0091] Among them, the detection breakpoint is used to represent the key point in the application running process. When the process runs to the detection breakpoint, the process in all terminal device simulators will be paused. At this time, the status and variable values of the point can be detected to compare consistency.
[0092] 206 : Deploy the application logic after setting the detection breakpoints and each user interface layout code to the corresponding terminal device simulator respectively, and run the application program in each terminal device simulator simultaneously to perform consistency detection based on multiple detection breakpoints.
[0093] It is understandable that when an application program with detection breakpoints is run simultaneously in each terminal device simulator, the processes in all terminal device simulators will be paused simultaneously when the process runs to each detection breakpoint.
[0094] 207. When the application program reaches a detection breakpoint, the application program in each terminal device simulator is paused, and the running results in each terminal device simulator are compared to see whether they are consistent.
[0095] The operation result includes the current user interface and background operation data in the terminal device simulator, and consistent operation results include consistent current user interface and consistent background operation data. In the embodiment of the present application, when the process is paused, it is possible to detect whether the operation status of each terminal device simulator is consistent, including background operation data, such as variable values, and the current user interface, such as the status of the payment button.
[0096] 208a. If they are consistent, continue to run the application program in each terminal device simulator simultaneously, and generate an installation package corresponding to each terminal device when it is determined that the running results of each terminal device simulator corresponding to all detection breakpoints are consistent.
[0097] 208b. If the running results of the terminal device simulators corresponding to any detection breakpoint are inconsistent, the application logic and the user interface layout codes are modified to re-perform consistency detection based on the modified application logic and user interface layout codes until the consistency detection passes and the installation package corresponding to each terminal device is generated.
[0098] In the embodiment, steps 208a and 208b respectively illustrate two situations that may occur during consistency detection.
[0099] 209. Combine the various installation packages to generate a cross-platform installation package for the application.
[0100] In an embodiment of the present application, after consistency detection, a corresponding installation package will be generated for each terminal device, and then all installation packages will be combined to generate a cross-platform installation package for the application, so that when the user installs the application, he can select the corresponding installation package from the cross-platform installation package based on the device information of the current terminal device.
[0101] 210. Generate test cases for the application based on business needs; run the test cases simultaneously on each terminal device tester based on a distributed architecture, record the running results of the test cases in each terminal device tester, and generate a multi-dimensional comparison report to optimize the cross-platform installation package of the application based on the multi-dimensional comparison report.
[0102] Among them, the terminal device tester is used to characterize different real terminal devices, which are cross-platform terminal devices. In the embodiment of the present application, using a real terminal device to test the cross-platform installation package of the application can better simulate the actual situation when the user uses the application, thereby ensuring the user experience; the multi-dimensional comparison report includes at least background operation data, such as the response log, error information, UI rendering differences and other multi-dimensional data of each terminal device tester, as well as device performance indicator data, such as loading time, memory usage, CPU consumption and other performance indicator data.
[0103] The present application provides a method for generating a cross-platform installation package for an application. First, target device information of each terminal device is received, where the target device information includes at least target hardware information, target operation habit information, and target terminal device style information. Secondly, a user interface template is matched for the corresponding terminal device according to the target hardware information, and elements contained in the user interface template are adjusted according to the target operation habit information and the target terminal device style information to generate a user interface layout code. The user interface template is pre-configured according to predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model that has completed model training. Finally, the application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulator, the application is run in each of the terminal device simulators, and the consistency of the application in different terminal device simulators is detected to generate an installation package corresponding to each of the terminal devices, and each of the installation packages is combined to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple terminal devices across platforms. Compared with the prior art, the embodiment of the present application predicts the device information development trend of each terminal device in advance through a device information prediction model to obtain predicted device information, and pre-configures the user interface template according to the predicted device information, so that when generating the installation package, the corresponding user interface template is directly matched according to the target device information, thereby ensuring the matching degree with the new device information; then, the elements contained in the user interface template are adjusted according to the user's operating habit information on each terminal device and the terminal device style information, thereby ensuring the consistency of the style and behavior of the application in each terminal device and improving the user experience; further, by deploying the application logic and each user interface layout code of the application to the corresponding terminal device simulator for simulating the operating environment of different terminal devices, instead of running in multiple terminal devices across platforms, the problem of inconsistent user experience caused by cross-platform specificity is avoided, and the compatibility of the application's cross-platform installation package is guaranteed.
[0104] Furthermore, as a response to the above Figure 1The embodiment of the present application provides a device for generating a cross-platform installation package for an application program, such as Figure 3 As shown, the device includes:
[0105] Target device information receiving module 31, user interface layout code generating module 32, cross-platform installation package generating module 33.
[0106] A target device information receiving module is used to receive target device information of each terminal device, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information;
[0107] A user interface layout code generation module 32 is configured to match a user interface template for a corresponding terminal device based on the target hardware information, and to adjust elements contained in the user interface template based on the target operating habit information and the target terminal device style information to generate user interface layout code, wherein the user interface template is pre-configured based on predicted device information, which is predicted based on a corresponding device information prediction model for which model training has been completed;
[0108] The cross-platform installation package generation module 33 is used to deploy the application logic of the application and each of the user interface layout codes to the corresponding terminal device simulators, run the application in each of the terminal device simulators, detect the consistency of the application in different terminal device simulators to generate installation packages corresponding to each of the terminal devices, and combine the various installation packages to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
[0109] In a specific application scenario, the device further includes a testing module for:
[0110] Generate test cases for the application based on business requirements;
[0111] Based on a distributed architecture, the test cases are run simultaneously on each terminal device tester, and the running results of the test cases in each terminal device tester are recorded to generate a multi-dimensional comparison report to optimize the cross-platform installation package of the application based on the multi-dimensional comparison report. The multi-dimensional comparison report includes at least background operation data and device performance indicator data.
[0112] In a specific application scenario, the cross-platform installation package generation module is specifically used to:
[0113] Pre-setting a plurality of detection breakpoints in the application logic of the application program;
[0114] Deploying the application logic after setting the detection breakpoints and each of the user interface layout codes into corresponding terminal device simulators, and running the application program simultaneously in each of the terminal device simulators to perform consistency detection based on multiple detection breakpoints;
[0115] When the application is run to a detection breakpoint, the application in each terminal device simulator is paused, and the running results in each terminal device simulator are compared to see whether they are consistent, the running results including the current user interface and background running data in the terminal device simulator, and the consistent running results including the consistency of the current user interface and the consistency of the background running data;
[0116] If they are consistent, continue to run the application in each of the terminal device simulators simultaneously, and generate an installation package corresponding to each of the terminal devices when it is determined that the running results of each of the terminal device simulators corresponding to all the detection breakpoints are consistent;
[0117] If the running results of the terminal device simulators corresponding to any detection breakpoint are inconsistent, modify the application logic and the user interface layout codes, and re-perform consistency testing based on the modified application logic and user interface layout codes, until the consistency test passes, and generate an installation package corresponding to each terminal device;
[0118] The installation packages are combined to generate a cross-platform installation package for the application.
[0119] In a specific application scenario, before the user interface layout code generation module, the device further includes a user interface template configuration module, which is used to:
[0120] Acquire current device information of each terminal device, wherein the current device information includes at least current hardware information, current operation habit information, and current terminal device style information;
[0121] performing prediction processing based on each of the current device information based on the corresponding device information prediction models that have completed model training, thereby obtaining predicted device information corresponding to each of the terminal devices, wherein the device information prediction models are obtained by model training based on the historical device information of each of the terminal devices, and the predicted device information includes at least predicted hardware information, predicted operating habit information, and predicted terminal device style information;
[0122] A user interface template is configured for each of the predicted device information.
[0123] In a specific application scenario, in the user interface template configuration module, before performing prediction processing based on each of the current device information based on the corresponding device information prediction models that have completed model training to obtain the predicted device information corresponding to each of the terminal devices, the user interface template configuration module is further configured to:
[0124] Acquire multiple sets of historical device information of each terminal device respectively, and divide the information into a training set and a test set;
[0125] Constructing initial device information prediction models corresponding to each of the terminal devices respectively;
[0126] Performing model training on the matched initial device information prediction model based on each of the training sets to obtain multiple intermediate device information prediction models;
[0127] The model parameters of the matched intermediate device information prediction model are optimized based on each of the test sets to obtain multiple device information prediction models that have completed model training, so as to perform device information prediction operations based on the corresponding device information prediction models that have completed model training.
[0128] In a specific application scenario, the target operation habit information includes at least target interaction logic operation habit information, target gesture control operation habit information, and target interaction preference operation habit information.
[0129] In a specific application scenario, the target terminal device style information includes at least target interface text display style information, target interface color display style information, target interface virtual key style information, and target animation display style information.
[0130] The present application provides a device for generating a cross-platform installation package for an application. The device first receives target device information of each terminal device, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information. Secondly, a user interface template is matched for the corresponding terminal device according to the target hardware information, and elements contained in the user interface template are adjusted according to the target operation habit information and the target terminal device style information to generate a user interface layout code. The user interface template is pre-configured according to predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model that has completed model training. Finally, the application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulator, the application is run in each of the terminal device simulators, and the consistency of the application in different terminal device simulators is detected to generate an installation package corresponding to each of the terminal devices, and each of the installation packages is combined to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple terminal devices across platforms. Compared with the prior art, the embodiment of the present application predicts the device information development trend of each terminal device in advance through a device information prediction model to obtain predicted device information, and pre-configures the user interface template according to the predicted device information, so that when generating the installation package, the corresponding user interface template is directly matched according to the target device information, thereby ensuring the matching degree with the new device information; then, the elements contained in the user interface template are adjusted according to the user's operating habit information on each terminal device and the terminal device style information, thereby ensuring the consistency of the style and behavior of the application in each terminal device and improving the user experience; further, by deploying the application logic and each user interface layout code of the application to the corresponding terminal device simulator for simulating the operating environment of different terminal devices, instead of running in multiple terminal devices across platforms, the problem of inconsistent user experience caused by cross-platform specificity is avoided, and the compatibility of the application's cross-platform installation package is guaranteed.
[0131] According to one embodiment of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer-executable instruction can execute the method for generating a cross-platform installation package for an application in any of the above method embodiments.
[0132] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0133] Figure 4 A schematic diagram of the structure of a terminal provided according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computer device.
[0134] like Figure 4 As shown, the terminal may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0135] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0136] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0137] The processor 402 is configured to execute the program 410 , and specifically to execute the relevant steps in the embodiment of the method for generating a cross-platform installation package for an application.
[0138] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0139] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in a computer device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0140] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0141] The program 410 may be specifically configured to cause the processor 402 to perform the following operations:
[0142] Receive target device information of each terminal device, wherein the target device information includes at least target hardware information, target operation habit information, and target terminal device style information;
[0143] matching a user interface template for a corresponding terminal device according to the target hardware information, and adjusting elements contained in the user interface template according to the target operating habit information and the target terminal device style information to generate a user interface layout code, wherein the user interface template is pre-configured according to the predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model for which model training has been completed;
[0144] The application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulators, the application is run in each of the terminal device simulators, the consistency of the application in different terminal device simulators is tested to generate an installation package corresponding to each of the terminal devices, and the various installation packages are combined to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
[0145] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device used to generate the cross-platform installation package for the application, supporting the execution of the information processing program and other software and / or programs. The network communication module is used to enable communication between components within the storage medium and with other hardware and software within the physical information processing device.
[0146] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. References to the same or similar parts between the various embodiments are sufficient. For system embodiments, since they largely correspond to method embodiments, their description is relatively simple. For relevant parts, references to the description of the method embodiments are sufficient.
[0147] The methods and systems of the present application may be implemented in many ways. For example, the methods and systems of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present application. Therefore, the present application also covers recording media that store programs for executing the methods according to the present application.
[0148] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0149] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for generating a cross-platform installation package of an application, characterized in that: include: Receiving target device information of each terminal device, the target device information at least including target hardware information, target operation habit information, and target terminal device style information; Matching a user interface template for a corresponding terminal device according to the target hardware information, and adjusting elements included in the user interface template according to the target operation habit information and the target terminal device style information to generate a user interface layout code, wherein the user interface template is pre-configured according to the predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model for which model training has been completed; The application logic of the application and each of the user interface layout codes are respectively deployed to the corresponding terminal device simulators, the application is run in each of the terminal device simulators, the consistency of the application in different terminal device simulators is detected to generate an installation package corresponding to each of the terminal devices, and each of the installation packages is combined to generate a cross-platform installation package of the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
2. The method according to claim 1, characterized in that: The method further comprises: Generate test cases for the application based on business requirements; Based on the distributed architecture, the test cases are run simultaneously on each terminal device tester, and the running results of the test cases in each terminal device tester are recorded to generate a multi-dimensional comparison report to optimize the cross-platform installation package of the application based on the multi-dimensional comparison report. The multi-dimensional comparison report includes at least background operation data and device performance indicator data.
3. The method according to claim 1, characterized in that The steps of deploying the application logic of the application and each of the user interface layout codes to the corresponding terminal device simulators, running the application in each of the terminal device simulators, detecting the consistency of the application in different terminal device simulators, generating installation packages corresponding to each of the terminal devices, and combining the installation packages to generate a cross-platform installation package for the application include: Pre-setting a plurality of detection breakpoints in the application logic of the application program; Deploy the application logic after setting the detection breakpoints and each of the user interface layout codes to the corresponding terminal device simulators respectively, and run the application program in each of the terminal device simulators simultaneously to perform consistency detection based on multiple detection breakpoints; When the detection breakpoint is reached, the application programs in the terminal device simulators are paused, and the running results in the terminal device simulators are compared to see if they are consistent, wherein the running results include the current user interface and background running data in the terminal device simulators, and the consistency of the running results includes the consistency of the current user interface and the consistency of the background running data; If they are consistent, continue to run the application in each of the terminal device simulators at the same time, and generate installation packages corresponding to each of the terminal devices when it is determined that the running results of each of the terminal device simulators corresponding to all the detection breakpoints are consistent; If the running results of the terminal device simulators corresponding to any detection breakpoint are inconsistent, modify the application logic and the user interface layout codes to re-perform consistency detection based on the modified application logic and user interface layout codes, and generate installation packages corresponding to the terminal devices after the consistency detection passes; The installation packages are combined to generate a cross-platform installation package for the application.
4. The method according to claim 1, characterized in that: Before matching the user interface template for the corresponding terminal device according to the target hardware information, the method further includes: Acquire current device information of each of the terminal devices, the current device information at least including current hardware information, current operation habit information, and current terminal device style information; Based on the corresponding device information prediction models that have completed model training, prediction processing is performed according to each of the current device information to obtain predicted device information corresponding to each of the terminal devices, wherein the device information prediction models are obtained by model training based on the historical device information of each of the terminal devices, and the predicted device information at least includes predicted hardware information, predicted operation habit information, and predicted terminal device style information; A user interface template is configured for each of the predicted device information.
5. The method according to claim 4, characterized in that Before performing prediction processing based on the corresponding device information prediction models for which model training has been completed and obtaining the predicted device information corresponding to each of the terminal devices according to the current device information, the method further includes: Respectively obtain multiple groups of historical device information of each of the terminal devices, and divide the historical device information into a training set and a test set; Constructing initial device information prediction models corresponding to each of the terminal devices respectively; Performing model training on the matched initial device information prediction model based on each of the training sets to obtain multiple intermediate device information prediction models; The model parameters of the matched intermediate device information prediction model are optimized based on each of the test sets to obtain a plurality of device information prediction models that have completed model training, so as to perform device information prediction operations based on the corresponding device information prediction models that have completed model training.
6. The method according to claim 1, characterized in that The target operation habit information at least includes target interaction logic operation habit information, target gesture control operation habit information, and target interaction preference operation habit information.
7. The method according to claim 1, characterized in that The target terminal device style information at least includes target interface text display style information, target interface color display style information, target interface virtual key style information, and target animation display style information.
8. A device for generating a cross-platform installation package of an application, characterized in that: include: A target device information receiving module, used to receive target device information of each terminal device, wherein the target device information at least includes target hardware information, target operation habit information, and target terminal device style information; A user interface layout code generation module, used to match a user interface template for a corresponding terminal device according to the target hardware information, and to adjust elements included in the user interface template according to the target operation habit information and the target terminal device style information to generate a user interface layout code, wherein the user interface template is pre-configured according to the predicted device information, and the predicted device information is predicted based on the corresponding device information prediction model for which model training has been completed; A cross-platform installation package generation module is used to deploy the application logic of the application and each of the user interface layout codes to the corresponding terminal device simulators, run the application in each of the terminal device simulators, detect the consistency of the application in different terminal device simulators to generate an installation package corresponding to each of the terminal devices, and combine each of the installation packages to generate a cross-platform installation package for the application. The terminal device simulator is used to simulate the operating environment of different terminal devices to replace multiple cross-platform terminal devices.
9. A storage medium, wherein at least one executable instruction is stored in the storage medium, characterized in that: The executable instructions enable the processor to execute operations corresponding to the method for generating a cross-platform installation package of an application as described in any one of claims 1-7.
10. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to execute operations corresponding to the method for generating a cross-platform installation package of an application as described in any one of claims 1-7.