Applet running method, system, device and medium
By connecting the mini-program logic execution interface and application programming interface to the target vehicle operating system in the mini-program's running method, the problem of low compatibility of mini-programs running on different operating systems is solved, and cross-operating system compatibility and cost optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZEBRED NETWORK TECH CO LTD
- Filing Date
- 2022-10-13
- Publication Date
- 2026-05-08
AI Technical Summary
The existing methods for running mini-programs require separate development for different operating systems, resulting in low compatibility.
By acquiring user action events of the mini-program, calling the mini-program logic execution interface, and connecting to the corresponding interface of the target vehicle operating system, the application programming interface information is output, and then the application programming interface is called to enable the mini-program to run on different vehicle operating systems.
It improves the compatibility of mini-program operation methods and reduces development and maintenance costs.
Smart Images

Figure CN115437722B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular to a method, system, device and medium for running a small program. Background Technology
[0002] With the rapid development of technology, all kinds of applications have emerged. However, users need to download and install the application package before they can use it. The emergence of mini-programs solves this problem, as mini-programs can be used without users having to download and install them.
[0003] In existing technologies, mini-programs require a mini-program runtime system to run. For in-vehicle terminals, since different in-vehicle terminals run different operating systems, different mini-program runtime systems need to be developed for different operating systems. The mini-program runtime system provides the mini-program running methods, so the running methods corresponding to different operating systems are also different.
[0004] In summary, existing methods for running mini-programs require separate development for different operating systems, resulting in low compatibility. Summary of the Invention
[0005] This application provides a method, system, device, and medium for running mini-programs, which addresses the problem that existing mini-program running methods require separate development for different operating systems and use different running methods to run mini-programs, resulting in low compatibility of mini-program running methods.
[0006] In a first aspect, embodiments of this application provide a method for running a mini-program, including:
[0007] Based on the user's operation events in the mini-program, call the mini-program logic execution interface;
[0008] By connecting the operation event-operating system interface with the target vehicle operating system, the applet logic execution interface is connected to the target vehicle operating system, so that the applet running engine in the target vehicle operating system runs the applet according to the operation event and outputs the application programming interface information corresponding to the operation event. The operation event-operating system interface is different for different vehicle operating systems.
[0009] Based on the obtained application programming interface information, determine the application programming interface corresponding to the application programming interface information;
[0010] Call the application programming interface;
[0011] The application programming interface is connected to the target vehicle operating system via the mini-program interface function - operating system docking interface, so that the target vehicle operating system can complete the operation event.
[0012] In one specific embodiment, the method further includes:
[0013] Call the rendering interface;
[0014] The rendering function-operating system interface corresponding to the target vehicle operating system is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system renders the mini-program and displays the operation event completion interface. The rendering function-operating system interface is different for different vehicle operating systems.
[0015] In one specific implementation, before invoking the mini-program logic execution interface based on the acquired user operation events of the mini-program, the method further includes:
[0016] In response to the user's action of opening the mini-program, the rendering interface is called;
[0017] The rendering function-operating system interface is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system can create a local window;
[0018] Call the mini-program logic execution interface;
[0019] Through the operation event-operating system interface, the mini-program logic execution interface is connected to the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system runs the mini-program and outputs mini-program startup rendering data;
[0020] Call the rendering interface;
[0021] The rendering function-operating system interface is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system can render and generate the mini-program startup interface according to the mini-program startup rendering data, and the mini-program startup interface is in the local window.
[0022] In one specific implementation, after responding to the user's action of opening the mini-program, the method further includes:
[0023] The installation package of the mini-program is downloaded, verified, and installed.
[0024] In one specific implementation, after determining the application programming interface (API) corresponding to the obtained API information, the method further includes:
[0025] Determine whether the application programming interface is a valid interface;
[0026] Accordingly, calling the application programming interface includes:
[0027] If the application programming interface is a valid interface, then call the application programming interface.
[0028] Secondly, embodiments of this application provide a mini-program running system, including:
[0029] The control module is used to call the mini-program logic execution interface based on the acquired user operation events.
[0030] The system adaptation module is used to connect the mini-program logic execution interface with the target vehicle operating system through the operation event-operating system interface corresponding to the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system runs the mini-program according to the operation event and outputs the application programming interface information corresponding to the operation event. The operation event-operating system interface is different for different vehicle operating systems.
[0031] The resource module is used to determine the application programming interface corresponding to the obtained application programming interface information.
[0032] The control module is also used to call the application programming interface;
[0033] The user interface function adaptation module is used to connect the application programming interface and the target vehicle operating system through the applet interface function-operating system interface corresponding to the target vehicle operating system, so that the target vehicle operating system can complete the operation event.
[0034] In one specific implementation, the control module is further configured to call the rendering interface;
[0035] The system adaptation module is also used to connect the rendering interface to the target vehicle operating system through the rendering function-operating system interface corresponding to the target vehicle operating system, so that the rendering engine in the target vehicle operating system renders the mini-program and displays the operation event completion interface. The rendering function-operating system interface is different for different operating systems.
[0036] In one specific embodiment, the control module is further configured to:
[0037] In response to the user's action of opening the mini-program, the rendering interface is called;
[0038] The system adaptation module is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system can create a local window;
[0039] The control module is also used to call the applet logic execution interface;
[0040] The system adaptation module is also used to connect the mini-program logic execution interface and the target vehicle operating system through the operation event-operating system interface, so that the mini-program running engine in the target vehicle operating system runs the mini-program and outputs mini-program startup rendering data;
[0041] The control module is also used to call the rendering interface;
[0042] The system adaptation module is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system renders and generates the mini-program startup interface according to the mini-program startup rendering data, and the mini-program startup interface is in the local window.
[0043] In one specific implementation, the control module is further configured to download, verify, and install the installation package of the mini-program.
[0044] In one specific embodiment, the control module is further configured to:
[0045] Determine whether the application programming interface is a valid interface;
[0046] If the application programming interface is a valid interface, then call the application programming interface.
[0047] Thirdly, embodiments of this application provide an electronic device, including:
[0048] Processor, memory, communication interface;
[0049] The memory is used to store the executable instructions of the processor;
[0050] The processor is configured to execute the applet running method described in any of the first aspects by executing the executable instructions.
[0051] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the applet running method described in any of the first aspects.
[0052] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement the applet running method described in any of the first aspects.
[0053] The mini-program running method, system, device, and medium provided in this application, after obtaining the user's operation event, call the mini-program logic execution interface, and then connect the mini-program logic execution interface with the target vehicle operating system. This allows the target vehicle operating system to run the mini-program based on the operation event and output the corresponding application programming interface (API) information. Then, the corresponding API is called again, connecting the API with the target vehicle operating system, so that the target vehicle operating system completes the operation event. This solution improves the compatibility of the mini-program running method by connecting the mini-program logic execution interface with the target vehicle operating system and connecting the API with the target vehicle operating system, while also reducing development and maintenance costs. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A flowchart illustrating an embodiment of the method for running a mini-program provided in this application;
[0056] Figure 2 A flowchart illustrating Embodiment 2 of the method for running a mini-program provided in this application;
[0057] Figure 3 A flowchart illustrating Embodiment 3 of the method for running a mini-program provided in this application;
[0058] Figure 4 A flowchart illustrating Embodiment 4 of the method for running a mini-program provided in this application;
[0059] Figure 5 This is a schematic diagram of the structure of an embodiment of the mini-program running system provided in this application;
[0060] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0062] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0063] With the rapid development of technology, people no longer need to download and install applications; they can directly use mini-programs to meet their needs.
[0064] In existing technologies, when a mini-program is running, different in-vehicle operating systems, such as Android, AliOS, and Linux, require different mini-program runtime systems to run the mini-program. This means that different mini-program runtime methods are used to run the mini-program. In the process of completing user operation events in the mini-program, the parts that need to be completed by the in-vehicle operating system directly call the corresponding operating system's interface, resulting in low compatibility of the mini-program runtime methods.
[0065] To address the problems existing in the prior art, the inventors, during their research on the mini-program running method, discovered that to improve the compatibility of the mini-program running method, the in-vehicle operating system and the mini-program running system can be decoupled. After obtaining the user's operation event and calling the mini-program logic execution interface, the mini-program logic execution interface is connected to the target in-vehicle operating system. This allows the mini-program running engine in the target in-vehicle operating system to run the mini-program according to the operation event and output the application programming interface information corresponding to the operation event. Then, the application programming interface corresponding to the application programming interface information is called, connecting the application programming interface to the target in-vehicle operating system, enabling the target in-vehicle operating system to complete the operation event. By connecting the mini-program logic execution interface and the target in-vehicle operating system, and the application programming interface and the target in-vehicle operating system, the compatibility of the mini-program running method is improved, while development and maintenance costs are reduced. Based on the above inventive concept, the mini-program running scheme of this application was designed.
[0066] The execution subject of the mini-program running method in this application can be an in-vehicle terminal, a terminal device, or a computer, server, or other device capable of running mini-programs and in-vehicle operating systems. This application does not limit it. The following explanation uses an in-vehicle terminal as an example.
[0067] The following describes the application scenarios of the mini-program running method provided in this application.
[0068] For example, in this application scenario, a user drives a vehicle on the road, the vehicle is equipped with an in-vehicle terminal, the in-vehicle terminal is equipped with the mini-program running system provided in this application, and can run mini-programs.
[0069] After the mini-program is launched, the corresponding mini-program interface is displayed on the in-vehicle terminal, where users can perform operations. For example, if a user wants to open the sunroof via the mini-program, they can click the corresponding button on the mini-program interface. The mini-program's operating system on the in-vehicle terminal will then receive the operation event as "open sunroof."
[0070] After calling the mini-program logic execution interface, the mini-program runtime system connects the mini-program logic execution interface with the target vehicle operating system through the operation event-operating system interface corresponding to the target vehicle operating system. This enables the mini-program runtime engine in the target vehicle operating system of the vehicle terminal to run the mini-program according to the operation event and output the application programming interface information corresponding to opening the sunroof.
[0071] The mini-program then runs the system and calls the corresponding sunroof opening application programming interface (API) information. Through the mini-program interface function-operating system interface corresponding to the target vehicle operating system, it connects the sunroof opening API with the target vehicle operating system, enabling the target vehicle operating system to control the sunroof opening.
[0072] It should be noted that vehicle-mounted terminals include, but are not limited to, devices that communicate via data connections / networks and / or via wireless interfaces, such as devices for cellular networks and wireless local area networks (WLANs). Examples of vehicle-mounted terminals include, but are not limited to, satellite or cellular phones; personal communications system (PCS) terminals that can combine cellular radiotelephones with data processing, fax, and data communication capabilities; personal digital assistants (PDAs) that may include radiotelephones, pagers, internet / intranet access, web browsers, notebooks, calendars, and / or Global Positioning System (GPS) receivers; and conventional laptop and / or handheld receivers or other electronic devices that include radiotelephone transceivers. The term can refer to access terminals, user units, user stations, mobile stations, mobile stations, remote stations, remote terminals, mobile devices, user terminals, terminals, wireless communication equipment, user agents, or user devices. Access terminals can be cellular phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, PDAs, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal devices in 5G networks, terminal devices in satellite networks, or terminal devices in future PLMNs, etc., and this solution does not impose any restrictions on them.
[0073] It should be noted that the above scenario is only an example of an application scenario provided by the embodiments of this application. The embodiments of this application do not limit the actual form of the various devices included in the scenario. In the specific application of the solution, it can be set according to actual needs.
[0074] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0075] Figure 1This is a flowchart illustrating an embodiment of the mini-program operation method provided in this application. This embodiment describes the process of obtaining an operation event, calling the mini-program logic execution interface, connecting the mini-program logic execution interface and the target vehicle operating system to obtain application programming interface (API) information, and then calling the API, connecting the API and the target vehicle operating system to complete the operation event. The method in this embodiment can be implemented through software, hardware, or a combination of both. Figure 1 As shown, the specific steps for running this mini-program are as follows:
[0076] S101: Based on the obtained user operation events of the mini program, call the mini program logic execution interface.
[0077] Users can use mini-programs on the in-vehicle terminal and trigger corresponding operation events on the mini-program interface according to their needs. The mini-program operating system on the in-vehicle terminal can then obtain the operation events of the mini-program.
[0078] In this step, after the vehicle terminal obtains the operation event, it calls the mini-program logic execution interface according to the operation event, so that the mini-program can execute the corresponding logic code according to the operation event.
[0079] It should be noted that the operation events can be opening the sunroof, turning on Bluetooth, opening the map, voice control, etc. This application embodiment does not limit the operation events, and can be determined according to the actual situation.
[0080] S102: By connecting the operation event-operating system interface corresponding to the target vehicle operating system, the applet logic execution interface is connected to the target vehicle operating system, so that the applet running engine in the target vehicle operating system runs the applet according to the operation event and outputs the application programming interface information corresponding to the operation event.
[0081] In this step, after the vehicle terminal's mini-program execution system calls the mini-program logic execution interface, since the mini-program's logic code needs to run in the mini-program execution engine of the target vehicle operating system, and the mini-program logic execution interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the mini-program logic execution interface with the target vehicle operating system through the operation event-operating system interface corresponding to the target vehicle operating system. This allows the mini-program execution engine in the target vehicle operating system to run the mini-program according to the operation event and output the application programming interface information corresponding to the operation event.
[0082] It should be noted that different in-vehicle operating systems have different operation event-operating system interface. By connecting the mini-program logic execution interface with the target in-vehicle operating system, the compatibility of the mini-program's running method can be improved.
[0083] It should be noted that different operation events correspond to different application programming interface (API) information. For example, for an operation event of opening the sunroof, the corresponding API information is the identifier of the sunroof opening interface; for an operation event of turning on Bluetooth, the corresponding API information is the identifier of the Bluetooth opening interface; and for an operation event of adjusting the temperature, the corresponding API information is the storage path of the temperature adjustment interface. This application does not limit the operation events and their corresponding API information; these can be determined according to the actual situation.
[0084] S103: Based on the obtained application programming interface information, determine the application programming interface corresponding to the application programming interface information.
[0085] In this step, the vehicle terminal's mini-program runtime system interfaces with the mini-program logic execution interface and the target vehicle operating system. After the target vehicle operating system outputs the application programming interface information, the corresponding application programming interface can be determined based on the obtained application programming interface information, since the vehicle terminal's mini-program runtime system stores the correspondence between application programming interface information and application programming interfaces.
[0086] S104: Call the application programming interface.
[0087] In this step, after the vehicle terminal's mini-program operating system determines the application programming interface, it needs to call the application programming interface in order to complete the operation event.
[0088] S105: Connect the application programming interface to the target vehicle operating system through the corresponding mini-program interface function - operating system interface, so that the target vehicle operating system can complete the operation event.
[0089] In this step, after the vehicle terminal's mini-program running system calls the application programming interface, the completion of the operation event requires control by the target vehicle operating system. Since the application programming interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the application programming interface and the target vehicle operating system through the mini-program interface function-operating system interface corresponding to the target vehicle operating system so that the target vehicle operating system can complete the operation event.
[0090] The mini-program running method provided in this embodiment calls the mini-program logic execution interface after obtaining an operation event. Then, to run the mini-program according to the operation event, it interfaces with the target vehicle operating system, causing the target vehicle operating system to output application programming interface (API) information. It then calls the corresponding API to complete the operation event, connecting the API with the target vehicle operating system so that the target vehicle operating system completes the operation event. Compared to existing technologies where one vehicle operating system corresponds to one mini-program running method, this solution, by connecting both the mini-program logic execution interface and the target vehicle operating system, enables the mini-program to run on multiple vehicle operating systems using a single running method. This improves the compatibility of the mini-program running method while reducing development and maintenance costs.
[0091] Figure 2 This is a flowchart illustrating a second embodiment of the mini-program operation method provided in this application. Based on the above embodiments, this application describes the display of the corresponding interface on the vehicle terminal after the operation event is completed. Figure 2 As shown, the specific steps for running this mini-program are as follows:
[0092] S201: Call the rendering interface.
[0093] For some operation events, it is necessary to display the corresponding operation event completion interface on the vehicle terminal. For example, if the operation event is to turn on Bluetooth, the interface needs to display information that Bluetooth is turned on, as well as information on Bluetooth devices that can be connected; if the operation event is to select a playlist, the interface needs to display the songs included in the playlist, etc.
[0094] In this step, after the operating system of the vehicle terminal completes the operation event, the mini-program running system of the vehicle terminal will call the rendering interface so that the corresponding interface can be generated in the subsequent rendering.
[0095] S202: Through the rendering function corresponding to the target vehicle operating system - the operating system interface, the rendering interface is connected to the target vehicle operating system so that the rendering engine in the target vehicle operating system renders the applet and displays the operation event completion interface.
[0096] In this step, after the mini-program running system of the vehicle terminal calls the rendering interface, since the rendering interface of the operation event needs to be completed in the rendering engine of the target vehicle operating system, and the rendering interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface corresponding to the target vehicle operating system, so that the rendering engine in the target vehicle operating system can render the mini-program and display the operation event completion interface.
[0097] It should be noted that different in-vehicle operating systems have different rendering functions and operating system interface interfaces. By connecting the rendering interface with the target in-vehicle operating system, the compatibility of the mini-program's running method can be improved.
[0098] The mini-program running method provided in this embodiment connects the rendering interface with the target vehicle operating system, enabling the rendering engine in the target vehicle operating system to render the mini-program and display the operation event completion interface. This improves the compatibility of the mini-program running method, ensures the normal execution of the mini-program, enhances the user experience, and also reduces development and maintenance costs.
[0099] Figure 3 This is a flowchart illustrating a third embodiment of the mini-program operation method provided in this application. Based on the above embodiments, this application describes the process by which the vehicle terminal responds to the user's mini-program opening operation by connecting the rendering interface with the target vehicle operating system and the mini-program logic execution interface with the target vehicle operating system, thereby displaying the corresponding interface on the vehicle terminal. For example... Figure 3 As shown, the specific steps for running this mini-program are as follows:
[0100] S301: In response to the user's action of opening the mini-program, the rendering interface is called.
[0101] In this step, when the user opens the mini-program, the corresponding mini-program interface needs to be displayed. Since the mini-program interface consists of two parts, the local window and the mini-program startup interface, the local window needs to be created first. This requires the mini-program running system of the vehicle terminal to call the rendering interface so that the local window can be created later.
[0102] S302: Through the rendering function-operating system interface, the rendering interface is connected to the target vehicle operating system, so that the target vehicle operating system can create a local window based on the rendering engine.
[0103] In this step, after the mini-program running system of the vehicle terminal calls the rendering interface, since the local window needs to be completed in the rendering engine of the target vehicle operating system, and the rendering interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface so that the target vehicle operating system can create a local window according to the rendering engine.
[0104] S303: Call the WeChat Mini Program logic execution interface.
[0105] In this step, after the vehicle terminal creates a local window, it needs to generate the mini-program startup interface. This requires calling the mini-program logic execution interface first, so that rendering data can be obtained later to generate the mini-program startup interface.
[0106] S304: Through the operation event-operating system interface, it connects the mini-program logic execution interface with the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system can run the mini-program and output the mini-program startup rendering data.
[0107] In this step, after the vehicle terminal's mini-program execution system calls the mini-program logic execution interface, since the mini-program's logic code needs to run in the mini-program execution engine in the target vehicle operating system, and the mini-program logic execution interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the mini-program logic execution interface and the target vehicle operating system through the operation event-operating system interface so that the mini-program execution engine in the target vehicle operating system can run the mini-program and output the mini-program startup rendering data.
[0108] S305: Call the rendering interface.
[0109] In this step, after the target vehicle operating system outputs the mini-program startup rendering data, the mini-program running system of the vehicle terminal can obtain it, and then call the rendering interface according to the mini-program startup rendering data. That is, the mini-program startup rendering data is input into the rendering interface so that the mini-program startup interface can be generated later.
[0110] S306: Through the rendering function-operating system interface, the rendering interface is connected to the target vehicle operating system, so that the rendering engine in the target vehicle operating system can render and generate the mini-program startup interface based on the mini-program startup rendering data.
[0111] In this step, after the vehicle terminal's mini-program running system calls the rendering interface, since the mini-program startup interface needs to be completed in the rendering engine of the target vehicle operating system, and the rendering interface and the target vehicle operating system cannot communicate directly, it is necessary to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system can render and generate the mini-program startup interface according to the mini-program startup rendering data. The mini-program startup interface is in the local window, and the complete mini-program interface is obtained.
[0112] It should be noted that if the mini-program is launched for the first time, since there is no corresponding mini-program installation package in the vehicle terminal, the installation package of the mini-program needs to be downloaded, verified and installed in response to the user's opening of the mini-program before calling the rendering interface.
[0113] The mini-program running method provided in this embodiment improves the compatibility of the mini-program running method by connecting the rendering interface with the target vehicle operating system and the mini-program logic execution interface with the target vehicle operating system during the mini-program startup process, while reducing development and maintenance costs.
[0114] Figure 4 This is a flowchart illustrating Embodiment 4 of the mini-program operation method provided in this application. Based on the above embodiments, this application embodiment describes the verification of the application programming interface during the completion of the operation event. Figure 4 As shown, the specific steps for running this mini-program are as follows:
[0115] S401: Based on the obtained application programming interface (API) information, determine the application programming interface corresponding to the API information.
[0116] In this step, the vehicle terminal's mini-program runtime system interfaces with the mini-program logic execution interface and the target vehicle operating system. After the target vehicle operating system outputs the application programming interface information, the corresponding application programming interface can be determined based on the obtained application programming interface information, since the vehicle terminal's mini-program runtime system stores the correspondence between application programming interface information and application programming interfaces.
[0117] S402: Determine whether the application programming interface is a valid interface; if the application programming interface is a valid interface, proceed to step S403; if the application programming interface is an invalid interface, proceed to step S404.
[0118] S403: Call the application programming interface.
[0119] S404: End the execution of the plan.
[0120] In the above steps, after determining the application programming interface, the vehicle terminal's mini-program operating system needs to determine whether the application programming interface is a valid interface in order to improve the operational security of the mini-program.
[0121] If the application programming interface (API) is a valid API, it means that the API is secure and can be called.
[0122] If the application programming interface is an illegal interface, it means that this application programming interface is insecure, and the execution of this solution will end.
[0123] It should be noted that methods for determining whether an application programming interface (API) is a legitimate interface can include checking if the API is on a preset whitelist; performing signature verification on the API; or verifying the API's validity period. This application does not limit the methods for determining whether an API is a legitimate interface; these methods can be set according to actual circumstances.
[0124] The method for running a mini-program provided in this embodiment improves the security of mini-program operation by verifying the application programming interface after it is determined.
[0125] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0126] Figure 5 This is a schematic diagram illustrating the structure of an embodiment of the mini-program running system provided in this application. Figure 5 As shown, the mini-program operating system 50 includes:
[0127] Control module 51 is used to call the mini-program logic execution interface based on the obtained operation events of the mini-program user;
[0128] System adaptation module 52 is used to connect the mini-program logic execution interface to the target vehicle operating system through the operation event-operating system interface corresponding to the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system runs the mini-program according to the operation event and outputs the application programming interface information corresponding to the operation event. The operation event-operating system interface is different for different vehicle operating systems.
[0129] Resource module 53 is used to determine the application programming interface corresponding to the obtained application programming interface information based on the obtained application programming interface information.
[0130] The control module 51 is also used to call the application programming interface;
[0131] The user interface function adaptation module 54 is used to connect the application programming interface with the target vehicle operating system through the applet interface function-operating system interface corresponding to the target vehicle operating system, so that the target vehicle operating system can complete the operation event.
[0132] Furthermore, the control module 51 is also used to call the rendering interface;
[0133] Furthermore, the system adaptation module 52 is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface corresponding to the target vehicle operating system, so that the rendering engine in the target vehicle operating system renders the mini-program and displays the operation event completion interface. The rendering function-operating system interface is different for different operating systems.
[0134] Furthermore, the control module 51 is also used for:
[0135] In response to the user's action of opening the mini-program, the rendering interface is called;
[0136] Furthermore, the system adaptation module 52 is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system can create a local window;
[0137] Furthermore, the control module 51 is also used to call the applet logic execution interface;
[0138] Furthermore, the system adaptation module 52 is also used to connect the mini-program logic execution interface and the target vehicle operating system through the operation event-operating system interface, so that the mini-program running engine in the target vehicle operating system runs the mini-program and outputs mini-program startup rendering data;
[0139] Furthermore, the control module 51 is also used to call the rendering interface;
[0140] Furthermore, the system adaptation module 52 is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system renders and generates the mini-program startup interface according to the mini-program startup rendering data, and the mini-program startup interface is in the local window.
[0141] Furthermore, the control module 51 is also used to download, verify, and install the installation package of the mini-program.
[0142] Furthermore, the control module 51 is also used for:
[0143] Determine whether the application programming interface is a valid interface;
[0144] If the application programming interface is a valid interface, then call the application programming interface.
[0145] Furthermore, the resource module 53 is also used to provide components.
[0146] Furthermore, the control layer 51 is also used for:
[0147] Distribute application programming interfaces;
[0148] Generate and update the node tree based on the operation of the mini-program;
[0149] Control the communication between the mini-program runtime container and the mini-program;
[0150] Create a thread to run the mini-program.
[0151] The mini-program running system provided in this embodiment is used to execute the technical solutions in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0152] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 includes:
[0153] Processor 61, memory 62, and communication interface 63;
[0154] The memory 62 is used to store the executable instructions of the processor 61;
[0155] The processor 61 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.
[0156] Optionally, the memory 62 can be either standalone or integrated with the processor 61.
[0157] Optionally, when the memory 62 is a device independent of the processor 61, the electronic device 60 may further include:
[0158] Bus 64, memory 62 and communication interface 63 are connected to processor 61 through bus 64 and complete communication with each other. Communication interface 63 is used to communicate with other devices.
[0159] Optionally, the communication interface 63 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0160] Bus 64 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0161] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0162] The electronic device is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0163] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.
[0164] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.
[0165] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for running a mini-program, characterized in that, include: Based on the user's operation events in the mini-program, call the mini-program logic execution interface; By connecting the operation event-operating system interface with the target vehicle operating system, the applet logic execution interface is connected to the target vehicle operating system, so that the applet running engine in the target vehicle operating system runs the applet according to the operation event and outputs the application programming interface information corresponding to the operation event. The operation event-operating system interface is different for different vehicle operating systems. Based on the obtained application programming interface information, determine the application programming interface corresponding to the application programming interface information; Call the application programming interface; The application programming interface is connected to the target vehicle operating system via the mini-program interface function - operating system docking interface, so that the target vehicle operating system can complete the operation event.
2. The method according to claim 1, characterized in that, The method further includes: Call the rendering interface; The rendering function-operating system interface corresponding to the target vehicle operating system is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system renders the mini-program and displays the operation event completion interface. The rendering function-operating system interface is different for different vehicle operating systems.
3. The method according to claim 2, characterized in that, Before calling the mini-program logic execution interface based on the obtained user operation events, the method further includes: In response to the user's action of opening the mini-program, the rendering interface is called; The rendering function-operating system interface is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system can create a local window; Call the mini-program logic execution interface; Through the operation event-operating system interface, the mini-program logic execution interface is connected to the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system runs the mini-program and outputs mini-program startup rendering data; Call the rendering interface; The rendering function-operating system interface is used to connect the rendering interface with the target vehicle operating system, so that the rendering engine in the target vehicle operating system can render and generate the mini-program startup interface according to the mini-program startup rendering data, and the mini-program startup interface is in the local window.
4. The method according to claim 3, characterized in that, After responding to the user's action of opening the mini-program, the method further includes: The installation package of the mini-program is downloaded, verified, and installed.
5. The method according to claim 1, characterized in that, After determining the application programming interface (API) corresponding to the obtained API information, the method further includes: Determine whether the application programming interface is a valid interface; Accordingly, calling the application programming interface includes: If the application programming interface is a valid interface, then call the application programming interface.
6. A mini-program operating system, characterized in that, include: The control module is used to call the mini-program logic execution interface based on the acquired user operation events. The system adaptation module is used to connect the mini-program logic execution interface with the target vehicle operating system through the operation event-operating system interface corresponding to the target vehicle operating system, so that the mini-program running engine in the target vehicle operating system runs the mini-program according to the operation event and outputs the application programming interface information corresponding to the operation event. The operation event-operating system interface is different for different vehicle operating systems. The resource module is used to determine the application programming interface corresponding to the obtained application programming interface information. The control module is also used to call the application programming interface; The user interface function adaptation module is used to connect the application programming interface and the target vehicle operating system through the applet interface function-operating system interface corresponding to the target vehicle operating system, so that the target vehicle operating system can complete the operation event.
7. The mini-program operating system according to claim 6, characterized in that, The control module is also used to call the rendering interface; The system adaptation module is also used to connect the rendering interface to the target vehicle operating system through the rendering function-operating system interface corresponding to the target vehicle operating system, so that the rendering engine in the target vehicle operating system renders the mini-program and displays the operation event completion interface. The rendering function-operating system interface is different for different operating systems.
8. The mini-program operating system according to claim 7, characterized in that, The control module is also used for: In response to the user's action of opening the mini-program, the rendering interface is called; The system adaptation module is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system can create a local window; The control module is also used to call the applet logic execution interface; The system adaptation module is also used to connect the mini-program logic execution interface and the target vehicle operating system through the operation event-operating system interface, so that the mini-program running engine in the target vehicle operating system runs the mini-program and outputs mini-program startup rendering data; The control module is also used to call the rendering interface; The system adaptation module is also used to connect the rendering interface with the target vehicle operating system through the rendering function-operating system interface, so that the rendering engine in the target vehicle operating system renders and generates the mini-program startup interface according to the mini-program startup rendering data, and the mini-program startup interface is in the local window.
9. The mini-program operating system according to claim 8, characterized in that, The control module is also used to download, verify, and install the installation package of the mini-program.
10. The mini-program operating system according to claim 6, characterized in that, The control module is also used for: Determine whether the application programming interface is a valid interface; If the application programming interface is a valid interface, then call the application programming interface.
11. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the applet running method according to any one of claims 1 to 5 by executing the executable instructions.
12. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the applet running method according to any one of claims 1 to 5.
13. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, is used to implement the applet running method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Application interface implementation method and device in host platform layer, equipment and medium
CN111367635A
Applet starting method and device, electronic equipment and storage medium
CN111767090A