Application interface migration method, communication system, electronic equipment and storage medium
By collaboratively analyzing and executing application interface source code files in cross-device communication systems, the problem of insufficient dynamic performance of application interfaces in the prior art is solved, and the collaborative application interface display on different devices and operating systems is realized. Reduces development costs and improves user experience.
Patent Information
- Application Number
- CN202411545933.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
When the existing technology realizes cross-device application interface rendering, the dynamic performance is weak, which cannot meet the increasing dynamic content updates and rapidly changing business needs. Especially on lightweight IoT systems with weak performance, the startup is relatively high. Stops are prone to occur when sliding pages slowly and quickly.
An application interface migration method is proposed, by obtaining migration configuration information and the source code file of the target application, working together between the first electronic device and the second electronic device, parsing and executing the object code file to generate a collaborative target application interface. The method includes exchanging data information in the device group, generating operation information in response to user operations, and ensuring a secure transmission of operation information through encryption and encapsulation mechanisms.
It realizes running the same source code file on different devices and operating systems, generating a collaborative target application interface, reducing the development and learning costs of multiple devices, improving user experience, and supporting synchronous collaboration between multiple devices.
Smart Images

Figure CN119440623A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to an application interface migration method, a communication system, an electronic device, and a storage medium. Background Art
[0002] The software development process mainly includes front-end development and back-end development. Among them, the user interface (UI) design framework based on JavaScript (JS) is a high-performance UI development framework that crosses devices. Applications developed based on the JS UI design framework can run on different platforms and devices. In related technologies, the developed application interface is rendered by calling the application programming interface provided by different devices, so that the application interface can be displayed on different devices. Summary of the invention
[0003] The present disclosure aims to solve at least one of the technical problems existing in the prior art, and proposes an application interface migration method, a communication system, an electronic device and a storage medium.
[0004] In order to achieve the above-mentioned object, in a first aspect, the present disclosure provides an application interface migration method, which is applied to a first electronic device in a communication system, wherein the communication system also includes a second electronic device, and the method includes:
[0005] Get the migration configuration information and the source code files of the target application;
[0006] Parsing the source code file to obtain a first target code file, and executing the first target code file according to the migration configuration information to generate a first target application interface;
[0007] The migration configuration information and the source code file are sent to the second electronic device so that the second electronic device can parse the source code file to obtain a second target code file, and execute the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface.
[0008] In some embodiments, parsing the source code file to obtain the first target code file includes: calling a first engine to parse the source code file to obtain the first target code file;
[0009] The second electronic device parsing the source code file includes: the second electronic device calling a second engine to parse the source code file;
[0010] The first engine and the second engine are capable of parsing at least one identical target script development language; and the source code file is generated by the target script development language.
[0011] In some embodiments, after sending the migration configuration information and the source code file to the second electronic device, the method further includes:
[0012] In response to a first operation performed by a user on the first target application interface, generating corresponding first operation information and sending the information to the second electronic device, so that the second electronic device can perform a second operation coordinated with the first operation on the second target application interface according to the first operation information;
[0013] And / or, in response to third operation information generated and sent by the second electronic device based on a third operation, a fourth operation coordinated with the third operation is performed on the first target application interface.
[0014] In some embodiments, when the method further includes: in response to a first operation performed by a user on the first target application interface, generating corresponding first operation information and sending the information to the second electronic device, the process of sending the first operation information to the second electronic device includes:
[0015] Encrypting the first operation information to generate first encrypted information;
[0016] encapsulating the first encrypted information to obtain a first encapsulation package, and sending the first encapsulation package to the second electronic device, so that the second electronic device parses the first encapsulation package to obtain the first encrypted information, decrypts the first encrypted information to obtain the first operation information, and performs a second operation coordinated with the first operation on the second target application interface according to the first operation information;
[0017] In the case where the method further includes, in response to third operation information sent by the second electronic device, performing a fourth operation coordinated with the third operation on the first target application interface, in response to the third operation information generated and sent by the second electronic device based on the third operation, performing the fourth operation coordinated with the third operation on the first target application interface includes:
[0018] In response to a second encapsulation packet sent by the second electronic device, parsing the second encapsulation packet to obtain second encrypted information;
[0019] The second encrypted information is decrypted to obtain the third operation information, and the fourth operation coordinated with the third operation information is performed on the first application interface according to the third operation information.
[0020] In some embodiments, encapsulating the first encrypted information to obtain a first encapsulation package includes: encapsulating the first encrypted information and a first function code to obtain the first encapsulation package; wherein the first function code is a key used when encrypting the first operation information;
[0021] The second packaging package is obtained by the second electronic device packaging the second encrypted information and the second function code; the second packaging package is parsed to obtain the second encrypted information and the second function code; decrypting the second encrypted information includes: using the second function code to decrypt the second encrypted information.
[0022] In some embodiments, the process of parsing the source code file to obtain a first target code file, and executing the first target code file according to the migration configuration information to generate a first target application interface includes:
[0023] Binding the first engine and the third engine so that the first engine and the third engine are mapped to each other through an interface function;
[0024] Calling the first engine to parse the source code file into a first target code file, and mapping the first target code file to the third engine through the corresponding interface function;
[0025] Calling the third engine so that the third engine executes the first target code file according to the migration configuration information to generate a local UI control;
[0026] Graphics rendering is performed according to the local UI control to obtain a first target application interface.
[0027] In some embodiments, the native UI control comprises an XML file.
[0028] In some embodiments, before obtaining migration configuration information and source code files of the target application in response to the user's application migration instruction, the method further includes:
[0029] Start the communication channel;
[0030] exchanging device information with the second electronic device according to the communication channel;
[0031] Establishing a device group with the second electronic device according to the exchanged device information;
[0032] Sending the source code file to the second electronic device includes: sending the migration configuration information and the source code file to the second electronic device in the device group.
[0033] In some embodiments, the source code file is generated by a Javascript scripting language, and the first object code file and the second object code file are both generated by at least one of a C scripting language and a C++ scripting language.
[0034] In some embodiments, obtaining migration configuration information and source code files of a target application includes:
[0035] In response to the application migration instruction, migration configuration information corresponding to the application migration instruction and a source code file of the target application are acquired.
[0036] In some embodiments, the operating systems of the first electronic device and the second electronic device are different.
[0037] In a second aspect, the present disclosure provides an application interface migration method, which is applied to a second electronic device in a communication system, wherein the communication system also includes a first electronic device, and the method includes:
[0038] Receiving migration configuration information and source code files sent by the first electronic device;
[0039] Parsing the source code file to obtain a second target code file;
[0040] Executing the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device;
[0041] The first target application interface is generated by the first electronic device parsing the source code file to obtain a first target code file and executing the first target code file.
[0042] In some embodiments, the first target code file is obtained by the first electronic device invoking a first engine to parse the source code file;
[0043] Parsing the source code file to obtain a second target code file includes: calling a second engine to parse the source code file to obtain the second target code file; wherein the second engine and the first engine can parse at least one same target script development language; and the source code file is generated by the target script development language.
[0044] In some embodiments, after executing the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device, the method further includes:
[0045] In response to a third operation performed by the user on the second target application interface, generating corresponding third operation information and sending the information to the first electronic device, so that the first electronic device can perform a fourth operation on the first target application interface in coordination with the third operation according to the third operation information;
[0046] And / or, in response to first operation information generated and sent by the first electronic device based on a first operation, a second operation coordinated with the first operation is performed on the second target application interface.
[0047] In some embodiments, the method further includes: in response to a third operation performed by the user on the second target application interface, generating corresponding third operation information and sending the information to the first electronic device, so that the first electronic device can perform a fourth operation coordinated with the third operation on the first target application interface according to the third operation information, and sending the third operation information to the second electronic device, comprising:
[0048] Encrypting the third operation information to generate second encrypted information;
[0049] encapsulating the second encrypted information to obtain a second encapsulation package, and sending the second encapsulation package to the first electronic device, so that the first electronic device parses the second encapsulation package to obtain the second encrypted information, decrypts the second encrypted information to obtain the third operation information, and performs a fourth operation coordinated with the third operation on the first target application interface according to the third operation information;
[0050] In the case where the method further includes, in response to first operation information sent by the first electronic device, performing a second operation coordinated with the first operation on the second target application interface, the process of performing the second operation coordinated with the first operation on the second target application interface in response to the first operation information sent by the first electronic device includes:
[0051] In response to a first encapsulation packet sent by the first electronic device, parsing the first encapsulation packet to obtain first encrypted information;
[0052] The first encrypted information is decrypted to obtain the first operation information, and a second operation coordinated with the first operation is performed on the second target application interface according to the first operation information.
[0053] In some embodiments, encapsulating the second encrypted information to obtain a second encapsulation package includes: encapsulating the second encrypted information with a second function code to obtain the second encapsulation package; wherein the second function code is a key used when encrypting the third operation information;
[0054] The first packaging package is obtained by packaging the first encrypted information and the first function code by the first electronic device; the first packaging package is parsed to obtain the first encrypted information and the first function code; decrypting the first encrypted information includes: using the first function code to decrypt the first encrypted information.
[0055] In some embodiments, the source code file is parsed to obtain a second target code file, and the process of executing the second target code file to generate a second target application interface that cooperates with the first target application interface in the first electronic device includes:
[0056] Binding the second engine and the fourth engine so that the second engine and the fourth engine are mapped to each other through an interface function;
[0057] Calling the second engine to parse the source code file into a second target code file, and mapping the second target code file to the fourth engine through the corresponding interface function;
[0058] Calling the fourth engine so that the fourth engine executes the second target code file according to the migration configuration information to generate a local UI control;
[0059] Graphics rendering is performed according to the local UI control to obtain a second target application interface.
[0060] In some embodiments, the native UI control comprises an XML file.
[0061] In some embodiments, before receiving the migration configuration information and the source code file sent by the first electronic device, the method further includes:
[0062] Start the communication channel;
[0063] exchanging device information with the second electronic device according to the communication channel;
[0064] Establishing a device group with the second electronic device according to the exchanged device information;
[0065] The migration configuration information and source code file sent by the first electronic device are received by the second electronic device in the device group.
[0066] In some embodiments, the source code file is generated by a Javascript scripting language, and the first object code file and the second object code file are both generated by at least one of a C scripting language and a C++ scripting language.
[0067] In a third aspect, the present disclosure provides a communication system, including: a first electronic device and a second electronic device;
[0068] The first electronic device is configured to: obtain migration configuration information and a source code file of a target application; parse the source code file to obtain a first target code file, and execute the first target code file to generate a first target application interface; and send the migration configuration information and the source code file to the second electronic device;
[0069] The second electronic device is configured to receive migration configuration information and source code files sent by the first electronic device, parse the source code files to obtain a second target code file; and execute the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device.
[0070] In some embodiments, the first electronic device and the second electronic device exchange device information with each other through a communication channel, and establish a device group according to the exchanged device information; the first electronic device and the second electronic device exchange data information in the device group;
[0071] The first electronic device and the second electronic device exchange data information in the device group, including: the first electronic device sends the migration configuration information and the source code file to the second electronic device in the device group.
[0072] In a fourth aspect, the present invention proposes an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the application interface migration method as described in any one of the above.
[0073] In a fifth aspect, the present disclosure proposes a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the application interface migration method as described in any one of the above. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0075] Figure 1 is a flow chart of an interface migration method in some embodiments of the present disclosure;
[0076] Figure 2 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0077] Figure 3 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0078] Figure 4 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0079] Figure 5 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0080] Figure 6 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0081] Figure 7 is a script development language binding flow chart in some embodiments of the present disclosure;
[0082] Figure 8 is a design flow chart of application development in some embodiments of the present disclosure;
[0083] Fig. 9 is a flowchart of encryption and decryption in some embodiments of the present disclosure;
[0084] Fig.10 is a flowchart of encryption and decryption in other embodiments of the present disclosure;
[0085] Fig.11 is a diagram of a graphics rendering framework in some embodiments of the present disclosure;
[0086] Fig.12 is a flowchart of graphics rendering in some embodiments of the present disclosure;
[0087] Fig.13 is a flowchart of graphics rendering in some other embodiments of the present disclosure;
[0088] Fig.14 is a flowchart of application development in some embodiments of the present disclosure;
[0089] Fig.15 is a flowchart of application development in other embodiments of the present disclosure;
[0090] Fig.16 is a distributed networking framework diagram in some embodiments of the present disclosure;
[0091] Fig.17 is an application block diagram of a distributed networking framework in some embodiments of the present disclosure;
[0092] Fig.18 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0093] Fig.19 is a flow chart of an interface migration method in some other embodiments of the present disclosure;
[0094] Fig. 20 It is a structural diagram of an electronic device in some embodiments of the present disclosure.
[0095] 10. First electronic device; 101. First engine; 102. Third engine; 103. First target application interface; 104. First processing module; 20. Second electronic device; 201. Second engine; 202. Fourth engine; 203. Second target application interface; 204. Second processing module; 901. Processor; 902. Memory; 903. I / O interface. DETAILED DESCRIPTION
[0096] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0097] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0098] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. Similarly, "including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0099] As used herein, "parallel" and "perpendicular" include the described situation and the situation similar to the described situation, and the range of the similar situation is within the acceptable deviation range, wherein the acceptable deviation range is determined by a person of ordinary skill in the art taking into account the measurement in question and the error associated with the measurement of a specific quantity (i.e., the limitations of the measurement system). For example, "parallel" includes absolute parallelism and approximate parallelism, wherein the acceptable deviation range of approximate parallelism can be, for example, a deviation within 5°; "perpendicular" includes absolute perpendicularity and approximate perpendicularity, wherein the acceptable deviation range of approximate perpendicularity can also be, for example, a deviation within 5°.
[0100] It will be understood that when a layer or an element is referred to as being on another layer or substrate, it can be directly on the other layer or substrate, or intervening layers may be present between the layer or element and the other layer or substrate.
[0101] Exemplary embodiments are described herein with reference to cross-sectional views and / or plan views that are idealized exemplary drawings. In the drawings, the thickness of layers and regions are exaggerated for clarity. Therefore, variations in shape relative to the drawings due to, for example, manufacturing techniques and / or tolerances are conceivable. Therefore, the exemplary embodiments should not be interpreted as being limited to the shapes of the regions shown herein, but include deviations in shape due to, for example, manufacturing. Therefore, the regions shown in the drawings are schematic in nature, and their shapes are not intended to illustrate the actual shapes of regions of the device, and are not intended to limit the scope of the exemplary embodiments.
[0102] In the related art, the developed application interface is rendered by calling the application programming interface provided by different devices, so that the application interface is displayed on different devices. However, this method of displaying will result in the content of the application interface being fixed. After updating the content in the front-end developed application, a new version of the application must be released to display the updated content on different devices. Therefore, the dynamic performance of this rendering method of displaying the application interface is relatively weak, which leads to the inability of native development to meet the increasing demand for dynamic content updates and rapidly changing business needs. In response to the problem of insufficient dynamics faced by native development, a solution was born that uses JS as the application development language, bridges JS components to native UI components (actually rendering native UI components), and realizes the rendering of JS components. And with the development of technology, users have an increasingly strong demand for using lightweight devices to run applications that support interface interaction. How to run applications that support interface interaction conveniently and quickly on lightweight devices is an urgent problem to be solved. However, applications under the framework of bridging JS components to native UI components start slowly on lightweight IoT systems or devices with weaker performance, such as light kernel systems such as RTOS, and are prone to freezes when sliding pages quickly. At the same time, due to the use of native UI components for rendering, the results displayed on the same application interface designed on different device systems sometimes vary greatly.
[0103] In order to at least alleviate or solve one of the technical problems described above, the present disclosure proposes an application interface migration method, a communication system, an electronic device and a readable storage medium.
[0104] In some embodiments, Figure 1 and Figure 2 As shown, the present disclosure provides an application interface migration method, which is applied to a first electronic device 10 in a communication system, wherein the communication system further includes a second electronic device 20. An application interface migration method provided by an embodiment of the present disclosure includes: step S1 and step S2.
[0105] Step S1: Obtain migration configuration information and source code files of the target application.
[0106] Step S2: parsing the source code file to obtain a first target code file, and executing the first target code file according to the migration configuration information to generate a first target application interface 103.
[0107] Optionally, the first electronic device 10 calls the first engine 101 to parse the source code file to obtain a first target code file, and calls the third engine 102 to execute the first target code file to generate a first target application interface 103 .
[0108] Among them, the engine is the core component for developing programs or systems on electronic platforms. Using the engine, developers can quickly build and lay out the functions required for the program, or use it to assist the operation of the program. Generally speaking, the engine is the supporting part of a program or a system. In the embodiment of the present disclosure, the first engine is a component for parsing source code files. Using the first engine, source code files can be parsed into files of other codes. For example, the first engine is a JS engine, and the JS engine can be regarded as an interpreter for the JavaScript scripting language. The third engine is a rendering engine, which is a key component for image rendering, responsible for converting two-dimensional or three-dimensional models, textures, lighting and other data into two-dimensional images visible to the naked eye.
[0109] Step S3: Send the migration configuration information and the source code file to the second electronic device 20, so that the second electronic device 20 can parse the source code file to obtain a second target code file, and generate a second target application interface 203 according to the migration configuration information and the second target code file. The second target application interface 203 cooperates with the first target application interface 103.
[0110] It should be noted that the second target application interface 203 cooperates with the first target application interface 103, which means that the second target application interface 203 and the first target application interface 103 can completely and consistently display a certain target interface; or, the second target application interface 203 and the first target application interface 103 can jointly display a certain target interface. For example, when the second target application interface 203 and the first target application interface 103 completely and consistently display a certain target interface, the second target application interface 203 and the first target application interface 103 display the same content, and the layout of the interface can be the same or different; when the second target application interface 203 and the first target application interface 103 jointly display a certain target interface, the second target application interface 203 and the first target application interface 103 can respectively display two different areas of the target interface.
[0111] Among them, the migration configuration information may include collaborative information between the second target application interface 203 and the first target application interface 103, that is, whether the two display the same content interface completely and consistently, or display one interface together; and when the two display the same content interface completely and consistently, the layout form of the interface, etc.
[0112] Optionally, the second electronic device 20 calls the second engine 201 to parse the source code file to obtain a second target code file, and calls the fourth engine 202 to execute the second target code file according to the migration configuration information to generate a second target application interface 203 .
[0113] Optionally, both the first target code file and the second target code file may be files generated by C language or C++ language.
[0114] In one example, the source code file is generated by at least one of JS, CSS (Cascading Style Sheets) and HTML (HyperText Markup Language) codes. For example, the source code file is developed by writing JS, CSS, HTML tags and data binding, and the source code file includes UI code and business logic code. The first engine 101 may be called, for example, a JS engine, and the source code file is run to obtain a C++ program written in C++, i.e., a first target code file. The third engine 102 may be called, for example, a lightweight graphics engine, and the C++ program is executed to implement a lightweight UI framework design with very light memory. The JS engine can effectively adapt to devices of various memory sizes, thereby realizing multi-terminal deployment and distribution of a set of source code files.
[0115] Optionally, the first electronic device 10 and the second electronic device 20 may be smart display devices or smart IoT devices. Optionally, the first electronic device 10 and the second electronic device 20 may be one of electronic devices such as computers, mobile phones, tablets, and notebooks.
[0116] In one example, the first electronic device 10 is a smart display device, and the source code file includes a JS Bundle package compiled from JS, HTML, and CSS files. In this case, the JS Bundle package can be parsed using the V8 engine to form a corresponding C or C++ program, which can be executed on a graphics rendering engine to obtain the first target application interface 103.
[0117] In another example, the first electronic device 10 is a smart IoT device, and the source code file includes a JS Bundle package compiled from JS, HTML, and CSS files. The lightweight JS engine is used to pass the JS Framework for parsing to form a corresponding C or C++ program, which is executed on the lightweight graphics rendering engine.
[0118] In the embodiment of the present disclosure, for the first electronic device 10 and the second electronic device 20 in the communication system, the same source code file can be used to call the engines in the devices in the first electronic device 10 and the second electronic device 20 respectively to convert the source code file into a first target code file or a second target code file that can be independently run in different devices, and obtain the first target application interface or the second target application interface by executing the first target code file or the second target code file, and the first target application interface and the second target application interface work together, that is, the first electronic device 10 and the second electronic device 20 use the same source code file to finally generate a coordinated target application interface, that is, to achieve the migration of target application interfaces between different devices, thereby reducing the development cost and learning cost of multiple devices and greatly improving the user experience.
[0119] Specifically, in one example, Figure 3 As shown, it is the application system architecture of JS engine. The source code file of the application is developed by using the JS script development language bound to the JS engine, and the source code file includes a JSView part and a logical JS code part. Among them, the JSView part includes page control and sub-control information and jump page information, and the logical JS code part includes business-related data flow, processing, and screen jump logic information. The source code file is called by different devices according to the device type. After the corresponding JS engine is adapted and parsed, the target code file is obtained. The target code file can be, for example, a C code file or a C++ code file, and the target code file includes a UI interface file, a style file, etc. For example, in a first electronic device, the source code file is parsed into a first target code file using the JS engine, and the JS engine and the third engine (for example, a UI rendering engine) are bound and mapped with logical codes to execute the first target code file using the UI rendering engine, that is, the first target application interface is formed by using the UI interface file, the style file, etc. in the UI rendering engine. The processing process of the source code file in the second electronic device is similar, wherein the specific engine used is called accordingly according to the type of the second electronic device to obtain a second target application interface that cooperates with the first target application interface. The embodiment of the present disclosure only needs to adjust the source code file generated by one development language, Js, to form the application interface of different devices.
[0120] In another example, Figure 4 The following is the application principle based on JS engine, including:
[0121] The source code file of the application is developed by writing JS, CSS, HTML tags and data binding, wherein the source code file includes UI graphics code and business logic code. A lightweight JS engine is used to run the JS framework layer business logic, and the UI graphics code is parsed into a C++ code file written in C++. The C++ code file is graphically rendered with a lightweight graphics engine to obtain the application interface, thereby realizing a lightweight UI framework design with very light memory. In the disclosed embodiment, the JS engine can effectively adapt to devices of various memory sizes and realize multi-terminal deployment and distribution of a set of source code.
[0122] In another example, Figure 5 and Figure 6 As shown, the JS engine-based application process includes: calling the unified interface encapsulated by the open source JS engine corresponding to the device, initializing the adaptation layer, initializing the JS execution environment, using the open source JS engine to introduce the source code file corresponding to the interface into the JS engine's execution environment, binding the encoding function in the JS engine with the local UI creation function, calling the UI creation interface function in the js engine execution environment, and mapping it to the corresponding local UI creation function, and finally creating a local UI control, and drawing it on the system's display device to obtain the application interface.
[0123] In one example, during the parsing and rendering process, communication is performed through threads between the JS engine and the UI engine. Figure 7 As shown, it is the communication process between JS-UI threads. Specifically, in the process of graphics rendering, in addition to the rendering of the interface, there are also functions such as calling, event binding, and callback of native modules, which are all implemented by the communication between the JS thread and the UI thread. The JS code of the target application interface runs on the JS thread, but the drawing of native components and the capture of events all occur in the UI thread. The communication between the two threads uses the two underlying interfaces callNative and callJS, which are asynchronous by default. Various encapsulations are made based on these two underlying interfaces in the JS framework layer and the native renderer. CallNative is an interface injected by the electronic device into the JS execution environment, which is provided to the JS framework layer for calling. The module calling method and parameters are sent to the electronic device through this interface. CallJS is implemented by the JS framework layer and is also injected into the execution environment and provided to the electronic device for calling. The dispatch of events and the callback function of the module are notified to the JS framework layer through this interface. The electronic device can be a first electronic device 10 or a second electronic device 20.
[0124] In some embodiments, the operating systems of the first electronic device 10 and the second electronic device 20 are different. For example, in one example, the operating system of the first electronic device 10 is a Windows operating system, and the operating system of the second electronic device 20 is an Android operating system. Of course, when the operating systems of the first electronic device 10 and the second electronic device 20 are the same, the application interface migration method disclosed in the present invention can also be applied.
[0125] The disclosed embodiments can achieve the collaboration of application interfaces of different operating systems by using the same source code file to parse it into files generated by C language or C++ language in different operating systems. For example, a first target code file is parsed in a first electronic device 10 and a second target code file is parsed in a second electronic device 20.
[0126] In some embodiments, the first engine 101 and the second engine 201 are bound to at least one same script development language, that is, the first engine 101 and the second engine 201 can parse at least one same target script development language, and the source code file is generated by the target script development language.
[0127] In the disclosed embodiment, the first engine 101 in the first electronic device 10 and the second engine 201 in the second electronic device 20 are capable of parsing the same target script development language, and the source code file is generated by the first script development language. In this case, the parsing and adaptation of the source code file by different devices can be guaranteed, thereby ensuring that the same source code file can be parsed in different devices to obtain the target code file, thereby further ensuring that different devices can generate the target application interface to achieve the migration of the target application interface between different devices.
[0128] In one example, if Figure 7 As shown in the figure, the implementation principle of JS engine binding the first scripting development language is to use a set format of API comments to describe the API to be scripted, use a tool called gen_idl to extract the comments to generate a JSON interface description file, and then use different code generators to generate bindings for the corresponding language. The code uses the MVVM ((Model-View-ViewModel, MV-VM)) design pattern to implement basic functions such as data binding, command binding, and window navigation. Among them, the MVVM framework is as follows Figure 8As shown. Model: Model. View: User interface, also called view, an interface composed of controls that interacts with users, used to display data to users and respond to user input. ViewModel: The core of MVVM. ViewModel connects View and Model through two-way data binding. It can retrieve the data of Model and help process the business logic involved in the View due to the need to display content. The interface and binding rules are described in XML. When developing an application, you only need to develop the model (that is, the business logic). The business logic of the application is developed using a binding scripting development language.
[0129] In some embodiments, Figure 1 and Figure 2 As shown, an application interface migration method provided by an embodiment of the present disclosure includes step S4 in addition to step S1 to step S3.
[0130] Step S4: in response to the target application interface generation message sent by the second electronic device 20, the first target application interface 103 and the second target application interface 203 are operated in coordination.
[0131] In the disclosed embodiment, after the first electronic device 10 and the second electronic device 20 generate a collaborative target application interface, the first electronic device 10 and the second electronic device 20 may also implement a collaborative operation function for the application interface.
[0132] In some embodiments, in step S4, enabling the first target application interface 103 and the second target application interface 203 to perform a collaborative operation includes: step S41 and / or step S42.
[0133] Step S41, in response to a first operation performed by a user on the first target application interface 103, corresponding first operation information is generated and sent to the second electronic device 20, so that the second electronic device 20 can perform a second operation coordinated with the first operation on the second target application interface 203 according to the first operation information.
[0134] Step S42 , in response to the third operation information sent by the second electronic device 20 (the third operation information is generated by the second electronic device 20 based on the third operation performed by the user on the second electronic device 20 ), perform a fourth operation coordinated with the third operation on the first target application interface 103 .
[0135] In one example, step S4 includes both step S41 and step S42 described above.
[0136] In an example, the second target application interface 203 and the first target application interface 103 display interfaces with the same content. In this case, the second operation may be the same as the first operation.
[0137] Optionally, both the first operation and the second operation may be operations on the application interface and the applications in the interface, for example, sliding the application interface left and right, selecting and opening a certain application in the interface, etc.
[0138] Optionally, the first operation information and the second operation information may include information such as the operated page, control, event, and position coordinates.
[0139] For example, in one example, in the first electronic device 10, the user slides the first target application interface 103 to the left, then the first electronic device 10 will generate the first operation information of "slide the first target application interface 103 to the left", such as the position coordinates of the interface, the left slide and other information, and send the first operation information to the second electronic device 20. After receiving the first operation information, the second electronic device 20 will complete the coordinated operation on the second target application interface 203 according to the specific information in the first operation information. Correspondingly, when the user performs the second operation on the second target application interface 203 in the second electronic device 20, the second electronic device 20 will generate the second operation information and send the second operation information to the first electronic device 10. After receiving the second operation information, the first electronic device 10 performs the coordinated operation on the first target application interface 103.
[0140] It should be noted that step S41 is a process in which the second electronic device 20 and the first electronic device 10 perform a coordinated operation. Step S42 is a process in which the first electronic device 10 and the second electronic device 20 perform a coordinated operation. Therefore, step S41 and step S42 describe two situations in which the first electronic device 10 and the second electronic device 20 perform a coordinated operation, and both can exist independently, and there is no order of precedence.
[0141] In another example, the second target application interface 203 and the first target application interface 103 jointly display a target interface (i.e., the second target application interface 203 and the interface displayed by the first target application interface 103 are adapted), and in this case, the second operation may be an operation that cooperates with the first operation. For example, the first operation is an operation of clicking on an icon; the second operation may be displaying relevant information of the icon.
[0142] In some embodiments, step S4 includes step S41, that is, the process of performing application interface collaboration with the second electronic device 20 includes generating corresponding first operation information and sending it to the second electronic device 20. Among them, the process of sending the first operation information to the second electronic device 20 in step S41 includes steps S411 and S412:
[0143] Step S411: Encrypt the first operation information to generate first encrypted information.
[0144] Step S412: encapsulate the first encrypted information to obtain a first encapsulation package, and send the first encapsulation package to the second electronic device 20, so that the second electronic device 20 can parse the first encapsulation package to obtain the first encrypted information, and decrypt the first encrypted information to obtain the first operation information, and perform a second operation coordinated with the first operation on the second target application interface 203 according to the first operation information.
[0145] Optionally, in some embodiments, Figure 2 As shown, the first electronic device 10 is provided with a first processing module 104, which is used to generate first operation information according to a first operation performed by a user on the first electronic device 10, and is also used to send the first operation information to the second electronic device 20 so that the second electronic device 20 can perform a second operation coordinated with the first operation according to the first operation information.
[0146] In some embodiments, in step S412, the process of encapsulating the first encrypted information to obtain the first encapsulation package includes: encapsulating the first encrypted information and the first function code to obtain the first encapsulation package, wherein the first function code is the key used to encrypt the first operation information.
[0147] In some other embodiments, step S4 includes step S42, that is, the process of performing application interface coordination with the second electronic device 20 includes performing a fourth operation coordinated with the third operation on the first target application interface 103 in response to the third operation information sent by the second electronic device 20. Among them, the process of performing the fourth operation coordinated with the third operation on the first target application interface 103 in response to the third operation information sent by the second electronic device 20 in step S32 includes steps S421 and S422:
[0148] Step S421: In response to the second encapsulation packet sent by the second electronic device 20, the second encapsulation packet is parsed to obtain second encrypted information.
[0149] Step S422: decrypt the second encrypted information to obtain third operation information, and perform a fourth operation coordinated with the third operation information on the first target application interface 103 according to the third operation information.
[0150] In some embodiments, the second package in step S421 is obtained by encapsulating the second encrypted information and the second function code by the second electronic device 20. In step S422, the second package is parsed to obtain the second encrypted information and the second function code. Accordingly, in step S422, the process of decrypting the second encrypted information includes: decrypting the second encrypted information using the second function code.
[0151] Specifically, in one example, Fig. 9 As shown, this is the process of XOR encryption and decryption.
[0152] The first operation information or the second operation information to be encrypted corresponds to Fig.15 The original information EIvis in the ciphertext is key, and the key is key, which corresponds to the first function code or the second function code. The first XOR operation is performed on EIvis, that is, the first electronic device 10 encrypts and packages the first operation information and the first function code to obtain the encrypted first package cipherText, or the second electronic device 20 encrypts and packages the second operation information and the second function code to obtain the encrypted second package. After the second electronic device 20 receives the first package or the first electronic device 10 receives the second package, it performs an XOR operation with key again, and the original information EIvis is restored, that is, the second electronic device 20 obtains the first operation information, and the first electronic device 10 obtains the second operation information.
[0153] In one example, as shown in Table 1, related parameters and parameter settings of the first encapsulation package or the second encapsulation package are shown.
[0154] Table 1
[0155]
[0156] As shown in Table 1, the relevant parameters of the designed first encapsulation packet or the second encapsulation packet include: packet header, function code, data packet length, data packet content, CRC check code and packet tail.
[0157] Wherein, optionally, the packet header may be 2 bytes, for example, it may include 0xAA and 0xBB. The packet header may be a fixed value. Optionally, the function code may be 2 bytes (main function + sub-function), for example, it may include 0x01 (main function) and 0x01 (sub-function), for example, it may include 0x01 (main function) and 0x02 (sub-function), for example, it may include 0x0N (main function) and 0x01 (sub-function), for example, it may include 0x0N (main function) and 0x02 (sub-function). Optionally, the data packet length may be 2 bytes, for example, it may include 0x00 and 0x0N (integer). Optionally, the data packet content includes N bytes of XOR encrypted data, and XOR key value key. Wherein, the XOR encrypted data corresponds to the first operation information or the second operation information. The XOR key value key is the first function code or the second function code. Optionally, the CRC check code may be 2 bytes. Optionally, the packet tail may be 2 bytes, for example, it may include 0xBB and 0xAA. The fixed value may be a fixed value.
[0158] In one example, the function code sent by the first electronic device 10 or the second electronic device 20 as a sending end is defined as shown in Table 2:
[0159] Table 2
[0160]
[0161]
[0162] The function code definition of the first electronic device 10 or the second electronic device 20 as the receiving end is shown in Table 3:
[0163] Table 3
[0164]
[0165] The first operation information or the second operation information is defined as follows:
[0166] {
[0167] "filename":"fnx.js", / / Synchronous application file name
[0168] "pagename":"pnx", / / Application homepage name
[0169] "subpagename":"spnx", / / Application subpage name
[0170] "widgetname":"wnx", / / control name
[0171] "xposition": xp1, / / cursor x-axis position
[0172] "yposition":yp1, / / cursor y-axis position
[0173] "eventtype":0, / / 0-single click, 1-double click, 2-long press, 3-move, 4-drag
[0174] }
[0175] In one example, if Fig.10As shown, the communication encryption and decryption process between the first electronic device 10 and the second electronic device 20. For example, when the first electronic device 10 is used as the sending end and the second electronic device 20 is used as the receiving end, the communication encryption and decryption process includes: before the first electronic device 10 sends the first operation information, the first function code is used as the key of the XOR encryption function and the first operation information to encrypt the first encrypted information and encapsulate it to obtain the first encapsulation package, and send it to the second electronic device 20. After receiving, the second electronic device 20 decrypts the first encapsulation package to obtain the first encrypted information and the first function code, and uses the first function code as the key of the XOR encryption function to decrypt the first encrypted information to obtain the decrypted first operation information, that is, a communication process is completed. For example, when the second electronic device 20 is used as the sending end and the first electronic device 10 is used as the receiving end, the communication encryption and decryption process includes: before the second electronic device 20 sends the second operation information, the second function code is used as the key of the XOR encryption function and the second operation information to encrypt the second encrypted information and encapsulate it to obtain the second encapsulation package, and send it to the first electronic device 10. After receiving the second package, the first electronic device 10 decrypts the second package to obtain the second encrypted information and the second function code, and uses the second function code as the key of the XOR encryption function to decrypt the second encrypted information to obtain the decrypted second operation information, thus completing a communication process.
[0176] In some embodiments, in step S2, the process of parsing the source code file to obtain the target code file, and executing the target code file according to the migration configuration information to generate the first target application interface 103 includes steps S21 to S24:
[0177] Step S21: Bind the first engine 101 and the third engine 102 so that the first engine 101 and the third engine 102 are mapped to each other through an interface function.
[0178] Step S22: calling the first engine 101 to parse the source code file into a first target code file, and mapping the first target code file to the third engine 102 through a corresponding interface function.
[0179] Step S23: calling the third engine 102 to execute the first target code file according to the migration configuration information to generate a local UI control, wherein the local UI control includes an XML file.
[0180] Step S24: Perform graphics rendering according to the local UI control to obtain the first target application interface 103.
[0181] Optionally, the first engine 101 may be a JS engine, and the JS engine includes a lightweight JS engine, a V8 engine, and the like. Specifically, different types of electronic devices may call corresponding types of JS engines according to the device type. The first engine 101 is a graphics engine, or it may be a lightweight graphics engine. The source code file may include a JS file, and the first target code file may include a C or C++ file. Different types of electronic devices may call corresponding types of graphics engines according to the device type to execute C or C++ files to complete graphics rendering to obtain the first target application interface 103.
[0182] In the disclosed embodiment, the first engine 101 is bound to the third engine 102, and in the execution environment of the JS engine, the interface function is called during the parsing of the JS file to obtain the C file, and mapped to the corresponding third engine 102. Specifically, the C file is mapped to the local UI creation function to create a local UI control, and finally the graphics are drawn according to the local UI control to complete the graphics rendering and obtain the first target application interface 103. Similarly, the second electronic device 20 can also directly use the JS file to generate the second target application interface 203 that cooperates with the first target application interface 103 by calling the second engine 201 and the fourth engine 202, thereby realizing the migration of the application interface.
[0183] Alternatively, if Fig.11 As shown, in one example, a basic framework for graphics rendering includes: a control module, a basic module, a general module and an adaptation module.
[0184] Among them, the control module is used to provide various controls. Controls are the basic components of the view layer, that is, graphic widgets. For example, when designing an interface, the interface will contain various buttons, texts, sliders, etc. These commonly used graphic widgets are controls. No matter how complex the interface is, it is composed of these controls.
[0185] The controls provided in the control module include: basic controls, extended controls, custom controls, containers and windows.
[0186] Among them, basic controls are some commonly used controls, such as buttons and sliders. Generally, a GUI engine will focus on implementing these basic controls at the beginning of its design.
[0187] Extended controls refer to some commonly used controls with more powerful and gorgeous functions. They are not as important as basic controls, but extended controls are generally a sign of whether a GUI engine is powerful.
[0188] A custom control is a control that developers can implement as needed when the controls provided by the GUI engine cannot meet the developer's needs, such as a circular color mixer.
[0189] A container can also be understood as a type of control. It does not have a layout effect itself and is mainly used for auxiliary prompts.
[0190] A window is the lowest level control of an interface. The windows created include ordinary windows, overlays, dialogs, etc.
[0191] Optionally, the graphics rendering process can be performed on a normal canvas. In one example, Fig.12 The figure shows the process of canvas rendering. Among them, the functions of ordinary canvas include: rendering textures, rendering text, filling rectangles, rendering rectangular borders, filling rounded rectangles, and rendering rounded rectangular borders. The process of drawing on ordinary canvas includes: implementing the corresponding effects of the bottom layer of canvas by calling the interface of the rendering entity class, wherein the rendering entity class is usually implemented by the adaptation layer. In one example, the image is drawn to the video memory by using lcd_mem.inc.
[0192] Optionally, there are two rendering modes, AGGE and OpenGL. Among them, AGGE is software rendering, which mainly uses the CPU to calculate the interface data and copy it to the video memory for display. It has good compatibility and is suitable for embedded platforms without GPU; OpenGL is based on OpenGL / GLES, has good rendering effects, is suitable for platforms with GPU, and is commonly used in PCs (computers). The basic principle of drawing a graphical interface is actually to merge UI controls, pictures (jpg, png, gif, etc.), fonts, vector graphics (svg) and other information into LCD color format bitmap data and copy it to the video memory.
[0193] In one example, if Fig.13 As shown, the process of control rendering includes: drawing each control. The drawing process of each control includes: drawing the external interface of the control, drawing the specific implementation of the control, starting to draw the control, drawing the control background, drawing the control itself, and drawing the sub-controls in the control. After the control is drawn, the border of the control is drawn, and the drawing of the control is finished. After all controls are drawn, the control rendering is completed.
[0194] Specifically, in one example, the actual development process of an application interface includes: an application development process, an XML file generation process and a specific implementation development process.
[0195] Among them, Fig.14As shown, the process of application development includes: designing the UI interface, writing style files and implementing business logic code are the main modification parts of developing the application. The source code files in this disclosure include the corresponding UI interface code files and business logic code files. During the development process, the main function entry, program initialization, initialization resources, initialization controls, business application initialization and event loop can be reused and adopt a unified interface mode. Fig.14 The examples shown in the example are presented in C language, and the interfaces and processes are the same when other development languages are used.
[0196] In one example, if Fig.15 As shown, a flowchart is generated for the XML file in the application development process. Among them, QtDesigner can export the control layout and property setting data to XML files or other files. The file ending with .ui generated after the page is designed in Qt Designer is actually an XML file. The control name, attribute name and corresponding attribute value are stored according to the agreed rules, and then they can be retrieved according to the agreed rules when opened. Each control also has several fixed data to be stored, such as the XY axis and the corresponding width and height, style configuration information, etc. Among them, exporting to XML format is for the convenience of parsing. The parsing of XML data format can be implemented on different devices. The XML file generation process specifically includes the following steps:
[0197] a) Create a new Application project using Qt Designer.
[0198] b) Open the window interface editor, set the window size to the required size, and delete all controls except centralWidget.
[0199] c) Add the required controls to the window.
[0200] d) Save the file.
[0201] e) In the command line, use qt_to_xml to convert the Qt UI file into an XML file:
[0202] . / bin / qt_to_xmlmainwindow.uimainwindow.xml
[0203] f) Manually edit the generated XML, for example to make some adjustments according to actual needs.
[0204] In some embodiments, before obtaining the migration configuration information and the source code file of the target application, the method further includes step S0:
[0205] Step S0, starting the communication channel; exchanging device information with the second electronic device 20 according to the communication channel; establishing a device group with the second electronic device 20 according to the exchanged device information.
[0206] In step S3, sending the source code file to the second electronic device 20 includes: sending the migration configuration information and the source code file to the second electronic device 20 in the device group.
[0207] Optionally, the communication channel includes at least one of a wireless local area network WIFI channel, a universal serial bus USB channel and a Bluetooth channel.
[0208] In the disclosed embodiment, the networking core of the first electronic device 10 starts the communication channel service, publishes the local device information, and obtains other peripheral device information such as the device information of the second electronic device 20 through the communication channel. The number of the second electronic device 20 can be one or more. The local device information and the device information of the second electronic device 20 are integrated to establish a device group, and the information within the device family group is updated according to the change of the communication channel state, so that the devices in the group form a virtual group, share the information within the group, and complete the construction of the distributed networking framework. Devices connected to the distributed networking framework can send messages, files, etc. to any device in the group, and receive information and files in real time, thereby ensuring that data information can be exchanged in real time between the devices in the group. When one of the devices, such as the first electronic device 10, needs to migrate the application interface of the local device to other devices, it can instantly send source code files, interface synchronization instructions, etc., so as to realize the migration of application interfaces between different devices.
[0209] In some embodiments, in step S1 , obtaining migration configuration information and source code files of the target application includes: obtaining migration configuration information and source code files of the target application in response to a migration configuration instruction.
[0210] Optionally, the migration configuration instruction may be input by a user to the first electronic device 10 , or may be automatically obtained by the first electronic device 10 at regular intervals in the established distributed networking framework.
[0211] In one example, the distributed networking framework of the present disclosure is as follows: Fig.16 As shown in the figure, the specific composition and functions of the distributed networking framework are as follows:
[0212] In order to conveniently and quickly realize the communication connection between the first electronic device 10 and the second electronic device 20 in the communication system, it is firstly necessary to respectively set a networking core of a distributed networking framework in the first electronic device 10 and the second electronic device 20 .
[0213] Among them, the networking core includes: service startup module, scheduling management module and information management module.
[0214] Among them, the service startup module is mainly responsible for initializing communication channels (such as initializing Wifi, Bluetooth, Usb and other communication channels), starting device channel services, device monitoring services and device discovery services.
[0215] The scheduling management module is mainly responsible for services such as device network registration, application network registration, device allocation and channel switching. Among them, the network registration service includes information identification of communication channels such as Wifi, Bluetooth, and Usb, and permission to join the interactive processing within the network. Application network registration services include: distributed input method, distributed file manager, distributed information display application, and permission to use distributed core functions. Device allocation services include: selection and scheduling of network registered devices before the transmission of data such as information and files to optimize the completion of tasks. Channel switching services include: Wifi, Bluetooth, Usb and other communication channels automatically adjust channels according to different transmission types in classified communications to ensure task completion.
[0216] The information management module mainly collects, integrates, accesses and updates information. Information includes device information and data information exchanged between devices.
[0217] The communication channels of the distributed networking framework include: Wifi, Bluetooth, and USB.
[0218] Among them, Wifi provides UDP and TCP transport layer protocols, is responsible for the establishment of network servers and clients, uses UDP protocol to publish and receive broadcast messages, realizes device discovery, and uses TCP protocol to send and receive files and information. For low-power devices, Coap protocol servers and clients are established to realize the sending, receiving, and subscription of files and messages. UDP and TCP are network transmission protocols, and can be used as long as it is network communication. WiFi is a wireless network and can be used in wired networks. There is no binding relationship between UDP and TCP and Wifi.
[0219] Bluetooth provides SPP and Gatt protocols, and is responsible for the construction of the slave (SPP and Gatt are Bluetooth transmission protocols, only Bluetooth can use them) and host of the Bluetooth Gatt protocol, distributing and searching service functions, realizing device discovery, and reading and writing simple messages. It also builds the server and client of the Bluetooth SPP protocol to realize the sending and receiving of files and information.
[0220] Usb provides the AOA protocol, which is responsible for the construction of Accessory and Host, as well as the sending and receiving of files and information.
[0221] Functional description of the distributed networking framework:
[0222] The networking core of each device starts the channel service, publishes local information, obtains peripheral device information from different channels, integrates local information and peripheral device information, and updates the information within the group according to the change of channel status, so that the devices within the group form a virtual group, share the information within the group, and complete the construction of the distributed framework. For example, in one example, updating the information within the group includes: connecting through the communication channel between the devices, adding the information transmitted by the communication channel to the shared information within the group, and when the communication channel changes or the connection status changes, the changed information must be updated to the latest to correct the old information in the group. Among them, if all three communication channels exist, all three communication channels can be started. In fact, the specific communication channels started can be adjusted according to the configuration. However, when all three communication channels are started, the integrity of the communication channels can be guaranteed. Each device can send messages, files and other data information such as applications connected to the distributed networking framework to any other device in the network, and receive information, files and other data information sent by any other device in real time.
[0223] Specifically, in one example, the application system architecture of the distributed networking framework is as follows: Fig.17 shown.
[0224] The application system architecture mainly includes four layers: distributed application layer, distributed SDK layer, distributed core layer and system adaptation layer. Each device integrates the application of the distributed framework and installs an independent distributed core framework to form a distributed framework application system. The distributed application layer calls the distributed core layer functions through the interface and callback function provided by the distributed SDK layer in a cross-process manner (AndroidAIDL, Linux and Windows shared memory). The device networking of the distributed core layer builds a multi-channel (wifi, Bluetooth, USB, etc.) service connection for communication with other devices, provides information and file transmission, and provides system-based functions according to the API interfaces provided by different systems to ensure the functional requirements of the distributed application layer.
[0225] Among them, the distributed application layer mainly includes some business applications, such as input methods, file managers, information publishing systems, etc.
[0226] The distributed SDK layer is mainly used to provide distributed applications with registration information, interface function definitions, and callback function definitions. This layer needs to be integrated into the application's program process.
[0227] The distributed core layer, also known as the distributed core functional layer, is mainly used to provide application management, device networking, device management, protocol integration, and scheduling management. The distributed core layer is a service process that runs independently of the application.
[0228] The system adaptation layer provides different system function interfaces according to different systems for the distributed core layer to call.
[0229] Optionally, the system adaptation layer and the distributed core layer are integrated in the same process.
[0230] In some other embodiments, exchanging data information with the second electronic device 20 further includes: receiving a target application interface generation message sent by the second electronic device 20 .
[0231] In the embodiment of the present disclosure, by instantly acquiring the target application interface generation message sent by the second electronic device 20 through the communication channel within the device group, the subsequent operation collaboration process can be started while determining that the first electronic device 10 and the second electronic device 20 have completed the collaborative display of the target application interface.
[0232] In some other embodiments, exchanging data information with the second electronic device 20 further includes: sending first operation information to the second electronic device 20 , and / or receiving third operation information sent by the second electronic device 20 .
[0233] In the embodiment of the present disclosure, by instantly sending first operation information to the second electronic device 20 through a communication channel within the device group, and / or receiving third operation information sent by the second electronic device 20, it can be ensured that when one of the first electronic device 10 and the second electronic device 20 performs a certain operation on the target application interface, the other of the first electronic device 10 and the second electronic device 20 can coordinate operations on the corresponding target application interface.
[0234] In some embodiments, the source code file is generated by a Javascript scripting language, and the object code file is generated by at least one of a C scripting language and a C++ scripting language.
[0235] For example, in one example, the first scripting language bound to the first engine 101 of the first electronic device 10 and the second engine 201 of the second electronic device 20 may be a Javascript scripting language, so for the source code file, the first electronic device 10 and the second electronic device 20 can both successfully match and parse to obtain the target code file of the C scripting language or the C++ scripting language. The C scripting language or the C++ scripting language can be successfully recognized and executed on different devices, so that different devices can display the collaborative application interface.
[0236] Furthermore, the present disclosure uses the same JS code, which can provide a unified source code source for later business changes and defect corrections. At the same time, parsing the same JS code into CC++ codes of different devices in different devices can fully utilize the rendering advantages of different devices.
[0237] In some embodiments, Figure 2 and Fig.18 As shown, the present disclosure provides an application interface migration method, which is applied to a second electronic device 20 in a communication system, wherein the communication system also includes a first electronic device 10. An application interface migration method provided by an embodiment of the present disclosure includes step S01:
[0238] Step S01: receiving migration configuration information and source code files sent by the first electronic device 10.
[0239] Step S02 , parse the source code file to obtain a second target code file, and execute the second target code file according to the migration configuration information to generate a second target application interface 203 . The second target application interface 203 cooperates with the first target application interface 103 .
[0240] Optionally, in one example, after receiving the migration configuration information and source code file sent by the first electronic device 10, the second electronic device 20 saves the source code file locally and sends source code file reception completion information to the first electronic device 10. After receiving the source code file reception completion information sent by the second electronic device 20, the first electronic device 10 calls the first engine 101 to parse the source code file and sends an interface coordination instruction to the second electronic device 20 so that the second electronic device 20 executes the saved source code file according to the migration configuration information. After receiving the interface coordination instruction, the second electronic device 20 can call the second engine 201 to parse the source code file to obtain the second target code file, and call the fourth engine 202 to execute the second target code file according to the migration configuration information to generate the second target application interface 203.
[0241] In some embodiments, the second engine 201 and the first engine 101 are both bound to a target script development language, and the source code file is generated by the target script development language.
[0242] In some embodiments, the source code file is generated by the JS scripting language, for example, the source code file may include the JS code generated by the JS scripting language. The second target code file includes one of the C code generated by the C scripting language and the C++ code generated by the C++ scripting language, for example, the second target code file may include the C code file generated by the C scripting language, or may also include the C++ code file generated by the C++ scripting language.
[0243] Optionally, the second engine 201 and the first engine 101 are both bound to the JS scripting language, that is, the second engine 201 and the first engine 101 can both parse the JS scripting language. Optionally, the second engine 201 and the first engine 101 can both be JS engines.
[0244] In some embodiments, Figure 2 and Fig.18 As shown, an application interface migration method provided by an embodiment of the present disclosure includes step S01 and step S02, and further includes step S03:
[0245] Step S03 : sending a target application interface generation message to the first electronic device 10 , and enabling the second target application interface 203 to perform a coordinated operation with the first target application interface 103 .
[0246] In some embodiments, Fig.18 As shown, in step S03, the process of enabling the second target application interface 203 to perform a cooperative operation with the first target application interface 103 includes: step S031 and / or step S032.
[0247] Step S031, in response to a third operation performed by the user on the second target application interface 203, corresponding third operation information is generated and sent to the first electronic device 10, so that the first electronic device 10 can perform a fourth operation on the first target application interface 103 in coordination with the third operation according to the third operation information.
[0248] Step 032 : In response to the first operation information sent by the first electronic device 10 , a second operation coordinated with the first operation is performed on the second target application interface 203 .
[0249] It should also be noted that step S031 and step S032 are two situations in which the second electronic device 20 and the first electronic device 10 perform collaborative operations, and both can exist independently, and there is no distinction between the order of precedence.
[0250] In some embodiments, step S03 includes step S031, that is, the second target application interface 203 and the first target application interface 103 perform a collaborative operation including sending the third operation information to the first electronic device 10, wherein the process of sending the third operation information to the second electronic device 20 includes steps S0311 and 0312:
[0251] Step S0311: encrypt the third operation information to generate second encrypted information.
[0252] Step S0312: encapsulate the second encrypted information to obtain a second encapsulation package, and send the second encapsulation package to the first electronic device 10, so that the first electronic device 10 can parse the second encapsulation package to obtain the second encrypted information, and decrypt the second encrypted information to obtain third operation information, and perform a fourth operation on the first target application interface 103 in coordination with the third operation according to the third operation information.
[0253] In some embodiments, in step S0311, the process of encapsulating the second encrypted information to obtain a second encapsulation package includes: encapsulating the second encrypted information and the second function code to obtain the second encapsulation package; wherein the second function code is the key used to encrypt the third operation information.
[0254] In some other embodiments, step S03 includes step S032, i.e., the second target application interface 203 and the first target application interface 103 perform a coordinated operation, including, in response to the first operation information sent by the first electronic device 10, performing a second operation coordinated with the first operation on the second target application interface 203, wherein, in response to the first operation information sent by the first electronic device 10, the process of performing the second operation coordinated with the first operation on the second target application interface 203 includes steps S0321 and step S0322:
[0255] Step S0321: In response to a first encapsulation packet sent by the first electronic device 10, the first encapsulation packet is parsed to obtain first encrypted information.
[0256] Step S0322: decrypt the first encrypted information to obtain first operation information, and perform a second operation coordinated with the first operation on the second target application interface 203 according to the first operation information.
[0257] In some embodiments, the first package in step S0321 is obtained by encapsulating the first encrypted information and the first function code by the first electronic device 10. In step S032, the first package is parsed to obtain the first encrypted information and the first function code. Accordingly, in step S032, decrypting the first encrypted information includes: decrypting the first encrypted information using the first function code.
[0258] Optionally, in some embodiments, Figure 2 As shown, the second electronic device 20 is provided with a second processing module 204, which is used to generate third operation information according to a third operation performed by the user on the second electronic device 20, and is also used to send the third operation information to the first electronic device 10 so that the first electronic device 10 can perform a fourth operation coordinated with the third operation according to the third operation information.
[0259] In some embodiments, in step S02, the process of parsing the source code file to obtain a second target code file, and executing the second target code file to generate a second target application interface includes:
[0260] Step S021: Bind the second engine 201 and the fourth engine 202 so that the second engine 201 and the fourth engine 202 are mapped to each other through an interface function.
[0261] Step S022: calling the second engine 201 to parse the source code file into a second target code file, and mapping the second target code file to the fourth engine 202 through a corresponding interface function.
[0262] Step S023: calling the fourth engine 202 to execute the second target code file according to the migration configuration information to generate a local UI control.
[0263] Step S024: Perform graphics rendering according to the local UI control to obtain the second target application interface 203.
[0264] In some embodiments, before step S01, receiving the migration configuration information and source code file sent by the first electronic device 10, the method also includes: step S00, starting a communication channel, exchanging device information with the second electronic device 20 according to the communication channel, and establishing a device group with the second electronic device 20 according to the exchanged device information.
[0265] In step S01 , the migration configuration information and the source code file sent by the first electronic device 10 are received by the second electronic device 20 in the device group.
[0266] In some embodiments, the present disclosure provides a communication system, including: a first electronic device 10 and a second electronic device 20 .
[0267] Among them, the first electronic device 10 is configured to: obtain migration configuration information and the source code file of the target application, parse the source code file to obtain a first target code file, and execute the first target code file to generate a first target application interface; send the migration configuration information and the source code file to the second electronic device.
[0268] The second electronic device 20 is configured to receive the migration configuration information and source code file sent by the first electronic device, parse the source code file to obtain a second target code file; execute the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device.
[0269] In some embodiments, the first electronic device 10 and the second electronic device 20 exchange device information with each other through a communication channel, and establish a device group based on the exchanged device information. The first electronic device 10 and the second electronic device 20 exchange data information in the device group. Among them, the first electronic device 10 and the second electronic device 20 exchange data information in the device group, including: the first electronic device 10 sends migration configuration information and source code files to the second electronic device 20 in the device group, the second electronic device 20 receives the migration configuration information and source code files sent by the first electronic device 10 in the device group, the first electronic device 10 sends an interface coordination instruction to the second electronic device 20 in the device group, and the second electronic device 20 receives the interface coordination instruction sent by the first electronic device 10 in the device group
[0270] In other embodiments, the first electronic device 10 and the second electronic device 20 exchange data information in a device group, which also includes: the first electronic device 10 sends first operation information to the second electronic device 20 in the device group, the second electronic device 20 receives the first operation information sent by the first electronic device 10 in the device group, the second electronic device 20 sends third operation information to the first electronic device 10 in the device group, the first electronic device 10 receives the third operation information sent by the second electronic device 20 in the device group, etc.
[0271] In some embodiments, Fig.19 As shown, the overall process of the application interface migration method based on the distributed networking framework disclosed in the present invention includes:
[0272] After the first electronic device 10 and the second electronic device 20 are connected to the distributed networking framework, that is, the first electronic device 10 and the second electronic device 20 are successfully networked, the communication channel between the first electronic device 10 and the second electronic device 20 has been started, and data information can be exchanged.
[0273] In this case, if an application of the first electronic device 10 initiates an application migration configuration instruction, the first electronic device 10 starts the application and reads the source code file (for example, the source code file may include a JS file, a Res resource file, etc.) and sends it to the second electronic device 20 through the communication channel of the distributed framework in sequence.
[0274] After receiving the migration configuration information and source code file through the communication channel of the distributed networking framework, the second electronic device 20 saves the source code file locally, and after successful reception, the second electronic device 20 sends the migration configuration information and source code file reception completion information to the first electronic device 10.
[0275] After receiving the migration configuration information and the source code file receiving completion information, the first electronic device 10 starts to run the source code file, and simultaneously sends an interface coordination instruction to the second electronic device 20, notifying the second electronic device 20 to start the locally stored source code file. That is, the first electronic device 10 and the second electronic device 20 both introduce their respective source code files into their respective engines for adaptation and parsing to obtain their respective target code files, and perform UI rendering on their respective devices according to the migration configuration information, obtain their respective target application interfaces and display them on their respective device screens, thus completing the migration of the application interface.
[0276] After completing the migration of the application interface, if the user performs a first operation on the application of the first electronic device 10 , the first electronic device 10 simultaneously sends corresponding first operation information to the second electronic device 20 .
[0277] The second electronic device 20 cooperates with the operation of the first electronic device 10 according to the received first operation information to complete the second operation coordinated with the first operation. Conversely, when the second electronic device 20 performs the third operation, it also synchronizes the corresponding third operation information to the first electronic device 10 so that the first electronic device 10 cooperates with the operation of the second electronic device 20 to complete the fourth operation coordinated with the third operation, thereby realizing the application cooperative operation function of the two devices.
[0278] To sum up, the present invention, by using the communication networking framework in which multiple devices exchange data information through multiple information channels, and utilizing different devices to communicate information and work together, can realize the use of the same source code file, such as JS code, to convert it into C or C++ code for different devices through the Js engine, and finally achieve an application interface that can be displayed collaboratively on different devices, which greatly reduces the development cost for users, greatly reduces the learning cost of users using the software, and greatly improves the user experience.
[0279] Furthermore, the embodiments of the present disclosure can achieve unified interfaces, unified control information, and unified events. Using the same source code can ensure the same business logic and support synchronous collaboration between multiple devices.
[0280] In some embodiments, the present disclosure provides an electronic device, including: a memory, a processor, and a program stored in the memory and executable on the processor. The processor is used to read the program in the memory to implement the steps in the application interface migration method described in any of the above embodiments of the present disclosure.
[0281] For example, in one example, Fig. 20 As shown, an electronic device provided by an embodiment of the present disclosure includes:
[0282] One or more processors 901;
[0283] A memory 902 having one or more programs stored thereon, and when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above system configuration methods;
[0284] One or more I / O interfaces 903 are connected between the processor and the memory and are configured to implement data interaction between the processor and the memory.
[0285] Among them, the processor 901 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 902 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 903 is connected between the processor 901 and the memory 902, and can realize data interaction between the processor 901 and the memory 902, including but not limited to a data bus (Bus), etc.
[0286] In some embodiments, the processor 901 , the memory 902 , and the I / O interface 903 are connected to each other through a bus, and further connected to other components of the computing device.
[0287] In some other embodiments, the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the system configuration method provided by any embodiment of the present disclosure is implemented.
[0288] It will be appreciated by those skilled in the art that all or some of the steps, systems, and modules / units in the disclosed methods above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0289] 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.
[0290] In some embodiments, the present disclosure provides a readable storage medium for storing a program, wherein the program, when executed by a processor, implements the steps in the application interface migration method as described in any of the above-mentioned embodiments of the present disclosure.
[0291] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. An application interface migration method, applied to a first electronic device in a communication system, wherein the communication system further includes a second electronic device, characterized in that: The method comprises: Get the migration configuration information and the source code files of the target application; Parsing the source code file to obtain a first target code file, and executing the first target code file according to the migration configuration information to generate a first target application interface; The migration configuration information and the source code file are sent to the second electronic device so that the second electronic device can parse the source code file to obtain a second target code file, and execute the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface.
2. The application interface migration method according to claim 1, characterized in that: Parsing the source code file to obtain the first target code file includes: calling a first engine to parse the source code file to obtain the first target code file; The second electronic device parsing the source code file includes: the second electronic device calling a second engine to parse the source code file; The first engine and the second engine are capable of parsing at least one identical target script development language; and the source code file is generated by the target script development language.
3. The application interface migration method according to claim 1 or 2, characterized in that: After sending the migration configuration information and the source code file to the second electronic device, the method further includes: In response to a first operation performed by a user on the first target application interface, generating corresponding first operation information and sending the information to the second electronic device, so that the second electronic device can perform a second operation coordinated with the first operation on the second target application interface according to the first operation information; And / or, in response to third operation information generated and sent by the second electronic device based on a third operation, a fourth operation coordinated with the third operation is performed on the first target application interface.
4. The application interface migration method according to claim 3, characterized in that: In the case where the method further includes: in response to a first operation performed by a user on the first target application interface, generating corresponding first operation information and sending the information to the second electronic device, the process of sending the first operation information to the second electronic device includes: Encrypting the first operation information to generate first encrypted information; encapsulating the first encrypted information to obtain a first encapsulation package, and sending the first encapsulation package to the second electronic device, so that the second electronic device parses the first encapsulation package to obtain the first encrypted information, decrypts the first encrypted information to obtain the first operation information, and performs a second operation coordinated with the first operation on the second target application interface according to the first operation information; In the case where the method further includes, in response to third operation information sent by the second electronic device, performing a fourth operation coordinated with the third operation on the first target application interface, in response to the third operation information generated and sent by the second electronic device based on the third operation, performing the fourth operation coordinated with the third operation on the first target application interface includes: In response to a second encapsulation packet sent by the second electronic device, parsing the second encapsulation packet to obtain second encrypted information; The second encrypted information is decrypted to obtain the third operation information, and the fourth operation coordinated with the third operation information is performed on the first application interface according to the third operation information.
5. The application interface migration method according to claim 4, characterized in that: Encapsulating the first encrypted information to obtain a first encapsulation package includes: encapsulating the first encrypted information and a first function code to obtain the first encapsulation package; wherein the first function code is a key used when encrypting the first operation information; The second packaging package is obtained by the second electronic device packaging the second encrypted information and the second function code; the second packaging package is parsed to obtain the second encrypted information and the second function code; decrypting the second encrypted information includes: using the second function code to decrypt the second encrypted information.
6. The application interface migration method according to claim 1 or 2, characterized in that: The process of parsing the source code file to obtain a first target code file, and executing the first target code file according to the migration configuration information to generate a first target application interface includes: Binding the first engine and the third engine so that the first engine and the third engine are mapped to each other through an interface function; Calling the first engine to parse the source code file into a first target code file, and mapping the first target code file to the third engine through the corresponding interface function; Calling the third engine so that the third engine executes the first target code file according to the migration configuration information to generate a local UI control; Graphics rendering is performed according to the local UI control to obtain a first target application interface.
7. The application interface migration method according to claim 6, characterized in that: The local UI control includes an XML file.
8. The application interface migration method according to claim 1 or 2, characterized in that: Before obtaining the migration configuration information and the source code file of the target application, the method further includes: Start the communication channel; exchanging device information with the second electronic device according to the communication channel; Establishing a device group with the second electronic device according to the exchanged device information; Sending the source code file to the second electronic device includes: sending the migration configuration information and the source code file to the second electronic device in the device group.
9. The application interface migration method according to claim 1 or 2, characterized in that: The source code file is generated by Javascript scripting language, and the first target code file and the second target code file are both generated by at least one of C scripting language and C++ scripting language.
10. The application interface migration method according to claim 1 or 2, characterized in that: Get the migration configuration information and the source code files of the target application, including: In response to the application migration instruction, migration configuration information corresponding to the application migration instruction and a source code file of the target application are acquired.
11. The application interface migration method according to claim 1 or 2, characterized in that: The first electronic device and the second electronic device have different operating systems.
12. An application interface migration method, applied to a second electronic device in a communication system, wherein the communication system also includes a first electronic device, characterized in that: The method comprises: Receiving migration configuration information and source code files sent by the first electronic device; Parsing the source code file to obtain a second target code file; Executing the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device; The first target application interface is generated by the first electronic device parsing the source code file to obtain a first target code file and executing the first target code file.
13. The application interface migration method according to claim 12, characterized in that: The first target code file is obtained by the first electronic device invoking a first engine to parse the source code file; Parsing the source code file to obtain a second target code file includes: calling a second engine to parse the source code file to obtain the second target code file; wherein the second engine and the first engine can parse at least one same target script development language; and the source code file is generated by the target script development language.
14. The application interface migration method according to claim 12 or 13, characterized in that: After executing the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device, the method further includes: In response to a third operation performed by the user on the second target application interface, generating corresponding third operation information and sending the information to the first electronic device, so that the first electronic device can perform a fourth operation on the first target application interface in coordination with the third operation according to the third operation information; And / or, in response to first operation information generated and sent by the first electronic device based on a first operation, a second operation coordinated with the first operation is performed on the second target application interface.
15. The application interface migration method according to claim 14, characterized in that: When the method further includes: in response to a third operation performed by the user on the second target application interface, generating corresponding third operation information and sending the information to the first electronic device, the process of sending the third operation information to the second electronic device includes: Encrypting the third operation information to generate second encrypted information; encapsulating the second encrypted information to obtain a second encapsulation package, and sending the second encapsulation package to the first electronic device, so that the first electronic device parses the second encapsulation package to obtain the second encrypted information, decrypts the second encrypted information to obtain the third operation information, and performs a fourth operation coordinated with the third operation on the first target application interface according to the third operation information; In the case where the method further includes, in response to the first operation information sent by the first electronic device, performing a second operation coordinated with the first operation on the second target application interface, the process of performing the second operation coordinated with the first operation on the second target application interface in response to the first operation information sent by the first electronic device includes: In response to a first encapsulation packet sent by the first electronic device, parsing the first encapsulation packet to obtain first encrypted information; The first encrypted information is decrypted to obtain the first operation information, and a second operation coordinated with the first operation is performed on the second target application interface according to the first operation information.
16. The application interface migration method according to claim 15, characterized in that: Encapsulating the second encrypted information to obtain a second encapsulation package includes: encapsulating the second encrypted information with a second function code to obtain the second encapsulation package; wherein the second function code is a key used when encrypting the third operation information; The first packaging package is obtained by packaging the first encrypted information and the first function code by the first electronic device; the first packaging package is parsed to obtain the first encrypted information and the first function code; decrypting the first encrypted information includes: using the first function code to decrypt the first encrypted information.
17. The application interface migration method according to claim 12 or 13, characterized in that: The process of parsing the source code file to obtain a second target code file, and executing the second target code file to generate a second target application interface that cooperates with the first target application interface in the first electronic device includes: Binding the second engine and the fourth engine so that the second engine and the fourth engine are mapped to each other through an interface function; Calling the second engine to parse the source code file into a second target code file, and mapping the second target code file to the fourth engine through the corresponding interface function; Calling the fourth engine so that the fourth engine executes the second target code file according to the migration configuration information to generate a local UI control; Graphics rendering is performed according to the local UI control to obtain a second target application interface.
18. The application interface migration method according to claim 17, characterized in that: The local UI control includes an XML file.
19. The application interface migration method according to claim 12 or 13, characterized in that: Before receiving the migration configuration information and the source code file sent by the first electronic device, the method further includes: Start the communication channel; exchanging device information with the second electronic device according to the communication channel; Establishing a device group with the second electronic device according to the exchanged device information; The migration configuration information and the source code file sent by the first electronic device are received by the second electronic device in the device group.
20. The application interface migration method according to claim 12 or 13, characterized in that: The source code file is generated by Javascript scripting language, and the first target code file and the second target code file are both generated by at least one of C scripting language and C++ scripting language.
21. A communication system, characterized in that: include: a first electronic device and a second electronic device; The first electronic device is configured to: obtain migration configuration information and a source code file of a target application; parse the source code file to obtain a first target code file, and execute the first target code file to generate a first target application interface; and send the migration configuration information and the source code file to the second electronic device; The second electronic device is configured to receive migration configuration information and source code files sent by the first electronic device, parse the source code files to obtain a second target code file; and execute the second target code file according to the migration configuration information to generate a second target application interface that cooperates with the first target application interface in the first electronic device.
22. The communication system according to claim 21, characterized in that The first electronic device and the second electronic device exchange device information with each other through a communication channel, and establish a device group according to the exchanged device information; the first electronic device and the second electronic device exchange data information in the device group; The first electronic device and the second electronic device exchange data information in the device group, including: the first electronic device sends the migration configuration information and the source code file to the second electronic device in the device group.
23. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is used to read the program in the memory to implement the steps in the application interface migration method as described in any one of claims 1 to 20.
24. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the application interface migration method as described in any one of claims 1 to 20 are implemented.