Cross-system UI application generation method, device and computer-readable storage medium
By porting the UI framework engine to the Linux system and using the Flutter framework, the problem that UI application code in different terminal systems cannot run across systems is solved, and a consistent UI experience and fluency is achieved, reducing the work burden and cost of UI designers.
Patent Information
- Application Number
- CN201911422746.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-30
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-12-30
AI Technical Summary
The UI application code of different terminal systems cannot run across systems, and the UI application fluency of Linux systems is poor, resulting in UI designers needing to code and maintain different systems, increasing workload and cost.
By porting the UI framework engine to the Linux system and encapsulating the call interface using a compatibility language, the target UI application is generated based on the Flutter open source UI framework, so that it can run between different systems, providing a consistent UI experience and improving fluency.
It realizes the cross-system operation of UI application code, provides the same UI interactive experience as the Android system, avoids the fluency problem caused by H5 drawing, and improves the fluency of UI applications in Linux system terminals.
Smart Images

Figure CN111158689B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal technology, and in particular to a cross-system UI application generation method, device and computer-readable storage medium. Background Art
[0002] As the core application of the OSD (On-Screen Display) of the Internet TV system, the smoothness of the Launcher affects the TV user experience.
[0003] Currently, most TVs are running Android systems, but due to cost, historical reasons and other factors, some TVs still use Linux systems. TV applications that are parasitic on Linux systems are generally developed by the Web, including Launchers. Specifically, Launchers drawn using H5 have poor fluency. This problem is inherent in the Linux system, and program optimization cannot achieve the fluency of Android TV Launchers. On the other hand, in order to maintain a consistent UI (User Interface) experience and to reduce the work of UI designers, engineers on both Android and Linux platforms code and implement UI applications according to the same set of UI renderings, but two pairs of UI designers are needed to design them, and the UI application needs to be developed twice, and the subsequent UI application maintenance also requires twice the manpower.
[0004] It can be seen from this that the codes corresponding to UI applications of different terminal systems cannot run across systems, and the UI applications of the Linux system corresponding terminals have poor fluency. Summary of the invention
[0005] The main purpose of the present invention is to provide a cross-system UI application generation method, device and computer-readable storage medium, aiming to solve the technical problems that the codes corresponding to the existing UI applications of different terminal systems cannot run across systems and the UI applications of the Linux system corresponding terminal have poor fluency.
[0006] To achieve the above object, the present invention provides a cross-system UI application generation method, the cross-system UI application generation method comprising the steps of:
[0007] Obtain a preset UI framework engine, and transplant the UI framework engine into the Linux system;
[0008] Encapsulate the calling interface of the UI framework engine in the Linux system by using a compatible language;
[0009] Based on the UI framework engine, a target UI application is generated according to the received development instruction, wherein the calling interface is used for terminals of various systems to call the target UI application.
[0010] Preferably, before the step of generating the target UI application based on the UI framework engine according to the received development instruction, the step further includes:
[0011] Obtaining a UI framework source code corresponding to the UI framework engine, and detecting whether there is a target source code to be modified corresponding to a target priority in the UI framework source code;
[0012] If it is determined that the target source code to be modified exists in the UI framework source code, obtaining a first patch file corresponding to the target source code to be modified;
[0013] The UI framework source code is updated according to the first patch file so that the UI framework engine runs successfully.
[0014] Preferably, the step of obtaining the UI framework source code corresponding to the UI framework engine and detecting whether there is a target source code to be modified corresponding to the target priority in the UI framework source code comprises:
[0015] Obtaining a UI framework source code corresponding to the UI framework engine, and performing a compatibility test on the UI framework source code in the Linux system to determine a source code to be modified in the UI framework source code;
[0016] If it is detected that the source code to be modified is code related to the successful operation of the UI framework engine, the code related to the successful operation of the UI framework engine is determined to be the target source code to be modified corresponding to the target priority.
[0017] Preferably, after the step of obtaining the UI framework source code corresponding to the UI framework engine and detecting whether there is a target source code to be modified corresponding to the target priority in the UI framework source code, the method further includes:
[0018] If it is determined that the target source code to be modified does not exist in the UI framework source code, then determining the target function code corresponding to each function in the UI framework engine;
[0019] Sending the target function code to a preset terminal so that a user of the preset terminal can view the target function code;
[0020] Detecting whether the UI framework source code modified according to the target function code and sent by the preset terminal is received;
[0021] If the modified UI framework source code is received, the UI framework engine is updated according to the modified UI framework source code so that the UI framework engine runs successfully.
[0022] Preferably, after the step of detecting whether the UI framework source code modified according to the target function code and sent by the preset terminal is received, the method further includes:
[0023] If the modified UI framework source code is not received, a second patch file corresponding to the target function code is determined, and the UI framework source code is updated according to the second patch file so that the UI framework engine runs successfully.
[0024] Preferably, after the step of determining the target function code corresponding to each function in the UI framework engine if it is determined that the target source code to be modified does not exist in the UI framework source code, the method further includes:
[0025] If it is determined that the target function code does not need to be sent to the preset terminal, a second patch file corresponding to the target function code is determined, and the UI framework source code is updated according to the second patch file so that the UI framework engine runs successfully.
[0026] Preferably, after the step of obtaining the UI framework source code corresponding to the UI framework engine, the method further includes:
[0027] Back up the UI framework source code.
[0028] Preferably, after the step of generating the target UI application based on the UI framework engine according to the received development instruction, the method further includes:
[0029] If a first calling instruction sent by an Android terminal is received through the calling interface, encapsulating the target UI application into an Android application package according to the first calling instruction, and sending the Android application package to the Android terminal;
[0030] If a second calling instruction sent by the Linux TV is received through the calling interface, the target UI application is encapsulated into an application package in TPK format according to the second calling instruction, and the application package in TPK format is sent to the Linux TV.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a cross-system UI application generation device, which includes a memory, a processor, and a cross-system UI application generation program stored in the memory and executable on the processor, and the cross-system UI application generation program, when executed by the processor, implements the steps of the cross-system UI application generation method as described above.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a cross-system UI application generation program is stored, and when the cross-system UI application generation program is executed by a processor, the steps of the cross-system UI application generation method as described above are implemented.
[0033] The present invention transplants a UI framework engine into a Linux system, and uses a compatible language to encapsulate a calling interface for calling the UI framework engine in the Linux system, generates a target UI application based on the UI framework engine according to the received development instructions, wherein the calling interface is used for terminals of various systems to call the target UI application, and transplants the Flutter Engine (UI framework engine) to the Linux system by utilizing the cross-platform characteristics of the Flutter open source UI framework, thereby realizing that the code corresponding to the UI application developed by the UI framework engine can run across systems, such as a set of Launcher codes can run on Android TV and Linux TV at the same time, providing a consistent UI interaction experience in Android TV and Linux TV, and because the developed UI application is implemented based on the Flutter open source UI framework, the problem of poor fluency of H5 drawing UI interface is avoided, thereby improving the fluency of the terminal UI application corresponding to the Linux system. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flowchart of a first embodiment of a method for generating a cross-system UI application according to the present invention;
[0035] Figure 2 It is a schematic diagram of the architecture of the Flutter Engine in an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of the architecture of a TV Launcher in an embodiment of the present invention;
[0037] Figure 4 It is a flowchart of a second embodiment of the cross-system UI application generation method of the present invention;
[0038] Figure 5 It is a flowchart of a third embodiment of the cross-system UI application generation method of the present invention;
[0039] Figure 6 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.
[0040] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0042] The present invention provides a cross-system UI application generation method, referring to Figure 1 , Figure 1 It is a flowchart of the first embodiment of the cross-system UI application generation method of the present invention.
[0043] The embodiment of the present invention provides an embodiment of a method for generating a cross-system UI application. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0044] The cross-system UI application generation method is applied to a terminal, and the terminal is not limited to a personal computer, a television, a mobile phone, a tablet computer, etc. The terminal can be a mobile terminal or a fixed terminal. In each embodiment of the cross-system UI application generation method, for the sake of convenience of description, the execution subject is omitted to explain each embodiment. The cross-system UI application generation method includes:
[0045] Step S10, obtaining a preset UI framework engine, and transplanting the UI framework engine into a Linux system.
[0046] Get a preset UI framework engine, where the UI framework engine is Flutter Engine. Flutter is Google's mobile UI framework that can quickly build high-quality native user interfaces on iOS and Android. The UI framework engine can be pre-stored in the Android terminal and obtained from the Android terminal when needed. The UI framework engine can also be stored in a server or cloud and obtained from a server or cloud when needed. In an embodiment of the present invention, the Android terminal is a terminal of the Android system, and the Linux terminal is a terminal of the Linux system. Specifically, refer to Figure 2 , Figure 2 It is a schematic diagram of the architecture of Flutter Engine in an embodiment of the present invention, consisting of Figure 2 As you can see, Flutter Engine contains UI components, Skia, and EGL. Skia is a 2D vector graphics processing library that includes fonts, coordinate conversion, and bitmaps with high-performance and concise performance. EGL is an interface between graphics rendering APIs (such as OpenGL ES) and the local platform window system.
[0047] After the UI framework engine is obtained, the UI framework engine is transplanted into the Linux system, that is, the UI framework engine is transplanted into a terminal of the Linux system, such as transplanting the UI framework engine into a TV of the Linux system. It should be noted that transplanting the UI framework engine into the Linux system means copying the UI framework engine into the Linux system.
[0048] Step S20: encapsulate the calling interface for calling the UI framework engine in the Linux system using a compatible language.
[0049] After the UI framework engine is transplanted to the Linux system, a compatible language is used to encapsulate the calling interface for calling the UI framework engine in the Linux system. The calling interface is used for terminals of various systems to call the target UI application. Specifically, in this embodiment, the calling interface for calling the UI framework engine in the Linux system is encapsulated by the Dart language. Dart is an object-oriented, class-defined, single-inheritance language. Its syntax is similar to that of the C language and can be translated into JavaScript. It supports interfaces, mixins, abstract classes, reified generics, optional typing, and sound type system. In other embodiments, other compatible languages can also be used to encapsulate the calling interface. This embodiment does not specifically limit the compatible language for encapsulating the calling interface.
[0050] Step S30, based on the UI framework engine, generating a target UI application according to the received development instruction, wherein the calling interface is used for terminals of various systems to call the target UI application.
[0051] Detect whether a development instruction is received, wherein the development instruction can be triggered by the user in the Linux system, or by the user through a terminal that has established a connection relationship with the Linux system. When the development instruction is received, based on the UI framework engine, a target UI application is generated according to the received development instruction. At this time, terminals of other systems can call the target UI application through the calling interface in the Linux system. It should be noted that the calling interface is the calling interface of the application layer of the Linux system. When the application layer of the Linux system receives the development instruction, the target UI application can be developed using the UI framework engine through the development instruction.
[0052] Specifically, in the Linux system, the Porting layer of the Linux system is defined as the API (Application Programming Interface) submodule of the UI framework engine, and the part below the Porting layer of the Linux system is defined as the Flutter Core submodule. The Flutter Core submodule provides an internal interface for the API submodule of the UI framework engine to call, and the API submodule of the UI framework engine provides an external interface, that is, the API submodule of the UI framework engine provides a calling interface for terminals of other systems to call the target UI application. It should be noted that in the process of implementing the API submodule of the UI framework engine, the implementation method of the Porting layer in the Android system can be referred to. The Porting layer is the data layer involved in data transmission; and for the Flutter Core submodule, under normal circumstances, there is no need to modify the corresponding source code file of the Flutter Core submodule, unless the UI framework engine cannot run without modifying the source code file, then the developer needs to modify the corresponding source code file of the Flutter Core submodule.
[0053] This embodiment transplants the UI framework engine to the Linux system, and uses a compatible language to encapsulate the calling interface of calling the UI framework engine in the Linux system. Based on the UI framework engine, a target UI application is generated according to the received development instructions, wherein the calling interface is used for terminals of various systems to call the target UI application. By utilizing the cross-platform characteristics of the Flutter open source UI framework, the Flutter Engine (UI framework engine) is transplanted to the Linux system, so that the code corresponding to the UI application developed by the UI framework engine can run across systems, such as a set of Launcher codes can run on Android TV and Linux TV at the same time, providing a consistent UI interaction experience in Android TV and Linux TV. In addition, since the developed UI application is implemented based on the Flutter open source UI framework, the problem of poor fluency of H5 drawing UI interface is avoided, thereby improving the fluency of the terminal UI application corresponding to the Linux system.
[0054] Further, see Figure 3 , Figure 3This is a schematic diagram of the architecture of the TV Launcher in an embodiment of the present invention. The TV Launcher contains the Dart Framework, TV Package, UI Flutter Engine, Host OS Package, Host OS Service, and SitaTV service.
[0055] Furthermore, a second embodiment of the cross-system UI application generation method of the present invention is proposed.
[0056] The difference between the second embodiment of the cross-system UI application generation method and the first embodiment of the cross-system UI application generation method is that, Figure 4 , the cross-system UI application generation method further includes:
[0057] Step S40, obtaining the UI framework source code corresponding to the UI framework engine, and detecting whether there is a target source code to be modified corresponding to the target priority in the UI framework source code.
[0058] After obtaining the UI framework engine, obtain the UI framework source code corresponding to the UI framework engine. It should be noted that since the UI framework engine is open source, the UI framework source code corresponding to the UI framework engine can be directly obtained when obtaining the UI framework engine, that is, when obtaining the UI framework engine, the UI framework source code can be obtained together. After obtaining the UI framework source code, check whether there is a target source code to be modified corresponding to the target priority in the UI framework source code. It should be noted that the target source code to be modified of the target priority is the code in the UI framework source code that the UI framework engine cannot run normally if it is not modified. In the UI framework source code, there are two types of codes that need to be modified. One is the code that can be modified or not. Even if the code is not modified, it will not cause the UI framework engine to fail to run normally; the other is the code that must be modified. If the code is not modified, it will affect the normal operation of the UI framework engine. The code that must be modified is the target source code to be modified corresponding to the target priority.
[0059] Specifically, after obtaining the UI framework source code, the UI framework source code is output, and the corresponding developer is prompted to confirm whether there is a target source code to be modified corresponding to the target priority in the UI framework source code. If a confirmation instruction is received from the developer confirming that there is a target source code to be modified corresponding to the target priority in the UI framework source code, the target source code to be modified in the UI framework source code is determined according to the confirmation instruction.
[0060] In addition to asking the developer to confirm whether the target source code to be modified exists in the UI framework source code, it is also possible to automatically confirm whether the target source code to be modified exists in the UI framework source code. Specifically, step S40 includes:
[0061] Step a, obtaining the UI framework source code corresponding to the UI framework engine, and performing a compatibility test on the UI framework source code in the Linux system to determine the source code to be modified in the UI framework source code.
[0062] Obtain the UI framework source code corresponding to the UI framework engine, and perform compatibility testing on the UI framework source code in the Linux system, that is, execute the UI framework source code once in the Linux system to determine the source code to be modified in the UI framework source code. It is understandable that during the compatibility testing of the UI framework source code, if a certain function cannot be implemented, or the implementation time of a certain function is longer than the normal time, it can be determined that the code corresponding to the function is the code to be modified.
[0063] Step b: if it is detected that the source code to be modified is code related to the successful operation of the UI framework engine, then the code related to the successful operation of the UI framework engine is determined to be the target source code to be modified corresponding to the target priority.
[0064] After determining the source code to be modified in the UI framework source code, check whether the source code to be modified is code related to the successful operation of the UI framework engine. If it is detected that the source code to be modified is code related to the successful operation of the UI framework engine, then the code related to the successful operation of the UI framework engine is determined to be the target source code to be modified corresponding to the target priority; if it is detected that the source code to be modified is code unrelated to the successful operation of the UI framework engine, then it is determined that the code unrelated to the successful operation of the UI framework engine is not the target source code to be modified corresponding to the target priority. It can be understood that the target source code to be modified is the code in the UI framework source code that will not be able to be implemented if it is not modified.
[0065] Step S50: If it is determined that the target source code to be modified exists in the UI framework source code, a first patch file corresponding to the target source code to be modified is obtained.
[0066] Step S60: updating the UI framework source code according to the first patch file to enable the UI framework engine to run successfully.
[0067] If it is determined that there is a target source code to be modified in the UI framework source code, then the patch file corresponding to the target source code to be modified is obtained, and the patch file is recorded as the first patch file, and the first patch file is used to replace the corresponding target source code to be modified to update the UI framework source code, so that the UI framework engine corresponding to the UI framework source code can run successfully, even if all the functions of the UI framework engine can be realized. Specifically, the patch files corresponding to the various functions of the UI framework source code can be stored in advance, and then after determining the target source code to be modified, the function identifier corresponding to the target source code to be modified is determined, and the patch file corresponding to the target source code to be modified is obtained according to the function identifier. At this time, each function has a corresponding function identifier, and the corresponding function can be uniquely determined by the function identifier; after determining the source code to be modified, a prompt message can also be output to prompt the developer to write a corresponding patch file according to the source code to be modified. It can be understood that the code of the new function can also be added to the UI framework source code so that the UI application generated by the UI framework engine meets user needs.
[0068] This embodiment detects whether there is a target source code to be modified corresponding to the target priority in the UI framework source code corresponding to the UI framework engine before generating the target UI application based on the UI framework engine. If it is determined that there is a target source code to be modified in the UI framework source code, the UI framework source code is updated according to the patch file corresponding to the target source code to be modified, so that the UI framework engine corresponding to the UI framework source code can run successfully, thereby improving the success rate of running the UI application generated based on the UI framework engine, that is, improving the success rate of cross-system running of the codes corresponding to the UI applications of different terminal systems.
[0069] Furthermore, the cross-system UI application generation method further includes:
[0070] Step c: back up the UI framework source code.
[0071] Furthermore, before updating the UI framework source code according to the first patch file, the UI framework source code is backed up to avoid the situation where the original UI framework source code cannot be found after the UI framework source code is updated, which is not conducive to developers maintaining the UI application generated by the UI framework engine. When the UI application generated by the UI framework engine is in a faulty state, the cause of the UI application failure can be quickly found based on the updated UI framework source code and the original UI framework source code.
[0072] Furthermore, a third embodiment of the cross-system UI application generation method of the present invention is proposed.
[0073] The difference between the third embodiment of the cross-system UI application generation method and the second embodiment of the cross-system UI application generation method is that the cross-system UI application generation method further includes:
[0074] Step d: If it is determined that the target source code to be modified does not exist in the UI framework source code, then the target function code corresponding to each function in the UI framework engine is determined.
[0075] If it is determined that there is no target source code to be modified corresponding to the target priority in the UI framework source code, the target function code corresponding to each function in the UI framework engine is determined. It should be noted that each function in the UI framework engine includes the functions that the UI framework engine can originally realize, and also includes the functions newly added in the UI framework engine according to the needs. Each function may have multiple schemes to realize, and each scheme has a corresponding function code, and the target function code is the code of the optimal scheme to realize a certain function. The target function code can be determined by the developer, or the code of multiple schemes corresponding to each function can be tested, and the code corresponding to the scheme with the highest operating efficiency is determined as the target function code of the function. In this embodiment, there is no specific restriction on the method for determining the target function code corresponding to each function of the UI framework engine, and the target function code corresponding to each function in the UI framework engine can also be pre-set. Further, if the operating efficiency of the corresponding function of some codes in the UI framework source code is lower than the set operating efficiency, or some codes in the UI framework source code need to be modified due to other reasons, the modified code in the UI framework source code also belongs to the target function code.
[0076] Step e: sending the target function code to a preset terminal so that a user of the preset terminal can view the target function code.
[0077] After obtaining the target function code, the target function code is sent to the preset terminal for the user of the preset terminal to view the target function code. Among them, the preset terminal is the terminal of the developer corresponding to the development of the UI framework engine. When the preset terminal receives the target function code, the preset terminal outputs the target function code on its screen, and outputs a prompt message to prompt the corresponding developer to check the target function code and determine whether to modify the target function code. It should be noted that if the developer corresponding to the preset terminal determines not to modify the target function code, it indicates that the developer corresponding to the preset terminal accepts the modification of the UI framework engine; if the developer corresponding to the preset terminal determines to modify the target function code, it indicates that the developer corresponding to the preset terminal does not accept the modification of the UI framework engine.
[0078] When the developer corresponding to the preset terminal accepts the modification of the UI framework engine, the developer of the preset terminal will modify the UI framework source code of the UI framework engine according to the target function code to obtain the modified UI framework source code. After the preset terminal obtains the modified UI framework source code, the preset terminal will return the modified UI framework source code.
[0079] Step f, detecting whether the UI framework source code modified according to the target function code and sent by the preset terminal is received.
[0080] Step h: if the modified UI framework source code is received, the UI framework engine is updated according to the modified UI framework source code so that the UI framework engine runs successfully.
[0081] After the target function code is sent to the preset terminal, it is detected whether the UI framework source code sent by the preset terminal and modified according to the target function code is received. If the modified UI framework source code is received, the UI framework engine is updated according to the modified UI framework source code so that the UI framework engine can run successfully. Further, after receiving the modified UI framework source code, the UI framework source code is stored.
[0082] Furthermore, the cross-system UI application generation method further includes:
[0083] Step i: If the modified UI framework source code is not received, determine the second patch file corresponding to the target function code, and update the UI framework source code according to the second patch file to enable the UI framework engine to run successfully.
[0084] If the modified UI framework source code is not received, the patch file corresponding to the target function code is determined, and the patch file corresponding to the target function code is determined as the second patch file. It can be understood that the second patch file corresponding to the target function code is to use the target function code as a patch file, and there are as many patch files as the number of functions corresponding to the target function code, that is, one patch file corresponds to one function. After the second patch file is determined, the UI framework source code is updated according to the second patch file, that is, the second patch file is updated to modify the UI framework source code, and a new UI framework engine is generated according to the updated UI framework source code so that the new UI framework engine can run successfully.
[0085] Furthermore, the cross-system UI application generation method further includes:
[0086] Step k: if it is determined that the target function code does not need to be sent to the preset terminal, determine the second patch file corresponding to the target function code, and update the UI framework source code according to the second patch file to enable the UI framework engine to run successfully.
[0087] Furthermore, after obtaining the target function code, it can be determined whether the target function code needs to be sent to the preset terminal. Specifically, whether to send the target function code to the preset terminal can be decided by the developer of the Linux system. The developer of the Linux system can determine that the target function code needs to be sent to the preset terminal by triggering a send instruction, or can determine that the target function code does not need to be sent to the preset terminal by triggering a negative instruction. If it is determined that the target function code does not need to be sent to the preset terminal, the second patch file corresponding to the target function code is determined, and the UI framework source code is updated according to the second patch file so that the UI framework engine can run successfully. It should be noted that when it is determined that the target function code does not need to be sent to the preset terminal, after updating the UI framework source code according to the target function code, the resulting UI framework source code is the code corresponding to the Linux system, and the UI framework source code corresponding to the UI framework engine in the preset terminal is different from the UI framework source code corresponding to the Linux system.
[0088] This embodiment determines the target function code corresponding to each function in the UI framework engine when there is no target source code to be modified in the UI framework source code, and updates the UI framework source code according to the target function code to enable the UI framework engine to run successfully, thereby further improving the success rate of running UI applications generated based on the UI framework engine, that is, further improving the cross-system running success rate of codes corresponding to UI applications of different terminal systems.
[0089] Furthermore, a fourth embodiment of the cross-system UI application generation method of the present invention is proposed.
[0090] The difference between the fourth embodiment of the cross-system UI application generation method and the first, second and / or third embodiments of the cross-system UI application generation method is that Figure 5 , the cross-system UI application generation method further includes:
[0091] Step S70: If a first calling instruction sent by an Android terminal is received through the calling interface, the target UI application is packaged into an Android application package according to the first calling instruction, and the Android application package is sent to the Android terminal.
[0092] If a first call instruction sent by an Android terminal is received through the call interface, the target UI application is encapsulated into an Android application package according to the first call instruction, that is, the target UI application is packaged into an APK (Android application package) format package, and the Android application package is sent to the Android terminal. When the Android terminal receives the Android application package corresponding to the target UI application, the Android application package can be installed. Among them, the first call instruction is sent by the user through the Android terminal.
[0093] Furthermore, the cross-system UI application generation method further includes:
[0094] Step m: if a second calling instruction sent by the Linux TV is received through the calling interface, the target UI application is encapsulated into an application package in TPK format according to the second calling instruction, and the application package in TPK format is sent to the Linux TV.
[0095] If a second calling instruction sent by Linux TV is received through the calling interface, the target UI application is encapsulated into an application package in TPK format according to the second calling instruction, and the application package in TPK format is sent to Linux TV, wherein TPK generates slices from a map or base map, and the slices are packaged to create a single compressed .TPK file, and a slice package (.TPK) is a set of slices (images) that can be published as Web slices or Web elevation layers in a map or raster dataset, wherein the TPK format is a format that complies with TV AM (Amplitude Modulation). Linux TV is a TV for Linux system. When Linux TV receives the application package in TPK format, it can install the application package in TPK format to successfully run the target UI application on Linux TV. The second calling instruction is triggered by the user in Linux TV.
[0096] It should be noted that when the system of the terminal corresponding to the sending calling instruction is different, the target UI application will be packaged into an application package corresponding to the system corresponding to the calling instruction, so that the target UI application can run normally in the terminal.
[0097] Furthermore, terminals of systems such as Android terminals and Linux TVs can upgrade their versions by acquiring the target UI application.
[0098] This embodiment packages the target UI application into an application package of the corresponding system according to the different terminal systems sending the calling instruction, so that after the terminal calls the target UI application, the target UI application can run successfully, thereby improving the success rate of UI applications generated by the UI framework engine running in different systems.
[0099] In addition, the present invention also provides a cross-system UI application generation device. Figure 6 As shown, Figure 6 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.
[0100] It should be noted that Figure 6 A structural diagram of the hardware operating environment of the device can be generated for the cross-system UI application.
[0101] like Figure 6 As shown, the cross-system UI application generation device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0102] Optionally, the cross-system UI application generating device may further include an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
[0103] Those skilled in the art will understand that Figure 6 The cross-system UI application generating device structure shown in the figure does not constitute a limitation on the cross-system UI application generating device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0104] like Figure 6 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a cross-system UI application generation program. Among them, the operating system is a program that manages and controls the hardware and software resources of the cross-system UI application generation device, and supports the operation of the cross-system UI application generation program and other software or programs.
[0105] exist Figure 6 In the cross-system UI application generation device shown, the user interface 1003 is mainly used for other system terminals, and performs data communication with terminals of other systems, such as connecting to an Android terminal, and performing data communication with an Android terminal, and / or connecting to a Linux TV, and performing data communication with a Linux TV; the network interface 1004 is mainly used for a background server, and performs data communication with a background server; the processor 1001 can be used to call a cross-system UI application generation program stored in the memory 1005, and execute the steps of the cross-system UI application generation method as described above.
[0106] The specific implementation of the device of the present invention is basically the same as the embodiments of the above-mentioned cross-system UI application generation method, and will not be repeated here.
[0107] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a cross-system UI application generation program is stored. When the cross-system UI application generation program is executed by a processor, the steps of the cross-system UI application generation method as described above are implemented.
[0108] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the above-mentioned embodiments of the cross-system UI application generation method, and will not be repeated here.
[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0110] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a device, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0112] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A cross-system UI application generation method, characterized in that: The cross-system UI application generation method comprises the following steps: Obtain a preset UI framework engine, and transplant the UI framework engine into a Linux system; Encapsulate the calling interface of the UI framework engine in the Linux system by using a compatible language; Obtaining a UI framework source code corresponding to the UI framework engine, and detecting whether there is a target source code to be modified corresponding to a target priority in the UI framework source code; If it is determined that the target source code to be modified does not exist in the UI framework source code, then determining the target function code corresponding to each function in the UI framework engine; If there is modified code in the UI framework source code, the modified code is marked as the target function code of the corresponding function; Sending the target function code to a preset terminal so that a user of the preset terminal can view the target function code; Detecting whether the UI framework source code modified according to the target function code and sent by the preset terminal is received; If the modified UI framework source code is received, updating the UI framework engine according to the modified UI framework source code so that the UI framework engine runs successfully; If it is determined that the target source code to be modified exists in the UI framework source code, then obtaining a first patch file corresponding to the target source code to be modified from the pre-stored patch files corresponding to each function of the UI framework source code; and / or, outputting prompt information and receiving the first patch file; the prompt information is used to prompt the developer to write the corresponding first patch file according to the source code to be modified; Updating the UI framework source code according to the first patch file to enable the UI framework engine to run successfully; Based on the UI framework engine, a target UI application is generated according to the received development instruction, wherein the calling interface is used for terminals of various systems to call the target UI application, and the function codes corresponding to each function in the UI framework engine are extensible.
2. The cross-system UI application generation method according to claim 1, characterized in that: The step of obtaining the UI framework source code corresponding to the UI framework engine and detecting whether there is a target source code to be modified corresponding to the target priority in the UI framework source code comprises: Obtaining a UI framework source code corresponding to the UI framework engine, and performing a compatibility test on the UI framework source code in the Linux system to determine a source code to be modified in the UI framework source code; If it is detected that the source code to be modified is code related to the successful operation of the UI framework engine, the code related to the successful operation of the UI framework engine is determined to be the target source code to be modified corresponding to the target priority.
3. The cross-system UI application generation method according to claim 1, characterized in that: After the step of detecting whether the UI framework source code sent by the preset terminal and modified according to the target function code is received, the method further includes: If the modified UI framework source code is not received, a second patch file corresponding to the target function code is determined, and the UI framework source code is updated according to the second patch file so that the UI framework engine runs successfully.
4. The cross-system UI application generation method according to claim 1, characterized in that: After the step of determining the target function code corresponding to each function in the UI framework engine if it is determined that the target source code to be modified does not exist in the UI framework source code, the method further includes: If it is determined that the target function code does not need to be sent to the preset terminal, a second patch file corresponding to the target function code is determined, and the UI framework source code is updated according to the second patch file so that the UI framework engine runs successfully.
5. The cross-system UI application generation method according to claim 1, characterized in that: After the step of obtaining the UI framework source code corresponding to the UI framework engine, the method further includes: Back up the UI framework source code.
6. The cross-system UI application generation method according to any one of claims 1 to 5, characterized in that: After the step of generating a target UI application based on the UI framework engine according to the received development instruction, the method further includes: If a first calling instruction sent by an Android terminal is received through the calling interface, encapsulating the target UI application into an Android application package according to the first calling instruction, and sending the Android application package to the Android terminal; If a second calling instruction sent by the Linux TV is received through the calling interface, the target UI application is encapsulated into an application package in TPK format according to the second calling instruction, and the application package in TPK format is sent to the Linux TV.
7. A cross-system UI application generation device, characterized in that: The cross-system UI application generation device includes a memory, a processor, and a cross-system UI application generation program stored in the memory and executable on the processor. When the cross-system UI application generation program is executed by the processor, the steps of the cross-system UI application generation method as described in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a cross-system UI application generation program, and when the cross-system UI application generation program is executed by the processor, the steps of the cross-system UI application generation method according to any one of claims 1 to 6 are implemented.
