Interactive display method and device, electronic equipment and storage medium
WebAssembly (wasm) virtual environments facilitate seamless cross-device application interface sharing by reducing development costs and ensuring consistent, secure synchronization, addressing the challenges of existing methods.
Patent Information
- Application Number
- CN202311533906.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
Existing methods for cross-device interaction of application interfaces face challenges such as incomplete displays, high development costs, and poor user experience due to the need for separate code development and environment-specific adaptations.
Utilizing WebAssembly (wasm) virtual environments for cross-device interaction, where application code and memory data are shared between devices, enabling seamless interface synchronization with cross-device locks and connection channels to maintain consistency and security.
This approach reduces cross-device development costs and ensures consistent, secure, and user-friendly interface sharing across different devices without requiring hardware-specific adaptations.
Smart Images

Figure CN120010971A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of vehicle-machine interactive display, and in particular to an interactive display method, device, electronic device and storage medium. Background Art
[0002] With the development of smart devices and the development of automobile intelligence, the combination instrument of the car is becoming more and more intelligent, and the combination instrument can interact with terminals such as mobile phones and wearable devices. For example, the display information of the combination instrument of the car can be synchronized with the mobile phone or wearable device, or the music playback information on the mobile phone or wearable device can be displayed on the combination instrument. Under the condition of ensuring driving safety, the interaction between the combination instrument and the terminal can increase the controllability and entertainment of the car, and improve the quality of the vehicle and the user experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an interactive display method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an interactive display method, which is applied to a first terminal, and the method includes:
[0005] In response to the interactive display instruction at the first terminal, the wasm code of the corresponding application and the linear memory data in the wasm virtual environment are sent to the second terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment;
[0006] The display screen of the first terminal is kept displaying a user interface corresponding to the application.
[0007] Optionally, the method comprises:
[0008] Establishing a connection channel between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal;
[0009] The linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal through the connection channel.
[0010] Optionally, the method comprises:
[0011] Establishing a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal;
[0012] The step of synchronizing the linear memory data of the wasm virtual environment in the first terminal to the reconstructed wasm virtual environment in the second terminal through the connection channel includes:
[0013] When the linear memory data of the wasm virtual environment in the first terminal is updated, a locking operation is performed through the cross-device lock;
[0014] When the locking is successful, the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal.
[0015] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0016] Optionally, the method comprises:
[0017] When the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal, the unlocking operation is performed.
[0018] Optionally, in response to the interactive display instruction at the first terminal, sending the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal includes:
[0019] In response to the interactive display instruction at the first terminal, compressing the linear memory data in the wasm virtual environment corresponding to the application;
[0020] The wasm code corresponding to the application and the compressed linear memory data are sent to the second terminal.
[0021] According to a second aspect of an embodiment of the present disclosure, there is provided an interactive display method, which is applied to a second terminal, and the method includes:
[0022] Receiving the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application;
[0023] Rebuilding the wasm virtual environment corresponding to the application according to the linear memory data;
[0024] Loading the wasm code of the application into the rebuilt wasm virtual environment, and running the application in the rebuilt wasm virtual environment;
[0025] The user interface corresponding to the application is displayed on the display screen of the second terminal.
[0026] Optionally, the method comprises:
[0027] Establishing a connection channel between the reconstructed wasm virtual environment in the second terminal and the wasm virtual environment in the first terminal;
[0028] The linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal through the connection channel.
[0029] Optionally, the method comprises:
[0030] Establishing a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal;
[0031] The step of synchronizing the linear memory data of the reconstructed wasm virtual environment in the second terminal to the wasm virtual environment in the first terminal through the connection channel includes:
[0032] When the linear memory data of the wasm virtual environment reconstructed in the second terminal is updated, a locking operation is performed through the cross-device lock;
[0033] When the locking is successful, the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal.
[0034] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0035] Optionally, the method comprises:
[0036] When the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal, the unlocking operation is performed.
[0037] Optionally, displaying a user interface corresponding to the application on a display screen of the second terminal includes:
[0038] Sending notification information to the application through the wasm virtual machine, where the notification information is used to indicate whether the application is running on the first terminal;
[0039] When the notification information indicates that the application is not running on the first terminal, acquiring device information of the second terminal;
[0040] The user interface corresponding to the application is displayed on the display screen of the second terminal according to the device information.
[0041] Optionally, the device information includes display screen size information of the second terminal, and displaying the user interface corresponding to the application on the display screen of the second terminal includes:
[0042] Adjusting display parameters of the application according to the display screen size information;
[0043] According to the adjusted display parameters, the user interface corresponding to the application is displayed on the display screen of the second terminal.
[0044] Optionally, the device information includes function information supported by the second terminal device for display, and the displaying of a user interface corresponding to the application on the display screen of the second terminal includes:
[0045] adjusting the function parameters of the application according to the function information;
[0046] According to the adjusted functional parameters, a user interface corresponding to the application is displayed on the display screen of the second terminal.
[0047] According to a third aspect of an embodiment of the present disclosure, there is provided an interactive display device, applied to a first terminal, the device comprising:
[0048] A sending module is configured to send the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal in response to the interactive display instruction at the first terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment;
[0049] The first display module is configured to keep displaying the user interface corresponding to the application on the display screen of the first terminal.
[0050] According to a fourth aspect of an embodiment of the present disclosure, an interactive display device is provided, which is applied to a second terminal, and the device includes:
[0051] A receiving module, configured to receive the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application;
[0052] A reconstruction module, configured to rebuild the wasm virtual environment corresponding to the application according to the linear memory data;
[0053] A running module, configured to load the wasm code of the application into the rebuilt wasm virtual environment, and run the application in the rebuilt wasm virtual environment;
[0054] The second display module is configured to display a user interface corresponding to the application on a display screen of the second terminal.
[0055] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0056] processor;
[0057] a memory for storing processor-executable instructions;
[0058] The processor is configured to execute executable instructions stored in the memory to implement any method described in the first aspect, or to implement any method described in the second aspect.
[0059] According to the sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented, or when the program instructions are executed by a processor, the steps of the method described in any one of the second aspects are implemented.
[0060] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0061] In response to the interactive display instruction at the first terminal, the wasm code of the application and the linear memory data in the wasm virtual environment are sent to the second terminal, and the user interface of the application is displayed on the display screen of the first terminal. At the same time, the second terminal rebuilds the wasm virtual environment according to the linear memory data, loads the wasm code into the rebuilt wasm virtual environment, and runs the application in the rebuilt wasm virtual environment; the user interface of the application is displayed on the display screen of the second terminal. There is no need to develop for hardware, nor is there any need to use layered encapsulated APIs for cross-device synchronization. The cost of cross-device development is reduced. And the wasm virtual environment runs the application, and there is no need to develop two applications for the first terminal and the second terminal. In addition, wasm brings isolation and security to the software.
[0062] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0064] Figure 1 The present invention is a flowchart of an interactive display method on a first terminal side according to an exemplary embodiment.
[0065] Figure 2 The figure is a schematic diagram of an environment for implementing interactive display according to an exemplary embodiment.
[0066] Figure 3 The figure is a schematic diagram of another environment for implementing interactive display according to an exemplary embodiment.
[0067] Figure 4 The present invention is a flowchart of another interactive display method on the second terminal side according to an exemplary embodiment.
[0068] Figure 5 The diagram is a schematic diagram showing a method of establishing a cross-device lock according to an exemplary embodiment.
[0069] Figure 6 The present invention is a flowchart of an interactive display method on a second terminal side according to an exemplary embodiment.
[0070] Figure 7 The present invention is a flowchart of another interactive display method on the second terminal side according to an exemplary embodiment.
[0071] Figure 8 It is a block diagram of an interactive display device on a first terminal side according to an exemplary embodiment.
[0072] Fig. 9 It is a block diagram of an interactive display device on a second terminal side according to an exemplary embodiment.
[0073] Fig.10 The invention is a block diagram showing a device for interactive display according to an exemplary embodiment.
[0074] Fig.11 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION
[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0076] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0077] Before introducing an interactive display method, device, electronic device and storage medium provided by the present disclosure, the methods used in related scenarios and the existing defects are briefly introduced. The first method is screen projection, which converts the display content of a program running on one device into a video stream and transmits it to another device, which can then be played on another screen. In this screen projection method, the application cannot perceive the screen status and information of the projected device, which may result in incomplete display or a small display page, making it difficult to merge with the projected device. This results in a poor user experience.
[0078] The second method is to develop two applications, that is, develop two sets of code for two terminals respectively, and run the two sets of code in different devices. The two devices are connected and share the same user interface. However, compiling two sets of code and developing two applications not only requires a lot of development work, but also has different operating environments on different devices. Development must be done for specific devices, which is not very applicable.
[0079] The third method is to establish a unified application framework and use interpreted languages (such as js / java, etc.) to run the same framework on different devices, and run the same program on different devices through remote invocation. This method requires a full understanding of the current application's operating environment and makes different judgments based on the situation. When switching between different devices, the switch will appear abrupt without special processing, resulting in a poor user experience.
[0080] In view of this, an embodiment of the present disclosure provides an interactive display method, which aims to reduce the cost of sharing and interactively displaying the same application interface between different devices, while improving the practicality and flexibility of the interactive display, thereby improving the user experience.
[0081] Figure 1 is a flow chart of an interactive display method according to an exemplary embodiment. Figure 1 As shown, the method can be applied to the first terminal, which can be a terminal such as a mobile phone, a wearable device, a tablet computer, or a vehicle-mounted device such as a combination instrument of a car, a multimedia display, etc. Figure 1 As shown, the method may include the following steps.
[0082] In step S11, in response to the interactive display instruction at the first terminal, the wasm code of the corresponding application and the linear memory data in the wasm virtual environment are sent to the second terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment.
[0083] See also Figure 2 As shown, in the embodiment of the present disclosure, the first terminal and the second terminal can interact through a unified API. For example, the first terminal and the second terminal can interact by calling the unified API of each other's Bluetooth program, or by calling the unified API in a wired manner.
[0084] In the disclosed embodiment, the wasm virtual environment is a virtual environment that isolates a specific hardware environment, and all applications can run in the wasm virtual environment. This can ensure the isolation and security of each application, and there is no need to worry about the installed application causing damage to the currently running system. In addition, the wasm virtual environment runs in a wasm virtual machine. If any application in the wasm virtual environment crashes, the virtual machine can intercept and close the application in the wasm virtual environment, so that the stability of the entire system will not be affected. In addition, the wasm virtual environment isolates the system environment and the application environment, and the application cannot read or damage the operation of the system. The stability of the system operation is guaranteed.
[0085] In an embodiment of the present disclosure, an operation button may be displayed on the user interface of the application, and the user may select the operation button by, for example, touching or selecting the button, thereby generating an interactive display instruction, wherein the interactive display instruction is used to instruct the first terminal to query whether there is an application program corresponding to the interactive display that can be shared with the second terminal, and when it is found that there is an application program corresponding to the interactive display that can be shared with the second terminal, the wasm code of the application program and the linear memory data in the wasm virtual environment are sent to the second terminal.
[0086] In the embodiment of the present disclosure, since the wasm code and the linear memory data in the wasm virtual environment not only have different formats, but also the wasm code is usually unchanged, and the linear memory data in the wasm virtual environment is variable, see Figure 3 As shown, the wasm code and the linear memory data in the wasm virtual environment can be sent to the second terminal respectively.
[0087] In step S12, the user interface corresponding to the application is kept displayed on the display screen of the first terminal.
[0088] In the embodiment of the present disclosure, after the second terminal displays the user interface of the application, it will not affect the display of the application on the first terminal. In this way, the same application can be interactively displayed between different devices.
[0089] The above technical solution responds to the interactive display instruction at the first terminal, sends the wasm code of the application and the linear memory data in the wasm virtual environment to the second terminal, and keeps displaying the user interface of the application on the display screen of the first terminal. At the same time, the second terminal rebuilds the wasm virtual environment according to the linear memory data, loads the wasm code into the reconstructed wasm virtual environment, and runs the application in the reconstructed wasm virtual environment; the user interface of the application is displayed on the display screen of the second terminal. There is no need to develop for hardware, nor is there any need to use layer-by-layer encapsulated APIs for cross-device synchronization. The cost of cross-device development is reduced. And the wasm virtual environment runs the application, and there is no need to develop two applications for the first terminal and the second terminal. In addition, wasm brings isolation and security to the software.
[0090] Alternatively, see Figure 4 As shown, in Figure 1 On the basis of, the method comprises:
[0091] In step S21, a connection channel is established between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal.
[0092] In the disclosed embodiment, the connection channel is independent of the channel for sending wasm code and linear memory data in the wasm virtual environment. The connection channel is only used to synchronize the subsequently generated linear memory data, and is not used to transmit data such as wasm code. In addition, the connection channel is established between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal, and can quickly synchronize the subsequently generated linear memory data without occupying other signaling and queue synchronization.
[0093] In step S22, the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal through the connection channel.
[0094] Taking the synchronization of vehicle speed information between the car's instrument cluster and a smart watch as an example, the wasm code of the application corresponding to the vehicle speed display in the instrument cluster and the linear memory data in the wasm virtual environment can be sent to the smart watch. The smart watch, as a second terminal, rebuilds the wasm virtual environment according to the linear memory data and loads the wasm code, and then runs the application corresponding to the vehicle speed display on the smart watch at the same time. Furthermore, a connection channel is established between the reconstructed wasm virtual environment of the smart watch and the wasm virtual environment of the instrument cluster. When the vehicle speed changes, the linear memory data in the wasm virtual environment on the instrument cluster can be synchronized to the smart watch through the connection channel, so that the memory information can be directly synchronized to achieve display synchronization.
[0095] In this way, the display of the application program on the two devices can be quickly synchronized through the connection channel. It can be explained that the present disclosure uses two devices as an example for explanation, and the second terminal can be multiple devices, and further, the display can be synchronized on multiple devices.
[0096] Optionally, the method comprises:
[0097] See also Figure 5 As shown, a cross-device lock is established between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal.
[0098] In the disclosed embodiment, the cross-device lock can be either a mutex lock or a semaphore lock. It is understandable that if the cross-device lock is a mutex lock, when one terminal locks applications running on multiple devices, only the locked terminal can perform corresponding storage and modification operations, and other terminals cannot perform storage, modification and other operations until the locked terminal is unlocked. In other words, at the same time, only one terminal holds the lock. If the cross-device lock is a semaphore lock, as long as the value of the semaphore is greater than 0, any terminal can sem_wait successfully, and the value of the semaphore is reduced by 1 after success; if the value is not greater than 0, sem_wait is blocked.
[0099] The step of synchronizing the linear memory data of the wasm virtual environment in the first terminal to the reconstructed wasm virtual environment in the second terminal through the connection channel includes:
[0100] When the linear memory data of the wasm virtual environment in the first terminal is updated, a locking operation is performed through the cross-device lock.
[0101] In the embodiment of the present disclosure, when the linear memory data of the wasm virtual environment in the first terminal is updated, the first terminal will first lock the linear memory data of the wasm virtual environment in the first terminal, and then request to lock the linear memory data of the wasm virtual environment reconstructed in the second terminal.
[0102] When the locking is successful, the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal.
[0103] In the disclosed embodiment, the cross-device lock is not only used to lock the application when data is updated to prevent mutually exclusive operations of different terminals from affecting the stability of the display, but is also used to determine whether the first terminal or the second terminal needs to synchronize data. If there is no cross-device lock, the corresponding content is only displayed on this terminal. If there is a cross-device lock, not only is the corresponding content displayed on this terminal, but the content is also interactively shared and displayed on the second terminal.
[0104] In this way, the stability of the application during operation is ensured, the user experience is improved, and it is also possible to decide whether to perform cross-device memory synchronization operations based on whether cross-device synchronization currently exists.
[0105] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0106] It can be explained that after locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal, only the first terminal has the authority to, for example, store and modify the linear memory data of the application running on the first terminal and the application running on the second terminal, and the second terminal does not have the authority to, for example, store and modify the linear memory data of the application running on the first terminal and the application running on the second terminal. Alternatively, only when value is greater than 0, the second terminal has the authority to, for example, store and modify the linear memory data of the application running on the first terminal and the application running on the second terminal.
[0107] Optionally, the method comprises:
[0108] When the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal, the unlocking operation is performed.
[0109] It can be understood that performing the unlocking operation can be to first unlock the linear memory data of the wasm virtual environment in the first terminal, and then generate a corresponding unlocking signal and send it to the second terminal, thereby unlocking the linear memory data of the reconstructed wasm virtual environment in the second terminal.
[0110] It is understandable that after performing the unlocking operation, if the first terminal wants to update the content again, it needs to perform the locking operation again. Similarly, after performing the unlocking operation, if the second terminal wants to update the content, it also needs to perform the locking operation.
[0111] Optionally, in response to the interactive display instruction at the first terminal, sending the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal includes:
[0112] Continue to see Figure 3 As shown, in response to the interactive display instruction at the first terminal, the linear memory data in the wasm virtual environment corresponding to the application is compressed.
[0113] In the disclosed embodiment, the method for compressing linear memory data may be to first query invalid information such as blanks and duplicates, and then delete the invalid information such as blanks and duplicates before compressing to obtain compressed linear memory data.
[0114] The wasm code corresponding to the application and the compressed linear memory data are sent to the second terminal.
[0115] Continue to see Figure 3 As shown, the wasm code and compressed linear memory data of the corresponding application are sent to the second terminal respectively, that is, the wasm code is sent normally without compression, and the linear memory data is sent in compression.
[0116] The embodiment of the present disclosure also provides an interactive display method, which is applied to a second terminal. Similarly, the second terminal may also be a terminal such as a mobile phone, a wearable device, a tablet computer, or a vehicle-mounted device such as a combination instrument of a car, a multimedia display, etc. Figure 6 As shown, the method includes:
[0117] In step S61, the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application are received.
[0118] It can be understood that the wasm code of the application can support the operation of the application, and the linear memory data in the wasm virtual environment can reconstruct the wasm virtual environment. The wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application have been described in the first terminal, and can be sent in response to the interactive display instruction corresponding to the user operation.
[0119] In step S62, the wasm virtual environment corresponding to the application is rebuilt according to the linear memory data.
[0120] In the disclosed embodiment, if the first terminal compresses the linear memory data and sends it to the second terminal, the second terminal needs to decompress the compressed linear memory data, and then rebuild the wasm virtual environment corresponding to the application according to the decompressed linear memory data.
[0121] In step S63, the wasm code of the application is loaded into the rebuilt wasm virtual environment, and the application is run in the rebuilt wasm virtual environment.
[0122] In step S64, a user interface corresponding to the application is displayed on a display screen of the second terminal.
[0123] In the disclosed embodiment, after the reconstruction of the wasm virtual environment is completed, the wasm code of the application is loaded into the reconstructed wasm virtual environment, so that the application can be run in the reconstructed wasm virtual environment. At the same time, the application is also running on the first terminal. In this way, the two applications are based on the same wasm code and linear memory data and run in the wasm virtual environment of different devices. Shared interactive display is achieved. In addition, there is no need to develop two sets of code, which reduces the R&D cost, does not require hardware improvements, and does not require the use of layer-by-layer encapsulated APIs for cross-device synchronization. The cross-device development cost is reduced. And the wasm virtual environment runs the application, and there is no need to develop two applications for the first terminal and the second terminal. In addition, wasm brings isolation and security to the software.
[0124] Alternatively, see Figure 7 As shown, in Figure 6 On the basis of, the method further comprises:
[0125] In step S71, a connection channel is established between the reconstructed wasm virtual environment in the second terminal and the wasm virtual environment in the first terminal.
[0126] In the disclosed embodiment, the connection channel is independent of the channel for sending wasm code and linear memory data in the wasm virtual environment. The connection channel is only used to synchronize the subsequently generated linear memory data, and is not used to transmit data such as wasm code. In addition, the connection channel is established between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal, and can quickly synchronize the subsequently generated linear memory data without occupying other signaling and queue synchronization.
[0127] In step S72, the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal through the connection channel.
[0128] Taking the synchronization of vehicle speed information between the vehicle's instrument cluster and a smart watch as an example, the vehicle serves as the first terminal, and the wasm code of the application corresponding to the vehicle speed display in the vehicle's instrument cluster and the linear memory data in the wasm virtual environment can be sent to the smart watch. The smart watch serves as the second terminal and rebuilds the wasm virtual environment according to the linear memory data, and loads the wasm code, and then simultaneously runs the application corresponding to the vehicle speed display on the smart watch. Furthermore, a connection channel is established between the reconstructed wasm virtual environment of the smart watch and the wasm virtual environment of the instrument cluster. When the vehicle speed changes, the linear memory data in the wasm virtual environment on the instrument cluster can be synchronized to the smart watch through the connection channel. In this way, the memory information can be directly synchronized to realize the synchronous display of the vehicle speed information on the instrument cluster and the smart watch.
[0129] In this way, the display of the application program on the two devices can be quickly synchronized through the connection channel. It can be explained that the present disclosure uses two devices as an example for explanation, and the second terminal can be multiple devices, and further, the display can be synchronized on multiple devices.
[0130] Optionally, the method comprises:
[0131] A cross-device lock is established between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal.
[0132] Similarly, the cross-device lock may be at least one of a mutex lock and a semaphore lock.
[0133] In step S72, synchronizing the linear memory data of the reconstructed wasm virtual environment in the second terminal to the wasm virtual environment in the first terminal through the connection channel includes:
[0134] When the linear memory data of the wasm virtual environment rebuilt in the second terminal is updated, a locking operation is performed through the cross-device lock.
[0135] For example, the user can adjust the way the vehicle speed is displayed on the smart watch. For example, if the vehicle speed information is displayed through a round dial on the instrument cluster, the vehicle speed information is also displayed through a round dial on the smart watch. The user can change the round dial to a digital dial on the smart watch. When the smart watch receives a digital dial change instruction, the smart watch locks the linear memory data of the wasm virtual environment reconstructed in the second terminal and the linear memory data of the wasm virtual environment in the first terminal.
[0136] For another example, if the first terminal is a mobile phone and the second terminal is an instrument cluster of a car, the wasm code corresponding to the application that plays music on the mobile phone and the linear memory data in the wasm virtual environment can be sent to the instrument cluster of the car, and then the music can be switched on the instrument cluster. At this time, when the music switching instruction is received on the instrument cluster, the instrument cluster locks the linear memory data of the wasm virtual environment reconstructed in the instrument cluster and the linear memory data of the wasm virtual environment in the mobile phone.
[0137] When the locking is successful, the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal.
[0138] In the above embodiment, the first terminal is a mobile phone, and the second terminal is a car's instrument cluster. The example of switching music on the instrument cluster is used to illustrate that the music switching instruction on the instrument cluster will update the linear memory data of the reconstructed asm virtual environment in the instrument cluster, and then synchronously update it to the wasm virtual environment of the mobile phone. Not only can the music playback switching be realized, but the switched music playback interface can also be displayed on both the instrument cluster and the mobile phone.
[0139] In the disclosed embodiment, data can be updated after being locked to avoid mutually exclusive operations on multiple terminals, which may cause application crashes and affect user experience.
[0140] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0141] Optionally, the method comprises:
[0142] When the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal, the unlocking operation is performed.
[0143] It can be understood that performing the unlocking operation can be to first unlock the linear memory data of the reconstructed wasm virtual environment in the second terminal, and then generate a corresponding unlocking signal and send it to the first terminal, thereby unlocking the linear memory data of the wasm virtual environment in the first terminal.
[0144] It is understandable that after performing the unlocking operation, if the second terminal wants to update the content again, it needs to re-perform the locking operation. Similarly, after performing the unlocking operation, if the first terminal wants to update the content, it also needs to perform the locking operation.
[0145] Optionally, displaying a user interface corresponding to the application on a display screen of the second terminal includes:
[0146] Notification information is sent to the application through the wasm virtual machine, where the notification information is used to indicate whether the application is running on the first terminal.
[0147] It is understandable that different terminals have different hardware-supported functions and display screen sizes. Therefore, after rebuilding the wasm virtual environment to complete the migration, the wasm virtual machine can notify the application to run in a new device environment.
[0148] In the disclosed embodiment, if the application is running in a new device environment, the notification information indicates that the application is not running in the first terminal; if the application is not running in a new device environment, the notification information indicates that the application is running in the first terminal.
[0149] When the notification information indicates that the application is not running on the first terminal, device information of the second terminal is acquired.
[0150] In the embodiment of the present disclosure, if the application is not running in a new device environment, that is, the application is still running in the first terminal, the device information of the first terminal has been obtained, and there is no need to obtain the device information of the first terminal again. In the case where the notification information indicates that the application is running in a new device environment, that is, the application is not running in the first terminal, it is necessary to obtain the device information of the new device (the second terminal).
[0151] The user interface corresponding to the application is displayed on the display screen of the second terminal according to the device information.
[0152] Optionally, the device information includes display screen size information of the second terminal, and displaying the user interface corresponding to the application on the display screen of the second terminal includes:
[0153] Adjusting display parameters of the application according to the display screen size information;
[0154] According to the adjusted display parameters, the user interface corresponding to the application is displayed on the display screen of the second terminal.
[0155] In the disclosed embodiment, by adjusting the display parameters of the application, the user interface of the application can adapt to the display screen size of the second terminal to avoid incomplete display or too small display of the user interface.
[0156] Optionally, the device information includes function information supported by the second terminal device for display, and the displaying of a user interface corresponding to the application on the display screen of the second terminal includes:
[0157] adjusting the function parameters of the application according to the function information;
[0158] In the embodiment of the present disclosure, adjusting the function parameters of the application on the second terminal may activate any function of the application, or may deactivate any function of the application. For example, if function A is supported on the first terminal but not on the second terminal, the function parameters of the application need to be adjusted to deactivate function A on the second terminal; if function B is not supported on the first terminal but supported on the second terminal, the function parameters of the application need to be adjusted to activate function B on the second terminal.
[0159] According to the adjusted functional parameters, a user interface corresponding to the application is displayed on the display screen of the second terminal.
[0160] In the embodiment of the present disclosure, by adjusting the functional parameters of the application, the user interface of the application can adapt to the corresponding function buttons displayed on the second terminal, thereby avoiding the situation where the second terminal cannot display the corresponding function when the second terminal can support the function that is not supported on the first terminal.
[0161] The present disclosure also provides an interactive display device, which is applied to a first terminal. Figure 8 As shown, the device comprises:
[0162] The sending module 110 is configured to send the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal in response to the interactive display instruction at the first terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment;
[0163] The first display module 120 is configured to keep displaying the user interface corresponding to the application on the display screen of the first terminal.
[0164] Optionally, the device further comprises:
[0165] A first establishing module is configured to establish a connection channel between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal;
[0166] The first synchronization module is configured to synchronize the linear memory data of the wasm virtual environment in the first terminal to the reconstructed wasm virtual environment in the second terminal through the connection channel.
[0167] Optionally, the device further comprises:
[0168] A second establishing module is configured to establish a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal;
[0169] The first synchronization module is configured as follows:
[0170] When the linear memory data of the wasm virtual environment in the first terminal is updated, a locking operation is performed through the cross-device lock;
[0171] When the locking is successful, the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal.
[0172] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0173] Optionally, the first synchronization module is further configured to:
[0174] When the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal, the unlocking operation is performed.
[0175] Optionally, the sending module is configured to:
[0176] In response to the interactive display instruction at the first terminal, compressing the linear memory data in the wasm virtual environment corresponding to the application;
[0177] The wasm code corresponding to the application and the compressed linear memory data are sent to the second terminal.
[0178] The present disclosure also provides an interactive display device, which is applied to a second terminal. Fig. 9 As shown, the device comprises:
[0179] The receiving module 210 is configured to receive the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application;
[0180] A reconstruction module 220 is configured to rebuild the wasm virtual environment corresponding to the application according to the linear memory data;
[0181] The running module 230 is configured to load the wasm code of the application into the rebuilt wasm virtual environment and run the application in the rebuilt wasm virtual environment;
[0182] The second display module 240 is configured to display a user interface corresponding to the application on a display screen of the second terminal.
[0183] Optionally, the device further comprises:
[0184] A third establishing module is configured to establish a connection channel between the reconstructed wasm virtual environment in the second terminal and the wasm virtual environment in the first terminal;
[0185] The second synchronization module is configured to synchronize the linear memory data of the reconstructed wasm virtual environment in the second terminal to the wasm virtual environment in the first terminal through the connection channel.
[0186] Optionally, the device further comprises:
[0187] A fourth establishing module is configured to establish a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal;
[0188] The second synchronization module is configured as follows:
[0189] When the linear memory data of the wasm virtual environment reconstructed in the second terminal is updated, a locking operation is performed through the cross-device lock;
[0190] When the locking is successful, the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal.
[0191] Optionally, the locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
[0192] Optionally, the second synchronization module is configured to:
[0193] When the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal, the unlocking operation is performed.
[0194] Optionally, the second display module is configured as:
[0195] Sending notification information to the application through a wasm virtual machine, where the notification information is used to indicate whether the application is running on the first terminal;
[0196] When the notification information indicates that the application is not running on the first terminal, acquiring device information of the second terminal;
[0197] The user interface corresponding to the application is displayed on the display screen of the second terminal according to the device information.
[0198] Optionally, the device information includes display screen size information of the second terminal, and the second display module is configured as follows:
[0199] Adjusting display parameters of the application according to the display screen size information;
[0200] According to the adjusted display parameters, the user interface corresponding to the application is displayed on the display screen of the second terminal.
[0201] Optionally, the device information includes function information supported by the second terminal device for display, and the second display module is configured to:
[0202] adjusting the function parameters of the application according to the function information;
[0203] According to the adjusted functional parameters, a user interface corresponding to the application is displayed on the display screen of the second terminal.
[0204] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0205] The present disclosure also provides an electronic device, including:
[0206] processor;
[0207] a memory for storing processor-executable instructions;
[0208] The processor is configured to execute executable instructions stored in the memory to implement any method described in the first terminal side in the aforementioned embodiments, or to implement any method described in the second terminal side in the aforementioned embodiments.
[0209] It can be explained that, for any terminal device, it can act as a first terminal to synchronize the wasm code of the corresponding application and the linear memory data in the wasm virtual environment corresponding to the application to the second terminal, and then synchronously display the user interface of the application on the terminal device on the second terminal, or it can act as a second terminal to receive the wasm code of the application sent by other terminals and the linear memory data in the wasm virtual environment corresponding to the application, and then synchronously display the user interface of the application on the other terminal on the terminal device.
[0210] An embodiment of the present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any one of the first terminal sides in the aforementioned embodiments, or, when executed by a processor, implement the steps of the method described in any one of the second terminal sides in the aforementioned embodiments.
[0211] Fig.10 8 is a block diagram of an apparatus 800 for interactive display according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device, etc.
[0212] Reference Fig.10 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0213] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0214] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0215] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0216] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0217] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0218] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0219] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0220] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0221] In an exemplary embodiment, the device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned interactive display method.
[0222] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of the device 800 to complete the above interactive display method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0223] Fig.11It is a block diagram of a vehicle 600 according to an exemplary embodiment. For example, the vehicle 600 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle or other types of vehicles. The vehicle 600 may be an autonomous vehicle, a semi-autonomous vehicle or a non-autonomous vehicle. The vehicle may serve as a first terminal, synchronizing the wasm code of the corresponding application on the instrument cluster and the linear memory data in the wasm virtual environment corresponding to the application to a second terminal such as a mobile phone or a wearable device, and then displaying information such as vehicle speed on the instrument cluster on the second terminal such as a mobile phone or a wearable device. It may also serve as a second terminal, receiving the wasm code of the application sent by other terminals such as a mobile phone or a wearable device and the linear memory data in the wasm virtual environment corresponding to the application, and displaying the user interface of the application on the vehicle's instrument cluster. Then, information such as playing music on the first terminal such as a mobile phone or a wearable device is displayed on the vehicle's instrument cluster.
[0224] Reference Fig.11 , the vehicle 600 may include various subsystems, for example, an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. The vehicle 600 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 600 may be interconnected by wire or wireless means.
[0225] In some embodiments, the infotainment system 610 may include a communication system, an entertainment system, and a navigation system, among others.
[0226] The perception system 620 may include several sensors for sensing information about the environment around the vehicle 600. For example, the perception system 620 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.
[0227] The decision control system 630 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0228] The drive system 640 may include components that provide powered motion for the vehicle 600. In one embodiment, the drive system 640 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.
[0229] Some or all functions of the vehicle 600 are controlled by a computing platform 650. The computing platform 650 may include at least one processor 651 and a memory 652, and the processor 651 may execute instructions 653 stored in the memory 652.
[0230] The processor 651 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0231] The memory 652 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0232] In addition to the instructions 653 , the memory 652 may also store data, such as road maps, route information, and data such as the location, direction, and speed of the vehicle. The data stored in the memory 652 may be used by the computing platform 650 .
[0233] In the embodiment of the present disclosure, the processor 651 may execute the instruction 653 to complete all or part of the steps of the above-mentioned interactive display method.
[0234] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0235] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An interactive display method, characterized in that: Applied to a first terminal, the method includes: In response to the interactive display instruction at the first terminal, the wasm code of the corresponding application and the linear memory data in the wasm virtual environment are sent to the second terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment; The display screen of the first terminal is kept displaying a user interface corresponding to the application.
2. The method according to claim 1, characterized in that The method comprises: Establishing a connection channel between the wasm virtual environment in the first terminal and the reconstructed wasm virtual environment in the second terminal; The linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal through the connection channel.
3. The method according to claim 2, characterized in that The method comprises: Establishing a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal; The step of synchronizing the linear memory data of the wasm virtual environment in the first terminal to the reconstructed wasm virtual environment in the second terminal through the connection channel includes: When the linear memory data of the wasm virtual environment in the first terminal is updated, a locking operation is performed through the cross-device lock; If the locking is successful, the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal.
4. The method according to claim 3, characterized in that The locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
5. The method according to claim 3, characterized in that: The method comprises: When the linear memory data of the wasm virtual environment in the first terminal is synchronized to the reconstructed wasm virtual environment in the second terminal, the unlocking operation is performed.
6. The method according to any one of claims 1 to 5, characterized in that The method of sending the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal in response to the interactive display instruction at the first terminal includes: In response to the interactive display instruction at the first terminal, compressing the linear memory data in the wasm virtual environment corresponding to the application; The wasm code corresponding to the application and the compressed linear memory data are sent to the second terminal.
7. An interactive display method, characterized in that: Applied to the second terminal, the method includes: Receiving the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application; Rebuilding the wasm virtual environment corresponding to the application according to the linear memory data; Loading the wasm code of the application into the rebuilt wasm virtual environment, and running the application in the rebuilt wasm virtual environment; The user interface corresponding to the application is displayed on the display screen of the second terminal.
8. The method according to claim 7, characterized in that The method comprises: Establishing a connection channel between the reconstructed wasm virtual environment in the second terminal and the wasm virtual environment in the first terminal; The linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal through the connection channel.
9. The method according to claim 8, characterized in that The method comprises: Establishing a cross-device lock between the wasm virtual environment of the first terminal and the reconstructed wasm virtual environment of the second terminal; The step of synchronizing the linear memory data of the reconstructed wasm virtual environment in the second terminal to the wasm virtual environment in the first terminal through the connection channel includes: When the linear memory data of the wasm virtual environment reconstructed in the second terminal is updated, a locking operation is performed through the cross-device lock; If the locking is successful, the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal.
10. The method according to claim 9, characterized in that The locking operation includes: locking the linear memory data of the wasm virtual environment reconstructed in the second terminal and locking the linear memory data of the wasm virtual environment in the first terminal.
11. The method according to claim 9, characterized in that The method comprises: When the linear memory data of the reconstructed wasm virtual environment in the second terminal is synchronized to the wasm virtual environment in the first terminal, the unlocking operation is performed.
12. The method according to any one of claims 7 to 11, characterized in that: The display screen of the second terminal displays a user interface corresponding to the application, including: Sending notification information to the application through the wasm virtual machine, where the notification information is used to indicate whether the application is running on the first terminal; When the notification information indicates that the application is not running on the first terminal, acquiring device information of the second terminal; The user interface corresponding to the application is displayed on the display screen of the second terminal according to the device information.
13. The method according to claim 12, characterized in that The device information includes display screen size information of the second terminal, and displaying the user interface corresponding to the application on the display screen of the second terminal includes: Adjusting display parameters of the application according to the display screen size information; According to the adjusted display parameters, the user interface corresponding to the application is displayed on the display screen of the second terminal.
14. The method according to claim 12, characterized in that The device information includes function information supported by the second terminal device for display, and the user interface corresponding to the application is displayed on the display screen of the second terminal, including: adjusting the function parameters of the application according to the function information; According to the adjusted functional parameters, a user interface corresponding to the application is displayed on the display screen of the second terminal.
15. An interactive display device, characterized in that: Applied to a first terminal, the device includes: A sending module is configured to send the wasm code of the corresponding application and the linear memory data in the wasm virtual environment to the second terminal in response to the interactive display instruction at the first terminal, so that the second terminal rebuilds the wasm virtual environment according to the linear memory data, and displays the user interface of the corresponding application according to the wasm code in the reconstructed wasm virtual environment; The first display module is configured to keep displaying the user interface corresponding to the application on the display screen of the first terminal.
16. An interactive display device, characterized in that: Applied to a second terminal, the device includes: A receiving module, configured to receive the wasm code of the application sent by the first terminal and the linear memory data in the wasm virtual environment corresponding to the application; A reconstruction module, configured to rebuild the wasm virtual environment corresponding to the application according to the linear memory data; A running module, configured to load the wasm code of the application into the rebuilt wasm virtual environment, and run the application in the rebuilt wasm virtual environment; The second display module is configured to display a user interface corresponding to the application on a display screen of the second terminal.
17. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute executable instructions stored in the memory to implement the method described in any one of claims 1 to 6, or to implement the method described in any one of claims 7 to 14.
18. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instruction is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented; or when the program instruction is executed by a processor, the steps of the method described in any one of claims 7 to 14 are implemented.