A cross-platform multi-mobile application access management method and system
By customizing the call of extended functions and managing permissions in a tree structure, the high cost and communication inconvenience of traditional mobile application access methods are solved, and convenient access and efficient permission management of cross-platform applications are achieved.
Patent Information
- Application Number
- CN202310028005.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-01-09
AI Technical Summary
Traditional mobile application access methods have high development costs, consume large resources for permission control functions, and have inconvenient communication between mobile portal applications and access applications.
Two-way communication between mobile applications and mobile portal applications is achieved through custom calling extension functions, a tree structure is used to manage permissions, and interface call requests are verified and authorized.
It simplifies the application access process, reduces development and maintenance costs, improves permission management efficiency, and enables convenient communication between cross-platform applications.
Smart Images

Figure CN116405239B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mobile application access, in particular to a cross-platform multi-mobile application access management method and system. BACKGROUND
[0002] With the rapid development of mobile Internet, enterprise mobile application construction develops rapidly, generating a large number of mobile applications such as App and small programs. The functions such as message push, short message sending, shooting and positioning in each mobile application will be repeatedly developed, resulting in a large amount of resource waste. The emergence of mobile portal application is to realize the rapid integration and unified management of each mobile application. The mobile portal application provides a unified application entrance, application center, message center and public service support for each mobile application.
[0003] However, the traditional mobile portal application usually adopts Android and IOS native development, which inevitably causes high cost, high investment, inconsistent version iteration, long development cycle, complex post-maintenance and many other problems. And the traditional application permission control usually adopts a management method combining user, role and permission table. Different roles are created for different types of personnel, and different application use permissions are given to different roles. In the permission management process, the role and the personnel are in a many-to-many relationship. With the increase of the number of access applications, the number of roles increases, and the personnel in the roles also appear many intersections. It is difficult to clearly maintain these data, and the resource consumption of storage and query will also become larger and larger. When a new user is added, the user must be added with batch roles to ensure that the user obtains the corresponding application use permission. The maintenance is complex and the expansibility is poor. In addition, under the cross-platform development mode, the communication between the mobile portal application and the access application is not convenient, and the transfer of callback functions is not supported. A large number of callback methods need to be defined under the front-end window, resulting in large page memory consumption. SUMMARY
[0004] The embodiment of the present application provides a cross-platform multi-mobile application access management method and system, which is used to solve the following technical problems: the development cost of the traditional mobile application access method is high, the permission control function resource consumption is large, and the communication between the mobile portal application and the access application is not convenient.
[0005] The embodiment of the present application adopts the following technical scheme:
[0006] In one aspect, the embodiments of the present application provide a cross-platform multi-mobile application access management method, which comprises: extending the communication function of a to-be-accessed mobile application and a mobile portal application by custom calling an extension function, so as to guarantee the bidirectional communication of the to-be-accessed mobile application after it accesses the mobile portal application; accessing the to-be-accessed mobile application into the mobile portal application based on application access parameters; managing the application access permission of the accessed mobile application by a tree structure management method; and checking the received interface calling request, and after the checking passes, authorizing the accessed mobile application sending the interface calling request with corresponding public services.
[0007] In one possible implementation, the communication function of a to-be-accessed mobile application and a mobile portal application is extended by custom calling an extension function, so as to guarantee the bidirectional communication of the to-be-accessed mobile application after it accesses the mobile portal application, which specifically comprises: modifying the background user authentication logic of the to-be-accessed mobile application, so that the to-be-accessed mobile application interfaces with the auth service of a unified authentication center; adding the this.$refs.webview.evalJS() method in the mobile portal application, which is used to execute the JS method defined in the accessed mobile application; adding the postMessage() method in js-bridge.js in the to-be-accessed mobile application, which is used to call the native capability API in the mobile portal application; developing a custom calling extension function based on the uni.webview.js() method, and through the custom calling extension function, initiating and executing the callback function when calling the API between the mobile application and the mobile portal application, so as to guarantee the bidirectional communication of the to-be-accessed mobile application after it accesses the mobile portal application.
[0008] In a feasible implementation, the initiation and execution of the callback function are performed when the API call is made between the mobile application and the mobile portal application by customizing the call extension function, specifically including: when the API call is made between the mobile application and the mobile portal application, a callback function is automatically generated for this API call by a first custom call extension function and is declared under the window object; wherein the first custom call extension function is a unified initiation function for the mobile application to call the mobile portal application API; the status bit of the mobile portal application return data is judged by the first custom call extension function; if the status bit is true, the resolve(data) method is called to return the mobile portal application return result; if the status bit is false, the reject(msg) method is called to create an asynchronous call by a Promise and set a preset time delay; if there is no return value within the preset time, it is determined that this API call fails, and the callback function is deleted in the window object; the callback function declared under the window object is executed by a second custom call extension function, and the callback function is cleared after the execution is completed; wherein the second custom call extension function is a unified execution function for the mobile portal application to initiate the API call of the mobile application.
[0009] In a feasible implementation, the mobile application to be accessed is accessed into the mobile portal application based on application access parameters, specifically including: after receiving an application access request, determining the access mode of the mobile application to be accessed; wherein the access mode includes a WebApp mode and a native application mode; in the WebApp mode, the mobile application to be accessed is accessed into the mobile portal application by using a WebView or a WKWebView loading link mode; in the native application mode, it is determined whether the mobile application to be accessed is installed according to the package name in the Android or IOS startup parameter; if it is installed, the mobile application to be accessed is called up by using the UrlSchemes protocol; if it is not installed, the user is guided to download and install the mobile application to be accessed according to the installation package download address in the application access parameters; wherein the application access parameters are filled in by the mobile application manufacturer in the application access page in the background management system; after the mobile application is accessed, the AppId, AppKey and AppSecret are generated and issued to the manufacturer of the mobile application.
[0010] In an implementable embodiment, application access permission management is performed on the mobile application that has been accessed by using a tree structure management method, and the method specifically comprises: perfecting an organization table in a database; the organization table at least comprises the following fields: organization node identification code, parent node, level, node full path, sequence, whether a leaf node, whether available, node name, and node code; wherein the organization node identification code and the parent node are key fields and cannot be empty; the node full path is a set of organization node identification codes of all superior nodes of a current organization node to a top node, and each organization node identification code is spliced by a connection symbol; creating a plurality of organization nodes according to enterprise demand data, and generating an organization node identification code and a node type for each organization node; wherein the node type at least comprises a unit node, a department node, a post node, and a personnel node; defining a superior-inferior relationship for the plurality of organization nodes, determining a top node and a node full path of a current node, and displaying and managing the organization nodes in a tree structure according to the superior-inferior relationship; and adding an organization node that needs to be authorized to a corresponding application permission list in an application authorization page, so that the organization node obtains application access permission.
[0011] In an implementable embodiment, after adding an organization node that needs to be authorized to a corresponding application permission list in an application authorization page, so that the organization node obtains application access permission, the method further comprises: after receiving an application access request of a user, querying a node full path of the user in the organization table; splitting the node full path by recognizing a splicing symbol to obtain a plurality of organization node identification codes; and if any one of the plurality of organization node identification codes exists in the application permission list, determining that the user has access permission of the application.
[0012] In an embodiment, the received interface call request is checked, and after the check is passed, the mobile application that sends the interface call request is authorized for corresponding public services, specifically including: receiving an interface call request sent by a mobile application manufacturer; wherein the interface call request contains a request header, and the request header carries an appKey, an Autho return Token, a timestamp, and encryption check information; the interface call request is checked, specifically including: verifying the token through auth to obtain login user information; determining whether the AppId has service call permission, and if so, further checking; determining the interval between the timestamp and the current time, and if it exceeds 1 minute, the request is invalid, and if it does not exceed 1 minute, further checking; verifying whether the encryption check information is consistent according to the parameter information, and if so, the check is passed; after the check is passed, the mobile application of the mobile application manufacturer is authorized for corresponding public services; wherein the provided public services at least include: unified message pushing, message pushing result return, unified short message issuing, issuing result return, unified voice synthesis service, and unified data encryption service.
[0013] In an embodiment, after the application access permission management of the accessed mobile application is performed through the tree structure management method, the method further includes: approving application access information submitted by a mobile application manufacturer, and after the approval is passed, performing application enabling and disabling settings; after the application is enabled, the application is displayed in the application center of the mobile portal application and is only displayed to users with access permission.
[0014] In an embodiment, the method further includes: if the mobile application accesses the mobile portal application in a WebApp mode and needs to call a native capability API in the mobile portal application, the native capability API is located and navigated in the mobile portal application through a postMessage() method, and then the native capability API is called to obtain corresponding return data.
[0015] In another aspect, the embodiment of the present application also provides a cross-platform multi-mobile application access management method and system, which includes: a communication guarantee module, configured to perform communication function extension on a to-be-accessed mobile application and a mobile portal application through a custom call extension function, so as to guarantee the bidirectional communication of the to-be-accessed mobile application after accessing the mobile portal application; an application access module, configured to access the to-be-accessed mobile application into the mobile portal application based on application access parameters; an application access permission management module, configured to perform application access permission management on the accessed mobile application through a tree structure management method; and a public service authorization module, configured to check a received interface call request, and after the check is passed, to authorize the accessed mobile application that sends the interface call request for corresponding public services.
[0016] Compared with the prior art, the cross-platform multi-mobile application access management method and system provided by the embodiment of the application has the following beneficial effects:
[0017] 1. The multi-application access management system in the application is based on the uniapp development framework, and a new mobile portal application design and application access concept is proposed, which breaks the mode that the traditional mobile portal application can only be developed using a native language, simplifies the application access process, facilitates private deployment and rapid iteration of enterprise users, and avoids a series of problems caused by Android and IOS development.
[0018] 2. The application realizes cross-platform multi-application access in a set of systems, can effectively reduce the number of application installations of users, achieves a set of user data for multiple systems, and avoids account forgetting caused by too many system accounts.
[0019] 3. The access management method and system provided by the application support cross-platform operation, provide native capability API for the mobile application of the mobile phone terminal, and provide unified public service resources for the mobile application by the background management system, thereby reducing repeated construction of many functions and saving costs.
[0020] 4. The application proposes a new permission management mode, simplifies the multi-application permission management processing logic, improves the user permission query efficiency, and can effectively reduce the maintenance cost under the condition that the user data of large and medium-sized enterprises is updated and maintained every day. When a new user is added, the node of the user is linked to the corresponding position of the tree structure, so that the application permission of the unit node, department node or post node to which the user belongs can be inherited by default, and the maintenance is simple and the expansibility is good.
[0021] 5. The application integrates an extensible JS-API in the mobile application and the mobile portal application, connects the real-time intercommunication between the webview component and the embedded page in the uniapp, makes the communication between the mobile portal application and the access application more convenient, realizes the transfer callback function, and realizes the transfer callback function. The application that has been constructed can be modified according to the JS-API integration method provided by the application to access the mobile portal application, and the application that is being developed or planned to be developed can be developed according to this method, without considering that the application will run on an Android or IOS mobile phone. Only technical personnel with front-end development capability can easily develop an application that can run on a mobile phone terminal, which greatly reduces the business application development cycle and cost. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative effort. In the drawings:
[0023] Figure 1 A cross-platform multi-mobile application access management method flow chart is provided for the embodiments of the present application;
[0024] Figure 2 An application access page schematic diagram is provided for the embodiments of the present application;
[0025] Figure 3 A field definition schematic diagram of an organization table is provided for the embodiments of the present application;
[0026] Figure 4 An organization data storage schematic diagram is provided for the embodiments of the present application;
[0027] Figure 5 A public service authorization page schematic diagram is provided for the embodiments of the present application;
[0028] Figure 6 A cross-platform multi-mobile application access management system structure schematic diagram is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0029] In order to make the person skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments only represent some of the embodiments of the present application, not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should be within the scope of protection of the present application.
[0030] The embodiments of the present application provide a cross-platform multi-mobile application access management method, as shown in Figure 1 The cross-platform multi-mobile application access management method specifically includes steps S101-S104:
[0031] S101, the access management system communicates with the mobile application to be accessed and the mobile portal application by custom calling an extended function, to ensure the two-way communication of the mobile portal application after the mobile application to be accessed accesses the mobile portal application.
[0032] Specifically, first, the background user authentication logic of the mobile application to be accessed is modified, so that the mobile application to be accessed interfaces with the auth service of the unified authentication center.
[0033] Further, js-bridge.js is introduced through a script tag or import, and the main function is to realize the bidirectional communication between the accessed mobile application and the mobile portal application. After introducing js-bridge.js, the this.$refs.webview.evalJS() method is added in the mobile portal application, which is used to execute the JS method defined in the accessed mobile application. In the mobile application to be accessed, the postMessage() method in js-bridge.js is added, which is used to call the native capability API in the mobile portal application.
[0034] Further, to solve the problem that the communication method provided by uniapp does not support callback function transmission, and a large number of callback functions need to be declared in the window of the accessed application, the present application extends the original function. In order to facilitate the unified call of the accessed application, the custom call extension function is developed on the basis of the official uni.webview.js, and when the API call is performed between the mobile application and the mobile portal application, the initiation and execution of the callback function are performed through the custom call extension function, so as to guarantee the bidirectional communication of the mobile application to be accessed after accessing the mobile portal application.
[0035] Specifically, the present application extends two custom call extension functions, which automatically generate a callback function for this API call and declare it under the window object when the API call is performed between the mobile application and the mobile portal application; wherein the first custom call extension function is a unified initiation function for the mobile application to call the mobile portal application API. Then, through the first custom call extension function, the state bit of the mobile portal application return data is judged; if the state bit is true, the resolve(data) method is called to return the mobile portal application return result; if the state bit is false, the reject(msg) method is called to create an asynchronous call through Promise, and a preset time delay is set; if there is no return value within the preset time, it is defaulted that this API call fails, and the callback function is deleted in the window object. Further, through the second custom call extension function, the callback function declared under the window object is executed, and the callback function is cleared after execution; wherein the second custom call extension function is a unified execution function for the API call initiated by the mobile application to the mobile portal application.
[0036] As a feasible implementation, the first custom call extension function is send2App(), and the second custom call extension function is send2Webapp(). send2App is a unified initiation function for WebApp to call the mobile portal API, and a callback function is automatically generated for each call during the process, which is uniformly declared under the window object. In the generation of the callback function, the status bit of the mobile portal return data is judged. If the status bit is true, resolve(data) is called to return the mobile portal return result. If the status bit is false, reject(msg) is called to perform an exception operation. With the help of Promise to create an asynchronous call, a 10s delay is set for waiting, and if there is no return value within 10s, the API call is defaulted to fail, and the callback function is deleted. send2Webapp is a unified execution function for the mobile portal to call the API call initiated by the WebApp, which is mainly applied to execute the callback function of the API call initiated by the WebApp. The callback function declared under the window in the send2App method is executed in this method, and the callback function is cleared after the execution is completed.
[0037] The application solves the problem of calling the native capability API of the accessed WebApp, which requires declaration of a callback function for each call. Through chain calling of the native capability API, the portal application return data can be directly obtained, which greatly reduces the complexity of JS-API development and use.
[0038] As a feasible implementation, if the mobile application accesses the mobile portal application in the WebApp mode and needs to call the native capability API in the mobile portal application, the postMessage() method is used to locate and navigate the native capability API in the mobile portal application, and then the native capability API is called to obtain the corresponding return data.
[0039] S102, the access management system accesses the mobile application to be accessed into the mobile portal application based on the application access parameter.
[0040] Specifically, after receiving the application access request, the access mode of the mobile application to be accessed is judged. The access mode includes a WebApp mode and a native application mode.
[0041] In the WebApp mode, the WebView or WKWebView loading link mode is used to access the application to be accessed into the mobile portal application.
[0042] In the native application mode, it is judged whether the mobile application to be accessed is installed according to the package name in the Android or IOS starting parameter; if installed, the UrlSchemes protocol is used to call the mobile application to be accessed. If not installed, the user is guided to download and install the application to be accessed according to the installation package download address in the application access parameter; wherein the application access parameter is filled in the application access page in the background management system by the mobile application manufacturer.
[0043] After the mobile application is accessed, the access management system generates AppId, AppKey and AppSecret and issues them to the manufacturer of the mobile application.
[0044] In one embodiment, Figure 2 An application access page schematic diagram provided by the embodiment of the application is shown in FIG. 1. Figure 2 As shown in FIG. 1, the application construction manufacturer fills in the application information in the application access page, clicks submit after filling, and the background can receive the corresponding application access request. The application information to be filled in includes application name, English name, application type, system navigation bar, whether it is a common application, application category, application url, Android starting parameter, IOS starting parameter, IOS download address, application icon, application introduction, etc.
[0045] S103, the access management system manages the application access permission of the mobile application to be accessed by the tree structure management method.
[0046] Specifically, the permission management method provided by the application is different from the traditional permission management design. The application mainly adopts the design idea of permission inheritance. First, the organization design of the enterprise or group is optimized, and the tree structure management is adopted. The organization nodes mainly include unit, department, post and personnel. The unique identifier, parent node, node full path and node type of each node are generated in the database. When adding authorization for the application, any node of the organization can be directly selected to add the use permission. For example, the service class and tool class application can be directly authorized to the entire unit, the business class application can be authorized to the related business department, and the fund management class application can be authorized to the special post. After authorization, the personnel of the corresponding child nodes and generation nodes have the application use permission. The specific implementation steps are as follows:
[0047] First, the organization table in the database is perfected. The organization table at least includes the following fields: organization node identifier, parent node, level, node full path, sorting, whether it is a leaf node, whether it is available, node name and node code; wherein the organization node identifier and the parent node are key fields and cannot be empty; the node full path is the organization node identifier set of all parent nodes from the current organization node to the top node, and each organization node identifier is spliced by a connection symbol.
[0048] As a feasible implementation, Figure 3 A field definition diagram of an organization table provided by the embodiment of the present application is shown in the figure, wherein the organization node identifier STRU ID, the parent node PARENT ID, the level STRU LEVEL, the node full path STRU PATH, the order STRU ORDER, whether it is a leaf node IS LEAF, whether it is in use IN USE, the node name STRU NAME and the node code STRU CODE are defined in the database, and the field types are defined. Figure 3
[0049] Further, according to the enterprise demand data, a plurality of organization nodes are created, and an organization node identifier and a node type are generated for each organization node. The node type at least includes a unit node, a department node, a post node and a personnel node. The superior-inferior relationship is defined for the plurality of created organization nodes, the top node and the node full path of the current node are determined, and the organization nodes are displayed and managed in a tree structure according to the superior-inferior relationship.
[0050] Further, when authorization is required, the organization node requiring authorization is added to the corresponding application permission list in the application authorization page, so that the organization node can obtain the application access permission.
[0051] As a feasible implementation, after receiving the application access request of the user, the system first queries the node full path of the user in the organization table. The node full path found is split to obtain a plurality of organization node identifiers by identifying the splicing symbol. If any one of the plurality of organization node identifiers exists in the application permission list, it is determined that the user has the access permission of the application.
[0052] In an embodiment, the organization node identifiers STRU ID in the node full path STRU PATH field are spliced by using the connection symbol “#”. The user inputs his / her account and password on the mobile terminal, and after the auth unified identity authentication, a token code is returned. The token is transmitted to the system, the system first queries the STRU PATH of the user in the organization table, and then splits the string according to the “#” connection symbol. Figure 4 A data storage diagram of an organization table provided by the embodiment of the present application is shown in the figure, Figure 4 As shown in the figure, after the full path of the node corresponding to employee 01 is split, four organization node identification codes can be obtained: rootId, 1, S00000000000000000002, S0000000000000000003, S00000000000000000004. Among these four organization node identification codes, if any one exists in the application permission table, it means that the user has the access and use permission of this application, otherwise the user does not have the permission.
[0053] Using this method, when adding a new user, simply link the user's node to the corresponding position in the tree structure. The user will then inherit the application permissions of the unit, department, or position node to which they belong by default. For example, if Employee A is placed under Leader 01, Employee A will automatically inherit the application permissions of all nodes under Leader 01. This approach requires minimal effort, is simple to maintain, and offers excellent scalability.
[0054] S104: The access management system verifies the received interface call request, and after the verification passes, performs corresponding public service authorization on the connected mobile application that sent the interface call request.
[0055] Specifically, an interface call request sent by a mobile application manufacturer is received, wherein the interface call request includes a request header, and the request header carries appKey, Autho return token, timestamp, and encrypted verification information.
[0056] Furthermore, the interface call request is verified, specifically including: obtaining the logged-in user information through auth verification token; determining whether the AppId has the service call permission, and if so, further verification; determining the time interval between the timestamp and the current time, and if it exceeds 1 minute, the request is invalid; if it does not exceed 1 minute, further verification is performed; verifying whether the encrypted verification information is consistent based on the parameter information, and if so, the verification passes;
[0057] After verification, the mobile application vendor's mobile application will be authorized to provide corresponding public services. The public services provided include at least: unified message push, message push result receipt, unified SMS delivery, delivery result receipt, unified speech synthesis service, and unified data encryption service.
[0058] As a feasible implementation method, Figure 5 A schematic diagram of a public service authorization page provided in an embodiment of the present application is shown as follows: Figure 5As shown, the public service resource includes unified message pushing, message pushing result receipt, unified short message issuing, issuing result receipt, unified voice synthesis service, unified data encryption service, etc. After application access, the background management system generates AppId, AppKey and AppSecret and issues them to the application manufacturer. The application manufacturer calls the interface, and the request header header needs to add appKey, Authorization (auth returns token), timestamp (timestamp), and sign (encryption verification) information. The sign field uses SHA256 to encrypt appkey+timestamp+AppSecret+requestBody. The background public service will perform the following 4-step verification on each request: 1. Verify the token through auth to obtain the logged-in user; 2. Judge whether the AppId has service calling permission; 3. Judge the time interval with the current time, which is invalid if it exceeds 1 minute; 4. Verify whether the sign encryption field is consistent according to the parameter information, and the encryption result is consistent. It can be called. After all conditions are met, this method can enhance the security management of public services and avoid parameter tampering.
[0059] Further, after the application construction manufacturer submits the application access information, the system administrator performs approval, and after the approval is passed, the application is enabled and disabled. After the application is enabled, it can be displayed in the application center of the mobile portal App, and only displayed to users with access permission.
[0060] In addition, the embodiment of the application further provides a cross-platform multi-mobile application access management system, such as Figure 6 As shown in the figure, the cross-platform multi-mobile application access management system 600 specifically comprises:
[0061] The communication guarantee module 610 is configured to expand the communication function of the to-be-accessed mobile application and the mobile portal application by customizing the call of the extended function, so as to guarantee the bidirectional communication of the to-be-accessed mobile application after the to-be-accessed mobile application accesses the mobile portal application.
[0062] The application access module 620 is configured to access the to-be-accessed mobile application into the mobile portal application based on the application access parameter.
[0063] The application access permission management module 630 is configured to manage the application access permission of the accessed mobile application by a tree structure management method.
[0064] The public service authorization module 640 is configured to verify the received interface call request, and after the verification is passed, the accessed mobile application that sends the interface call request is authorized for corresponding public service.
[0065] The systems, apparatuses, modules, or units disclosed in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0066] The specification is presented to enable any person skilled in the art to practice the methods, systems, and computer program products described herein. The computer program products preferably include a computer readable storage medium, a sequence of instructions Figure 1 The functions of each flow or blocks Figure 1 The means for carrying out the functions specified in each flow or block.
[0067] It should be noted that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the identified element.
[0068] Each of the embodiments in the present application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, and thus the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0069] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0070] The above merely provides an example of the present application, but is not intended to limit the present application. The example of the present application can be variously changed and modified by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the example of the present application shall fall within the scope of claims of the present application.
Claims
1. A cross-platform multi-mobile application access management method, characterized in that: The method comprises: By customizing the call extension function, the communication function of the mobile application to be connected and the mobile portal application is extended to ensure two-way communication after the mobile application to be connected accesses the mobile portal application, specifically including: Modify the background user authentication logic of the mobile application to be accessed, so that the mobile application to be accessed can be connected to the auth service of the unified authentication center; in the mobile portal application, add the this.$refs.webview.evalJS() method to execute the JS method defined in the mobile application that has been accessed; in the mobile application to be accessed, add the postMessage() method in js-bridge.js to call the native capability API in the mobile portal application; based on the uni.webview.js() method, develop a custom call extension function, and through the custom call extension function, initiate and execute the callback function when making an API call between the mobile application and the mobile portal application to ensure two-way communication after the mobile application to be accessed accesses the mobile portal application, specifically including: When an API call is made between a mobile application and a mobile portal application, a callback function is automatically generated for the API call through a first custom call extension function and declared under a window object; wherein, the first custom call extension function is a unified initiating function for the mobile application to call the mobile portal application API; through the first custom call extension function, the status bit of the data returned by the mobile portal application is judged; if the status bit is true, the resolve(data) method is called to return the result returned by the mobile portal application; if the status bit is false, the reject(msg) method is called to create an asynchronous call through Promise and set a preset time delay to wait; if there is no return value within the preset time, it is assumed that the API call has failed, and the callback function is deleted from the window object; through the second custom call extension function, the callback function declared under the window object is executed, and the callback function is cleared after execution is completed; wherein, the second custom call extension function is a unified execution function for the API call initiated by the mobile portal application to the mobile application; Based on the application access parameters, the mobile application to be accessed is connected to the mobile portal application, specifically including: after receiving the application access request, determining the access mode of the mobile application to be accessed; wherein, the access mode includes WebApp mode and native application mode; in the WebApp mode, using WebView or WKWebView to load the link method to connect the application to be accessed to the mobile portal application; in the native application mode, judging whether the mobile application to be accessed has been installed according to the package name in the Android or IOS startup parameters; if it has been installed, using the UrlSchemes protocol to call up the mobile application to be accessed; if it has not been installed, guiding the user to download and install the mobile application to be accessed according to the installation package download address in the application access parameters; wherein, the application access parameters are filled in by the mobile application manufacturer in the application access page in the background management system; after the mobile application is accessed, AppId, AppKey, and AppSecret are generated and sent to the manufacturer of the mobile application; Use a tree-structured management method to manage access permissions for connected mobile applications, including: Improve the organizational table in the database; the organizational table includes at least the following fields: organization node identification code, parent node, level, node full path, sorting, whether it is a leaf node, whether it is available, node name and node code; wherein, the organization node identification code and parent node are key fields and cannot be empty; the node full path is the set of organization node identification codes of all upper nodes from the current organization node to the top-level node, and each organization node identification code is spliced by a connector; according to the enterprise demand data, create several organization nodes, and generate an organization node identification code and node type for each organization node; wherein, the node type includes at least unit node, department node, position node and personnel node; define the superior-subordinate relationship for the several organization nodes, determine the node full path of the top-level node and the current node; and according to the superior-subordinate relationship, display and manage the organization nodes in a tree structure; in the application authorization page, add the organization node that needs to be authorized to the corresponding application permission list so that the organization node obtains application access rights; After receiving the user's application access request, query the user's node full path in the organization table; identify the splicing character, split the node full path, and obtain multiple organization node identification codes; if any of the multiple organization node identification codes exists in the application permission list, it is determined that the user has access rights to the application; The received interface call request is verified, and after the verification passes, corresponding public service authorization is performed on the connected mobile application that sent the interface call request.
2. A cross-platform multi-mobile application access management method according to claim 1, characterized in that: Verify the received interface call request. If the verification passes, authorize the connected mobile application that sent the interface call request with corresponding public services, including: Receive an interface call request sent by a mobile application manufacturer; wherein the interface call request includes a request header, and the request header carries appKey, Autho return token, timestamp, and encrypted verification information; Verify the interface call request, specifically including: Obtain login user information through auth verification token; Determine whether the AppId has the service call permission. If so, perform further verification. Determine the time interval between the timestamp and the current time. If it exceeds 1 minute, the request will be invalid. If it does not exceed 1 minute, further verification will be performed. Verify whether the encryption verification information is consistent with the parameter information, if so, the verification passes; After the verification is passed, the mobile application manufacturer's mobile application will be authorized for corresponding public services; among them, the public services provided include at least: unified message push, message push result receipt, unified SMS delivery, delivery result receipt, unified speech synthesis service, and unified data encryption service.
3. A cross-platform multi-mobile application access management method according to claim 1, characterized in that: After performing application access permission management on the connected mobile application using the tree structure management method, the method further includes: Approve the application access information submitted by mobile application manufacturers, and after approval, enable or disable the application; After the application is activated, it will be displayed in the application center of the mobile portal application and will only be displayed to users with access rights.
4. A cross-platform multi-mobile application access management method according to claim 1, characterized in that: The method further comprises: If the mobile application accesses the mobile portal application in the WebApp mode and needs to call the native capability API in the mobile portal application, the native capability API is located and navigated in the mobile portal application through the postMessage() method, and then the native capability API is called to obtain the corresponding return data.
5. A cross-platform multi-mobile application access management system, applying a cross-platform multi-mobile application access management method according to any one of claims 1 to 4, characterized in that: The system comprises: A communication guarantee module is used to extend the communication functions of the mobile application to be connected and the mobile portal application by customizing the call extension function to ensure two-way communication after the mobile application to be connected accesses the mobile portal application; An application access module, configured to access the mobile application to be accessed into the mobile portal application based on application access parameters; The application access permission management module is used to manage the application access permission of connected mobile applications through a tree structure management method; The public service authorization module is used to verify the received interface call request, and after the verification is passed, perform corresponding public service authorization on the connected mobile application that sent the interface call request.
Citation Information
Patent Citations
Access method supporting multiple IPTV services platform and IPTV terminal unit
CN101247344A
Cross-platform middleware device of mobile terminal equipment and implementation method of cross-platform middleware device of mobile terminal equipment
CN104572042A