Mini-program operation method, device, electronic device, and storage medium

By receiving and matching the target execution file package of the mini program, the problem of low version matching efficiency during the loading process of the mini program is solved, fast and accurate version matching and efficient file package delivery are achieved, and the loading and running performance of the mini program is improved. .

CN113220367BActive Publication Date: 2024-09-13BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110518939.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-12
Publication Date
2024-09-13
Estimated Expiration
2041-05-12

AI Technical Summary

Technical Problem

The existing technology has problems such as low version matching efficiency, bloated executable file packages, and poor loading performance during the loading process of mini programs, making it difficult to quickly and accurately locate the executable file package that adapts to the host application.

Method used

By receiving the request message from the host application, including the target applet identification and current version information, the target applet and its candidate execution file package are determined, and the target execution file package is matched based on the version information and sent to the client to support the loading of the applet. .

Benefits of technology

It improves the loading performance and overall running performance of small programs, reduces the complexity of program code development, and improves the efficiency of version matching and delivery of execution file packages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113220367B
    Figure CN113220367B
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for running a mini-program, and relates to the field of computer technology, and specifically to the field of artificial intelligence technology such as deep learning and cloud computing. Specific implementation scheme: receiving a request message sent by a client of a host application, the request message includes: a target mini-program identifier and the current version information of the host application; determining a target mini-program according to the target mini-program identifier, the target mini-program having a corresponding plurality of candidate execution file packages; determining a target execution file package from a plurality of candidate execution file packages according to the current version information; and sending the target execution file package to the client, since the target execution file package that matches the current version information is provided to the client of the host application, the loading performance of the host application for the mini-program is effectively improved, and the overall running performance of the mini-program is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology such as deep learning and cloud computing, and specifically to a method, device, electronic device and storage medium for running a mini-program. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning, deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] In the related technology, developers develop the executable file package of the mini-program on the developer tool platform, and publish the executable file package of the mini-program to the mini-program package management platform. The executable file package will be reviewed by the mini-program package management platform. After the review is passed, the host application can be supported to load the mini-program. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device, storage medium and computer program product for running a mini-program.

[0005] According to the first aspect of the present disclosure, a method for running a mini-program is provided, comprising: receiving a request message sent by a client of a host application, the request message comprising: a target mini-program identifier, and current version information of the host application; determining a target mini-program according to the target mini-program identifier, the target mini-program having a corresponding plurality of candidate execution file packages; determining a target execution file package from the plurality of candidate execution file packages according to the current version information; and sending the target execution file package to the client.

[0006] According to the second aspect of the present disclosure, a method for running a mini-program is provided, comprising: upon receiving a request to open the mini-program, obtaining a target mini-program identifier of the mini-program and current version information of a host application; generating a request message based on the target mini-program identifier and the current version information, and sending the request message to a server; receiving a target execution file package sent by the server, wherein the target execution file package is determined by the server based on the target mini-program identifier and the current version information, and the target execution file package is adapted to the current version information.

[0007] According to the third aspect of the present disclosure, a device for running a mini-program is provided, comprising: a first receiving module, used to receive a request message sent by a client of a host application, the request message comprising: a target mini-program identifier, and current version information of the host application; a first determination module, used to determine a target mini-program based on the target mini-program identifier, the target mini-program having a corresponding plurality of candidate execution file packages; a second determination module, used to determine a target execution file package from the plurality of candidate execution file packages based on the current version information; and a sending module, used to send the target execution file package to the client.

[0008] According to the fourth aspect of the present disclosure, a device for running a mini-program is provided, comprising: a second acquisition module, for acquiring a target mini-program identifier of the mini-program and current version information of a host application upon receiving an opening request for the mini-program; a third generation module, for generating a request message according to the target mini-program identifier and the current version information, and sending the request message to a server; a second receiving module, for receiving a target execution file package sent by the server, the target execution file package being determined by the server according to the target mini-program identifier and the current version information, and the target execution file package being adapted to the current version information.

[0009] According to the fifth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for running the mini-program of an embodiment of the present disclosure.

[0010] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to enable the computer to execute a method for running a mini-program disclosed in an embodiment of the present disclosure.

[0011] According to a seventh aspect of the present disclosure, a computer program product is proposed, including a computer program, which, when executed by a processor, implements the method for running the applet disclosed in the embodiment of the present disclosure.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0014] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0015] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0016] Figure 3 is an application schematic diagram of an embodiment of the present disclosure;

[0017] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure;

[0018] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0019] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0020] Figure 7 is a schematic diagram according to a sixth embodiment of the present disclosure;

[0021] Figure 8 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0023] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure.

[0024] It should be noted that the executor of the mini-program running method of this embodiment is the mini-program running device, which can be implemented by software and / or hardware, and can be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0025] The embodiments of the present disclosure relate to the fields of artificial intelligence technologies such as deep learning and cloud computing.

[0026] Among them, Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0027] Deep learning is the process of learning the inherent laws and representation levels of sample data. The information obtained in the learning process is of great help in interpreting data such as text, images, and sounds. The ultimate goal of deep learning is to enable machines to have analytical learning capabilities like humans and to be able to recognize data such as text, images, and sounds.

[0028] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed in an on-demand, self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications and model training such as artificial intelligence and blockchain.

[0029] The mini-program running method in this embodiment can be applied to the server side, so as to send the corresponding mini-program execution file package to the client of the host application based on the server side to support the host application to load and open the corresponding mini-program execution file package.

[0030] like Figure 1 As shown, the operation method of the applet includes:

[0031] S101: Receive a request message sent by a client of a host application, where the request message includes: a target applet identifier and current version information of the host application.

[0032] As an example, the mini-program in the embodiments of the present disclosure may be hosted on a host application, which may be installed on an electronic device, wherein the electronic device may be a mobile terminal, which may be a mobile phone, a tablet computer, a personal digital assistant, or other hardware device with various operating systems.

[0033] The host application has a corresponding client, which can be installed and run in the electronic device to provide corresponding program functions to the outside.

[0034] In some embodiments, the client of the host application may provide the user with an interface for loading a mini-program. When it monitors that the interface is called, it may provide the user with multiple candidate mini-program identifiers. In response to the mini-program selection instruction input by the user, the candidate mini-program identifier selected by the mini-program selection instruction is used as the target mini-program identifier, indicating that the user currently has a need to load the target mini-program to which the target mini-program identifier belongs in the host application.

[0035] Among them, the target mini-program identifier can be used to uniquely identify the target mini-program.

[0036] In the embodiment of the present disclosure, when the electronic device monitors that the host application triggers the loading of the target applet to which the target applet identifier belongs, it can trigger the acquisition of the version information of the host application, thereby using the currently acquired version information as the above-mentioned current version information. The current version information can be specific, such as the current version number, or it can be any other possible information that can identify the current version of the host application, without limitation.

[0037] When the host application triggers the loading of the target mini-program belonging to the target mini-program identifier, a request message can be generated based on the target mini-program identifier and the current version information, and the request message can be sent to the server. Since the corresponding mini-program execution file package can be sent to the client of the host application based on the server, the server can parse and process the request message after receiving the request message to obtain the target mini-program identifier and current version information therein, and trigger subsequent steps.

[0038] S102: Determine a target applet according to the target applet identifier, where the target applet has a corresponding plurality of candidate execution file packages.

[0039] In some embodiments, after receiving the request message, the server can parse the request message to obtain the target mini-program identifier and current version information therein, and then, based on the multiple candidate mini-programs pre-stored in the mini-program package management platform, determine the candidate mini-program corresponding to the target mini-program identifier as the target mini-program, and read multiple candidate execution file packages corresponding to the target mini-program.

[0040] That is to say, in the disclosed embodiment, multiple matching execution file packages will be pre-generated for each candidate mini-program and serve as corresponding multiple candidate execution file packages. Different candidate execution file packages can be used to adapt to different version information of the host application, thereby assisting in the subsequent acquisition of candidate execution file packages that are adapted to the current version information of the host application, avoiding the execution file package sent to the client of the host application from being too bloated, and assisting in improving the efficiency of sending the execution file package, thereby effectively improving the loading performance of the host application for the mini-program.

[0041] It can be understood that the executable file package of the mini program can be similar to the EXE executable file of the software. The executable file package of the mini program can not only include business logic code files, but also style files, configuration files, etc. The client of the host application can load the business functions provided by the corresponding mini program by loading and running the business logic code files in the executable file package.

[0042] When obtaining multiple candidate execution file packages corresponding to the target mini program, the target mini program identifier can be used to obtain multiple candidate execution file packages of the corresponding target mini program. The acquisition location of the candidate execution file package can be obtained from the local cache of the server, or from the cloud platform corresponding to the mini program service, without limitation.

[0043] S103: Determine a target execution file package from a plurality of candidate execution file packages according to the current version information.

[0044] After determining the target applet according to the target applet identifier and obtaining multiple candidate execution file packages corresponding to the target applet, the matching status of each candidate execution file package with the current version information can be determined, so that the matched candidate execution file package is used as the target execution file package.

[0045] In the disclosed embodiments, in order to effectively improve the matching efficiency, reduce the complexity of program code development, and achieve functional optimization of the mini-program's execution file package on different version information of the host application, the corresponding candidate mini-program version information (candidate mini-program version information, such as the mini-program version number) can also be pre-configured for the candidate execution file package, that is, different candidate execution file packages can be loaded to implement the business functions of the corresponding mini-programs, but the version information of the mini-programs corresponding to different candidate execution file packages may be different.

[0046] Therefore, in the embodiments of the present disclosure, a target execution file package can be determined from multiple candidate execution file packages based on the current version information. Multiple candidate mini-program version information corresponding to the multiple candidate execution file packages can be determined, and the candidate mini-program version information that matches the current version information can be selected from the multiple candidate mini-program version information, and the candidate execution file package corresponding to the matching candidate mini-program version information can be used as the target execution file package. This can effectively improve the matching efficiency, reduce the complexity of program code development, and quickly and accurately locate the mini-program execution file package that is compatible with the current version information of the host application, thereby improving the overall loading and distribution performance of the mini-program.

[0047] S104: Send the target execution file package to the client.

[0048] After the target execution file package is determined from the plurality of candidate execution file packages, the target execution file package may be sent to the client of the host application, thereby supporting the host application to load and open the corresponding applet.

[0049] In this embodiment, a request message sent by a client of a host application is received, the request message includes: a target applet identifier, and the current version information of the host application, and the target applet is determined based on the target applet identifier. The target applet has corresponding multiple candidate execution file packages. Based on the current version information, the target execution file package is determined from the multiple candidate execution file packages, and the target execution file package is sent to the client. Since the target execution file package that matches the current version information is provided to the client of the host application, the loading performance of the host application for the applet is effectively improved, and the overall running performance of the applet is effectively improved.

[0050] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure.

[0051] like Figure 2 As shown, the operation method of the applet includes:

[0052] S201: Obtain a compatible executable file package of the target applet.

[0053] The compatible executable file package may be an executable file package that is compatible with the minimum version information of the host application. Usually, the compatible executable file package occupies less transmission resources.

[0054] The compatible executable file package matches the target version information of the host application, and the target version information is the lowest version information among multiple reference version information.

[0055] It is understandable that as the host application is continuously upgraded and developed, the host application may have multiple version information, and the multiple version information can be called multiple reference version information, and the target version information can be the lowest version information among the multiple reference version information, or it can also be the lower version information among the multiple reference version information, without limitation.

[0056] The compatible executable file package of the target applet obtained above can be used to assist in sub-package optimization compilation, and the executable file package obtained by the sub-package optimization compilation can be called a subsequent stable executable file package.

[0057] That is to say, the disclosed embodiments support performing sub-package compilation optimization based on a compatible execution file package that is adapted to the minimum version information of the host application, so as to generate multiple stable execution file packages that are adapted to different version information. Since the compatible execution file package that is adapted to the minimum version information of the host application usually occupies less transmission resources, it can effectively ensure the data transmission efficiency during the execution file package generation process, reduce computing resource consumption, and comprehensively ensure the operation efficiency of the mini-program.

[0058] S202: generating a plurality of stable execution file packages corresponding to a plurality of reference version information of a host application program according to the compatible execution file package, wherein the current version information belongs to the plurality of reference version information.

[0059] After obtaining the compatible execution file package of the target applet, a plurality of stable execution file packages corresponding to the plurality of reference version information of the host application program may be generated according to the compatible execution file package.

[0060] Among them, the host application may have multiple version information, which can be called multiple reference version information, and the stable execution file packages adapted to different reference version information may have different optimization functions. For example, the stable execution file package adapted to reference version information A may carry optimization function A, and the stable execution file package adapted to reference version information B may carry optimization function B.

[0061] Therefore, in the disclosed embodiments, multiple stable execution file packages corresponding to multiple reference version information of the host application can be generated based on the compatible execution file package, so that the multiple stable execution file packages can carry the corresponding multiple optimization functions for the target mini-programs, so that while performing sub-package compilation optimization, the optimization functions carried by the stable execution package can meet the personalized version requirements of the host application and improve the running effect of the mini-program.

[0062] Optionally, in some embodiments, multiple stable execution file packages corresponding to multiple reference version information of the host application are generated based on the compatible execution file package. This may be by obtaining multiple program code files corresponding to the multiple reference version information, and combining the multiple program code files based on the compatible execution file package to generate multiple stable execution file packages corresponding to the multiple reference version information of the host application.

[0063] Among them, the above-mentioned program code file can be a business logic code file that carries the optimization function of the mini program, or a style file, configuration file, etc. corresponding to the optimization function.

[0064] The above-mentioned program code file carrying the optimization function of the mini-program can be specifically determined according to the development document of the mini-program, and there is no limitation on this.

[0065] The multiple program code files corresponding to the multiple reference version information respectively refer to the optimization functions of the mini-programs carried by the corresponding program code files, which can be compatible with the host application corresponding to the reference version information.

[0066] Therefore, based on the compatible execution file package combined with multiple program code files, multiple stable execution file packages corresponding to multiple reference version information of the host application are generated, which can support the compatibility of the host application with the corresponding reference version information, effectively ensure the compatibility and stability of the stable execution file package in the host application, and effectively assist in improving the loading performance of the host application for the corresponding stable execution file package.

[0067] S203: taking the multiple stable execution file packages as multiple candidate execution file packages.

[0068] S204: Generate multiple candidate mini-program version information corresponding to the multiple reference version information respectively.

[0069] After generating multiple stable execution packages, the multiple stable execution file packages can be directly used as multiple candidate execution file packages. Then, multiple candidate mini-program version information corresponding to the multiple reference version information can be generated to trigger subsequent steps.

[0070] Among them, assuming that the reference version information is 1.0, the candidate mini-program version information corresponding to the reference version information 1.0 can also be configured as 1.0; assuming that the reference version information is 2.0, the candidate mini-program version information corresponding to the reference version information 2.0 can also be configured as 2.0; assuming that the reference version information is 3.0, the candidate mini-program version information corresponding to the reference version information 3.0 can also be configured as 3.0. There is no restriction on this.

[0071] S205: Use multiple candidate mini-program version information to mark corresponding multiple candidate execution file packages.

[0072] When generating multiple candidate mini-program version information corresponding to multiple reference version information, the multiple candidate mini-program version information can be directly used to mark the corresponding multiple candidate execution file packages, thereby making the marking processing logic of the version information of the execution file package more concise and effectively assisting in improving the search efficiency of the target execution file package.

[0073] like Figure 3 As shown, Figure 3 It is an application schematic diagram of the embodiment of the present disclosure, which includes: a mini-program package management platform, the mini-program package management platform manages multiple candidate execution file packages, the multiple candidate execution file packages respectively have corresponding multiple candidate mini-program version information, and different candidate execution file packages are used to adapt to host applications with different version information. Therefore, when the host application loads the execution file package of the target mini-program from the mini-program package management platform, the candidate execution file package adapted to the current version information of the host application can be used as the target execution file package and sent to the corresponding host application.

[0074] S206: Receive a request message sent by the client of the host application, where the request message includes: a target applet identifier and current version information of the host application.

[0075] S207: Determine the target applet according to the target applet identifier, where the target applet has a corresponding plurality of candidate execution file packages.

[0076] S208: Determine a target execution file package from a plurality of candidate execution file packages according to the current version information.

[0077] S209: Send the target execution file package to the client.

[0078] The description of S206-S209 can be specifically referred to the above embodiment, which will not be repeated here.

[0079] In this embodiment, by receiving a request message sent by the client of the host application, the request message includes: a target applet identifier and the current version information of the host application, and the target applet is determined according to the target applet identifier, the target applet has a corresponding plurality of candidate execution file packages, and the target execution file package is determined from the plurality of candidate execution file packages according to the current version information, and the target execution file package is sent to the client. Since the target execution file package adapted to its current version information is provided to the client of the host application, the loading performance of the host application for the applet is effectively improved, and the overall running performance of the applet is effectively improved. Supporting the sub-package compilation optimization based on the compatible execution file package adapted to the minimum version information of the host application as the benchmark to generate multiple stable execution file packages adapted to different version information, since the compatible execution file package adapted to the minimum version information of the host application usually occupies less transmission resources, it can effectively ensure the data transmission efficiency in the execution file package generation process, reduce the consumption of computing resources, and comprehensively ensure the running efficiency of the applet. When generating multiple candidate mini-program version information corresponding to multiple reference version information, you can directly use the multiple candidate mini-program version information to mark the corresponding multiple candidate execution file packages, so that the marking processing logic of the version information of the execution file package can be more concise, and effectively help improve the search efficiency of the target execution file package.

[0080] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure.

[0081] The method for running the mini program in this embodiment can be applied to a client, which can specifically be a client of a host application. The client of the host application can receive the execution file package of the corresponding mini program sent by the server, and load and open the execution file package of the corresponding mini program.

[0082] like Figure 4 As shown, the operation method of the applet includes:

[0083] S401: When receiving a request to open a mini-program, obtain a target mini-program identifier of the mini-program and current version information of the host application.

[0084] It should be noted that the description and explanation of terms in this embodiment that are the same as those in the above embodiments can be found in the above embodiments and will not be repeated here.

[0085] Among them, the open request can be used to trigger the loading of the target applet in the host application. Therefore, in the embodiment of the present disclosure, when the open request of the applet is received, the target applet identifier of the applet and the current version information of the host application can be obtained, and then the subsequent steps can be triggered.

[0086] S402: Generate a request message according to the target applet identifier and the current version information, and send the request message to the server.

[0087] After obtaining the target applet identifier of the applet and the current version information of the host application, the corresponding request generation interface can be called in real time to generate a request message based on the target applet identifier and the current version information, and send the request message to the server, thereby assisting in requesting the server to obtain the target execution file package based on the request message.

[0088] The processing logic for the server to search for and obtain the target execution file package can be specifically referred to in the above embodiment, which will not be described in detail here.

[0089] S403: Receive a target execution file package sent by the server. The target execution file package is determined by the server according to the target applet identifier and the current version information. The target execution file package is compatible with the current version information.

[0090] After receiving the target execution file package sent by the server, the target execution file package can be directly loaded and run locally on the client of the host application. Since the target execution file package is determined by the server based on the target applet identifier and the current version information, the target execution file package is adapted to the current version information, thereby achieving better applet loading performance.

[0091] In this embodiment, when receiving a request to open the mini-program, the target mini-program identifier of the mini-program and the current version information of the host application are obtained, a request message is generated according to the target mini-program identifier and the current version information, and the request message is sent to the server, and the target execution file package sent by the server is received. The target execution file package is determined by the server according to the target mini-program identifier and the current version information, and the target execution file package is adapted to the current version information. Since the target execution file package adapted to the current version information of the host application is obtained from the server, the loading performance of the host application for the mini-program is effectively improved, and the overall running performance of the mini-program is effectively improved.

[0092] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure.

[0093] like Figure 5 As shown, the running device 50 of the applet is applied to the server and includes:

[0094] The first receiving module 501 is used to receive a request message sent by a client of a host application, where the request message includes: a target applet identifier and current version information of the host application.

[0095] The first determination module 502 is used to determine a target applet according to the target applet identifier, and the target applet has a corresponding plurality of candidate execution file packages.

[0096] The second determination module 503 is used to determine a target execution file package from multiple candidate execution file packages according to the current version information.

[0097] The sending module 504 is used to send the target execution file package to the client.

[0098] In some embodiments of the present disclosure, the second determining module 503 is specifically configured to:

[0099] Determine multiple candidate mini-program version information corresponding to the multiple candidate execution file packages respectively;

[0100] Selecting candidate mini-program version information that matches the current version information from multiple candidate mini-program version information; and

[0101] The candidate execution file package corresponding to the matching candidate mini-program version information is used as the target execution file package.

[0102] In some embodiments of the present disclosure, Figure 6 As shown, the running device 60 of the applet includes: a first receiving module 601, a first determining module 602, a second determining module 603, a sending module 604, and further includes:

[0103] A first acquisition module 605 is used to acquire a compatible execution file package of a target applet;

[0104] The first generation module 606 is used to generate multiple stable execution file packages corresponding to multiple reference version information of the host application according to the compatible execution file package, the current version information belongs to the multiple reference version information, and use the multiple stable execution file packages as multiple candidate execution file packages.

[0105] In some embodiments of the present disclosure, the first generating module 606 is specifically configured to:

[0106] Acquire multiple program code files corresponding to multiple reference version information respectively;

[0107] A plurality of stable execution file packages corresponding to a plurality of reference version information of a host application program are generated according to the compatible execution file package combined with a plurality of program code files.

[0108] In some embodiments of the present disclosure, Figure 6 As shown, it also includes:

[0109] The second generating module 607 is used to generate multiple candidate mini-program version information corresponding to multiple reference version information respectively.

[0110] The marking module 608 is used to mark the corresponding multiple candidate execution file packages using the multiple candidate mini-program version information.

[0111] In some embodiments of the present disclosure, the compatible executable file package matches the target version information of the host application, and the target version information is the lowest version information among multiple reference version information.

[0112] It is understandable that the present embodiment Figure 6 The mini-program running device 60 in the embodiment may have the same function and structure as the mini-program running device 50 in the above-mentioned embodiment, the first receiving module 601 may have the same function and structure as the first receiving module 501 in the above-mentioned embodiment, the first determination module 602 may have the same function and structure as the first determination module 502 in the above-mentioned embodiment, the second determination module 603 may have the same function and structure as the mini-program running device 50 in the above-mentioned embodiment, the first determination module 602 may have the same function and structure as the first determination module 502 in the above-mentioned embodiment, the second determination module 603 may have the same function and structure as the sending module 504 in the above-mentioned embodiment.

[0113] It should be noted that the aforementioned explanation of the method for running the mini-program is also applicable to the mini-program running device of this embodiment and will not be repeated here.

[0114] In this embodiment, a request message sent by a client of a host application is received, the request message includes: a target applet identifier, and the current version information of the host application, and the target applet is determined based on the target applet identifier. The target applet has corresponding multiple candidate execution file packages. Based on the current version information, the target execution file package is determined from the multiple candidate execution file packages, and the target execution file package is sent to the client. Since the target execution file package that matches the current version information is provided to the client of the host application, the loading performance of the host application for the applet is effectively improved, and the overall running performance of the applet is effectively improved.

[0115] Figure 7 is a schematic diagram according to a sixth embodiment of the present disclosure.

[0116] like Figure 7 As shown, the running device 70 of the applet is applied to the client and includes:

[0117] The second acquisition module 701 is used to acquire the target applet identifier of the applet and the current version information of the host application when receiving an opening request of the applet.

[0118] The third generating module 702 is used to generate a request message according to the target applet identifier and the current version information, and send the request message to the server.

[0119] The second receiving module 703 is used to receive a target execution file package sent by the server. The target execution file package is determined by the server according to the target applet identifier and the current version information. The target execution file package is compatible with the current version information.

[0120] It should be noted that the aforementioned explanation of the method for running the mini-program is also applicable to the mini-program running device of this embodiment and will not be repeated here.

[0121] In this embodiment, when receiving a request to open the mini-program, the target mini-program identifier of the mini-program and the current version information of the host application are obtained, a request message is generated according to the target mini-program identifier and the current version information, and the request message is sent to the server, and the target execution file package sent by the server is received. The target execution file package is determined by the server according to the target mini-program identifier and the current version information, and the target execution file package is adapted to the current version information. Since the target execution file package adapted to the current version information of the host application is obtained from the server, the loading performance of the host application for the mini-program is effectively improved, and the overall running performance of the mini-program is effectively improved.

[0122] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0123] Figure 8 A schematic block diagram of an example electronic device that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0124] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0125] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0126] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the running method of the applet.

[0127] For example, in some embodiments, the method for running the applet may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method for running the applet described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the method for running the applet in any other appropriate manner (e.g., by means of firmware).

[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0129] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0130] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0132] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0133] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0135] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for running a mini program, applied to a server, comprising: Receive a request message sent by a client of a host application, the request message including: a target applet identifier and current version information of the host application; Determine a target applet according to the target applet identifier, the target applet having a plurality of corresponding candidate execution file packages, wherein different candidate execution file packages are used to adapt to the host application with different version information; Determining a target execution file package from the plurality of candidate execution file packages according to the current version information; and Sending the target execution file package to the client; The step of determining a target execution file package from the plurality of candidate execution file packages according to the current version information includes: Determine multiple candidate mini-program version information corresponding to the multiple candidate execution file packages respectively; Selecting candidate mini-program version information that matches the current version information from the plurality of candidate mini-program version information; and Using the candidate execution file package corresponding to the matched candidate mini-program version information as the target execution file package; Before receiving the request message sent by the client of the host application, the method further includes: Obtaining a compatible executable file package of the target applet; Acquire multiple program code files corresponding to multiple reference version information respectively, wherein the program code files are business logic code files carrying the optimization function of the mini program; generating, according to the compatible executable file package and the plurality of program code files, a plurality of stable executable file packages respectively corresponding to a plurality of reference version information of the host application program, wherein the current version information belongs to the plurality of reference version information; The multiple stable execution file packages are used as the multiple candidate execution file packages.

2. The method according to claim 1, after taking the plurality of stable execution file packages as the plurality of candidate execution file packages, further comprising: Generate multiple candidate mini-program version information corresponding to the multiple reference version information respectively; The multiple candidate executable file packages corresponding to the multiple candidate mini-program version information tags are used.

3. The method according to any one of claims 1 to 2, wherein: The compatible executable file package matches the target version information of the host application, and the target version information is the lowest version information among the multiple reference version information.

4. A method for running a small program, applied to a client, comprising: Upon receiving a request to open a mini-program, obtaining a target mini-program identifier of the mini-program and current version information of a host application; Generate a request message according to the target applet identifier and the current version information, and send the request message to the server, so that the server executes the method according to any one of claims 1 to 3; Receiving a target execution file package sent by the server, wherein the target execution file package is determined by the server according to the target applet identifier and the current version information, and the target execution file package is compatible with the current version information; The server determines the target executable file according to the target applet identifier and the current version information, including: Determine a target applet according to the target applet identifier, the target applet having a plurality of corresponding candidate execution file packages, wherein different candidate execution file packages are used to adapt to the host application with different version information; Determine multiple candidate mini-program version information corresponding to the multiple candidate execution file packages respectively; Selecting candidate mini-program version information that matches the current version information from the plurality of candidate mini-program version information; and The candidate execution file package corresponding to the matching candidate mini-program version information is used as the target execution file package.

5. A mini-program running device, applied to a server, comprising: A first receiving module is used to receive a request message sent by a client of a host application, wherein the request message includes: a target applet identifier and current version information of the host application; A first determination module, configured to determine a target applet according to the target applet identifier, wherein the target applet has a plurality of corresponding candidate execution file packages; A second determination module is configured to determine a target execution file package from among the plurality of candidate execution file packages according to the current version information; and A sending module, used for sending the target execution file package to the client; Wherein, the second determining module is specifically used to: Determine multiple candidate mini-program version information corresponding to the multiple candidate execution file packages respectively; Selecting candidate mini-program version information that matches the current version information from the plurality of candidate mini-program version information; and Using the candidate execution file package corresponding to the matched candidate mini-program version information as the target execution file package; A first acquisition module, used to acquire a compatible execution file package of the target applet; The first generation module is used to obtain multiple program code files corresponding to multiple reference version information respectively; generate multiple stable execution file packages corresponding to multiple reference version information of the host application according to the compatible execution file package combined with the multiple program code files.

6. The apparatus according to claim 5, further comprising: A second generating module, used to generate a plurality of candidate mini-program version information corresponding to the plurality of reference version information respectively; The marking module is used to use the version information of the multiple candidate mini-programs to mark the corresponding multiple candidate execution file packages.

7. The device according to any one of claims 5 to 6, wherein: The compatible executable file package matches the target version information of the host application, and the target version information is the lowest version information among the multiple reference version information.

8. A mini-program running device, applied to a client, comprising: A second acquisition module is used to acquire a target applet identifier of the applet and current version information of the host application when receiving an opening request of the applet; A third generating module, configured to generate a request message according to the target applet identifier and the current version information, and send the request message to a server, so that the server executes the method according to any one of claims 1 to 3; A second receiving module is used to receive a target execution file package sent by the server, wherein the target execution file package is determined by the server according to the target applet identifier and the current version information, and the target execution file package is compatible with the current version information; The server determines the target executable file according to the target applet identifier and the current version information, including: Determine a target applet according to the target applet identifier, the target applet having a plurality of corresponding candidate execution file packages, wherein different candidate execution file packages are used to adapt to the host application with different version information; Determine multiple candidate mini-program version information corresponding to the multiple candidate execution file packages respectively; Selecting candidate mini-program version information that matches the current version information from the plurality of candidate mini-program version information; and The candidate execution file package corresponding to the matching candidate mini-program version information is used as the target execution file package.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1 to 3, or execute the method of claim 4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 3, or to execute the method according to claim 4.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 3, or implements the method according to claim 4.