A page sharing method, device, equipment and storage medium for mini programs
By requesting the target configuration information from the specified server to update the default information of the sharing page, the problem of inefficient sharing of existing applets is solved, and flexible sharing configurations without code modification is realized, and the sharing efficiency of applets is improved.
Patent Information
- Application Number
- CN202310195811.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2043-02-24
AI Technical Summary
The sharing of existing applets only supports setting the configuration information of the sharing page through API and onShareAppMessage. Developers need to modify the code package and submit it for review, resulting in inefficient sharing.
Provide a page sharing method for mini-programs. By requesting target configuration information from a designated server, updating the default page information of the sharing page, obtaining the page information to be shared, and forwarding it to the second client to output the sharing page.
There is no need for developers to modify the code package of the applet, which realizes flexible configuration and modification of the sharing page and improves the sharing efficiency of the applet.
Smart Images

Figure CN116233051B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, particularly to the field of mini-program technology, and specifically to a method, apparatus, device, and storage medium for sharing pages of a mini-program. Background Art
[0002] Currently, the sharing of mini-programs only supports developers to set the configuration information for the shared page in two ways: through the API (Application Programming Interface) and onShareAppMessage (a function for setting sharing information).
[0003] Among them, the setting of the configuration information requires developers to modify the code package of the mini-program and submit the code package for review to take effect. Summary of the Invention
[0004] The present disclosure provides a method, apparatus, device, and storage medium for sharing pages of a mini-program.
[0005] According to one aspect of the present disclosure, there is provided a method for sharing pages of a mini-program, which is applied to a first client, and the method includes:
[0006] In response to a sharing operation for a target mini-program, request target configuration information from a specified server; wherein, the target configuration information is the configuration information for the shared page indicated by the sharing operation, and the specified server is: a server for storing the to-be-utilized configuration information configured for the mini-program page;
[0007] Update the default page information of the shared page by using the target configuration information to obtain the to-be-shared page information; wherein, the default page information is the default information for describing the shared page;
[0008] Forward the to-be-shared page information to a second client, so that the second client outputs the shared page based on the to-be-shared page information.
[0009] According to another aspect of the present disclosure, there is provided a system for sharing pages of a mini-program, including a first client, a second client, and a specified server;
[0010] The first client is configured to, in response to a sharing operation for a target mini-program, request target configuration information from a specified server; update the default page information of the sharing page by using the target configuration information to obtain information of the page to be shared; and forward the information of the page to be shared to a second client. The target configuration information is the configuration information of the sharing page indicated by the sharing operation, and the default page information is the default information used to describe the sharing page.
[0011] The second client is configured to receive the information of the page to be shared sent by the first client and output the sharing page based on the information of the page to be shared.
[0012] The specified server is configured to store the configuration information to be used configured for mini-program pages.
[0013] According to another aspect of the present disclosure, there is provided a page sharing device for a mini-program, which is applied to a first client. The device includes:
[0014] A request module, configured to, in response to a sharing operation for a target mini-program, request target configuration information from a specified server. The target configuration information is the configuration information of the sharing page indicated by the sharing operation, and the specified server is a server configured to store the configuration information to be used configured for mini-program pages.
[0015] An update module, configured to update the default page information of the sharing page by using the target configuration information to obtain information of the page to be shared. The default page information is the default information used to describe the sharing page.
[0016] A sharing module, configured to forward the information of the page to be shared to a second client, so that the second client outputs the sharing page based on the information of the page to be shared.
[0017] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the page sharing method for a mini-program according to any one of the above.
[0018] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause a computer to execute the page sharing method for a mini-program according to any one of the above.
[0019] According to another aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the method for sharing a page of a mini-program according to any one of the above.
[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0022] Figure 1 is a flowchart of a method for sharing a page of a mini-program according to the present disclosure;
[0023] Figure 2 is another flowchart of the method for sharing a page of a mini-program according to the present disclosure;
[0024] Figure 3 is yet another flowchart of the method for sharing a page of a mini-program according to the present disclosure;
[0025] Figure 4A is an interaction schematic diagram according to the present disclosure;
[0026] Figure 4B is another interaction schematic diagram according to the present disclosure;
[0027] Figure 5 is an interface schematic diagram of the sharing information configuration according to the present disclosure;
[0028] Figure 6 is a schematic structural diagram of a system for sharing a page of a mini-program according to the present disclosure;
[0029] Figure 7 is a schematic structural diagram of a device for sharing a page of a mini-program according to the present disclosure;
[0030] Figure 8 is a block diagram of an electronic device for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted for clarity and conciseness in the following description.
[0032] Currently, the sharing of mini-programs only supports developers to set the configuration information for the shared page through two methods: API and onShareAppMessage. For the promotion of internal operation activities of mini-programs, developers need to modify the code package of the mini-program and submit it for code package review to take effect. The long effective period results in low sharing efficiency of the mini-program.
[0033] Based on the above, in order to improve the sharing efficiency of mini-programs, the embodiments of the present disclosure provide a method, device, equipment and storage medium for sharing pages of mini-programs.
[0034] First, a method for sharing pages of mini-programs provided by the embodiments of the present disclosure will be introduced below.
[0035] A method for sharing pages of mini-programs provided by the embodiments of the present disclosure is applied to a first client. In a specific application, the first client may be the client for performing mini-program sharing operations in a terminal device. In actual applications, the first client may be the host software of the mini-program to be shared. For example, it may be an instant messaging software; the terminal device may be: a smart phone, a tablet computer, a desktop computer, etc.
[0036] Specifically, the execution subject of the method for sharing pages of mini-programs may be a device for sharing pages of mini-programs. Exemplarily, when the method for sharing pages of mini-programs is applied to a terminal device, the device for sharing pages of mini-programs may be a plugin running in the first client. For example, it may be a plugin for sharing pages of mini-programs.
[0037] Among them, a method for sharing pages of mini-programs provided by the embodiments of the present disclosure may include the following steps:
[0038] In response to a sharing operation for a target mini-program, request target configuration information from a specified server; wherein, the target configuration information is the configuration information for the shared page indicated by the sharing operation, and the specified server is: a server for storing the to-be-utilized configuration information configured for the mini-program page;
[0039] Update the default page information of the shared page by using the target configuration information to obtain the to-be-shared page information; wherein, the default page information is the default information for describing the shared page;
[0040] Forward the to-be-shared page information to a second client, so that the second client outputs the shared page based on the to-be-shared page information.
[0041] In the solution provided by the present disclosure, since the designated server stores the configuration information to be utilized configured for the applet page, therefore, in response to a sharing operation for a target applet, the configuration information of the sharing page indicated by the sharing operation, that is, the target configuration information, can be requested from the designated server. Thus, the default page information of the sharing page indicated by the sharing operation can be updated by using the target configuration information to obtain the page information to be shared, so that after the page information to be shared is forwarded to the second client, the second client can generate a new sharing page based on the page information to be shared, completing the page sharing of the applet. It can be seen that this solution does not require developers to modify the code package of the applet, and can achieve flexible configuration and modification of the sharing page, thereby improving the sharing efficiency of the applet.
[0042] The following introduces the page sharing method for applets provided by the embodiments of the present disclosure with reference to the accompanying drawings.
[0043] As Figure 1 shown, the page sharing method for applets provided by the embodiments of the present disclosure, which is applied to the first client, may include steps S101 - S103:
[0044] S101, in response to a sharing operation for a target applet, request target configuration information from the designated server; wherein, the target configuration information is the configuration information of the sharing page indicated by the sharing operation, and the designated server is: a server for storing the configuration information to be utilized configured for the applet page;
[0045] In this embodiment, the first client may be the host software of the target applet. In response to a sharing operation for the target applet initiated by the user in the first client, request target configuration information from the designated server. Exemplarily, the first client may be any client that can run an applet, and the target applet for which the sharing operation is performed may be an e-commerce applet, or a game applet, etc. In addition, it should be noted that the configuration information may also be referred to as sharing information. Exemplarily, the configuration information may include an activity name, a sharing title, a sharing content, etc.
[0046] It can be understood that the designated server is the server corresponding to the first client, and the designated server stores the configuration information to be utilized configured for the applet page. When the user shares the target applet in the first client, the user can initiate sharing for different pages in the target applet. At this time, in response to the sharing operation for the target applet, the first client can request the configuration information of the sharing page indicated by the sharing operation from the designated server, that is, request the target configuration information, so that the default page information of the sharing page indicated by the sharing operation can be updated by using the target configuration information subsequently.
[0047] In addition, it should be noted that the configuration information to be utilized stored in the specified server can be the latest configuration information, that is, the configuration information stored in the specified server can change.
[0048] Optionally, in one implementation, the manner in which the specified server obtains the configuration information to be utilized configured for the applet page may include:
[0049] The specified server obtains the latest configuration information for the applet page based on the data synchronization method of the specified configuration platform;
[0050] Among them, the specified configuration platform is: a platform for setting configuration information for the applet page.
[0051] In this implementation, relevant staff of the applet can set configuration information for the applet page in the specified configuration platform. Exemplarily, the specified configuration platform can be the O side, that is, an internal operation platform for applet operators. It can be understood that the specified server can synchronize data with the specified configuration platform, so that when the staff submits the configuration information configured for the applet page in the specified configuration platform, the configuration information can be synchronized to the specified server, so that the specified server can store the configuration information for the applet page, and if the configuration information is updated, the latest configuration information can be synchronized to the specified server in a timely manner. Exemplarily, the data synchronization method can be bp (a real-time data synchronization mechanism), which can monitor data changes in the specified configuration platform and push data to the specified server.
[0052] It should be noted that the above method by which the specified server obtains the configuration information for the applet page through data synchronization is only an example. In actual applications, the specified server can also obtain the configuration information for the applet page from the specified configuration platform by sending requests regularly. The embodiments of the present disclosure do not limit the manner in which the specified server obtains the configuration information to be utilized configured for the applet page.
[0053] S102. Use the target configuration information to update the default page information of the sharing page to obtain the page information to be shared; where the default page information is the default information used to describe the sharing page;
[0054] In this embodiment, the default page information of the sharing page may include the default title of the sharing page, the default sharing content, and so on. It can be understood that when the first client responds to the sharing operation for the target mini-program and requests the target configuration information from the specified server, since the target configuration information is the configuration information for the sharing page indicated by the sharing operation, the default page information of the sharing page can be updated using the target configuration information to obtain the page information to be shared, so that a new sharing page can be generated based on the page information to be shared subsequently, without the need for developers to modify the code package of the mini-program, thereby improving the sharing efficiency of the mini-program.
[0055] Optionally, in one implementation, updating the default page information of the sharing page using the target configuration information to obtain the page information to be shared may include:
[0056] Replacing the field value in the default page information of the sharing page with the same field as the field value in the target configuration information to obtain the page information to be shared.
[0057] It can be understood that the target configuration information and the default page information can be stored in the form of field values. By replacing the field value in the default page information of the sharing page with the same field as the field value in the target configuration information, the default page information of the sharing page can be updated. Exemplarily, if the field value of field A in the target configuration information is "Takeout discount activity" and the field value of field A in the default page information is "Takeout activity", then replace "Takeout activity" in the default page information with "Takeout discount activity" to obtain the page information to be shared. It should be noted that if the field value corresponding to a certain field in the default page information is empty in the target configuration information, the field value of this field is still the default value of this field in the default page information.
[0058] S103. Forward the page information to be shared to the second client so that the second client outputs the sharing page based on the page information to be shared.
[0059] In this embodiment, by forwarding the page information to be shared to the second client, the page sharing of the target mini-program can be completed. After receiving the page information to be shared, the second client can render the page information to be shared, thereby displaying the sharing page, that is, outputting the sharing page. Exemplarily, the second client may be an instant messaging client, an entertainment client, and so on.
[0060] In the solution provided by the present disclosure, since the designated server stores the configuration information to be utilized configured for the mini-program page, therefore, in response to a sharing operation for a target mini-program, the configuration information of the sharing page indicated by the sharing operation, that is, the target configuration information, can be requested from the designated server. Thus, the default page information of the sharing page indicated by the sharing operation can be updated by using the target configuration information to obtain the page information to be shared, so that after the page information to be shared is forwarded to the second client, the second client can generate a new sharing page based on the page information to be shared, completing the sharing of the mini-program page. It can be seen that this solution does not require developers to modify the code package of the mini-program, and can achieve flexible configuration and modification of the sharing page, thereby improving the sharing efficiency of the mini-program.
[0061] Optionally, in another embodiment of the present disclosure, any configuration information is set with an effective time period;
[0062] Correspondingly, in this embodiment, as Figure 2 shown, the method may include steps S201 - S203:
[0063] S201, in response to a sharing operation for a target mini-program, request from the designated server the target configuration information whose set effective time period matches the designated time;
[0064] wherein, the designated time is the time when the sharing operation occurs; the target configuration information is the configuration information of the sharing page indicated by the sharing operation, and the designated server is: the server for storing the configuration information to be utilized configured for the mini-program page;
[0065] S202, use the target configuration information to update the default page information of the sharing page to obtain the page information to be shared; wherein, the default page information is the default information for describing the sharing page;
[0066] S203, forward the page information to be shared to the second client, so that the second client outputs the sharing page based on the page information to be shared.
[0067] It can be understood that the content of steps S202 - S203 is the same as the content of the above steps S102 - S103, and will not be elaborated here.
[0068] In this embodiment, the designated server may store multiple pieces of configuration information to be utilized configured for any mini-program page, and any piece of configuration information may be set with an effective time period. It can be understood that since there may be multiple pieces of configuration information about the shared page indicated by the sharing operation stored in the designated server, and these multiple pieces of configuration information may be set with different effective time periods, therefore, in response to the sharing operation for the target mini-program, the target configuration information whose set effective time period matches the specified time can be requested from the designated server. Thus, different shared pages can be generated by using different configuration information configured for the same page in different time periods, without the need for manual code modification, improving the sharing efficiency.
[0069] Exemplarily, the way to determine whether the effective time period matches the specified time may be to determine whether the effective time period contains the specified time period. If it contains, the effective time period matches the specified time; otherwise, it does not match.
[0070] Optionally, in one implementation, any piece of configuration information includes: mini-program identifier and page path;
[0071] Correspondingly, in this implementation, in response to the sharing operation for the target mini-program, requesting the target configuration information whose set effective time period matches the specified time from the designated server may include steps A1 - A3:
[0072] A1, construct an information acquisition request carrying the specified time and the page identifier for characterizing the shared page;
[0073] In this implementation, when the user initiates a sharing operation for the target mini-program in the first client, the time when the sharing operation occurs and the page location in the target mini-program where the sharing operation occurs, that is, the page identifier of the shared page, can be determined, so as to construct an information acquisition request carrying the specified time and the page identifier for characterizing the shared page.
[0074] Exemplarily, the page identifier may be a page id, or a page name, etc. It can be understood that if sharing a certain page in the target mini-program, an information acquisition request carrying the specified time and the page identifier for characterizing the page can be constructed, so that subsequently, according to the specified time and the page identifier carried in the request, the target configuration information in the configuration information corresponding to the page, whose effective time period matches the specified time, can be obtained.
[0075] A2. Send the information acquisition request to the specified server so that when the specified server receives the information acquisition request, it determines, from the synchronized configuration information, candidate configuration information whose corresponding page matches the page indicated by the page identifier, and selects, from the candidate configuration information, the configuration information whose set effective time period includes the specified time, and feeds back the selected configuration information to the first client; wherein, the page corresponding to any configuration information is determined based on the mini-program identifier and page path included in the configuration information;
[0076] After constructing the information acquisition request carrying the specified time and page identifier in step A1, the information acquisition request can be sent to the specified server, so that after the specified server receives the information acquisition request, it can select, from the synchronized configuration information, the configuration information that matches the page identifier and the specified time by using the page identifier and the specified time.
[0077] Exemplarily, the mini-program identifier can be the mini-program id, or the mini-program name, etc., and the page path can represent the position of the sharing page corresponding to the configuration information in the mini-program, such as the home page, end page of the mini-program, and so on. It can be understood that since the configuration information includes the mini-program identifier and the page path, and the page path can represent the position of the sharing page corresponding to the configuration information in the mini-program, therefore, the page in the mini-program corresponding to the configuration information can be determined according to the mini-program identifier and the page path. Thus, the page identifier of the determined page is compared with the page identifier carried in the information acquisition request. If they are the same, the page corresponding to the configuration information matches the page indicated by the page identifier carried in the request. Exemplarily, the specified server can select, from the synchronized configuration information, the configuration information whose corresponding page is the same as the page indicated by the page identifier as the candidate configuration information, and after determining the candidate configuration information, select, from the candidate configuration information, the configuration information whose set effective time period includes the specified time, and the selected configuration information is the target configuration information.
[0078] A3. Receive the configuration information sent by the specified server to obtain the target configuration information whose set effective time period matches the specified time.
[0079] It can be understood that the first client receives the configuration information fed back by the specified server, and then can obtain the target configuration information whose set effective time period matches the specified time.
[0080] It can be seen that through this solution, by setting the effective time period for the configuration information, different sharing pages can be generated by using different configuration information configured for the same page in different time periods, without the need for manual code modification, improving the sharing efficiency.
[0081] Optionally, in another embodiment of the present disclosure, on the basis of the embodiment shown in Figure 1 , as shown in Figure 3 , the method may further include step S104:
[0082] S104. In response to not obtaining the target configuration information, send the default page information of the sharing page to the second client, so that the second client outputs the sharing page based on the default page information.
[0083] In this embodiment, if the first client does not obtain the target configuration information, the default page information of the sharing page is sent to the second client. After receiving the default page information, the second client can render the default page information to output the sharing page. Exemplarily, in practical applications, the default page information of the sharing page can be pre-stored locally on the first client, so that when the first client does not obtain the target configuration information, the locally stored default page information of the sharing page can be sent to the second client to complete the sharing of the applet page.
[0084] It can be seen that through this solution, the sharing of the applet page can be completed without obtaining the target configuration information.
[0085] To better understand this solution, the method provided by the embodiments of the present disclosure will be described below with a specific example.
[0086] Figure 4A shows an interaction diagram between the client (corresponding to the first client in the above text) and the O side (corresponding to the specified server in the above text). As shown in Figure 4A , relevant staff of the applet can set configuration information for the applet page on the O side. Among them, the configuration information may include the applet id, path (corresponding to the page path in the above text), sharing title, sharing content, etc. The O side synchronizes the configuration information to the C-Server (the server corresponding to the first client) through the DTS (Data Transmission Service) synchronization method, and the C-Server side provides it to the C-FE (the first client) through the interface synchronization method after parsing the data.
[0087] Figure 4B shows an interaction diagram between the applet side and the O side. As shown in Figure 4BAs shown in the figure, relevant staff of the mini-program can create sharing information (corresponding to the configuration information in the above text) and edit the sharing information on the O side. The sharing information can include parameters such as sharing content, title, effective time period, path, etc. When the user triggers a sharing operation on the mini-program side, an interface request is sent to the O side to obtain the sharing information. The O side feeds back the sharing information through the sharing information synchronization interface to the mini-program side. After receiving the sharing information, the mini-program side calls the interface to issue the sharing. In practical applications, when the user clicks on the mini-program sharing within the host App, the configuration information of the sharing page indicated by the sharing operation can be obtained; if there is no configuration information for the sharing page indicated by the sharing operation, the default page information of the sharing page is used.
[0088] Figure 5 shows an interface diagram of sharing information configuration. As Figure 5 shown, the sharing information can include creation time, activity name, mini-program id, etc. When saving the sharing information, the validation of the effective time period is performed. Multiple effective time periods of the sharing information cannot overlap. For example, the two time periods of 13:00 - 15:00 and 14:00 - 16:00 overlap; the configuration of multiple discrete time periods on weekdays and weekends is supported, and only one sharing information can be configured for the same path.
[0089] It can be seen that through this solution, it supports the low-cost and efficient completion of the custom configuration of the sharing content of the mini-program activity page, which can improve the user sharing experience and the external fission effect of the industry; for the activity pages of internal operation and promotion in each service industry, the time cost of setting the configuration information can be shortened, and the configuration time period is reduced from monthly level to hour / minute level.
[0090] Corresponding to the embodiments of the above method, the embodiments of the present disclosure also provide a page sharing system for a mini-program, as Figure 6 shown, including a first client 610, a second client 620, and a designated server 630;
[0091] The first client 610 is used to, in response to a sharing operation for a target mini-program, request target configuration information from the designated server; use the target configuration information to update the default page information of the sharing page to obtain the sharing page information to be shared; forward the sharing page information to the second client; where the target configuration information is the configuration information for the sharing page indicated by the sharing operation, and the default page information is the default information used to describe the sharing page;
[0092] The second client 620 is used to receive the sharing page information to be shared sent by the first client and output the sharing page based on the sharing page information to be shared;
[0093] The specified server 630 is used to store the configuration information to be utilized configured for the applet page.
[0094] Optionally, the system further includes a specified configuration platform, and the specified configuration platform is: a platform for setting configuration information for the applet page;
[0095] The specified server is specifically used for: obtaining the latest configuration information for the applet page in a manner of data synchronization based on the specified configuration platform.
[0096] Optionally, an effective time period is set for any configuration information;
[0097] The requesting of the target configuration information from the specified server in response to a sharing operation for the target applet includes:
[0098] In response to a sharing operation for the target applet, requesting from the specified server the target configuration information whose set effective time period matches the specified time;
[0099] Wherein, the specified time is the time when the sharing operation occurs.
[0100] Optionally, any configuration information includes: an applet identifier and a page path;
[0101] The requesting of the target configuration information whose set effective time period matches the specified time from the specified server in response to a sharing operation for the target applet includes:
[0102] Constructing an information acquisition request carrying the specified time and a page identifier for characterizing the sharing page;
[0103] Sending the information acquisition request to the specified server, so that when the specified server receives the information acquisition request, it determines, from the synchronized configuration information, candidate configuration information corresponding to a page that matches the page indicated by the page identifier, and selects, from the candidate configuration information, the configuration information whose set effective time period includes the specified time, and feeds back the selected configuration information to the first client; wherein, the page corresponding to any configuration information is determined based on the applet identifier and page path included in the configuration information;
[0104] Receiving the configuration information sent by the specified server to obtain the target configuration information whose set effective time period matches the specified time.
[0105] Optionally, the updating of the default page information of the sharing page with the target configuration information to obtain the page information to be shared includes:
[0106] Replace the field value in the target configuration information with the field value in the default page information that belongs to the same field, to obtain the page information to be shared.
[0107] Optionally, the first client is further configured to:
[0108] In response to not obtaining the target configuration information, send the default page information of the shared page to the second client, so that the second client outputs the shared page based on the default page information.
[0109] Corresponding to the embodiments of the above method, embodiments of the present disclosure further provide a page sharing device for a mini program, which is applied to the first client, as Figure 7 shown, the device includes:
[0110] A request module 710, configured to request target configuration information from a specified server in response to a sharing operation for a target mini program; wherein, the target configuration information is the configuration information for the shared page indicated by the sharing operation, and the specified server is: a server for storing the configuration information to be utilized configured for the mini program page;
[0111] An update module 720, configured to update the default page information of the shared page by using the target configuration information to obtain the page information to be shared; wherein, the default page information is the default information for describing the shared page;
[0112] A sharing module 730, configured to forward the page information to be shared to the second client, so that the second client outputs the shared page based on the page information to be shared.
[0113] Optionally, the manner in which the specified server obtains the configuration information to be utilized configured for the mini program page includes:
[0114] The specified server obtains the latest configuration information for the mini program page based on the data synchronization method of the specified configuration platform;
[0115] Wherein, the specified configuration platform is: a platform for setting configuration information for the mini program page.
[0116] Optionally, any configuration information is set with an effective time period;
[0117] The request module is specifically configured to:
[0118] In response to a sharing operation for a target mini program, request target configuration information from a specified server, where the set effective time period matches the specified time;
[0119] Wherein, the specified time is the time when the sharing operation occurs.
[0120] Optionally, any configuration information includes: a mini-program identifier and a page path;
[0121] The step of, in response to a sharing operation for a target mini-program, requesting, from a specified server, target configuration information whose set effective time period matches the specified time, includes:
[0122] Constructing an information acquisition request carrying the specified time and a page identifier for characterizing the sharing page;
[0123] Sending the information acquisition request to the specified server, so that when the specified server receives the information acquisition request, it determines, from the synchronized configuration information, candidate configuration information whose corresponding page matches the page indicated by the page identifier, and selects, from the candidate configuration information, configuration information whose set effective time period includes the specified time, and feeds back the selected configuration information to the first client; wherein, the page corresponding to any configuration information is determined based on the mini-program identifier and the page path included in the configuration information;
[0124] Receiving the configuration information sent by the specified server to obtain target configuration information whose set effective time period matches the specified time.
[0125] Optionally, the updating module is specifically configured to:
[0126] Replacing the field values in the default page information with the field values in the target configuration information that belong to the same field to obtain the page information to be shared.
[0127] Optionally, the apparatus further includes:
[0128] A default module, configured to, in response to not obtaining the target configuration information, send the default page information of the sharing page to a second client, so that the second client outputs the sharing page based on the default page information.
[0129] 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.
[0130] An electronic device provided by the present disclosure may include:
[0131] At least one processor; and
[0132] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any of the above-mentioned page sharing methods for applets.
[0133] A computer-readable storage medium provided by the present disclosure, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned page sharing methods for applets are implemented.
[0134] A computer program product containing instructions, which when running on a computer, causes the computer to execute the steps of any of the above-mentioned page sharing methods for applets in the above embodiments.
[0135] Figure 8 A schematic block diagram of an exemplary electronic device 800 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, for example, 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, for example, 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 illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0136] As Figure 8 shown, the device 800 includes a computing unit 801, which can execute 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 through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0137] A plurality 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 magnetic 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.
[0138] The computing unit 801 can be various general-purpose and / or special-purpose 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, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above, such as the page sharing method for mini-programs. For example, in some embodiments, the page sharing method for mini-programs can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto 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 page sharing method for mini-programs described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the page sharing method for mini-programs in any other suitable manner (e.g., by means of firmware).
[0139] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments 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 or general programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0140] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0141] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0142] In order 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds 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, speech input, or tactile input).
[0143] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including 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), and the Internet.
[0144] A computer system can include a client and a server. The client and the server are generally far apart from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0145] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0146] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for sharing a page of a mini-program, which is applied to a first client, and the method includes: Responding to a sharing operation for a target mini-program, and requesting target configuration information from a specified server; wherein, the target configuration information is the configuration information for the sharing page indicated by the sharing operation, and the specified server is: a server for storing the to-be-exploited configuration information configured for the mini-program page; wherein, any configuration information is set with an effective time period; the responding to a sharing operation for a target mini-program, and requesting target configuration information from a specified server includes: responding to a sharing operation for a target mini-program, and requesting target configuration information whose set effective time period matches the specified time from a specified server; wherein, the specified time is the time when the sharing operation occurs; Using the target configuration information to update the default page information of the sharing page to obtain the to-be-shared page information; wherein, the default page information is the default information for describing the sharing page; Forwarding the to-be-shared page information to a second client, so that the second client outputs the sharing page based on the to-be-shared page information.
2. The method according to claim 1, wherein, The manner in which the specified server obtains the to-be-exploited configuration information configured for the mini-program page includes: The specified server obtains the latest configuration information for the mini-program page by means of data synchronization based on a specified configuration platform; wherein, the specified configuration platform is: a platform for setting configuration information for the mini-program page.
3. The method according to claim 1, wherein, Any configuration information includes: a mini-program identifier and a page path; The responding to a sharing operation for a target mini-program, and requesting target configuration information whose set effective time period matches the specified time from a specified server includes: Constructing an information acquisition request carrying the specified time and the page identifier for characterizing the sharing page; Sending the information acquisition request to the specified server, so that when the specified server receives the information acquisition request, it determines candidate configuration information whose corresponding page matches the page indicated by the page identifier from the synchronized configuration information, and selects the configuration information whose set effective time period includes the specified time from the candidate configuration information, and feeds back the selected configuration information to the first client; wherein, the page corresponding to any configuration information is determined based on the mini-program identifier and the page path included in the configuration information; Receiving the configuration information sent by the specified server to obtain the target configuration information whose set effective time period matches the specified time.
4. The method according to claim 1, wherein, The using the target configuration information to update the default page information of the sharing page to obtain the to-be-shared page information includes: Replacing the field value in the default page information of the sharing page that belongs to the same field as the field value in the target configuration information with the field value in the target configuration information to obtain the to-be-shared page information.
5. The method according to claim 1, wherein, the method further includes: in response to the failure to obtain the target configuration information, sending the default page information of the sharing page to a second client, so that the second client outputs the sharing page based on the default page information.
6. A page sharing system for a mini-program, including a first client, a second client, and a designated server; the first client is configured to, in response to a sharing operation for a target mini-program, request target configuration information from the designated server; use the target configuration information to update the default page information of the sharing page to obtain the to-be-shared page information; and forward the to-be-shared page information to the second client; wherein, the target configuration information is the configuration information for the sharing page indicated by the sharing operation, and the default page information is the default information for describing the sharing page; wherein, any configuration information is set with an effective time period; the step of, in response to a sharing operation for a target mini-program, requesting target configuration information from the designated server includes: in response to a sharing operation for a target mini-program, requesting target configuration information whose set effective time period matches the specified time from the designated server; wherein, the specified time is the time when the sharing operation occurs; the second client is configured to receive the to-be-shared page information sent by the first client and output the sharing page based on the to-be-shared page information; the designated server is configured to store the configuration information to be utilized configured for the mini-program page.
7. The system according to claim 6 further includes a designated configuration platform, and the designated configuration platform is: a platform for setting configuration information for the mini-program page; the designated server is specifically configured to: obtain the latest configuration information for the mini-program page based on the data synchronization method of the designated configuration platform.
8. A page sharing device for a mini-program, applied to the first client, the device includes: a request module, configured to, in response to a sharing operation for a target mini-program, request target configuration information from the designated server; wherein, the target configuration information is the configuration information for the sharing page indicated by the sharing operation, and the designated server is: a server for storing the configuration information to be utilized configured for the mini-program page; wherein, any configuration information is set with an effective time period; the request module is specifically configured to: in response to a sharing operation for a target mini-program, request target configuration information whose set effective time period matches the specified time from the designated server; wherein, the specified time is the time when the sharing operation occurs; an update module, configured to use the target configuration information to update the default page information of the sharing page to obtain the to-be-shared page information; wherein, the default page information is the default information for describing the sharing page; a sharing module, configured to forward the to-be-shared page information to the second client, so that the second client outputs the sharing page based on the to-be-shared page information.
9. The apparatus according to claim 8, wherein, the manner in which the specified server obtains the configuration information to be utilized configured for the applet page includes: the specified server obtains the latest configuration information for the applet page by means of data synchronization based on a specified configuration platform; wherein the specified configuration platform is a platform for setting configuration information for the applet page.
10. The apparatus according to claim 8, wherein, any one of the configuration information includes: an applet identifier and a page path; responding to a sharing operation for a target applet, and requesting, from the specified server, target configuration information whose set effective time period matches the specified time, includes: constructing an information acquisition request carrying the specified time and an information for characterizing the page identifier of the sharing page; sending the information acquisition request to the specified server, so that when the specified server receives the information acquisition request, it determines, from the synchronized configuration information, candidate configuration information whose corresponding page matches the page indicated by the page identifier, and selects, from the candidate configuration information, configuration information whose set effective time period includes the specified time, and feeds back the selected configuration information to the first client; wherein the page corresponding to any one of the configuration information is determined based on the applet identifier and the page path included in the configuration information; receiving the configuration information sent by the specified server to obtain the target configuration information whose set effective time period matches the specified time.
11. The apparatus according to claim 8, wherein, the update module is specifically configured to: replace the field value in the default page information with the same field as the field value in the target configuration information to obtain the page information to be shared.
12. The apparatus according to claim 8, wherein, the apparatus further includes: a default module, configured to, in response to not obtaining the target configuration information, send the default page information of the sharing page to the second client, so that the second client outputs the sharing page based on the default page information.
13. An electronic device, including: 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 to enable the at least one processor to execute the method according to any one of claims 1-5.
14. 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-5.
15. A computer program product including a computer program, and the computer program implements the method according to any one of claims 1-5 when executed by a processor.
Citation Information
Patent Citations
Method, system and equipment for processing sharing path of page in applet and medium
CN115221435A