CN117675757A - Background management method, device, equipment and medium of applet platform - Google Patents

Background management method, device, equipment and medium of applet platform Download PDF

Info

Publication number
CN117675757A
CN117675757A CN202311629441.3A CN202311629441A CN117675757A CN 117675757 A CN117675757 A CN 117675757A CN 202311629441 A CN202311629441 A CN 202311629441A CN 117675757 A CN117675757 A CN 117675757A
Authority
CN
China
Prior art keywords
domain name
applet
address
server
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311629441.3A
Other languages
Chinese (zh)
Inventor
王凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN202311629441.3A priority Critical patent/CN117675757A/en
Publication of CN117675757A publication Critical patent/CN117675757A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a background management method, a device, equipment and a medium of an applet platform, relating to the technical field of applet development, wherein the method comprises the following steps: acquiring domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address; generating name space parameters of the applet according to the domain name configuration information; transmitting the name space parameter to a client device running the applet, so that the running applet obtains a server domain name address and a service domain name address by accessing the name space parameter in a global variable in the running environment; the invention can inject the name space parameter into the operation environment of the small program, and realize the access of the small program to the domain name address in the name space parameter, thereby avoiding the processes of modifying the domain name address in the small program source code, checking the platform and the like, reducing the operation and maintenance cost of the small program and improving the development efficiency of the small program.

Description

Background management method, device, equipment and medium of applet platform
Technical Field
The present invention relates to the field of applet development technologies, and in particular, to a method, an apparatus, a device, and a medium for background management of an applet platform.
Background
With the development of mobile applications, applets (Mini programs) are accepted by more and more people by virtue of the advantages of no installation, running after use, low development cost and the like, so that a plurality of platforms open an applet inlet. In the development process of the applet, a server domain name and a service domain name of the applet are required to be configured in a background management system of the platform, wherein the server domain name is mainly used for interface call, file uploading, file downloading and the like of the applet and a server side, and the service domain name is mainly used for displaying an embedded web page.
In general, when a domain name address is changed, as shown in fig. 1, a new domain name to be used needs to be added in a background management system of an applet platform, after the domain name passes a system verification and verification, domain name configuration in an applet source code is modified, the applet source code is recompiled and packaged, an applet experience version is submitted to the platform, an online verification is initiated, and after the platform verification is successful, an applet of an online new version is rebuilt. As shown in fig. 1, to validate the new domain name configuration, the procedures of modifying the source code of the applet, compiling, packaging, and auditing the platform are required, the auditing time of the platform generally needs 1 to 7 working days, and once the middle is in question, the platform auditing is submitted again, so that the operation and maintenance cost of the applet is greatly increased. Therefore, how to reduce the operation and maintenance cost of the applet and improve the development efficiency of the applet is an urgent problem to be solved by cash.
Disclosure of Invention
The invention aims to provide a background management method, a device, equipment and a computer readable storage medium of an applet platform, so as to reduce the operation and maintenance cost of the applet and improve the development efficiency of the applet.
In order to solve the above technical problems, the present invention provides a background management method for an applet platform, including:
acquiring domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address;
generating name space parameters of the applet according to the domain name configuration information; the name space parameters comprise the server domain name address, the service domain name address and unique tag attributes corresponding to each server domain name address and each service domain name address;
transmitting the name space parameter to a client device running the applet, so that the running applet obtains the server domain name address and the service domain name address by accessing the name space parameter in a global variable in a running environment; wherein the namespace parameter corresponds to a unique identification of the applet in the applet's operating environment.
In some embodiments, the namespace parameters include an applet configuration root level, a server domain name level and a business domain name level under the applet configuration root level, and an array of objects under the server domain name level and under the business domain name level;
the server domain name address comprises domain name addresses corresponding to the server domain name types respectively, and the service domain name address comprises domain name addresses corresponding to the service domain name types respectively; the server domain name type comprises at least one of a hypertext transfer protocol request domain name, a network socket domain name, a file uploading domain name and a file downloading domain name, and the service domain name type comprises a network page domain name;
the object array under the server domain name hierarchy comprises one object array corresponding to each server domain name type, and the object array corresponding to the current server domain name type comprises each server domain name address corresponding to the current server domain name type and each unique tag attribute corresponding to each server domain name address; the object array under the service domain name hierarchy comprises one object array corresponding to each service domain name type, and the object array corresponding to the current service domain name type comprises each service domain name address corresponding to the current service domain name type and each unique tag attribute corresponding to each service domain name address.
In some embodiments, the domain name configuration information further includes unique tag attributes and description information corresponding to each of the server domain name addresses and each of the service domain name addresses.
In some embodiments, the sending the namespace parameters to a client device running the applet includes:
transmitting the name space parameters to a client device running the applet in a proxy mode; wherein the namespace parameter within the operating environment of the applet on the client device is a read-only attribute.
In some embodiments, the obtaining domain name configuration information of the applet includes:
acquiring a domain name configuration request of the applet; wherein the domain name configuration request includes the domain name configuration information;
performing domain name address examination on the domain name configuration information to obtain a domain name address examination result;
if the domain name address examination result is that examination is passed, executing the step of generating the name space parameters of the applet according to the domain name configuration information;
and if the domain name address examination result is that examination is not passed, outputting reconfiguration prompt information.
In some embodiments, the method further comprises:
acquiring a domain name updating request of the applet; the domain name updating request comprises a domain name address to be updated and a unique tag attribute corresponding to the domain name address to be updated;
and updating the name space parameters of the applet according to the domain name updating request of the applet.
In some embodiments, after updating the namespace parameters of the applet according to the domain name update request of the applet, the method further comprises:
according to the configuration updating request sent by the client device, the updated name space parameters are sent to the client device; wherein the configuration update request includes a unique identification of the applet.
The invention also provides a background management device of the applet platform, which comprises:
the acquisition module is used for acquiring domain name configuration information of the applet; the domain name configuration information comprises a server domain name address and a service domain name address;
the generation module is used for generating name space parameters of the applet according to the domain name configuration information; the name space parameters comprise the server domain name address, the service domain name address and unique tag attributes corresponding to each server domain name address and each service domain name address;
The transmission module is used for transmitting the name space parameters to the client equipment running the applet so that the running applet obtains the server domain name address and the service domain name address by accessing the name space parameters in the global variables in the running environment; wherein the namespace parameter corresponds to a unique identification of the applet in the applet's operating environment.
The invention also provides a background management device of the applet platform, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the background management method of the applet platform when executing the computer program.
Furthermore, the present invention provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the background management method of the applet platform as described above.
The invention provides a background management method of a small program platform, which comprises the following steps: acquiring domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address; generating name space parameters of the applet according to the domain name configuration information; the name space parameters comprise unique tag attributes corresponding to the server domain name address and the service domain name address respectively; transmitting the name space parameter to a client device running the applet, so that the running applet obtains a server domain name address and a service domain name address by accessing the name space parameter in a global variable in the running environment; the name space parameters in the running environment of the applet correspond to the unique identification of the applet;
Therefore, the name space parameters of the applet are generated according to the domain name configuration information, the name space parameters can be injected into the applet operation environment, and the applet can access and acquire the domain name addresses in the name space parameters, so that the real domain name addresses do not need to be configured in the applet source codes, the processes of modifying the applet source codes, checking the platform and the like during domain name address modification are avoided, the operation and maintenance cost of the applet is reduced, and the applet development efficiency is improved. In addition, the invention also provides a background management device, equipment and a computer readable storage medium of the applet platform, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a small program modification domain name configuration online in the prior art;
FIG. 2 is a flowchart of a background management method of an applet platform according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a namespace parameter according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for background management of an applet platform according to an embodiment of the invention;
FIG. 5 is a schematic domain name modification flow chart of another background management method of an applet platform according to an embodiment of the present invention;
FIG. 6 is a block diagram illustrating a background management apparatus for an applet platform according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a background management device of an applet platform according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a specific structure of a background management device of an applet platform according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 2, fig. 2 is a flowchart of a background management method of an applet platform according to an embodiment of the invention. The method may include:
step 101: acquiring domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address.
It is understood that the domain name configuration information of the applet in this embodiment may be information of the domain name address of the applet configured. The domain name configuration information may include domain name addresses of various server domain names (i.e., server domain name addresses) and domain name addresses of various service domain names (i.e., service domain name addresses). That is, the background management system of the applet platform provided by the background management device of the applet platform (such as a server of the applet platform) may have a configuration function (i.e., a domain name address configuration function) of an applet backend server domain name and a service domain name, so that a developer or a manager of the applet may log in the background management system to configure the server domain name address and the service domain name address of the applet, i.e., domain name configuration information.
Correspondingly, the server domain name addresses comprise domain name addresses corresponding to the server domain name types respectively, and the service domain name addresses comprise domain name addresses corresponding to the service domain name types respectively; the server domain name type may include one or more of an HTTP (Hypertext Transfer Protocol ) request domain name, a Websocket domain name, a file upload domain name, and a file download domain name, and the service domain name type may include a Web page domain name for embedded Web page presentation in an applet.
It should be noted that, for the specific content of the domain name configuration information in this embodiment, the designer may set the specific content according to the practical scenario and the user requirement, for example, the domain name configuration information may include not only the server domain name address and the service domain name address, but also unique tag attributes corresponding to each server domain name address and each service domain name address, that is, unique tag attributes corresponding to each domain name address, so that the purpose of each domain name address is defined by the unique tag attributes, and the distinction during the call in the applet is convenient. The domain name configuration information may also include description information corresponding to each server domain name address and each service domain name address, so as to facilitate the invocation in the applet and the modification of the subsequent domain name addresses. For example, the domain name configuration information may include URLs (Uniform Resource Locator, uniform resource locators) of the two HTTP request domain names, "HTTPs:// request-URL-1.Com" and "HTTPs:// request-URL-2.Com", i.e., domain name addresses, and may also include unique tag attributes (e.g., request Url 1) and description information (e.g., request interface 1) corresponding to "HTTPs:// request-URL-1.Com", and unique tag attributes (e.g., request Url 2) and description information (e.g., request interface 2) corresponding to "HTTPs:// request-URL-2. Com".
Correspondingly, for the specific mode of acquiring the domain name configuration information of the applet by the background management equipment in the step, the configuration information can be set by a designer according to a practical scene and user requirements, for example, the background management equipment can acquire the domain name configuration request of the applet; wherein, the applet domain name configuration request can comprise the unique identification (such as program code AppID) of the applet and domain name configuration information; for example, a developer of the applet can log in the background management system, and configure domain name configuration information of the applet through a domain name address configuration function provided by the background management system, so as to trigger a corresponding domain name configuration request after the configuration is completed.
The present embodiment is presented by taking the background management device as an example of domain name address configuration of one applet, and the domain name address configuration of other applets may be implemented in the same or similar manner as the method provided in the present embodiment, which is not limited in any way.
Correspondingly, the method provided by the embodiment can further comprise an auditing process of the domain name configuration information, namely, the applet platform can audit and verify the configuration completion domain name configuration information so as to configure the name space parameters of the applet by utilizing the audited domain name configuration information. For example, the background management device may obtain a domain name configuration request of the applet in this step; wherein the domain name configuration request includes domain name configuration information; performing domain name address examination on the domain name configuration information to obtain a domain name address examination result so as to realize automatic examination of the domain name address in the domain name configuration information; if the domain name address inspection result is that the inspection is passed, proceeding to step 102; if the domain name address inspection result is that the inspection is not passed, the reconfiguration prompt information is output, and the reconfiguration prompt information can comprise the domain name address which is not passed by the inspection.
Correspondingly, the background management equipment can also acquire the domain name configuration request of the applet; generating and sending an auditing request to an auditing terminal according to domain name configuration information in the domain name configuration request; obtaining an auditing result corresponding to the auditing request returned by the auditing terminal; if the auditing result is that the auditing is passed, the step 102 is entered; if the examination result of the domain name address is that examination is not passed, outputting reconfiguration prompt information to a request terminal corresponding to the domain name configuration request; the request terminal can be a terminal for sending a domain name configuration request, namely a terminal used by a developer of the applet to log in a background management system; the auditing terminal can be a terminal used by an auditing personnel of the applet platform to log in a background management system.
Step 102: generating name space parameters of the applet according to the domain name configuration information; the name space parameter comprises a server domain name address, a service domain name address and unique tag attributes corresponding to each server domain name address and each service domain name address.
It will be appreciated that the namespace parameters in this embodiment may be parameters of a namespace, which may be a logical grouping of code under unique identifiers (e.g., unique identifiers of applets) for preventing conflicts with other objects or variables under the global namespace. The running environment of each applet can be composed of various global variables which are uniformly mounted under the global object corresponding to the unique identification of the applet; if the global object identified by the app id of the applet is uniformly installed, because the app id of each applet is unique, namespaces accessible by each applet are isolated from each other, and only the namespace parameters of the current applet can be accessed in one applet.
Correspondingly, for the specific content and structure of the namespace parameters of the applet in the embodiment, the specific content and structure can be set by the designer according to the practical scenario and the user requirement, for example, because the applet development mainly uses JavaScript (a scripting language) language, the namespace parameters can be in a multi-layer nested form by adopting a hierarchical searching mode to obtain the domain name addresses in the parameters in the namespace, for example, the namespace parameters can include an applet configuration root level, a server domain name level and a service domain name level under the applet configuration root level, and an object array under the server domain name level and under the service domain name level; the object array under the server domain name hierarchy comprises each server domain name address and a unique tag attribute (such as a unique tag attribute in domain name configuration information or a unique tag attribute automatically generated) corresponding to each server domain name address, and can also comprise description information corresponding to each server domain name address; the object array under the service domain name layer comprises each service domain name address and a unique tag attribute corresponding to each service domain name address, and can also comprise descriptive information corresponding to each service domain name address.
As shown in fig. 3, the root level of the namespace parameter is mp.config (i.e., applet configuration root level), the second level includes a server domain name serviceDomain (i.e., server domain name level) and a service domain name businessDomain (i.e., service domain name level), the third level is a specific configuration option of the server domain name and the service domain name, and each configuration option includes one or more configuration data composition object arrays of corresponding server domain name types; the server domain name type includes at least one of an HTTP request domain name (requestUrl), a Websocket domain name (socketUrl), a file upload domain name (uploadFileUrl), and a file download domain name (downloadFileUrl), and the service domain name type includes a web page domain name (webUrl). That is, the object array under the server domain name hierarchy includes one object array corresponding to each server domain name type, and the object array corresponding to the current server domain name type includes each server domain name address corresponding to the current server domain name type and each unique tag attribute corresponding to each server domain name address; the object array under the service domain name hierarchy comprises one object array corresponding to each service domain name type, and the object array corresponding to the current service domain name type comprises each service domain name address corresponding to the current service domain name type and each unique tag attribute corresponding to each service domain name address.
In the third-level namespace parameter, a plurality of domain name addresses may be configured in an object array, for example: requestUrl [ { url [ "https:// request-url-1.Com ], tag:" RequestUrl1", desc:" request interface 1"}, { url:" https:// request-url-2.Com ], tag: "RequestUrl2", desc: "request interface 2" } ].
Step 103: transmitting the name space parameter to a client device running the applet, so that the running applet obtains a server domain name address and a service domain name address by accessing the name space parameter in a global variable in the running environment; wherein the namespace parameters in the operating environment of the applet correspond to the unique identification of the applet.
It can be understood that, in this embodiment, the background management device may send the generated namespace parameter to the client device running the applet, so that the applet running on the client device obtains the server domain name address and the service domain name address by accessing the namespace parameter in the global variable in the running environment, thereby implementing access obtaining of the applet to the domain name address in the namespace parameter. For example, domain name addresses in parameters in a namespace can be obtained in a hierarchical lookup manner in the applet; for example, as shown in fig. 3, when there is an HTTP request with a request tag of a domain name address of requestUrl1 in the applet, the domain name address (URL) with a unique tag attribute (tag) of requestUrl1 is found in the object array data acquired by mp.
Correspondingly, in this embodiment, in order to ensure that the global variable in the operating environment of the applet is not polluted and covered, the namespace parameter in the operating environment of the applet on the client device may be a read-only attribute, and may not be deleted or overwritten. In this step, the background management device may send the namespace parameters to the client device running the applet in a Proxy (Proxy) manner, so that all the namespace parameters may be exposed to the get method only for the developer, i.e. may only be read in a Proxy manner.
In this embodiment, the source code of the applet may not set the domain name address of the server domain name and the service domain name, i.e. the real domain name address is not configured in the applet source code any more, but is acquired by accessing the global variable, so that the applet does not need to pay attention to the rear-end service domain name in the actual running process of the applet, but is dynamically distributed by the applet platform according to the configuration of the background management system; therefore, when the domain name address changes, the applet manager can take effect at the applet end by modifying the related configuration through the background management system of the applet platform, the processes of modifying the applet source code, compiling and packing, auditing the platform and the like are omitted, the operation and maintenance cost of the applet is greatly reduced, the applet development efficiency is improved, and convenience is provided for the iterative upgrade of the service of the applet back end.
It should be noted that, in this embodiment, the background management device sends the generated namespace parameters of the applet to the client device running the applet, so as to implement the exhibition of the namespace parameters in the applet in the client device in the operating environment by using the configuration example, and the background management device may also directly send the domain name configuration information that passes the audit to the client device running the applet, and complete the configuration of the namespace parameters in the applet in the operating environment by using the applet platform running on the client device.
In the embodiment of the invention, the name space parameters of the applet are generated according to the domain name configuration information, so that the name space parameters can be injected into the applet operation environment, and the applet can access and acquire the domain name addresses in the name space parameters, thereby avoiding the processes of modifying the domain name source code, checking the platform and the like when the domain name addresses are modified without configuring the real domain name addresses in the applet source code, reducing the operation and maintenance cost of the applet and improving the applet development efficiency.
Based on the above embodiment, the embodiment of the present invention further provides a flowchart of another background management method of the applet platform, so as to implement modification of the domain name address in the namespace parameters of the applet. Specifically, referring to fig. 4, fig. 4 is a flowchart of another background management method of an applet platform according to an embodiment of the invention. The method may include:
Step 201: acquiring a domain name updating request of an applet; the domain name updating request comprises a domain name address to be updated and a unique tag attribute corresponding to the domain name address to be updated.
It will be appreciated that the domain name update request in this embodiment may be a request for updating and adjusting the domain name address of the server and/or the service domain name address of the applet, for example, a request triggered by a manager of the applet through a background management system.
Correspondingly, the domain name address to be updated in the embodiment may be a domain name address that needs to be updated into a namespace parameter of the applet, such as a server domain name address and/or a service domain name address. As shown in fig. 5, when the domain name update request is a newly added domain name request, the domain name address to be updated may be a newly added domain name address; when the domain name update request is a domain name modification request, the domain name address to be updated may be a modified domain name address.
Further, the step may further include a process of checking the domain name address to be updated in the domain name update request, for example, performing domain name address checking on the domain name address to be updated in the domain name update request, to obtain a domain name address checking result; if the domain name address inspection result is that the inspection is passed, proceeding to step 202; and if the domain name address examination result is that examination is not passed, outputting a re-update prompt message.
Step 202: and updating the name space parameters of the applet according to the domain name updating request of the applet.
It can be understood that the embodiment is not limited to a specific manner of updating the namespace parameters of the applet by the background management device according to the domain name update request of the applet, for example, the background management device may determine the namespace parameters of the applet according to the unique identifier (e.g. AppID) of the applet in the domain name update request; and updating the name space parameter according to the to-be-updated domain name address and the unique label attribute corresponding to the to-be-updated domain name address in the domain name updating request, such as modifying the name space parameter or regenerating a new name space parameter, for example, adding the unique label attribute and the to-be-updated domain name address into the name space parameter or modifying the domain name address corresponding to the unique label attribute into the to-be-updated domain name address.
Step 203: the updated namespace parameters are sent to the client device running the applet.
It can be appreciated that the background management device in this embodiment may send the updated namespace parameters to the client device running the applet, so that the applet running on the client device can obtain the domain name address using the latest namespace parameters.
The specific manner in which the background management device sends the updated namespace parameters to the client device running the applet in this embodiment may be set by the designer according to the usage scenario and the user requirement, for example, the manner in which the namespace parameters are sent in the initial configuration in step 103 may be the same or similar, that is, when the client device normally requests the namespace parameters through updating the namespace parameters in the background management device, the updated namespace parameters may be obtained. In this step, the background management device may also send the updated namespace parameter to the client device according to the configuration update request sent by the client device; wherein the configuration update request includes a unique identification (e.g., appID) of the applet, i.e., the client device may update the locally cached namespace parameters of the applet via the configuration update request. The present embodiment does not impose any limitation on this.
Correspondingly, for the specific manner of sending the updated namespace parameters to the client device according to the configuration update request sent by the client device, that is, the update mechanism of the global naming parameter configuration in the operating environment of the applet may be set by a designer according to a practical scenario and user requirements, for example, the update of the global naming parameter configuration may be implemented in the same or similar manner as the version update method of the applet, for example, the update of the global naming parameter configuration may be classified into synchronous update and asynchronous update; the applet platform running on the client device can periodically check whether the name space parameters of the back-end management device (such as a server) of the applet change, if so, when the applet which is not used for a long time is opened, the automatic synchronous update of the applet can be triggered, and the latest name space parameters are acquired from the back-end management device; that is, the background management device may send a configuration synchronization update request according to the client device, and send the updated namespace parameter to the client device running the applet; the synchronous update request may be an update request sent by the client device when the applet is started, and the synchronous update request may include a unique identifier of the applet. After each time of the applet is started, the applet platform can execute asynchronous update check, if the namespace parameters of the back-end management device are found to change, the latest namespace parameters can be acquired from the back-end management device when the applet is started next time, and the configuration update of the namespace parameters in the applet running space takes effect immediately, or the latest namespace parameters can be acquired from the back-end management device directly when the applet is started this time. That is, the background management device may send a configuration asynchronous update request according to the client device, and send the updated namespace parameters to the client device running the applet; the asynchronous update request may be an update request sent by the client device during the running process of the applet, and the asynchronous update request may include a unique identifier of the applet.
Furthermore, in this embodiment, an interface for querying the configuration update of the applet may be provided for the developer of the applet, and by calling the interface, it may be queried whether the configuration of the namespace parameters of the background management device is updated, and if so, the namespace parameters of the applet running in each client device may be directly and actively updated, or if so, the user may be queried to be prompted to enable the new namespace parameters, so as to prevent the untimely update of the namespace parameters caused by the local cache of the applet in the client device. For example, in this step, according to the acquired developer update request of the applet, an update selection box is displayed on the client device running the applet; and according to the update determination instruction triggered by the update selection box, the updated name space parameter is sent to the client device running the applet.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a background management device for an applet platform, where the background management device for an applet platform described below and the background management method for an applet platform described above may be referred to correspondingly.
Referring to fig. 6, fig. 6 is a block diagram illustrating a background management device of an applet platform according to an embodiment of the invention. The apparatus may include:
An obtaining module 10, configured to obtain domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address;
a generating module 20, configured to generate a namespace parameter of the applet according to the domain name configuration information; the name space parameters comprise unique tag attributes corresponding to the server domain name address and the service domain name address respectively;
a transmission module 30, configured to send the namespace parameters to a client device running the applet, so that the running applet obtains a server domain name address and a service domain name address by accessing the namespace parameters in a global variable in the running environment; wherein the namespace parameters in the operating environment of the applet correspond to the unique identification of the applet.
In some embodiments, the namespace parameters include an applet configuration root hierarchy, a server domain name hierarchy and a business domain name hierarchy under the applet configuration root hierarchy, and an array of objects under the server domain name hierarchy and under the business domain name hierarchy;
the server domain name address comprises domain name addresses corresponding to the server domain name types respectively, and the service domain name address comprises domain name addresses corresponding to the service domain name types respectively; the server domain name type comprises at least one of a hypertext transfer protocol request domain name, a network socket domain name, a file uploading domain name and a file downloading domain name, and the service domain name type comprises a network page domain name;
The object array under the server domain name hierarchy comprises one object array corresponding to each server domain name type, and the object array corresponding to the current server domain name type comprises each server domain name address corresponding to the current server domain name type and each unique tag attribute corresponding to each server domain name address; the object array under the service domain name hierarchy comprises one object array corresponding to each service domain name type, and the object array corresponding to the current service domain name type comprises each service domain name address corresponding to the current service domain name type and each unique tag attribute corresponding to each service domain name address.
In some embodiments, the domain name configuration information further includes unique tag attributes and descriptive information corresponding to each server domain name address and each service domain name address, respectively.
In some embodiments, the transmission module 30 may be specifically configured to send the namespace parameters to the client device running the applet by way of a proxy; wherein the namespace parameter within the operating environment of the applet on the client device is a read-only attribute.
In some embodiments, the acquisition module 10 may include:
the request acquisition sub-module is used for acquiring domain name configuration requests of the applet; wherein the domain name configuration request includes domain name configuration information;
The address examination sub-module is used for performing domain name address examination on the domain name configuration information and obtaining a domain name address examination result; if the domain name address inspection result is that the inspection is passed, sending a starting signal to the generation module 20;
and the prompt sub-module is used for outputting reconfiguration prompt information if the domain name address examination result is that examination is not passed.
In some embodiments, the apparatus may further comprise:
the update acquisition module is used for acquiring a domain name update request of the applet; the domain name updating request comprises a domain name address to be updated and a unique tag attribute corresponding to the domain name address to be updated;
and the configuration updating module is used for updating the name space parameters of the applet according to the domain name updating request of the applet.
In some embodiments, the apparatus may further comprise:
the configuration transmission module is used for transmitting the updated name space parameters to the client equipment according to the configuration update request transmitted by the client equipment; wherein the configuration update request includes a unique identification of the applet.
In this embodiment, the generating module 20 generates the name space parameter of the applet according to the domain name configuration information, so that the name space parameter can be injected into the applet operating environment, and access acquisition of the applet to the domain name address in the name space parameter is realized, so that the real domain name address is not required to be configured in the applet source code, the processes of modification of the applet source code, platform audit and the like during domain name address modification are avoided, the operation and maintenance cost of the applet is reduced, and the applet development efficiency is improved.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a background management device of an applet platform, where the background management device of an applet platform described below and the background management method of an applet platform described above may be referred to correspondingly.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a background management device of a applet platform according to an embodiment of the invention. The background management apparatus may include:
a memory D1 for storing a computer program;
and the processor D2 is used for realizing the steps of the background management method of the applet platform provided by the method embodiment when executing the computer program.
Specifically, referring to fig. 8, fig. 8 is a schematic diagram of a specific structure of a background management device of an applet platform according to an embodiment of the invention, where the background management device 310 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (e.g. one or more processors) and a memory 332, one or more storage media 330 (e.g. one or more mass storage devices) storing application programs 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the data processing apparatus. Still further, the central processor 322 may be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium 330 on the background management device 310.
The background management device 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341. For example, windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
The background management device 310 provided in this embodiment may be a device, such as a server, that provides a background management system of an applet platform.
The steps in the background management method of the applet platform described above may be implemented by the structure of the background management device of the applet platform.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a computer readable storage medium, where a computer readable storage medium described below and a background management method of an applet platform described above may be referred to correspondingly.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the invention. The computer-readable storage medium 40 has stored thereon a computer program 41, which when executed by a processor implements the steps of the background management method of the applet platform as provided by the method embodiments described above.
The computer readable storage medium 40 may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, etc. which can store various program codes.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The apparatus, device and computer readable storage medium of the embodiments are described more simply because they correspond to the methods of the embodiments, and the description thereof will be given with reference to the method section.
The background management method, device, equipment and computer readable storage medium of the applet platform provided by the invention are described in detail above. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (10)

1. A method for background management of an applet platform, comprising:
acquiring domain name configuration information of an applet; the domain name configuration information comprises a server domain name address and a service domain name address;
generating name space parameters of the applet according to the domain name configuration information; the name space parameters comprise the server domain name address, the service domain name address and unique tag attributes corresponding to each server domain name address and each service domain name address;
transmitting the name space parameter to a client device running the applet, so that the running applet obtains the server domain name address and the service domain name address by accessing the name space parameter in a global variable in a running environment; wherein the namespace parameter corresponds to a unique identification of the applet in the applet's operating environment.
2. The applet platform background management method according to claim 1, wherein the namespace parameters include an applet configuration root hierarchy, a server domain name hierarchy and a service domain name hierarchy under the applet configuration root hierarchy, and an array of objects under the server domain name hierarchy and under the service domain name hierarchy;
The server domain name address comprises domain name addresses corresponding to the server domain name types respectively, and the service domain name address comprises domain name addresses corresponding to the service domain name types respectively; the server domain name type comprises at least one of a hypertext transfer protocol request domain name, a network socket domain name, a file uploading domain name and a file downloading domain name, and the service domain name type comprises a network page domain name;
the object array under the server domain name hierarchy comprises one object array corresponding to each server domain name type, and the object array corresponding to the current server domain name type comprises each server domain name address corresponding to the current server domain name type and each unique tag attribute corresponding to each server domain name address; the object array under the service domain name hierarchy comprises one object array corresponding to each service domain name type, and the object array corresponding to the current service domain name type comprises each service domain name address corresponding to the current service domain name type and each unique tag attribute corresponding to each service domain name address.
3. The applet platform background management method according to claim 1 wherein the domain name configuration information further comprises unique tag attributes and description information corresponding to each of the server domain name addresses and each of the service domain name addresses.
4. The method of claim 1, wherein said sending the namespace parameters to a client device running the applet comprises:
transmitting the name space parameters to a client device running the applet in a proxy mode; wherein the namespace parameter within the operating environment of the applet on the client device is a read-only attribute.
5. The method for background management of an applet platform according to claim 1, wherein the obtaining domain name configuration information of an applet comprises:
acquiring a domain name configuration request of the applet; wherein the domain name configuration request includes the domain name configuration information;
performing domain name address examination on the domain name configuration information to obtain a domain name address examination result;
if the domain name address examination result is that examination is passed, executing the step of generating the name space parameters of the applet according to the domain name configuration information;
and if the domain name address examination result is that examination is not passed, outputting reconfiguration prompt information.
6. The applet platform background management method according to any one of claims 1 to 5, further comprising:
Acquiring a domain name updating request of the applet; the domain name updating request comprises a domain name address to be updated and a unique tag attribute corresponding to the domain name address to be updated;
and updating the name space parameters of the applet according to the domain name updating request of the applet.
7. The method for background management of an applet platform according to claim 6, wherein after updating the namespace parameters of the applet according to the domain name update request of the applet, further comprising:
according to the configuration updating request sent by the client device, the updated name space parameters are sent to the client device; wherein the configuration update request includes a unique identification of the applet.
8. A background management apparatus for an applet platform, comprising:
the acquisition module is used for acquiring domain name configuration information of the applet; the domain name configuration information comprises a server domain name address and a service domain name address;
the generation module is used for generating name space parameters of the applet according to the domain name configuration information; the name space parameters comprise the server domain name address, the service domain name address and unique tag attributes corresponding to each server domain name address and each service domain name address;
The transmission module is used for transmitting the name space parameters to the client equipment running the applet so that the running applet obtains the server domain name address and the service domain name address by accessing the name space parameters in the global variables in the running environment; wherein the namespace parameter corresponds to a unique identification of the applet in the applet's operating environment.
9. A background management apparatus of an applet platform, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the background management method of the applet platform according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the background management method of the applet platform according to anyone of claims 1 to 7.
CN202311629441.3A 2023-11-30 2023-11-30 Background management method, device, equipment and medium of applet platform Pending CN117675757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311629441.3A CN117675757A (en) 2023-11-30 2023-11-30 Background management method, device, equipment and medium of applet platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311629441.3A CN117675757A (en) 2023-11-30 2023-11-30 Background management method, device, equipment and medium of applet platform

Publications (1)

Publication Number Publication Date
CN117675757A true CN117675757A (en) 2024-03-08

Family

ID=90076352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311629441.3A Pending CN117675757A (en) 2023-11-30 2023-11-30 Background management method, device, equipment and medium of applet platform

Country Status (1)

Country Link
CN (1) CN117675757A (en)

Similar Documents

Publication Publication Date Title
RU2673403C2 (en) Website access method, device and website system
CN108279932B (en) Method and device for dynamically configuring user interface of mobile terminal
US10713034B2 (en) Updating web resources
US9064029B2 (en) Dynamically identifying and evaluating component hierarchy for rendering content components on a webpage
CN112131504B (en) Webpage editing and displaying method, device, equipment and storage medium
WO2020248727A1 (en) Management method and device for software module, and server
CN105450461A (en) Shunting method and network equipment
CN112615759B (en) Full link voltage measurement assembly, full link voltage measurement method and device
CN112799663A (en) Page display method and device, computer readable storage medium and electronic equipment
CN108021564A (en) A kind of method and apparatus of page reorientation
CN112235132B (en) Method, device, medium and server for dynamically configuring service
US10530709B2 (en) Container contract for data dependencies
CN103139298A (en) Method for transmitting network data and device
CN117675757A (en) Background management method, device, equipment and medium of applet platform
CN115361279A (en) Configuration data updating method and device, electronic equipment and computer readable medium
CN114489674A (en) Data verification method and device of dynamic data model
CN111857736A (en) Cloud computing product generation method, device, equipment and storage medium
CN112764751B (en) Interface generation method and device, interface request method and device and storage medium
CN117240825A (en) Address library construction method, device, equipment and medium applied to CDN
CN117667391A (en) Cluster management method, system, processor and electronic equipment
CN117131295A (en) Resource management method, system, device, electronic equipment and storage medium
CN116560777A (en) Page display method and device
CN112395534A (en) Data acquisition method, object loading method, system and equipment
CN114816932A (en) Method, system, medium and electronic device for managing algorithm
CN115237489A (en) Page resource loading method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination