Method and system suitable for multi-party platform to realize H5 light application through integration

By creating a pass-through port and a retry queue mechanism on the main platform, the problem of incompatibility of H5 light application operations between different third-party platforms is solved, data synchronization and security are achieved, and user experience and system availability are improved.

CN118779032APending Publication Date: 2024-10-15ZHEJIANG LVCHENG FUTURE DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410914170.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The independent operating environments and interface specifications of different third-party platforms make H5 light applications incompatible when running on third-party platforms, resulting in difficulty in data synchronization, increased security risks, and degraded user experience.

Method used

By creating a through port on the main platform and obtaining the port's unique identifier and key, the third-party platform calls the open API to synchronize basic data, and allocates project and light application permissions through the through port to achieve synchronization of light application information and permission changes. The test queue mechanism ensures the success and safety of interface calls.

Benefits of technology

It realizes the seamless operation of H5 light applications between different platforms, maintains the real-time and security of data synchronization, improves service accessibility and user experience, and the system is easy to maintain and expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779032A_ABST
    Figure CN118779032A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system suitable for multi-party platforms to realize H5 light application through integration, electronic equipment and a readable storage medium. A third-party platform creates a through port, obtains a unique identifier and a key of the port allocated by a total platform, calls an open API of the total platform, synchronizes basic data and records a unique code; the third-party platform applies for items and light application permissions; and synchronizing the light application information of the total platform through the open API of the total platform. The platform has the advantages of being efficient, safe and easy to expand, and the integration mode proposed by the application not only can improve the reachability of services, but also can enhance the synergistic effect between different platforms, thereby finally providing richer and more efficient service experience for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data interaction and authority management, and in particular to a method, system, electronic device and readable storage medium suitable for realizing H5 light application through-integration on multiple platforms. Background Art

[0002] In the current wave of digital transformation, various regions and institutions are actively building their own digital platforms to improve service efficiency and user experience. Zhejiang Province's Zheli Future Community Online System (referred to as the "provincial platform") is a typical representative of this, which aims to provide a series of convenient online services for community residents. With the advancement of the major application integration work of Zhejiang Province's future community, the provincial platform needs to deploy the hosted H5 light applications to the self-built digital platforms in various places (referred to as "third-party platforms") so that a wider range of users can use these applications.

[0003] However, there is a challenge in practice, that is, third-party platforms often have their own independent operating environments and interface specifications. These differences may result in the H5 light applications under the provincial platform not being able to run directly on the third-party platform. This incompatibility may cause a series of problems, such as difficulty in data synchronization, increased security risks and reduced user experience. Summary of the invention

[0004] In view of this, the present invention provides a method, system, electronic device and readable storage medium suitable for realizing the integration of H5 light applications on multiple platforms, realizing data interaction of H5 light applications between different platforms, ensuring the seamless operation of light applications on third-party platforms, while maintaining the real-time and security of data synchronization.

[0005] In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended to be a general review, nor is it intended to identify key / important components or to delineate the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.

[0006] The present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for realizing H5 light application integration on multiple platforms, comprising:

[0008] The third-party platform creates a through port and obtains the unique port identifier and key assigned by the main platform;

[0009] The third-party platform calls the open API of the main platform through the unique port identifier and key, synchronizes the basic data to the main platform, and records the unique code generated by the main platform;

[0010] The general platform allocates project and light application permissions to third-party platforms through the through-port;

[0011] The through-port obtains the interface address uploaded by the third-party platform. The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address stored in the through-port, and synchronizes the light application information of the main platform through the open API of the main platform.

[0012] Furthermore, the method for realizing H5 light application integration on multiple platforms also includes:

[0013] The overall platform encapsulates callback parameters according to the light application change type;

[0014] Determine whether the callback interface of the through port corresponding to the third-party platform is successfully called. If successful, the process ends. If failed, continue to determine whether the call count threshold is exceeded. If exceeded, the process ends. If not exceeded, enter the retry queue and initiate a callback retry according to the preset strategy;

[0015] The call count threshold is 5 times, and the preset strategy means: after the first callback fails, the callback is retried after entering the retry queue for 10 seconds; after the second callback fails, the callback is retried after entering the retry queue for 30 seconds; after the third callback fails, the callback is retried after entering the retry queue for 3 minutes; after the fourth callback fails, the callback is retried after entering the retry queue for 10 minutes; after the fifth callback fails, the callback is retried after entering the retry queue for 30 minutes.

[0016] Furthermore, the method for realizing H5 light application integration on multiple platforms also includes:

[0017] The mobile terminal of the third-party platform initiates a request to the server of the third-party platform, and the request carries a token and a light application ID;

[0018] The server of the third-party platform initiates a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key;

[0019] The main platform returns the authCode to the third-party platform, and the mobile terminal of the light application returns the authCode to the server of the light application;

[0020] The server of the light application initiates an authentication request to the main platform, and the authentication request carries the authCode, light application ID and signature, and obtains the token returned by the main platform;

[0021] The server of the light application uses the token to make an interface call, obtain user data and send it to the mobile end of the light application.

[0022] Furthermore, the method for realizing H5 light application integration on multiple platforms also includes:

[0023] The management end of the third-party platform initiates a request to the server end of the third-party platform, and the request carries a token and a light application ID;

[0024] The server of the third-party platform initiates a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and signature generated by the key;

[0025] The main platform sends the authToken to the third-party platform, and the management end of the light application sends the authToken back to the server end of the light application;

[0026] The server of the light application initiates an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature. The administrator information interface is called through authToken to obtain the basic administrator information and send it to the management end of the light application.

[0027] In a second aspect, the present invention provides a system suitable for realizing H5 light application integration on multiple platforms, including:

[0028] The port creation module is used by the third-party platform to create a through port and obtain the unique port identifier and key assigned by the overall platform;

[0029] The data synchronization module is used for the third-party platform to call the open API of the main platform through the unique port identifier and key, synchronize the basic data to the main platform, and record the unique code generated by the main platform;

[0030] The permission allocation module is used by the main platform to allocate project and light application permissions to third-party platforms through the through port;

[0031] The information change module is used to obtain the interface address uploaded by the third-party platform through the through-port. The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address stored in the through-port, and synchronizes the light application information of the main platform through the open API of the main platform.

[0032] Furthermore, the system suitable for realizing H5 light application integration on multiple platforms also includes:

[0033] The encapsulated callback module is used by the overall platform to encapsulate callback parameters according to the light application change type;

[0034] The callback judgment module is used to judge whether the callback interface of the through port corresponding to the third-party platform is successfully called. If successful, the process ends. If failed, it continues to judge whether the call count threshold is exceeded. If exceeded, the process ends. If not exceeded, it enters the retry queue and initiates a callback retry according to the preset strategy.

[0035] The call count threshold is 5 times, and the preset strategy is:

[0036] After the first callback fails, it enters the retry queue and initiates a callback retry after 10 seconds;

[0037] After the second callback fails, it enters the retry queue and initiates a callback retry after 30 seconds;

[0038] After the third callback fails, it enters the retry queue and initiates a callback retry after 3 minutes;

[0039] After the fourth callback fails, it enters the retry queue and initiates a callback retry after 10 minutes;

[0040] After the fifth callback fails, it enters the retry queue and initiates a callback retry 30 minutes later.

[0041] Furthermore, the system suitable for realizing H5 light application integration on multiple platforms also includes:

[0042] The first request module is used for the mobile terminal of the third-party platform to initiate a request to the server of the third-party platform, and the request carries a token and a light application ID;

[0043] The second request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key;

[0044] The return module is sent down, which is used for the main platform to return the authCode to the third-party platform, and the mobile terminal of the light application returns the authCode to the server of the light application;

[0045] The mobile authentication module is used for the server of the light application to initiate an authentication request to the overall platform. The authentication request carries the authCode, light application ID and signature, and obtains the token returned by the overall platform. The server of the light application uses the token to make an interface call, obtain user data and send it to the mobile end of the light application.

[0046] Furthermore, the system suitable for realizing H5 light application integration on multiple platforms also includes:

[0047] The third request module is used for the management end of the third-party platform to initiate a request to the server end of the third-party platform, and the request carries a token and a light application ID;

[0048] The fourth request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and signature generated by the key;

[0049] The management-side authentication module is used for the server side of the light application to initiate an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature. The administrator information interface is called through authToken to obtain the basic administrator information and send it to the management side of the light application.

[0050] In a third aspect, the present invention provides an electronic device, comprising: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute the aforementioned method suitable for realizing H5 light application integration on multiple platforms.

[0051] In a fourth aspect, the present invention provides an electronic device and a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the aforementioned method suitable for realizing the integration of H5 light applications on multiple platforms.

[0052] The beneficial effects brought about by the present invention are as follows: by allocating unique port identifiers and keys through an open platform, authentication of interface calls is achieved, thereby achieving effective permission management of third-party platforms and synchronization of basic data, with the advantages of high efficiency, security, and easy scalability. The integration method proposed in this application can not only improve the accessibility of services, but also enhance the synergy between different platforms, thereby ultimately providing users with a richer and more efficient service experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 This is a flowchart of a method for realizing H5 light application integration on multiple platforms in this application;

[0055] Figure 2 This is a schematic diagram of the synchronization process of the light application information and permission changes of this application;

[0056] Figure 3 This is a diagram of the login-free process on the mobile terminal of this application's light application;

[0057] Figure 4 This is a diagram of the log-free process on the management side of the light application of this application;

[0058] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0059] The embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] like Figure 1 As shown, in some illustrative embodiments, a method for implementing H5 light application integration on multiple platforms is provided, comprising the following steps:

[0061] 101: The third-party platform sends an application request to the general platform. The application request contains the information required by the general platform for review. The purpose of the review is to determine whether the current third-party platform can become a light application interoperability service provider. That is, the application request is used by the third-party platform to request the general platform to obtain the qualification of being a light application interoperability service provider. If the review fails, execute step 102; if the review passes, it means that the third-party platform becomes a light application interoperability service provider, and execute step 103.

[0062] 102: The third-party platform obtains the modification information and re-initiates the application, that is, generates a new application request and sends it to the third-party platform.

[0063] 103: The third-party platform sends a creation request to the main platform. The creation request contains the information required for the main platform to review. The purpose of the review is to determine whether the third-party platform can create a through port. That is, the creation request is used by the third-party platform to request the main platform to obtain the qualification to create a through port. If the review fails, execute step 104; if the review passes, it means that the main platform allows the third-party platform to create a through port, and execute step 105.

[0064] 104: The third-party platform obtains the modification information and re-initiates the application, that is, generates a new creation request and sends it to the third-party platform.

[0065] 105: The third-party platform creates a through port and obtains the unique port identifier and key assigned by the main platform.

[0066] 106: The third-party platform calls the open API provided by the main platform through the port unique identifier and key, synchronizes the basic data to the main platform, and records the unique code generated by the main platform. That is, the third-party platform is bound to the unique code to facilitate subsequent data search and sharing, thereby achieving connectivity with the basic data of the main platform.

[0067] Among them, the basic data includes: user data, space data, and human-room relationship data; the unique codes include: user unique code and space unique code.

[0068] 107: The main platform allocates project and light application permissions to the third-party platform through the through-port, that is, the third-party platform applies for project and light application permissions through the corresponding through-port.

[0069] 108: The through port obtains the interface address appCallbackUrl uploaded by the third-party platform. The interface address appCallbackUrl is used to receive the light application information and permission change callback interface request;

[0070] The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address appCallbackUrl stored in the through-port, and synchronizes the light application information of the main platform through the open API of the main platform.

[0071] 109: Record the log information of the open API interface request called by the through port to facilitate subsequent problem tracking and analysis.

[0072] The present invention mainly guides third-party platform developers to settle in the general platform as light application penetration service providers, and apply to create a penetration port, and use the open API provided by the general platform to achieve the penetration integration of H5 light applications issued by the general platform.

[0073] The through port corresponds to the third-party platform and is used to store the through port information applied for and created by each light application through service provider, specifically including: the port unique identifier appKey, the key appSecret, and the interface address appCallbackUrl for receiving light application information and permission change callback interface requests.

[0074] The third-party platform synchronizes the basic data to the main platform through the unique port identifier and key stored in the corresponding through-port to ensure the consistency of the basic data between the third-party platform and the main platform. In addition, the third-party platform applies for project and light application permissions on the main platform through the through-port, and the main platform opens the API interface for the third-party platform corresponding to the through-port to call.

[0075] The open API provided by the overall platform is used to provide an interface for basic data synchronization, an interface for callback query of light application information and permission changes, an interface for obtaining the login-free authCode of the light application mobile terminal, and an interface for the login-free token of the light application management terminal.

[0076] like Figure 2 As shown, the method for implementing H5 light application integration on multiple platforms in this embodiment also includes a light application information and permission change third-party platform synchronization process, which specifically includes the following steps:

[0077] 201: The main platform encapsulates callback parameters according to the light application change type. The light application change types include: light application release and light application removal.

[0078] 202: Start to call back the callback interface of the through port corresponding to the third-party platform.

[0079] 203: Determine whether the callback interface of the through port corresponding to the third-party platform is successfully called. If successful, the process ends; if failed, proceed to step 204.

[0080] 204: Continue to determine whether the call count threshold is exceeded. If exceeded, end the process. If not exceeded, proceed to step 205.

[0081] 205: Enter the retry queue and initiate a callback retry according to the preset strategy.

[0082] The call count threshold is 5 times. The preset strategy is: after the first callback fails, the callback is retried 10 seconds after entering the retry queue; after the second callback fails, the callback is retried 30 seconds after entering the retry queue; after the third callback fails, the callback is retried 3 minutes after entering the retry queue; after the fourth callback fails, the callback is retried 10 minutes after entering the retry queue; after the fifth callback fails, the callback is retried 30 minutes after entering the retry queue.

[0083] According to the callback result, make corresponding logic: if the callback is successful, end directly; if the callback fails, determine whether the number of calls has been exceeded; if it has been exceeded, end; if not, enter the retry logic, retry 5 times in total, plus the first callback, in extreme cases, the third-party platform will be called back 6 times, and the third-party platform needs to do idempotent processing through the open API. This method has the following benefits:

[0084] High availability: Through the retry mechanism, even if the third-party platform is temporarily unavailable, the overall platform can ensure uninterrupted service and improve the availability of the entire system;

[0085] Flexible response strategies: Through the preset number of retries and time intervals, the overall platform can flexibly respond to different third-party platform service states, avoiding waste of resources and ensuring service continuity;

[0086] Stable interactive experience: For users, no matter how the backend service changes, the frontend H5 application experience is smooth and stable, which helps to improve user satisfaction with the service;

[0087] Efficient resource utilization: Through retry queues and strategies, the overall platform can effectively utilize resources and avoid resource waste due to frequent invalid requests;

[0088] Easy to maintain: The entire integration process is implemented through coding and configuration, which is easy to maintain and update. When the third-party platform services change, the overall platform can adapt quickly without large-scale code modifications;

[0089] Clear error handling: When a callback fails, the overall platform will handle it according to the preset logic, which helps to quickly locate the problem and take appropriate measures.

[0090] In short, this method can improve the flexibility and availability of the system while ensuring system stability, providing users with a high-quality service experience, while also providing a convenient working environment for maintenance personnel.

[0091] like Figure 3 As shown, the method for realizing H5 light application integration on multiple platforms in this embodiment also includes a light application mobile terminal login-free process, which specifically includes the following steps:

[0092] 301: The mobile terminal of the third-party platform initiates a request to the server of the third-party platform, and the request carries a token and a light application ID.

[0093] 302: The server of the third-party platform initiates a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key.

[0094] 303: The main platform returns the authCode to the server of the third-party platform.

[0095] 304: The server of the third-party platform returns the authCode to the mobile terminal of the third-party platform.

[0096] Steps 301-304 implement the third-party platform calling the open API provided by the main platform through the specified parameters to obtain the authCode. The authCode usually refers to the authorization code, which is a temporary credential in the open API verification process and is used for one-time security authentication between the third-party platform and the main platform.

[0097] When a light application user needs to use a function provided by the main platform on a third-party platform, the third-party platform needs to call the open API provided by the main platform. In order to ensure security and correct authorization, the open API usually requires the third-party platform to initiate the call through specified parameters, including: user unique code, light application ID, community code, port unique identifier, and signature generated by key.

[0098] 305: The mobile terminal of the third-party platform transmits the authCode back to the mobile terminal of the light application by concatenating the authCode and jumping to the light application link.

[0099] This method usually means that the mobile terminal of the third-party platform appends the authCode to the parameters of the URL link, and then opens the link through the browser. It can also pass the link to the light application in some way, such as calling the light application's API. After the light application receives the authCode, it can use it to communicate with the overall platform to obtain the required resources and functions.

[0100] 306: The mobile terminal of the light application transmits the authCode back to the server of the light application by initiating a login request to the server of the light application, and the login request carries the intercepted authCode and the light application ID.

[0101] 307: The server of the light application initiates an authentication request to the main platform, and the authentication request carries authCode, light application ID and signature.

[0102] When authentication is required, the server of the light application will initiate an authentication request to the main platform. In this request, the server will carry three key information: authCode, light application ID, and signature. authCode is used to verify the identity of the light application in this request. The light application ID is a unique identifier on the main platform. Through this ID, the main platform can identify which light application the request comes from, so as to allow or deny the service. Signature is an encrypted verification method for request information. The server of the light application will use a pre-set signature algorithm and key to sign the data in the request. The main platform uses the same algorithm and key to verify the signature to ensure the integrity and authenticity of the request. The entire process ensures the security and reliability of communication between the light application and the main platform.

[0103] 308: The server of the light application obtains the token returned by the main platform. Specifically, the main platform returns the current community information and user openID, and the open interface access token accessToken.

[0104] After the light application initiates an authentication request to the main platform and successfully passes the authentication, the main platform will return some key information to the light application server, including: current community information and user openID. Community information usually refers to specific information of the social network or platform to which the main platform belongs, such as the name, description, link, etc. of the community. User openID is an identifier that identifies the user's identity. After the user logs in or authenticates, the main platform will provide an openID to the user. This openID is unique within the main platform and can be used by light applications to identify specific users.

[0105] AccessToken is a token that represents the authorization for the light application. When the main platform agrees to authorize the light application to access certain resources or data, the main platform will generate an accessToken and return it to the light application. This token usually contains information such as the scope of access to resources and the validity period. The light application needs to carry this token when accessing the main platform's interface to prove that the user has authorized the light application to perform the corresponding operation. In this way, the light application can rely on the services of the main platform to provide a richer and more personalized user experience.

[0106] 309: The server of the light application initiates a request to the main platform to obtain user information. The request carries the interface access token accessToken and the user openID.

[0107] 310: The main platform returns user data to the server of the light application, such as username, avatar, etc.

[0108] 311: The server of the light application sends the user data to the mobile terminal of the light application.

[0109] Steps 309-311 are for the light application to call the accessToken interface, exchange the token through the authCode, light application ID and signature, obtain the returned token, and then call the interface through the token to obtain user data.

[0110] After the main platform verifies the information provided by the light application, it generates an accessToken and returns it to the light application. This token is one-time and usually time-limited, and is used to prove that the light application has the right to access the requested resources. Since the token has verified the identity of the light application and the user's authorization, this token can be used to securely access user data. This allows users to authorize third-party applications to access data without directly revealing their user credentials. This practice improves the security of user data and simplifies the application login and data access process.

[0111] like Figure 4 As shown, the method for implementing H5 light application integration on multiple platforms in this embodiment also includes a third-party platform implementing a light application management terminal login-free process, which specifically includes the following steps:

[0112] 401: The management end of the third-party platform initiates a request to the server end of the third-party platform, and the request carries a token and a light application ID.

[0113] The management end of the third-party platform is usually an interface used by developers or administrators to manage platform resources, monitor status, configure settings, etc. When the management end needs to perform certain operations or query information, it initiates a request to the server end of the third-party platform. In order to prove that the request from the management end of the third-party platform is legitimate, and to be able to identify which light application is requesting resources, the request will contain two key information: token and light application ID. The token is a token that verifies the identity of the management end to ensure that the request is initiated by an authorized user.

[0114] The server of the third-party platform will verify the validity of the token to ensure that the request is initiated by the authorized management end. At the same time, the use of light application ID can help the server distinguish different light applications and provide personalized responses or resource access permissions for each application, ensuring that only legitimate management end users and their light applications can access sensitive data or perform key operations.

[0115] 402: The server of the third-party platform initiates a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and a signature generated by the key.

[0116] 403: The main platform returns the authToken to the server of the third-party platform.

[0117] 404: The third-party platform server returns the authToken to the third-party platform management side.

[0118] Steps 401-404 enable the third-party platform to call the open API provided by the main platform by specifying parameters and obtain authToken. authToken is a token used to prove the legitimacy of the third-party platform and allow it to access the resources provided by the main platform. Usually, when a third-party platform tries to call the open API of the main platform for the first time, it needs to authenticate its identity. The main platform will verify the identity of the third-party platform and respond with an authToken as a credential to access the resources and functions of the main platform.

[0119] 405: The management end of the third-party platform returns the authToken to the management end of the light application. The return method is to splice and carry the authToken, or to jump to the light application management backend link.

[0120] In order for the light application to use authToken to access the resources of the main platform, the management end of the third-party platform needs to pass this token to the management end of the light application. Splicing and carrying authToken usually refers to carrying authToken in the URL parameter. Jumping to the light application management backend link usually means that the management end will create a link. When the light application management end clicks this link, it will be redirected to the light application management backend. In this process, authToken will be passed to the light application management backend, enabling it to access the services of the main platform. The advantage of this approach is that it is simple and safe, because authToken will not be exposed in the header or body of the HTTP request, reducing the risk of interception.

[0121] 406: The management end of the light application returns the authToken to the server end of the light application by initiating a login request to the server end of the light application. The login request carries the intercepted authToken and the light application ID.

[0122] 407: The server of the light application initiates an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature.

[0123] The server of the light application needs to initiate an authentication request to the main platform to ensure that the main platform can verify the identity of the light application and decide whether to allow it to access protected resources. In the authentication request, the server of the light application will carry an authToken to prove the legitimacy of the light application. The light application ID is the unique identifier of the light application on the main platform, which is used to distinguish different light applications. By sending the light application ID, the main platform can confirm which light application the request comes from. The signature is usually a string calculated by a specific algorithm, which is used to verify the integrity and authenticity of the request.

[0124] After receiving the authentication request, the main platform will verify the authToken, light application ID and signature in the request. If the verification is successful, the main platform will consider the light application to be a trusted application and allow it to access the requested resources or services.

[0125] 408: The main platform returns the administrator's basic information and current community information to the server of the light application. The main platform queries the database or service that stores the administrator's basic information, which includes the administrator's username, password, contact information, permission level, etc.

[0126] 409: The server of the light application returns the administrator's basic information and accessToken to the light application's management end.

[0127] Steps 408-409 implement the server of the light application calling the administrator information interface through authToken, obtaining the basic information of the administrator and sending it to the management end of the light application. When calling the administrator information interface, the server of the light application will use an authToken. After successfully passing the verification of authToken, the server can retrieve the basic information of the administrator from the administrator information interface. The confidentiality and security of the administrator information are ensured. Only authenticated and authorized applications can access the administrator information. This can protect the administrator's personal information from being obtained by unauthorized applications or users.

[0128] The present invention has the following significant advantages:

[0129] 1. Authentication mechanism: By allocating appKey and appSecret through the open platform, the authentication of interface calls is realized, ensuring the security of data and the legitimacy of the interface.

[0130] 2. Rights management: The present invention enables the main platform to effectively manage the rights of third-party platforms and record calls, thereby improving the security and controllability of the system.

[0131] 3. Data unification: Through the synchronization of basic data, unified management of basic data is achieved, and the consistency and accuracy of data are improved.

[0132] 4. Reduce code modification: Based on the method of the present invention, the existing H5 light applications do not need to make any code modifications, which greatly reduces the workload of developers and improves development efficiency.

[0133] 5. Easy to expand: The design of the present invention enables new third-party platforms to be quickly connected, thus achieving easy expandability of the system.

[0134] In general, the present invention provides an efficient, secure and easily expandable method, which realizes the seamless connection, integration and use of the overall platform H5 light application and the third-party platform.

[0135] The present invention also provides a system suitable for realizing H5 light application integration on multiple platforms, including:

[0136] The port creation module is used by the third-party platform to create a through port and obtain the unique port identifier and key assigned by the overall platform;

[0137] The data synchronization module is used for the third-party platform to call the open API of the main platform through the unique port identifier and key, synchronize the basic data to the main platform, and record the unique code generated by the main platform;

[0138] The permission allocation module is used by the main platform to allocate project and light application permissions to third-party platforms through the through port;

[0139] The information change module is used to obtain the interface address uploaded by the third-party platform through the through-port. The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address stored in the through-port, and synchronizes the light application information of the main platform through the open API.

[0140] A system suitable for realizing H5 light application integration on multiple platforms, further comprising:

[0141] The encapsulated callback module is used by the overall platform to encapsulate callback parameters according to the light application change type;

[0142] The callback judgment module is used to judge whether the callback interface of the through port corresponding to the third-party platform is successful. If successful, the process ends. If failed, it continues to judge whether the call count threshold is exceeded. If exceeded, the process ends. If not exceeded, it enters the retry queue and initiates a callback retry according to the preset strategy.

[0143] The call count threshold is 5 times, and the preset strategy means: after the first callback fails, the callback is retried after entering the retry queue for 10 seconds; after the second callback fails, the callback is retried after entering the retry queue for 30 seconds; after the third callback fails, the callback is retried after entering the retry queue for 3 minutes; after the fourth callback fails, the callback is retried after entering the retry queue for 10 minutes; after the fifth callback fails, the callback is retried after entering the retry queue for 30 minutes.

[0144] A system suitable for realizing H5 light application integration on multiple platforms, further comprising:

[0145] The first request module is used for the mobile terminal of the third-party platform to initiate a request to the server of the third-party platform, and the request carries a token and a light application ID;

[0146] The second request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key;

[0147] The sending and returning module is used for the main platform to send the authCode to the third-party platform, and the mobile terminal of the light application sends the authCode back to the server of the light application;

[0148] The mobile authentication module is used for the server of the light application to initiate an authentication request to the overall platform. The authentication request carries the authCode, light application ID and signature, and obtains the token returned by the overall platform. The server of the light application uses the token to make an interface call, obtain the user's basic data resources and send them to the mobile terminal of the light application.

[0149] A system suitable for realizing H5 light application integration on multiple platforms, further comprising:

[0150] The third request module is used for the management end of the third-party platform to initiate a request to the server end of the third-party platform, and the request carries a token and a light application ID;

[0151] The fourth request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and signature generated by the key;

[0152] The management-side authentication module is used for the server side of the light application to initiate an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature. The administrator information interface is called through authToken to obtain the basic administrator information and send it to the management side of the light application.

[0153] The system of the above embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0154] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5As shown, it may include: a shell 61, a processor 62, a memory 63, a circuit board 64 and a power circuit 65, wherein the circuit board 64 is arranged inside the space enclosed by the shell 61, and the processor 62 and the memory 63 are arranged on the circuit board 64; the power circuit 65 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 63 is used to store executable program codes; the processor 62 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 63, and is used to execute any one of the methods provided in the aforementioned embodiments that is suitable for realizing the integration of H5 light applications on multiple platforms, and therefore can also achieve corresponding beneficial technical effects, which have been described in detail in the previous text and will not be repeated here.

[0155] The above electronic devices exist in many forms, including but not limited to:

[0156] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

[0157] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.

[0158] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0159] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0160] (5) Other electronic devices with data interaction functions.

[0161] Correspondingly, an embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement any of the methods provided in the aforementioned embodiments that are suitable for implementing H5 light application integration on multiple platforms, thereby also being able to achieve the corresponding technical effects, which have been described in detail in the previous article and will not be repeated here.

[0162] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0163] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0164] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0165] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present application, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.

[0166] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0167] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for realizing H5 light application integration on multiple platforms, characterized in that: include: The third-party platform creates a through port and obtains the unique port identifier and key assigned by the main platform; The third-party platform calls the open API of the main platform through the unique port identifier and key, synchronizes the basic data to the main platform, and records the unique code generated by the main platform; The general platform allocates project and light application permissions to third-party platforms through the through-port; The through-port obtains the interface address uploaded by the third-party platform. The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address stored in the through-port, and synchronizes the light application information of the main platform through the open API of the main platform.

2. According to claim 1, a method for realizing H5 light application integration on multiple platforms, characterized in that: Also includes: The overall platform encapsulates callback parameters according to the light application change type; Determine whether the callback interface of the through port corresponding to the third-party platform is successfully called. If successful, the process ends. If failed, continue to determine whether the call count threshold is exceeded. If exceeded, the process ends. If not exceeded, enter the retry queue and initiate a callback retry according to the preset strategy; The call count threshold is 5 times, and the preset strategy is: After the first callback fails, it enters the retry queue and initiates a callback retry after 10 seconds; After the second callback fails, it enters the retry queue and initiates a callback retry after 30 seconds; After the third callback fails, it enters the retry queue and initiates a callback retry after 3 minutes; After the fourth callback fails, it enters the retry queue and initiates a callback retry after 10 minutes; After the fifth callback fails, it enters the retry queue and initiates a callback retry 30 minutes later.

3. According to claim 2, a method for realizing H5 light application integration on multiple platforms is characterized in that: Also includes: The mobile terminal of the third-party platform initiates a request to the server of the third-party platform, and the request carries a token and a light application ID; The server of the third-party platform initiates a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key; The main platform returns the authCode to the third-party platform, and the mobile terminal of the light application returns the authCode to the server of the light application; The server of the light application initiates an authentication request to the main platform, and the authentication request carries the authCode, light application ID and signature, and obtains the token returned by the main platform; The server of the light application uses the token to make an interface call, obtain user data and send it to the mobile end of the light application.

4. According to claim 3, a method for realizing H5 light application integration on multiple platforms is characterized in that: Also includes: The management end of the third-party platform initiates a request to the server end of the third-party platform, and the request carries a token and a light application ID; The server of the third-party platform initiates a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and signature generated by the key; The main platform sends the authToken to the third-party platform, and the management end of the light application sends the authToken back to the server end of the light application; The server of the light application initiates an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature. The administrator information interface is called through authToken to obtain the basic administrator information and send it to the management end of the light application.

5. A system suitable for realizing H5 light application integration on multiple platforms, characterized in that: include: The port creation module is used by the third-party platform to create a through port and obtain the unique port identifier and key assigned by the overall platform; The data synchronization module is used for the third-party platform to call the open API of the main platform through the unique port identifier and key, synchronize the basic data to the main platform, and record the unique code generated by the main platform; The permission allocation module is used by the main platform to allocate project and light application permissions to third-party platforms through the through port; The information change module is used to obtain the interface address uploaded by the third-party platform through the through-port. The third-party platform receives the light application information and permission change callback interface request issued by the main platform through the interface address stored in the through-port, and synchronizes the light application information of the main platform through the open API of the main platform.

6. According to claim 5, a system suitable for realizing H5 light application integration on multiple platforms is characterized in that: Also includes: The encapsulated callback module is used by the overall platform to encapsulate callback parameters according to the light application change type; The callback judgment module is used to judge whether the callback interface of the through port corresponding to the third-party platform is successfully called. If successful, the process ends. If failed, it continues to judge whether the call count threshold is exceeded. If exceeded, the process ends. If not exceeded, it enters the retry queue and initiates a callback retry according to the preset strategy. The call count threshold is 5 times, and the preset strategy is: After the first callback fails, it enters the retry queue and initiates a callback retry after 10 seconds; After the second callback fails, it enters the retry queue and initiates a callback retry after 30 seconds; After the third callback fails, it enters the retry queue and initiates a callback retry after 3 minutes; After the fourth callback fails, it enters the retry queue and initiates a callback retry after 10 minutes; After the fifth callback fails, it enters the retry queue and initiates a callback retry 30 minutes later.

7. According to claim 6, a system suitable for realizing H5 light application integration on multiple platforms, characterized in that: Also includes: The first request module is used for the mobile terminal of the third-party platform to initiate a request to the server of the third-party platform, and the request carries a token and a light application ID; The second request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the user's unique code, light application ID, community code, port unique identifier, and a signature generated by the key; The return module is sent down, which is used for the main platform to return the authCode to the third-party platform, and the mobile terminal of the light application returns the authCode to the server of the light application; The mobile authentication module is used for the server of the light application to initiate an authentication request to the overall platform. The authentication request carries the authCode, light application ID and signature, and obtains the token returned by the overall platform. The server of the light application uses the token to make an interface call, obtain user data and send it to the mobile end of the light application.

8. According to claim 7, a system suitable for realizing H5 light application integration on multiple platforms is characterized in that: Also includes: The third request module is used for the management end of the third-party platform to initiate a request to the server end of the third-party platform, and the request carries a token and a light application ID; The fourth request module is used for the server of the third-party platform to initiate a request to the main platform, and the request carries the administrator's mobile phone number, administrator account name, light application ID, community code, port unique identifier, and signature generated by the key; The management-side authentication module is used for the server side of the light application to initiate an authentication request to the main platform, and the authentication request carries authToken, light application ID and signature. The administrator information interface is called through authToken to obtain the basic administrator information and send it to the management side of the light application.

9. An electronic device, characterized in that: The electronic device includes: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute a method described in any one of claims 1 to 4 above, which is suitable for realizing H5 light application integration on multiple platforms.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement a method for realizing H5 light application integration on multiple platforms as described in any one of claims 1 to 4.