Subroutine synchronization processing method and device
By detecting the collaboration status of the local subroutine and the remote subroutine of the terminal device in the virtual machine of the remote server, parsing and synchronizing event responses, the problem of page desynchronization in the terminal and cloud applet mode is solved, and the user experience and performance are improved.
Patent Information
- Application Number
- CN202210287184.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-03-23
AI Technical Summary
In the device-cloud applet mode, the page synchronization mechanism between the local applet and the cloud applet is missing, resulting in a degraded user experience and possibly causing the local applet and cloud applet pages to be out of sync.
In the virtual machine deployed on the remote server, the collaboration status of the local subroutine and the remote subroutine of the terminal device is detected. If it is an interactive synchronization state, the trigger event is parsed, the corresponding event response action is executed, and the subroutine page after the action is executed Synchronize to the terminal device and introduce a page synchronization mechanism to ensure local and remote page synchronization.
It improves the user experience, ensures the synchronization of local applet and remote applet pages, and improves the fluency and performance of user interaction.
Smart Images

Figure CN114661483B
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a subroutine synchronization processing method and device. Background Art
[0002] The end-cloud mini program is an application mode that renders the mini program in the cloud and displays the mini program page on the terminal device. It includes cloud mini programs and local mini programs, so that the mini program is no longer limited by the hardware configuration of the terminal device, providing users with a better performance experience. However, this mode also divides the working process of the mini program into two parts: local and cloud, running in the local terminal device and cloud virtual system respectively. Summary of the invention
[0003] One or more embodiments of the present specification provide a subroutine synchronization processing method, which is applied to a remote server, and includes: obtaining a trigger event of a local subroutine of a terminal device. Detecting the collaborative state between the local subroutine and the corresponding remote subroutine in a program container; the program container is installed in a virtual machine deployed by the remote server. If the collaborative state is an interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event. An event response action corresponding to the event type is executed based on the program container, and the subroutine page obtained after the action is executed is synchronized to the terminal device.
[0004] One or more embodiments of the present specification provide another subprogram synchronization processing method, which is applied to a terminal device, including: detecting a trigger event of a local subprogram, and uploading the trigger event to a remote server. Receiving a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the trigger event based on a program container. Performing page update processing for the local subprogram according to the subprogram page; wherein the program container is installed in a virtual machine deployed by the remote server.
[0005] One or more embodiments of the present specification provide a subroutine synchronization processing device, which runs on a remote server and includes: a trigger event acquisition module, which is configured to obtain a trigger event of a local subroutine of a terminal device. A collaborative state detection module, which is configured to detect the collaborative state of the local subroutine and the corresponding remote subroutine in a program container; the program container is installed in a virtual machine deployed by the remote server. If the collaborative state is an interactive synchronization state, an event type parsing module is run, and the event type parsing module is configured to parse the trigger event to obtain the event type of the trigger event. An event response action execution module, which is configured to execute an event response action corresponding to the event type based on the program container, and synchronize the subroutine page obtained after the action is executed to the terminal device.
[0006] One or more embodiments of the present specification provide another subroutine synchronization processing device, which runs on a terminal device and includes: a trigger event detection module, configured to detect a trigger event of a local subroutine and upload the trigger event to a remote server. A subroutine page receiving module, configured to receive a subroutine page synchronized by the remote server; the subroutine page is obtained after an event response action corresponding to the event type of the trigger event is executed based on the program container. A page update processing module, configured to perform page update processing for the local subroutine according to the subroutine page; wherein the program container is installed on a virtual machine deployed on the remote server.
[0007] One or more embodiments of the present specification provide a subroutine synchronization processing device, including: a processor; and a memory configured to store computer executable instructions, wherein the computer executable instructions, when executed, cause the processor to: obtain a trigger event of a local subroutine of a terminal device. Detect the collaborative state between the local subroutine and the corresponding remote subroutine in a program container; the program container is installed in a virtual machine deployed by a remote server. If the collaborative state is an interactive synchronization state, parse the trigger event to obtain the event type of the trigger event. Execute an event response action corresponding to the event type based on the program container, and synchronize the subroutine page obtained after the action is executed to the terminal device.
[0008] One or more embodiments of the present specification provide another subroutine synchronization processing device, including: a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor: detects a trigger event of a local subroutine, and uploads the trigger event to a remote server. Receive a subroutine page synchronized by the remote server; the subroutine page is obtained after executing an event response action corresponding to the event type of the trigger event based on a program container. Perform page update processing for the local subroutine according to the subroutine page; wherein the program container is installed in a virtual machine deployed by the remote server.
[0009] One or more embodiments of the present specification provide a storage medium for storing computer executable instructions, which implement the following process when executed by a processor: obtaining a trigger event of a local subroutine of a terminal device. Detecting the collaborative state between the local subroutine and the corresponding remote subroutine in a program container; the program container is installed in a virtual machine deployed by a remote server. If the collaborative state is an interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event. An event response action corresponding to the event type is executed based on the program container, and the subroutine page obtained after the action is executed is synchronized to the terminal device.
[0010] One or more embodiments of the present specification provide another storage medium for storing computer executable instructions, which implement the following process when executed by a processor: detecting a trigger event of a local subroutine and uploading the trigger event to a remote server. Receive a subroutine page synchronized by the remote server; the subroutine page is obtained after executing an event response action corresponding to the event type of the trigger event based on a program container. Perform page update processing for the local subroutine according to the subroutine page; wherein the program container is installed in a virtual machine deployed by the remote server. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0012] Figure 1 A processing flow chart of a subroutine synchronization processing method provided for one or more embodiments of this specification;
[0013] Figure 2 A schematic diagram of a remote subroutine and a local subroutine system block diagram provided for one or more embodiments of this specification;
[0014] Figure 3 A processing sequence diagram of a subroutine synchronization processing method applied to an interactive synchronization scenario provided by one or more embodiments of this specification;
[0015] Figure 4 A processing sequence diagram of a subroutine synchronization processing method applied to a startup synchronization scenario provided by one or more embodiments of this specification;
[0016] Figure 5 A processing flow chart of a subroutine synchronization processing method applied to a local exit scenario provided by one or more embodiments of this specification;
[0017] Figure 6 A processing flow chart of another subroutine synchronization processing method provided for one or more embodiments of this specification;
[0018] Figure 7 A schematic diagram of a subroutine synchronization processing device provided for one or more embodiments of this specification;
[0019] Figure 8A schematic diagram of another subroutine synchronization processing device provided for one or more embodiments of this specification;
[0020] Fig. 9 A schematic diagram of the structure of a subroutine synchronization processing device provided for one or more embodiments of this specification;
[0021] Fig.10 A schematic diagram of the structure of another subroutine synchronization processing device provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0023] This specification provides a subroutine synchronization processing method embodiment:
[0024] Reference Figure 1 The subroutine synchronization processing method provided in this embodiment is applied to a remote server and specifically includes steps S102 to S108.
[0025] Step S102, obtaining a triggering event of a local subroutine of the terminal device.
[0026] In actual applications, the end-cloud mini program renders the mini program page in the cloud and displays the mini program page on the terminal device. The mini program's working process is divided into two parts: local and cloud, which run in the terminal device and cloud virtual system respectively. If the end-cloud mini program does not establish a page synchronization mechanism, it may cause the local mini program and the cloud mini program to be out of sync, reducing the user experience.
[0027] To this end, the subprogram synchronization processing method provided in this embodiment cooperates with the terminal device to establish a page synchronization mechanism between the remote subprogram and the local subprogram. Specifically, the trigger event of the local subprogram of the terminal device is obtained, and the collaborative state between the local subprogram and the corresponding remote subprogram in the program container is detected. If the collaborative state is an interactive synchronization state, the corresponding event response action is determined and executed according to the event type of the trigger event obtained by parsing the trigger event, and the subprogram page obtained after the action is executed is synchronized to the terminal device. A page synchronization mechanism between the local subprogram and the remote subprogram is introduced to ensure that the display page of the local subprogram is synchronized with the display page of the remote subprogram, thereby improving the user experience.
[0028] The subprogram described in this embodiment refers to a program function module or application component installed on a terminal device or a remote server, or a program function module or application component loaded and installed by a terminal device or a remote server, such as a mini-program. From a service perspective, the subprogram has the ability to independently provide self-closed-loop services, such as a subprogram with self-closed-loop capabilities for service reservation and reservation message push.
[0029] The local subroutine refers to a program function module or application component installed on a terminal device, or a program function module or application component loaded and installed by a terminal device, such as a local applet. The remote server includes a cloud server. The terminal device is configured with a display screen, including but not limited to at least one of the following: a user terminal, a vehicle-mounted vehicle terminal, an IoT (Internet of Things) device connected to the vehicle, a smart speaker, an unmanned vending machine, an interactive advertising screen, a POS (Point of sale) device, and smart home appliances such as smart TVs and smart refrigerators, as well as smart wearable products.
[0030] The trigger event includes at least one of the following: a start request event, an interaction event, and an exit event; optionally, the trigger event includes an interaction event intercepted and uploaded by the terminal device; after the terminal device detects that the user triggers the interaction event submitted by the interaction interface configured by the local subroutine, the terminal device intercepts the interaction event.
[0031] Specifically, the startup request event refers to the event submitted by the terminal device to the remote server in response to the startup of the local subprogram and the display of the access page; the interaction event refers to the event submitted by the user triggering a control within the local subprogram, such as an interaction event generated after the user inputs information through the interaction interface configured for the current access page of the local subprogram, or a page jump event generated after the user triggers the interaction interface configured for the current access page of the local subprogram; the exit event includes abnormal exit events of the local subprogram, such as a crash event of the local subprogram.
[0032] In this embodiment, the remote server and the terminal device cooperate to implement subprogram synchronization processing. The subprograms are divided into local subprograms and remote subprograms. Page rendering is performed in the remote subprogram, and the rendered page is displayed in the local subprogram. The local subprogram runs on the operating system of the terminal device. The page access of the local subprogram is performed through the access interface configured by the operating system, such as the access interface configured by the operating system of the IoT terminal. In addition, the page access of the local subprogram can also be performed through the access interface for remote and local interaction. The page access of the local subprogram can also be performed through the access interface in the application program equipped with the local subprogram or the access interface in the local subprogram application. The remote server is deployed with many virtual machines (virtual systems), and the program container runs on the virtual machine of the remote server. The program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram, so that when the exit status of the local subprogram is inconsistent with that of the remote subprogram, the exit status of the local subprogram and the remote subprogram are synchronized. Multiple subprograms can be run in the program container, or only one subprogram can be run.
[0033] like Figure 2 As shown, the remote server is a cloud server. A custom transmission control protocol is used between the cloud server and the terminal device for event or data communication. The local subprogram runs on the operating system of the terminal device. The cloud server is deployed with many virtual systems, the number of which is uncertain. The program container runs on the virtual system of the remote server. The program container has a detection service, which is used to detect the exit and running status of the local subprogram and the remote subprogram. Multiple subprograms can run in the program container, or only one subprogram can run.
[0034] In the specific implementation, the trigger event of the local subprogram of the terminal device is obtained. Prior to this, the terminal device detects the trigger event of the local subprogram and uploads the trigger event to the remote server. In the specific execution process of the terminal device detecting the trigger event of the local subprogram and uploading the trigger event to the remote server, the interaction event submitted by the user triggering the interaction interface configured by the local subprogram is obtained; the interaction event is intercepted and uploaded to the remote server.
[0035] Step S104, detecting the collaborative status between the local subprogram and the corresponding remote subprogram in the program container.
[0036] The program container is installed in the virtual machine deployed by the remote server. It should be noted that the virtual machine here includes a single virtual machine deployed by the remote server or a group of virtual machines deployed by the remote server.
[0037] The program container described in this embodiment refers to an operating framework or operating engine provided for a remote server. By installing the program container on a virtual machine deployed on a remote server, a remote subprogram can be run in the program container. The remote subprogram described in this embodiment is mounted on the program container run by the virtual machine of the remote server. The remote subprogram refers to a program function module or application component mounted on a remote server, or a program function module or application component loaded and installed by a remote server, such as a cloud applet.
[0038] The collaborative state refers to the state in which the local subprogram cooperates with the remote subprogram to render the page. For example, the terminal device uploads the trigger event to the remote server, and renders the access page in the remote subprogram according to the interactive event to synchronize the terminal device with the state displayed in the local subprogram. The collaborative state includes an interactive synchronization state, a startup synchronization state, and a local exit state. Among them, the interactive synchronization state is the collaborative state corresponding to the interactive event of the local subprogram, the startup synchronization state is the collaborative state corresponding to the startup request event of the local subprogram, and the local exit state is the collaborative state corresponding to the exit event of the local subprogram.
[0039] Based on the above-mentioned acquisition of the triggering event of the local subprogram of the terminal device, this step detects the collaborative state between the local subprogram and the corresponding remote subprogram in the program container, so as to respond to the triggering event of the local subprogram according to the collaborative state.
[0040] As described above, the detected collaboration states between the local subprogram and the remote subprogram include three, namely, interactive synchronization state, startup synchronization state, and local exit state. The following specifically describes the response process of triggering events under these three collaboration states.
[0041] Specifically, for the detailed description of the response process of the triggering event in the interactive synchronization state, please refer to steps S106 and S108, and for the detailed description of the response process of the triggering event in the startup synchronization state and the local exit state, please refer to step S108.
[0042] Step S106: If the collaborative state is an interactive synchronization state, the triggering event is parsed to obtain the event type of the triggering event.
[0043] The above detection of the collaborative state between the local subprogram and the corresponding remote subprogram in the program container, when the detected collaborative state is an interactive collaborative state, parses the trigger event to obtain the event type of the trigger event, so as to determine and execute the event response action corresponding to the event type.
[0044] As mentioned above, the detected collaborative states between the local subprogram and the remote subprogram include three types, namely, interactive synchronization state, startup synchronization state, and local exit state. If the collaborative state is the interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event. Specifically, the event parsing model can be used to input the trigger event into the event parsing model for event type parsing, and obtain the event type corresponding to the trigger event output by the event parsing model.
[0045] The event types parsed and obtained in this embodiment include interaction event types, fallback event types and / or exit event types; for example, an interaction event is when a user triggers an interaction control configured in a local subprogram to input interaction information, or when a user triggers a service request in a local subprogram to jump to the service page of the service, or when a user triggers an interaction control configured in a local subprogram to request display of pop-up box information; a fallback event is when a user triggers a fallback control; and an exit event is when a user triggers an exit control.
[0046] Step S108: executing an event response action corresponding to the event type based on the program container, and synchronizing a subprogram page obtained after the action is executed to the terminal device.
[0047] The event response action described in this embodiment refers to the action to be performed in response to the triggering event.
[0048] In the above-mentioned case where the collaborative state is the interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event. On this basis, this step uses the program container to execute the event response action corresponding to the event type obtained by the analysis, and synchronizes the subprogram page obtained by the action execution to the terminal device, so as to display the subprogram page in the local subprogram of the terminal device, so as to ensure the page synchronization of the local subprogram and the remote subprogram. With the help of the huge data support of the remote server, the subprogram page of the remote subprogram is rendered and synchronized to the terminal device, so as to improve the performance and aesthetics of the local subprogram, and further enhance the user experience.
[0049] In specific implementation, the above-mentioned analysis of the triggering event obtains the event type of the triggering event. There are different solutions for different event types, so as to perform event response actions in a targeted manner. In an optional implementation manner provided in this embodiment, the event response action corresponding to the event type is performed in the following manner:
[0050] If the event type is an interactive event type, rendering an access page in the remote subprogram according to the triggering event; synchronizing the rendered access page to the terminal device;
[0051] If the event type is a rollback event type, determining whether the access page of the local subroutine corresponding to the triggering event has a parent page;
[0052] If it exists, the parent page is rendered in the remote subprogram according to the trigger event; and the rendered parent page is synchronized to the terminal device.
[0053] It should be added that if the access page of the local subprogram corresponding to the triggering event does not have an upper-level page, an exit notification for the local subprogram is synchronized to the detection service of the program container to record the exit status of the local subprogram and determine whether the page stack data is empty;
[0054] If it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access sequence recorded in the page stack data; synchronize the read access page to the terminal device;
[0055] If it is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
[0056] Correspondingly, if the event type is an interactive event type, the terminal device receives the rendered access page synchronously from the remote server and displays the access page in the local subprogram. The access page here refers to the page generated according to the triggering event. For example, when a user triggers a service in the local subprogram, it jumps to the access page of the service.
[0057] If the event type is a fallback event type, and the access page of the local subprogram corresponding to the triggering event has an upper-level page, the terminal device receives the upper-level page of the access page of the local subprogram rendered in the remote subprogram synchronized by the remote server, and updates the access page of the local subprogram according to the upper-level page, that is, updates the page originally displayed by the local subprogram according to the upper-level page.
[0058] If the event type is a fallback event type, and the access page of the local subroutine corresponding to the triggering event does not have an upper-level page, and the page stack data is not empty, the terminal device receives the access page of the previous local subroutine of the local subroutine synchronized by the remote server; and updates the access page of the local subroutine according to the access page of the previous local subroutine.
[0059] If the event type is a rollback event type, and the access page of the local subroutine corresponding to the triggering event does not have an upper-level page, and the page stack data is empty, the terminal device receives an exit instruction for the local subroutine sent by the remote server and exits the running of the local subroutine.
[0060] In addition, if the event type is an interactive event type, the access page is rendered in the remote subroutine according to the triggering event; if the event type is a fallback event type, it is determined whether the access page of the local subroutine corresponding to the triggering event has a parent page;
[0061] If it exists, render the parent page in the remote subroutine according to the trigger event; if it does not exist, determine whether the page stack data is empty;
[0062] If it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access order recorded in the page stack data; if it is empty, send an exit instruction for the local subprogram to the terminal device, and release resources for the target virtual machine running the program container.
[0063] On this basis, in addition to the specific implementation process of executing the corresponding event response action when the trigger event is an interactive event type and a rollback event type provided above, for the case where the event type is an exit event type, an optional implementation provided by this embodiment executes the event response action corresponding to the event type in the following manner:
[0064] If the event type is an exit event type, synchronizing an exit notification for the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether page stack data is empty;
[0065] If it is not empty, the access page of the previous local subprogram of the local subprogram is queried and read according to the program access sequence recorded in the page stack data.
[0066] In addition, the event response action corresponding to the event type can also be executed in the following manner: if the event type is an exit event type, determine whether the page stack data is empty; if not empty, query and read the access page of the previous local subroutine of the local subroutine according to the program access order recorded in the page stack data.
[0067] Further, on the basis of providing a specific implementation process for executing event response actions corresponding to three event types, if the above-mentioned page stack data is empty, it means exiting the current local subprogram and there is no other local subprogram accessed before the current local subprogram. In an optional implementation provided by this embodiment, if the page stack data is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
[0068] Furthermore, on the basis of providing a specific implementation process for executing event response actions corresponding to three event types and sending an exit instruction for the local subroutine to the terminal device when the page stack data is empty, optionally, if it is detected that the local subroutine jumps from the first access page to the second access page and jumps back from the second access page to the first access page, the page record of the second access page is deleted in the page stack data.
[0069] For example, the local subroutine jumps from access page A to access page B, and then returns from access page B to access page A. The page record of access page B is deleted from the recorded page stack data to prevent page data from invalidly occupying storage resources and improve storage resource utilization.
[0070] In addition, if the collaborative state of the local subprogram and the remote subprogram is a startup synchronization state, a corresponding virtual machine may be allocated to the terminal device, and on this basis, the program container is run and the remote subprogram is run in the program container, and the page rendering of the access page is performed in the remote subprogram. Specifically, in an optional implementation manner provided in this embodiment, the following operations are also performed:
[0071] If the collaborative state is the start synchronization state, the corresponding target virtual machine is allocated to the terminal device in the virtual machine pool and a binding process is performed;
[0072] After the binding is completed, the target virtual machine is started, and the program container is started based on the target virtual machine;
[0073] Running the remote subprogram in the program container, and performing page rendering for the remote subprogram based on the program container to obtain an access page;
[0074] The access page is synchronized to the terminal device for display in the local subprogram.
[0075] Prior to this, the terminal device detects the startup request event of the local subprogram submitted by the user triggering the access control of the local subprogram, intercepts the startup request event and uploads it to the remote server. At this time, the local subprogram displays a startup screen, which may include a startup animation. Correspondingly, the remote server obtains the startup request event of the local subprogram of the terminal, and requests the remote server to allocate the corresponding target virtual machine through the startup request event. In the process of detecting the collaborative state between the local subprogram and the corresponding remote subprogram in the program container, the corresponding remote subprogram in the program container is empty, that is, it is not started. In this case, the collaborative state is the started collaborative state.
[0076] In the above-mentioned binding process, optionally, the device identifier of the terminal device is bound to the virtual machine identifier of the target virtual machine; in addition, the account identifier of the local subprogram, the device identifier of the terminal device, and the virtual machine identifier of the target virtual machine can also be bound; and when the local subprogram is equipped with a host application running on the terminal device, the account identifier of the host application and / or the device identifier of the terminal device and the virtual machine identifier of the target virtual machine can also be bound.
[0077] It should be noted that a certain number of virtual machines are deployed on the remote server, among which the virtual machine pool refers to a virtual machine pool composed of virtual machines corresponding to virtual machine identifiers that are not bound to the device identifiers of the terminal devices, that is, a group of idle and non-working virtual machines. In the process of binding the virtual machine identifier of the virtual machine with the device identifier of the terminal device, the virtual machine corresponding to the virtual machine identifier only provides services for the terminal device corresponding to the device identifier; the virtual machine includes a virtual system; the access page refers to the first page displayed after starting the local subroutine.
[0078] Furthermore, in addition to the above-mentioned collaborative state being the interactive synchronization state and the startup synchronization state, the collaborative state may also be the local exit state, that is, when the local subroutine is detected to have exited, in an optional implementation manner provided by this embodiment, the following operations are further performed:
[0079] If the collaborative state is a local exit state, exit the running of the remote subprogram in the program container, and release resources for the target virtual machine running the program container;
[0080] The detection service of the program container sends detection messages to the terminal device according to a preset time period, and when it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, it is determined that the collaborative state is a local exit state.
[0081] Specifically, in order to ensure that the exit status of the local subprogram is synchronized with that of the remote subprogram, when the local subprogram exits, the virtual machine resources of the remote server are released in a timely manner to improve the resource utilization of the remote server. The detection service of the program container sends a detection message to the terminal device according to a preset time period (for example, 1ms) to determine whether the local subprogram has exited the operation by whether the local subprogram responds to the detection message. When it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, the collaborative state is determined to be the local exit state.
[0082] If the collaboration status is the local exit status, it means that the local subprogram has exited. Accordingly, in order to avoid the waste of resources caused by the remote server's virtual machine resources not being released when the local subprogram exits, and even other users being unable to request the remote server to allocate virtual machine resources, the remote subprogram is exited in the program container, and the resources of the target virtual machine running the program container are released to improve resource utilization.
[0083] In addition, in actual applications, when the user inputs an exit event by means of a gesture exit, the remote subprogram exits, but the local subprogram may not exit, and the local subprogram displays a black screen. Or, when the remote subprogram exits abnormally (such as a flash exit), the exit message cannot be synchronized to the local subprogram, and the local subprogram displays a black screen, which reduces the user experience. In view of this, this embodiment provides an optional implementation method, in which the detection service of the program container detects the exit event of the remote subprogram and promptly synchronizes the exit instruction for the local subprogram to the terminal device. The specific implementation process is as follows:
[0084] Detecting an exit event of the remote subprogram based on a detection service of the program container;
[0085] If the exit event is an abnormal exit event, synchronizing an exit instruction for the local subprogram to the terminal device to exit the running of the local subprogram;
[0086] The program container is closed, and resources of the target virtual machine allocated to the terminal device are released.
[0087] Specifically, the detection service of the program container detects the exit event of the remote subprogram, which indicates that the remote subprogram has exited. If the exit event is a normal exit event, it means that when the local subprogram exits, the remote subprogram also exits. The exit event of the remote subprogram is a normal exit event and no processing is required at this time. If the exit event is an abnormal exit event, it means that the remote subprogram has exited while the local subprogram has not exited. This is an abnormal exit. At this time, the exit instruction for the local subprogram is synchronized to the terminal device. Accordingly, the terminal device exits the local subprogram, synchronizes the exit status of the local subprogram with the remote subprogram, closes the program container, and releases the target virtual machine resources in a timely manner, thereby improving the resource utilization of the cloud server for the virtual machine.
[0088] In summary, the subprogram synchronization processing method provided in this embodiment first obtains the trigger event of the local subprogram of the terminal device, detects the collaborative state of the local subprogram and the corresponding remote subprogram in the program container,
[0089] Secondly, if the collaborative state is the interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event;
[0090] If the event type is an interactive event type, render the access page in the remote subroutine according to the triggering event; synchronize the rendered access page to the terminal device;
[0091] If the event type is a fallback event type, determine whether the access page of the local subprogram corresponding to the triggering event has an upper-level page; if so, render the upper-level page in the remote subprogram according to the triggering event, and synchronize the rendered upper-level page to the terminal device; if not, synchronize the exit notification of the local subprogram to the detection service of the program container to record the exit status of the local subprogram, and determine whether the page stack data is empty; if not, query and read the access page of the previous local subprogram of the local subprogram according to the program access sequence recorded in the page stack data, and synchronize the read access page of the previous local subprogram to the terminal device; if it is empty, issue an exit instruction for the local subprogram to the terminal device, and release resources for the target virtual machine running the program container;
[0092] If the event type is an exit event type, synchronize the exit notification for the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether the page stack data is empty; if it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access sequence recorded in the page stack data, and synchronize the read access page of the previous local subprogram to the terminal device; if it is empty, send an exit instruction for the local subprogram to the terminal device, and release resources for the target virtual machine running the program container;
[0093] Thirdly, if the collaborative state is the start synchronization state, the corresponding target virtual machine is allocated to the terminal device in the virtual machine pool and the binding process is performed; after the binding is completed, the target virtual machine is started, and the program container is started based on the target virtual machine; the remote subprogram is run in the program container, and the page rendering is performed for the remote subprogram based on the program container to obtain the access page; the access page is synchronized to the terminal device for display in the local subprogram;
[0094] If the collaborative state is a local exit state, the remote subprogram is exited in the program container, and resources are released for the target virtual machine running the program container; wherein the detection service of the program container sends a detection message to the terminal device according to a preset time period, and when it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, it is determined that the collaborative state is a local exit state.
[0095] In addition, the program container-based detection service detects the exit event of the remote subprogram; if the exit event is an abnormal exit event, the exit instruction for the local subprogram is synchronized to the terminal device to exit the operation of the local subprogram; the program container is closed, and the resources of the target virtual machine allocated to the terminal device are released.
[0096] By introducing a page synchronization mechanism between the local subprogram and the remote subprogram, the display page of the local subprogram is synchronized with the display page of the remote subprogram, thereby improving the user experience.
[0097] The following takes the application of a subroutine synchronization processing method provided in this embodiment in an interactive synchronization scenario as an example to further illustrate the subroutine synchronization processing method provided in this embodiment. Figure 3 , a subroutine synchronization processing method applied to an interactive synchronization scenario specifically includes the following steps.
[0098] Step S304, detecting the coordination status between the local subprogram and the corresponding cloud subprogram in the program container.
[0099] Among them, the program container is installed in a virtual machine deployed on a cloud server.
[0100] Step S306: If the collaborative state is the interactive synchronization state, the interactive event is parsed to obtain the event type of the interactive event.
[0101] Step S308, if the event type is a rollback event type, determine whether the access page of the local subprogram corresponding to the interactive event has a parent page based on the program container;
[0102] If it exists, the parent page is rendered in the cloud subprogram based on the program container and according to the interaction event, and the rendered parent page is synchronized to the terminal device;
[0103] If not present, execute steps S310 to S312.
[0104] In addition, if the event type is an exit event type, an exit notification for the local subprogram is synchronized to the detection service of the program container to record the exit status of the local subprogram and determine whether the page stack data is empty;
[0105] If it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access order recorded in the page stack data;
[0106] If it is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
[0107] If the event type is an interactive event type, the access page is rendered in the remote subroutine according to the interactive event.
[0108] Step S310: Synchronize the exit notification of the local subprogram to the detection service of the program container to record the exit status of the local subprogram.
[0109] Step S312, determining whether the page stack data is empty;
[0110] If it is not empty, execute steps S314 to S316;
[0111] If it is empty, execute step S322.
[0112] Step S314: query and read the access page of the previous local subprogram of the local subprogram according to the program access sequence recorded in the page stack data.
[0113] Step S316, synchronizing the access page of the previous local subprogram of the local subprogram read to the terminal device.
[0114] Step S322: Send an exit instruction for the local subprogram to the terminal device, and release resources for the target virtual machine running the program container.
[0115] The following uses the application of a subroutine synchronization processing method provided in this embodiment in a startup synchronization scenario as an example to further illustrate the subroutine synchronization processing method provided in this embodiment. Figure 4 , a subroutine synchronization processing method applied to start a synchronization scenario specifically includes the following steps.
[0116] Step S404, detecting the coordination status between the local subprogram and the corresponding cloud subprogram in the program container.
[0117] Among them, the program container is installed in a virtual machine deployed on a cloud server.
[0118] Step S406: Allocate a corresponding target virtual machine to the terminal device in the virtual machine pool and perform binding processing.
[0119] Step S408: After the binding is completed, the target virtual machine is started, and the program container is started based on the target virtual machine.
[0120] Step S410: Run the cloud subprogram in the program container, and render the page for the cloud subprogram based on the program container to obtain an access page.
[0121] Step S412, synchronizing the access page to the terminal device to display it in the local subprogram.
[0122] The following uses the application of a subprogram synchronization processing method provided in this embodiment in a local exit scenario as an example to further illustrate the subprogram synchronization processing method provided in this embodiment. Figure 5 , a subroutine synchronization processing method applied to a local exit scenario specifically includes the following steps.
[0123] Step S502: The detection service based on the program container sends a detection message to the terminal device according to a preset time period.
[0124] Step S504: when it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, it is determined that the collaborative state is a local exit state.
[0125] Step S506, exiting the cloud subprogram in the program container.
[0126] Step S508: releasing resources for the target virtual machine running the program container.
[0127] The implementation process of the sub-program synchronization processing method for the interactive synchronization scenario and the startup synchronization scenario provided above is executed by a remote server, and the implementation process of the sub-program synchronization processing method for the interactive synchronization scenario and the startup synchronization scenario provided in the following method embodiment is executed by a terminal device. The two cooperate with each other during the execution process. Therefore, please refer to the corresponding content of the following method embodiment for reading the above implementation process.
[0128] Another subroutine synchronization processing method embodiment provided in this specification is:
[0129] In the above-mentioned embodiment, a subroutine synchronization processing method is provided, which is applied to a remote server. In conjunction with this, this embodiment also provides a subroutine synchronization processing method, which is applied to a terminal device, which is described below in conjunction with the accompanying drawings.
[0130] Reference Figure 6 The subroutine synchronization processing method provided in this embodiment is applied to a terminal device and specifically includes steps S602 to S606.
[0131] Step S602: Detect a triggering event of a local subroutine, and upload the triggering event to a remote server.
[0132] The subprogram synchronization processing method provided in this embodiment cooperates with the remote server to detect the trigger event of the local subprogram, and uploads the detected trigger event to the remote server to render the page on the remote server, and display the subprogram page synchronized by the received remote server, introduces a page synchronization mechanism between the local subprogram and the remote subprogram, ensures that the access page displayed by the local subprogram is synchronized with the access page displayed by the remote subprogram, and improves the user experience.
[0133] The subprogram described in this embodiment refers to a program function module or application component installed on a terminal device or a remote server, or a program function module or application component loaded and installed by a terminal device or a remote server, such as a mini-program. From a service perspective, the subprogram has the ability to independently provide self-closed-loop services, such as a subprogram with self-closed-loop capabilities for service reservation and reservation message push.
[0134] The local subroutine refers to a program function module or application component installed on a terminal device, or a program function module or application component loaded and installed by a terminal device, such as a local applet. The remote server includes a cloud server. The terminal device is configured with a display screen, including but not limited to at least one of the following: a user terminal, a vehicle-mounted vehicle terminal, an IoT (Internet of Things) device connected to the vehicle, a smart speaker, an unmanned vending machine, an interactive advertising screen, a POS (Point of sale) device, and smart home appliances such as smart TVs and smart refrigerators, as well as smart wearable products.
[0135] The trigger event includes at least one of the following: a start request event, an interaction event, and an exit event; specifically, the trigger event includes an interaction event intercepted and uploaded by a terminal device; after the terminal device detects an interaction event submitted by an interaction interface configured by a local subroutine triggered by a user, the terminal device intercepts the interaction event.
[0136] Specifically, the startup request event refers to the event submitted by the terminal device to the remote server in response to the startup of the local subprogram and the display of the access page; the interaction event refers to the event submitted by the user triggering a control within the local subprogram, such as an interaction event generated after the user inputs information through the interaction interface configured for the current access page of the local subprogram, or a page jump event generated after the user triggers the interaction interface configured for the current access page of the local subprogram; the exit event includes abnormal exit events of the local subprogram, such as a crash event of the local subprogram.
[0137] In this embodiment, the remote server and the terminal device cooperate to implement subprogram synchronization processing. The subprograms are divided into local subprograms and remote subprograms. Page rendering is performed in the remote subprogram, and the rendered page is displayed in the local subprogram. The local subprogram runs on the operating system of the terminal device. The page access of the local subprogram is performed through the access interface configured by the operating system, such as the access interface configured by the operating system of the IoT terminal. In addition, the page access of the local subprogram can also be performed through the access interface for remote and local interaction. The page access of the local subprogram can also be performed through the access interface in the application program equipped with the local subprogram or the access interface in the local subprogram application. The remote server is deployed with many virtual machines (virtual systems), and the program container runs on the virtual machine of the remote server. The program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram, so that when the exit status of the local subprogram is inconsistent with that of the remote subprogram, the exit status of the local subprogram and the remote subprogram are synchronized. Multiple subprograms can be run in the program container, or only one subprogram can be run.
[0138] The program container is installed in a virtual machine deployed on a remote server. It should be noted that the virtual machine here includes a single virtual machine deployed on a remote server or a group of virtual machines deployed on a remote server.
[0139] The program container refers to a running framework or running engine provided for a remote server. By installing the program container on a virtual machine deployed on a remote server, a remote subprogram can be run in the program container. The remote subprogram described in this embodiment is mounted on the program container run by the virtual machine of the remote server. The remote subprogram refers to a program function module or application component mounted on a remote server, or a program function module or application component loaded and installed by a remote server, such as a cloud applet.
[0140] like Figure 2 As shown, the remote server is a cloud server. A custom transmission control protocol is used between the cloud server and the terminal device for event or data communication. The local subprogram runs on the operating system of the terminal device. The cloud server is deployed with many virtual systems, the number of which is uncertain. The program container runs on the virtual system of the remote server. The program container has a detection service, which is used to detect the exit and running status of the local subprogram and the remote subprogram. Multiple subprograms can run in the program container, or only one subprogram can run.
[0141] In specific implementation, the triggering event of the local subroutine is detected, and the detected triggering event is uploaded to the remote server so that the remote server performs an event response. Correspondingly, the remote server obtains the triggering event of the local subroutine of the terminal device.
[0142] In actual applications, users can input interactive events through the interface configured by the local subprogram. In this case, the local subprogram does not respond to the interactive event, but intercepts the interactive event and uploads it to the remote server so that the remote server can respond to the interactive event. In an optional implementation provided by this embodiment, the specific implementation process of detecting the trigger event of the local subprogram and sending the trigger event to the remote server is as follows:
[0143] Acquire an interaction event submitted by a user triggering an interaction interface configured by the local subprogram;
[0144] The interaction event is intercepted and uploaded to the remote server.
[0145] After the remote server obtains the trigger event of the local subprogram, the remote server detects the collaborative state of the local subprogram and the corresponding remote subprogram in the program container; the collaborative state refers to the state in which the local subprogram and the remote subprogram cooperate to render the page. For example, the terminal device uploads the trigger event to the remote server, and renders the access page in the remote subprogram according to the interactive event to synchronize the state of the terminal device displaying the local subprogram. The collaborative state includes an interactive synchronization state, a startup synchronization state, and a local exit state. Among them, the interactive synchronization state is the collaborative state corresponding to the interactive event of the local subprogram, the startup synchronization state is the collaborative state corresponding to the startup request event of the local subprogram, and the local exit state is the collaborative state corresponding to the exit event of the local subprogram.
[0146] As described above, the detected collaboration states between the local subprogram and the remote subprogram include three, namely, interactive synchronization state, startup synchronization state, and local exit state. The following specifically describes the response process of triggering events under these three collaboration states.
[0147] (1) Collaborative state is interactive synchronization state
[0148] If the collaborative state is an interactive synchronization state, the trigger event is parsed to obtain the event type of the trigger event, and an event response action corresponding to the event type is executed based on the program container. Specifically, an event parsing model can be used to input the trigger event into the event parsing model for event type parsing, and obtain the event type corresponding to the trigger event output by the event parsing model.
[0149] Among them, the event type includes interaction event type, fallback event type and / or exit event type; for example, the interaction event is that the user triggers an interaction control configured in the local subprogram to input interaction information, or the user triggers a service request in the local subprogram to jump to the service page of the service, or the user triggers an interaction control configured in the local subprogram to request to display pop-up box information, the fallback event is that the user triggers the fallback control, and the exit event is that the user triggers the exit control.
[0150] In the specific implementation, after parsing the trigger event to obtain the event type of the trigger event, the remote server executes the event response action corresponding to the event type based on the program container, and synchronizes the sub-program page obtained after the action is executed to the terminal device, so as to display the sub-program page in the local sub-program of the terminal device, so as to ensure the page synchronization of the local sub-program and the remote sub-program. With the help of the huge data support of the remote server, the sub-program page of the remote sub-program is rendered and synchronized with the terminal device, so as to improve the performance and aesthetics of the local sub-program, and further enhance the user experience.
[0151] In specific implementation, the above-mentioned analysis of the triggering event obtains the event type of the triggering event. There are different solutions for different event types to perform event response actions in a targeted manner. In an optional implementation manner provided in this embodiment, the remote server performs the event response action corresponding to the event type in the following manner:
[0152] If the event type is an interactive event type, rendering an access page in the remote subprogram according to the triggering event; synchronizing the rendered access page to the terminal device;
[0153] If the event type is a rollback event type, determining whether the access page of the local subroutine corresponding to the triggering event has a parent page;
[0154] If it exists, the parent page is rendered in the remote subprogram according to the trigger event; and the rendered parent page is synchronized to the terminal device.
[0155] It should be added that if the access page of the local subprogram corresponding to the triggering event does not have an upper-level page, the remote server synchronizes the exit notification of the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether the page stack data is empty;
[0156] If it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access sequence recorded in the page stack data; synchronize the read access page to the terminal device;
[0157] If it is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
[0158] In addition, if the event type is an interactive event type, the remote server renders the access page in the remote subprogram based on the program container according to the trigger event; if the event type is a fallback event type, it is determined whether the access page of the local subprogram corresponding to the trigger event has a parent page;
[0159] If it exists, render the parent page in the remote subroutine according to the trigger event; if it does not exist, determine whether the page stack data is empty;
[0160] If it is not empty, query and read the access page of the previous local subprogram of the local subprogram according to the program access order recorded in the page stack data; if it is empty, send an exit instruction for the local subprogram to the terminal device, and release resources for the target virtual machine running the program container.
[0161] On this basis, in addition to the specific implementation process of executing the corresponding event response action when the trigger event is an interactive event type and a rollback event type provided above, when the event type is an exit event type, the remote server executes the event response action corresponding to the event type in the following manner:
[0162] If the event type is an exit event type, synchronizing an exit notification for the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether page stack data is empty;
[0163] If it is not empty, the access page of the previous local subprogram of the local subprogram is queried and read according to the program access sequence recorded in the page stack data.
[0164] In addition, the remote server can also execute the event response action corresponding to the event type in the following way: if the event type is an exit event type, determine whether the page stack data is empty; if not empty, query and read the access page of the previous local subroutine of the local subroutine according to the program access order recorded in the page stack data.
[0165] Further, on the basis of providing a specific implementation process for executing event response actions corresponding to the three event types, if the above-mentioned page stack data is empty, it means exiting the current local subprogram and there is no other local subprogram accessed before the current local subprogram. Specifically, the remote server performs the following operations: if the page stack data is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
[0166] Furthermore, the remote server provides a specific implementation process for executing event response actions corresponding to the three event types, and sends an exit instruction to the local subroutine to the terminal device when the page stack data is empty. Specifically, if it is detected that the local subroutine jumps from the first access page to the second access page, and then jumps back from the second access page to the first access page, the page record of the second access page is deleted from the page stack data.
[0167] For example, the local subroutine jumps from access page A to access page B, and then returns from access page B to access page A. The page record of access page B is deleted from the recorded page stack data to prevent page data from invalidly occupying storage resources and improve storage resource utilization.
[0168] (2) The collaborative state is the start synchronization state
[0169] The remote server allocates a corresponding virtual machine to the terminal device, and runs the program container and the remote subprogram in the program container on this basis, and performs page rendering of the access page in the remote subprogram. Specifically, in an optional implementation manner provided by this embodiment, the remote server further performs the following operations:
[0170] If the collaboration state is the start synchronization state, the corresponding target virtual machine is allocated to the terminal device in the virtual machine pool and the binding process is performed;
[0171] After the binding is completed, the target virtual machine is started, and a program container is started based on the target virtual machine;
[0172] Run the remote subprogram in the program container, and render the page for the remote subprogram based on the program container to obtain the access page;
[0173] Synchronize access to the page to the terminal device for display in the local subprogram.
[0174] Prior to this, the terminal device detects the startup request event of the local subprogram submitted by the user triggering the access control of the local subprogram, intercepts the startup request event and uploads it to the remote server. At this time, the local subprogram displays a startup screen, which may include a startup animation. Correspondingly, the remote server obtains the startup request event of the local subprogram of the terminal, and requests the remote server to allocate the corresponding target virtual machine through the startup request event. In the process of detecting the collaborative state between the local subprogram and the corresponding remote subprogram in the program container, the corresponding remote subprogram in the program container is empty, that is, it is not started. In this case, the collaborative state is the started collaborative state.
[0175] During the above-mentioned binding process, the remote server binds the device identifier of the terminal device with the virtual machine identifier of the target virtual machine; in addition, the account identifier of the local subprogram, the device identifier of the terminal device, and the virtual machine identifier of the target virtual machine may also be bound; and when the local subprogram carries a host application running on the terminal device, the account identifier of the host application and / or the device identifier of the terminal device and the virtual machine identifier of the target virtual machine may also be bound.
[0176] It should be noted that a certain number of virtual machines are deployed on the remote server, among which the virtual machine pool refers to a virtual machine pool composed of virtual machines corresponding to virtual machine identifiers that are not bound to the device identifiers of the terminal devices, that is, a group of idle and non-working virtual machines. In the process of binding the virtual machine identifier of the virtual machine with the device identifier of the terminal device, the virtual machine corresponding to the virtual machine identifier only provides services for the terminal device corresponding to the device identifier; the virtual machine includes a virtual system; the access page refers to the first page displayed after starting the local subroutine.
[0177] (3) The collaborative state is the start synchronization state
[0178] In addition, in addition to the above-mentioned collaborative state being the start synchronization state, the collaborative state can also be the local exit state, that is, when the local subroutine is detected to have exited, the remote server also performs the following operations:
[0179] If the collaboration state is the local exit state, the remote subprogram is exited in the program container, and resources are released for the target virtual machine running the program container;
[0180] The detection service of the program container sends detection messages to the terminal device according to a preset time period, and when it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, the collaborative state is determined to be a local exit state.
[0181] Specifically, in order to ensure that the exit status of the local subprogram is synchronized with that of the remote subprogram, when the local subprogram exits, the remote server releases the virtual machine resources in a timely manner to improve the resource utilization of the remote server. The remote server sends a detection message to the terminal device based on the program container's detection service according to a preset time period (for example, 1ms) to determine whether the local subprogram has exited by determining whether the local subprogram responds to the detection message. When it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, the collaborative state is determined to be the local exit state.
[0182] If the collaboration status is the local exit status, it means that the local subprogram has exited. Accordingly, in order to avoid the waste of resources caused by the remote server's virtual machine resources not being released when the local subprogram exits, and even other users being unable to request the remote server to allocate virtual machine resources, the remote server exits the remote subprogram in the program container and releases resources for the target virtual machine running the program container to improve resource utilization.
[0183] In addition, in actual applications, when the user inputs an exit event by means of gesture exit, the remote subprogram exits, but the local subprogram may not exit, and the local subprogram displays a black screen. Or, when the remote subprogram exits abnormally (such as flash exit), the exit message cannot be synchronized to the local subprogram, and the local subprogram displays a black screen, which reduces the user experience. To address this, the remote server detects the exit event of the remote subprogram based on the detection service of the program container, and promptly synchronizes the exit instruction for the local subprogram to the terminal device. The specific implementation process is as follows:
[0184] The detection service based on the program container detects the exit event of the remote subprogram;
[0185] If the exit event is an abnormal exit event, synchronizing an exit instruction for the local subprogram to the terminal device to exit the running of the local subprogram;
[0186] The program container is closed, and resources of the target virtual machine allocated to the terminal device are released.
[0187] Specifically, the detection service of the program container detects the exit event of the remote subprogram, which indicates that the remote subprogram has exited. If the exit event is a normal exit event, it means that when the local subprogram exits, the remote subprogram also exits. The exit event of the remote subprogram is a normal exit event and no processing is required at this time. If the exit event is an abnormal exit event, it means that the remote subprogram has exited while the local subprogram has not exited. This is an abnormal exit. At this time, the exit instruction for the local subprogram is synchronized to the terminal device. Accordingly, the terminal device exits the local subprogram, synchronizes the exit status of the local subprogram with the remote subprogram, closes the program container, and releases the target virtual machine resources in a timely manner, thereby improving the resource utilization of the cloud server for the virtual machine.
[0188] Step S604, receiving the subprogram page synchronized by the remote server.
[0189] The subprogram page is obtained after executing an event response action corresponding to the event type of the triggering event based on a program container; and the program container is installed in a virtual machine deployed by the remote server.
[0190] The above detects the trigger event of the local subroutine and uploads the trigger event to the remote server. Correspondingly, the remote server obtains the subroutine page after executing the event response action corresponding to the event type of the trigger event based on the program container. On this basis, this step receives the subroutine page synchronized by the remote server.
[0191] As described above, the remote server executes event response actions corresponding to the three event types of the trigger event respectively. If the event type is an interactive event type, the remote server renders the access page in the remote subroutine according to the trigger event; and synchronizes the rendered access page to the terminal device; accordingly, the terminal device receives the rendered access page synchronized by the remote server. The access page here refers to the page generated according to the trigger event. For example, when a user triggers a service in the local subroutine, it jumps to the access page of the service.
[0192] If the event type is a fallback event type, and the access page of the local subroutine corresponding to the trigger event has a parent page, the remote server renders the parent page in the remote subroutine according to the trigger event; the rendered parent page is synchronized to the terminal device, and accordingly, the terminal device receives the rendered parent page synchronized by the remote server.
[0193] If the event type is a rollback event type, and the access page of the local subroutine corresponding to the triggering event does not have an upper-level page, and the page stack data is empty, the remote server sends an exit instruction for the local subroutine to the terminal device, and releases resources for the target virtual machine running the program container. Correspondingly, the terminal device receives the exit instruction for the local subroutine sent by the remote server, and exits the running of the local subroutine based on the exit instruction.
[0194] If the event type is a fallback event type, and the access page of the local subroutine corresponding to the triggering event does not have an upper-level page, and the page stack data is not empty, the remote server queries and reads the access page of the previous local subroutine of the local subroutine according to the program access order recorded in the page stack data; and synchronizes the read access page to the terminal device; accordingly, the terminal device receives the access page of the previous local subroutine of the local subroutine synchronized by the remote server and queried and read.
[0195] Step S606: Execute page update processing for the local subprogram according to the subprogram page.
[0196] Based on the above-mentioned receiving of the subprogram page synchronized by the remote server, this step performs page update processing for the local subprogram according to the subprogram page; it should be noted that the page of the local subprogram here can be updated to other pages within the local subprogram or the access page of the previous local subprogram of the local subprogram, or other pages.
[0197] In a specific implementation, for the above-mentioned terminal device receiving the rendered parent page synchronously from the remote server, in an optional implementation provided by this embodiment, the terminal device performs the following operations in the process of executing the page update processing for the local subprogram according to the subprogram page:
[0198] The access page of the local subprogram is updated according to the parent page of the access page of the local subprogram synchronized by the remote server.
[0199] The access page here updates the page originally displayed by the local subroutine according to the parent page.
[0200] In an optional implementation manner provided by this embodiment, in the process of executing page update processing for the local subprogram according to the subprogram page, the terminal device performs the following operations:
[0201] The access page of the local subprogram is updated according to the access page of the previous local subprogram of the local subprogram synchronized by the remote server.
[0202] To summarize, the subprogram synchronization processing method provided in this embodiment first detects the trigger event of the local subprogram and uploads the trigger event to the remote server, then receives the subprogram page synchronized by the remote server, and finally performs page update processing for the local subprogram according to the subprogram page. By introducing a page synchronization mechanism between the local subprogram and the remote subprogram, the display page of the local subprogram is synchronized with the display page of the remote subprogram, thereby improving the user experience.
[0203] The following takes the application of a subroutine synchronization processing method provided in this embodiment in an interactive synchronization scenario as an example to further illustrate the subroutine synchronization processing method provided in this embodiment. Figure 3 , a subroutine synchronization processing method applied to an interactive synchronization scenario specifically includes the following steps.
[0204] Step S302, detecting the interaction events of the local subprogram, intercepting the interaction events and uploading them to the cloud server.
[0205] Step S318, receiving the access page of the previous local subprogram of the local subprogram synchronized by the cloud server.
[0206] Step S320: updating the access page of the local subprogram according to the access page of the previous local subprogram.
[0207] Step S324, receiving the exit instruction for the local subprogram synchronized by the cloud server, and exiting the running of the local subprogram.
[0208] The following uses the application of a subroutine synchronization processing method provided in this embodiment in a startup synchronization scenario as an example to further illustrate the subroutine synchronization processing method provided in this embodiment. Figure 4 , a subroutine synchronization processing method applied to start a synchronization scenario specifically includes the following steps.
[0209] Step S402, detecting a startup request event of a local subprogram, and uploading the startup request event to a cloud server.
[0210] Step S414, receiving the access page obtained by synchronous rendering from the cloud server, and displaying it in the local subprogram.
[0211] In summary, the subroutine synchronization processing method provided in this embodiment is:
[0212] An embodiment of a subroutine synchronization processing device provided in this specification is as follows:
[0213] In the above-mentioned embodiment, a subprogram synchronization processing method applied to a remote server is provided, and correspondingly, a subprogram synchronization processing device running on a remote server is also provided, which is described below with reference to the accompanying drawings.
[0214] Reference Figure 7 , which shows a schematic diagram of a subroutine synchronization processing device provided in this embodiment.
[0215] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0216] This embodiment provides a subroutine synchronization processing device, which runs on a remote server and includes:
[0217] The trigger event acquisition module 702 is configured to acquire a trigger event of a local subroutine of a terminal device;
[0218] A collaboration state detection module 704 is configured to detect a collaboration state between the local subprogram and a corresponding remote subprogram in a program container; the program container is installed in a virtual machine deployed by the remote server;
[0219] If the collaborative state is the interactive synchronization state, the event type parsing module 706 is executed, and the event type parsing module 706 is configured to parse the trigger event to obtain the event type of the trigger event;
[0220] The event response action execution module 708 is configured to execute the event response action corresponding to the event type based on the program container, and synchronize the sub-program page obtained after the action is executed to the terminal device.
[0221] Another embodiment of a subroutine synchronization processing device provided in this specification is as follows:
[0222] In the above-mentioned embodiment, a subprogram synchronization processing method applied to a terminal device is provided, and correspondingly, a subprogram synchronization processing device running on the terminal device is also provided, which is described below with reference to the accompanying drawings.
[0223] Reference Figure 8 , which shows a schematic diagram of a subroutine synchronization processing device provided in this embodiment.
[0224] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0225] This embodiment provides a subroutine synchronization processing device, which runs on a terminal device and includes:
[0226] The trigger event detection module 802 is configured to detect the trigger event of the local subroutine and upload the trigger event to the remote server;
[0227] The subprogram page receiving module 804 is configured to receive the subprogram page synchronized by the remote server; the subprogram page is obtained after the program container executes the event response action corresponding to the event type of the triggering event;
[0228] The page update processing module 806 is configured to perform page update processing for the local subprogram according to the subprogram page; wherein the program container is installed in a virtual machine deployed by the remote server.
[0229] An embodiment of a subroutine synchronization processing device provided in this specification is as follows:
[0230] Corresponding to the above-described subprogram synchronization processing method applied to a remote server, based on the same technical concept, one or more embodiments of this specification further provide a subprogram synchronization processing device, which is used to execute the above-provided subprogram synchronization processing method. Fig. 9 A schematic diagram of the structure of a subroutine synchronization processing device provided in one or more embodiments of this specification.
[0231] This embodiment provides a subroutine synchronization processing device, including:
[0232] like Fig. 9 As shown, the subroutine synchronization processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be a short-term storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the subroutine synchronization processing device. Furthermore, the processor 901 may be configured to communicate with the memory 902, and execute a series of computer executable instructions in the memory 902 on the subroutine synchronization processing device. The subroutine synchronization processing device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input / output interfaces 905, one or more keyboards 906, etc.
[0233] In a specific embodiment, the subroutine synchronization processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the subroutine synchronization processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0234] Get the trigger event of the local subroutine of the terminal device;
[0235] Detecting the collaborative state of the local subprogram and the corresponding remote subprogram in the program container; the program container is installed in a virtual machine deployed on a remote server;
[0236] If the collaborative state is an interactive synchronization state, parsing the trigger event to obtain an event type of the trigger event;
[0237] An event response action corresponding to the event type is executed based on the program container, and a subprogram page obtained after the action is executed is synchronized to the terminal device.
[0238] Another embodiment of a subroutine synchronization processing device provided in this specification is as follows:
[0239] Corresponding to the above-described subprogram synchronization processing method applied to a terminal device, based on the same technical concept, one or more embodiments of this specification also provide a subprogram synchronization processing device, which is used to execute the above-provided subprogram synchronization processing method. Fig.10 A schematic diagram of the structure of a subroutine synchronization processing device provided in one or more embodiments of this specification.
[0240] This embodiment provides a subroutine synchronization processing device, including:
[0241] like Fig.10As shown, the subroutine synchronization processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 1001 and memory 1002, and the memory 1002 may store one or more storage applications or data. Among them, the memory 1002 may be a short-term storage or a persistent storage. The application stored in the memory 1002 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the subroutine synchronization processing device. Furthermore, the processor 1001 may be configured to communicate with the memory 1002, and execute a series of computer executable instructions in the memory 1002 on the subroutine synchronization processing device. The subroutine synchronization processing device may also include one or more power supplies 1003, one or more wired or wireless network interfaces 1004, one or more input / output interfaces 1005, one or more keyboards 1006, etc.
[0242] In a specific embodiment, the subroutine synchronization processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the subroutine synchronization processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0243] Detecting a triggering event of a local subroutine and uploading the triggering event to a remote server;
[0244] Receiving a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the triggering event based on the program container;
[0245] Executing page update processing for the local subprogram according to the subprogram page;
[0246] The program container is installed in a virtual machine deployed on the remote server.
[0247] An embodiment of a storage medium provided in this specification is as follows:
[0248] Corresponding to the above-described method for synchronously processing a subprogram applied to a remote server, based on the same technical concept, one or more embodiments of this specification further provide a storage medium.
[0249] The storage medium provided in this embodiment is used to store computer executable instructions, and the computer executable instructions implement the following process when executed by a processor:
[0250] Get the trigger event of the local subroutine of the terminal device;
[0251] Detecting the collaborative state of the local subprogram and the corresponding remote subprogram in the program container; the program container is installed in a virtual machine deployed on a remote server;
[0252] If the collaborative state is an interactive synchronization state, parsing the trigger event to obtain an event type of the trigger event;
[0253] An event response action corresponding to the event type is executed based on the program container, and a subprogram page obtained after the action is executed is synchronized to the terminal device.
[0254] It should be noted that the embodiment of the storage medium in this specification and the embodiment of the subroutine synchronization processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0255] Another storage medium embodiment provided in this specification is as follows:
[0256] Corresponding to the above-described method for synchronously processing a subroutine applied to a terminal device, based on the same technical concept, one or more embodiments of this specification further provide a storage medium.
[0257] The storage medium provided in this embodiment is used to store computer executable instructions, and the computer executable instructions implement the following process when executed by a processor:
[0258] Detecting a triggering event of a local subroutine and uploading the triggering event to a remote server;
[0259] Receiving a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the triggering event based on the program container;
[0260] Executing page update processing for the local subprogram according to the subprogram page;
[0261] The program container is installed in a virtual machine deployed on the remote server.
[0262] It should be noted that the embodiment of the storage medium in this specification and the embodiment of the subroutine synchronization processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0263] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0264] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0265] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0266] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0267] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0268] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0269] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0270] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0271] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0272] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0273] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0274] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0275] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0276] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0277] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0278] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. A subroutine synchronization processing method, applied to a remote server, comprising: Get the trigger event of the local subroutine of the terminal device; Detecting a collaborative state between the local subprogram and a corresponding remote subprogram in a program container; The program container is installed in a virtual machine deployed by the remote server; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram is inconsistent with that of the remote subprogram; If the collaborative state is an interactive synchronization state, parsing the trigger event to obtain an event type of the trigger event; An event response action corresponding to the event type is executed based on the program container, and a subprogram page obtained after the action is executed is synchronized to the terminal device.
2. The subroutine synchronization processing method according to claim 1, wherein the executing the event response action corresponding to the event type comprises: If the event type is an interactive event type, rendering an access page in the remote subprogram according to the triggering event; If the event type is a rollback event type, determining whether the access page of the local subroutine corresponding to the triggering event has a parent page; If so, the parent page is rendered in the remote subprogram according to the trigger event.
3. The subroutine synchronization processing method according to claim 2, wherein the executing the event response action corresponding to the event type further comprises: If the event type is an exit event type, synchronizing an exit notification for the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether page stack data is empty; If it is not empty, the access page of the previous local subprogram of the local subprogram is queried and read according to the program access sequence recorded in the page stack data.
4. The subroutine synchronization processing method according to claim 3 further comprises: If the page stack data is empty, an exit instruction for the local subprogram is sent to the terminal device, and resources are released for the target virtual machine running the program container.
5. The subroutine synchronization processing method according to claim 4 further comprises: If it is detected that the local subroutine jumps from the first access page to the second access page and then jumps back from the second access page to the first access page, the page record of the second access page is deleted from the page stack data.
6. The subroutine synchronization processing method according to claim 1, further comprising: If the collaborative state is the start synchronization state, the corresponding target virtual machine is allocated to the terminal device in the virtual machine pool and a binding process is performed; After the binding is completed, the target virtual machine is started, and the program container is started based on the target virtual machine; Running the remote subprogram in the program container, and performing page rendering for the remote subprogram based on the program container to obtain an access page; The access page is synchronized to the terminal device for display in the local subprogram.
7. The subroutine synchronization processing method according to claim 6, wherein the binding processing comprises: Bind the device identifier of the terminal device to the virtual machine identifier of the target virtual machine.
8. The subroutine synchronization processing method according to claim 1, further comprising: If the collaborative state is a local exit state, exit the running of the remote subprogram in the program container, and release resources for the target virtual machine running the program container; The detection service of the program container sends detection messages to the terminal device according to a preset time period, and when it is detected that the number of detection messages to which the local subprogram has not responded exceeds a preset number, it is determined that the collaborative state is a local exit state.
9. According to the subroutine synchronization processing method according to claim 1, the trigger event includes an interaction event intercepted and uploaded by the terminal device; after the terminal device detects that the user triggers the interaction event submitted by the interaction interface configured by the local subroutine, the terminal device intercepts the interaction event.
10. The subroutine synchronization processing method according to claim 1, further comprising: Detecting an exit event of the remote subprogram based on a detection service of the program container; If the exit event is an abnormal exit event, synchronizing an exit instruction for the local subprogram to the terminal device to exit the running of the local subprogram; The program container is closed, and resources of the target virtual machine allocated to the terminal device are released.
11. A subroutine synchronization processing method, applied to a terminal device, comprising: Detecting a triggering event of a local subroutine and uploading the triggering event to a remote server; Receiving a subprogram page synchronized by the remote server; The subprogram page is obtained after executing an event response action corresponding to the event type of the trigger event based on the program container; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram in the program container, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram is inconsistent with that of the remote subprogram; Executing page update processing for the local subprogram according to the subprogram page; The program container is installed in a virtual machine deployed on the remote server.
12. The subroutine synchronization processing method according to claim 11, wherein the executing the event response action corresponding to the event type of the triggering event comprises: If the event type is an interactive event type, rendering an access page in the remote subprogram according to the triggering event; If the event type is a rollback event type, determining whether the access page of the local subroutine corresponding to the triggering event has a parent page; If so, the parent page is rendered in the remote subprogram according to the trigger event.
13. The subroutine synchronization processing method according to claim 12, wherein the executing the event response action corresponding to the event type of the triggering event further comprises: If the event type is an exit event type, synchronizing an exit notification for the local subprogram to the detection service of the program container to record the exit status of the local subprogram and determine whether page stack data is empty; If it is not empty, the access page of the previous local subprogram of the local subprogram is queried and read according to the program access sequence recorded in the page stack data.
14. The subprogram synchronization processing method according to claim 11, wherein the performing page update processing for the local subprogram according to the subprogram page comprises: The access page of the local subprogram is updated according to the parent page of the access page of the local subprogram synchronized by the remote server.
15. The subprogram synchronization processing method according to claim 11, wherein the performing page update processing for the local subprogram according to the subprogram page comprises: The access page of the local subprogram is updated according to the access page of the previous local subprogram of the local subprogram synchronized by the remote server.
16. The subroutine synchronization processing method according to claim 13, further comprising: If the page stack data is empty, an exit instruction for the local subprogram sent by the remote server is received, and the local subprogram is exited based on the exit instruction.
17. The subprogram synchronization processing method according to claim 11, wherein the detecting a triggering event of a local subprogram and uploading the triggering event to a remote server comprises: Acquire an interaction event submitted by a user triggering an interaction interface configured by the local subprogram; The interaction event is intercepted and uploaded to the remote server.
18. A subroutine synchronization processing device, running on a remote server, comprising: A trigger event acquisition module, configured to acquire a trigger event of a local subroutine of a terminal device; A collaborative state detection module is configured to detect the collaborative state of the local subprogram and the corresponding remote subprogram in the program container; the program container is installed in a virtual machine deployed by the remote server; the program container has a detection service, and the detection service is used to detect the exit and running state of the local subprogram and the remote subprogram, so as to synchronize the exit state of the local subprogram with the remote subprogram when the exit state of the local subprogram is inconsistent with that of the remote subprogram; If the collaborative state is an interactive synchronization state, an event type parsing module is run, and the event type parsing module is configured to parse the trigger event to obtain the event type of the trigger event; The event response action execution module is configured to execute the event response action corresponding to the event type based on the program container, and synchronize the sub-program page obtained after the action is executed to the terminal device.
19. A subroutine synchronization processing device, running on a terminal device, comprising: A trigger event detection module, configured to detect a trigger event of a local subroutine and upload the trigger event to a remote server; A subprogram page receiving module is configured to receive a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the triggering event based on the program container; the program container has a detection service, the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram in the program container, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram is inconsistent with that of the remote subprogram; The page update processing module is configured to perform page update processing for the local subprogram according to the subprogram page; wherein the program container is installed in a virtual machine deployed by the remote server.
20. A subroutine synchronization processing device, comprising: processor; as well as, a memory configured to store computer executable instructions which, when executed, cause the processor to: Get the trigger event of the local subroutine of the terminal device; Detecting the collaborative status of the local subprogram and the corresponding remote subprogram in the program container; the program container is installed in a virtual machine deployed by a remote server; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram and the remote subprogram are inconsistent; If the collaborative state is an interactive synchronization state, parsing the trigger event to obtain an event type of the trigger event; An event response action corresponding to the event type is executed based on the program container, and a subprogram page obtained after the action is executed is synchronized to the terminal device.
21. A subroutine synchronization processing device, comprising: processor; as well as, a memory configured to store computer executable instructions which, when executed, cause the processor to: Detecting a triggering event of a local subroutine and uploading the triggering event to a remote server; Receiving a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the trigger event based on the program container; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram in the program container, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram is inconsistent with that of the remote subprogram; Executing page update processing for the local subprogram according to the subprogram page; The program container is installed in a virtual machine deployed on the remote server.
22. A storage medium for storing computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the following process: Get the trigger event of the local subroutine of the terminal device; Detecting the collaborative status of the local subprogram and the corresponding remote subprogram in the program container; the program container is installed in a virtual machine deployed by a remote server; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram and the remote subprogram are inconsistent; If the collaborative state is an interactive synchronization state, parsing the trigger event to obtain an event type of the trigger event; An event response action corresponding to the event type is executed based on the program container, and a subprogram page obtained after the action is executed is synchronized to the terminal device.
23. A storage medium for storing computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the following process: Detecting a triggering event of a local subroutine and uploading the triggering event to a remote server; Receiving a subprogram page synchronized by the remote server; the subprogram page is obtained after executing an event response action corresponding to the event type of the trigger event based on the program container; the program container has a detection service, and the detection service is used to detect the exit and running status of the local subprogram and the remote subprogram in the program container, so as to synchronize the exit status of the local subprogram with the remote subprogram when the exit status of the local subprogram is inconsistent with that of the remote subprogram; Executing page update processing for the local subprogram according to the subprogram page; The program container is installed in a virtual machine deployed on the remote server.
