Cross-platform identity authentication interface abstraction method and system based on national network identity authentication APP

By unifying the identity authentication process across iOS and Android platforms through a cross-platform interface abstraction layer, the problems of high development costs and complex processes in cross-platform authentication are solved, achieving consistency of authentication status and closed-loop process, reducing development costs and improving project feasibility.

CN121842676APending Publication Date: 2026-04-10赖海波
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
赖海波
Filing Date
2026-01-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, when mobile terminal applications access the national digital identity authentication system, they need to adapt to the native identity authentication SDK and jump mechanism of the iOS and Android platforms respectively, resulting in high development costs, complex authentication processes, and a lack of cross-platform consistency and authentication loop.

Method used

This paper provides a cross-platform identity authentication interface abstraction method. It uniformly handles the bounce events of native identity authentication SDKs on iOS and Android platforms and national network identity authentication APP through a cross-platform interface abstraction layer. It encapsulates the authentication results with structured data and returns them to the upper-layer application in an asynchronous callback manner, thereby realizing a closed loop of the authentication process.

Benefits of technology

By shielding platform differences, it achieves consistency in authentication status and a closed-loop process, reduces development costs, and improves project feasibility and the robustness of the authentication process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention relates to a cross-platform identity authentication interface abstraction method and system based on a national network identity authentication APP. The upper-layer application initiates an identity authentication request through a cross-platform interface and calls the native identity authentication SDK to pull up the national network identity authentication APP to execute identity authentication operation, and the national network identity authentication APP locally executes identity authentication and verifies an authentication result to the national identity authentication server; and after the authentication is completed, returning to the upper-layer application which initiates the call through a rebound event. And the primary layer receives the authentication result carried by the rebound event, packages the authentication result into structured data, and returns the structured data to the upper layer application in an asynchronous mode to complete the closed loop of the identity authentication process. According to the method, the difference between the iOS and the Android platform is shielded, the rebound processing and the authentication result expression of the national network identity authentication APP are unified, and the consistency and the engineering implementability of the identity authentication process in the cross-platform environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of mobile terminal digital identity authentication, relates to cross-platform application framework and native identity authentication SDK fusion technology, and particularly relates to a cross-platform identity authentication interface abstraction method and system based on national network identity authentication APP identity authentication and authentication closed loop implementation through back jump events. BACKGROUND

[0002] When a mobile terminal application accesses a national digital identity authentication system, it usually needs to call a national network identity authentication APP to perform identity authentication operations. After the upper application initiates an identity authentication request, the national network identity authentication APP needs to be pulled up by the native identity authentication SDK, and the APP performs identity authentication locally and performs network verification with the national identity authentication server. Since the identity authentication process is completed in the external APP, the life cycle of the upper application is interrupted, the authentication request and the authentication result are separated in time, the upper application is difficult to form an authentication process closed loop, and the authentication state and session context are difficult to manage uniformly.

[0003] In addition, iOS platform and Android platform have significant differences in identity authentication back jump mechanism, life cycle management, interface form and data callback mode: iOS platform usually uses URL Scheme for back jump, while Android platform uses Activity callback or Intent mechanism to complete result return. In the prior art, the upper application needs to adapt to the back jump mode of different platforms and external identity authentication APPs, resulting in high development cost, complex identity authentication logic and errors, which is not conducive to the consistency and engineering implementability of cross-platform identity authentication.

[0004] The prior art has not yet provided an identity authentication interface abstraction method and system capable of shielding the differences between iOS and Android platforms in a cross-platform environment, uniformly processing national network identity authentication APP back jump events and forming an authentication closed loop. SUMMARY

[0005] The technical problem to be solved: the application aims to solve the problem that the upper application in the prior art needs to adapt to the back jump mechanism of different platform native identity authentication SDKs and national network identity authentication APPs, solve the problem that the identity authentication process crosses multiple application life cycle stages and lacks unified abstraction and closed loop, realize identity authentication process closed loop, authentication state consistency and authentication result structured expression in a cross-platform environment, so that the upper application does not need to care about platform differences and external APP details.

[0006] Technical solution: To achieve the above-mentioned purpose, the application provides a cross-platform identity authentication interface abstraction method based on a national network identity authentication APP, comprising the following steps: (1) receiving an identity authentication request initiated by an upper application; (2) calling a native identity authentication SDK through a cross-platform interface abstraction layer to pull up the national network identity authentication APP to execute an identity authentication process; (3) performing an identity authentication operation locally by the national network identity authentication APP, and checking an authentication result to a national identity authentication server through networking; (4) after the identity authentication process is completed, the national network identity authentication APP returns to the original upper application which initiates the call through a back jump event; (5) receiving the authentication result carried by the back jump event in the native layer, analyzing and packaging the authentication result into structured data; (6) returning the structured data to the upper application in an asynchronous callback manner, so that the upper application obtains an identity authentication success or failure result, thereby completing an identity authentication process closed loop.

[0007] In a preferred embodiment, the cross-platform interface abstraction layer is an identity authentication plug-in running in the Flutter cross-platform framework, and the Flutter layer calls the cross-platform interface abstraction layer through a unified method.

[0008] In a preferred embodiment, the back jump event returns the authentication result in the form of URL Scheme back jump on the iOS platform and Activity callback on the Android platform, and both of the above-mentioned back jump mechanisms return the original upper application which initiates the call as the target.

[0009] In a preferred embodiment, the structured data is represented in the form of Map, and the Map contains a state field for representing an authentication state and a context field for representing a session context; the context field includes at least one of token, session or user identification.

[0010] In a preferred embodiment, the method supports processing of authentication failure scenarios, including cancellation, timeout, permission rejection or SDK authentication failure, etc.

[0011] In a preferred embodiment, the method does not require the upper application to write cross-application jump and back jump adaptation logic, and the upper application can complete the access of the national network identity authentication APP through a unified cross-platform interface call. Advantages

[0012] Compared with the prior art, the present application has at least the following beneficial effects: (1) The native identity authentication SDK and the national network identity authentication APP are uniformly abstracted through the cross-platform interface abstraction layer, which shields the differences between iOS and Android platforms in terms of bounce mechanism, life cycle management and data callback, so that the upper application does not need to perceive the platform differences; (2) The national network identity authentication APP is used to perform identity authentication and return the original upper application calling by the bounce event, the authentication result analysis and structured packaging are completed in the native layer, and the upper application is returned in an asynchronous callback manner, which realizes the closed loop of the identity authentication process and the consistency of the authentication state; (3) The authentication result and the session context are packaged in the Map structure, which facilitates the unified management of token, session, user identifier and other context fields, and has good expansibility and engineering implementability; (4) The failure path branch processing such as cancellation, timeout, permission rejection or SDK authentication failure is supported, which improves the robustness and controllability of the identity authentication process; (5) The upper application only needs to call the unified interface to access the national network identity authentication APP, without writing cross-application jump and bounce adaptation logic, which reduces the development cost and is conducive to popularization in cross-platform application scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 is a system structure schematic diagram.

[0014] Figure 2 is a cross-platform adaptation structure schematic diagram.

[0015] Figure 3 is an identity authentication process timing schematic diagram.

[0016] Figure 4 is a life cycle state schematic diagram. DETAILED DESCRIPTION

[0017] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Those skilled in the art should understand that various modifications or equivalent replacements can be made to the following embodiments without departing from the concept of the present application, and these should fall within the protection scope of the present application.

[0018] Embodiment one: overall structure Referring to Figure 1 , the cross-platform identity authentication interface abstraction system based on the national network identity authentication APP provided by the present embodiment comprises: Upper application: used for running business logic and initiating an identity authentication request; Cross-platform interface abstraction layer: preferably an identity authentication plug-in running in the Flutter cross-platform framework, used for receiving an identity authentication request initiated by the upper application and providing a unified calling interface; iOS native identity authentication SDK: deployed on the iOS platform, used to pull up the national network identity authentication APP and cooperate with the bounce mechanism to receive the authentication result; Android native identity authentication SDK: deployed on the Android platform, used to pull up the national network identity authentication APP and receive the authentication result through Activity callback; National network identity authentication APP: used to perform identity authentication locally and verify the authentication result to the national identity authentication server through networking; National identity authentication server: used to verify the authentication request submitted by the national network identity authentication APP and return the authentication result.

[0019] The upper application calls the cross-platform interface abstraction layer through the Flutter cross-platform framework, the cross-platform interface abstraction layer selects to call the iOS native identity authentication SDK or the Android native identity authentication SDK according to the current running platform, pulls up the national network identity authentication APP to perform identity authentication operation, and after the authentication is completed, the national network identity authentication APP bounces back to the original upper application which initiates the call, the native layer receives the bounce data and encapsulates it into a Map structure, and returns it to the Flutter layer through asynchronous callback, and the upper application completes the identity authentication process accordingly.

[0020] Embodiment two: cross-platform adaptation structure Referring to Figure 2 In this embodiment, the cross-platform interface abstraction layer abstracts the iOS native identity authentication SDK and the Android native identity authentication SDK, the upper application initiates an identity authentication request through a unified authentication interface (for example, the getAuthResult method), and the cross-platform interface abstraction layer selects to call the corresponding native SDK according to the running platform, without the upper application judging the platform or implementing two sets of calling logic respectively.

[0021] Embodiment three: identity authentication process timing Referring to Figure 3 The identity authentication process timing of this embodiment is as follows: (1) The upper application calls the unified method provided by the cross-platform interface abstraction layer in the Flutter layer to initiate an identity authentication request; (2) The cross-platform interface abstraction layer calls the native identity authentication SDK through the method channel; (3) The native identity authentication SDK pulls up the national network identity authentication APP, and the national network identity authentication APP switches to the foreground running, and the upper application enters the background or paused state; (4) Users complete the identity authentication operation in the National Network Identity Authentication APP. The National Network Identity Authentication APP submits the authentication request to the National Identity Authentication Server and receives the verification result via the Internet. (5) After authentication is completed, the National Network Identity Authentication APP returns to the original upper-layer application that initiated the call through a jump event. On the iOS platform, the jump is performed using the URL Scheme method, and on the Android platform, the jump is performed using the Activity callback method. The jump target is the original upper-layer application that initiated the identity authentication request. (6) The native layer receives the authentication result carried by the bounce event and converts the authentication result into a structured data container Map; (7) The cross-platform interface abstraction layer returns the Map structure to the Flutter layer through asynchronous callback. The upper application parses the state field and session context field in the Map structure to determine whether the identity authentication is successful or failed, thereby completing the identity authentication process loop.

[0022] In this implementation, the authentication request and the authentication result are transmitted asynchronously, and the two are separated in time. The upper-layer application receives the authentication completion notification through the asynchronous mechanism.

[0023] Example 4: Lifecycle Status See Figure 4 In this embodiment, the lifecycle states of the upper-layer application include: Foreground running state: The upper-layer application is in the foreground, and the user initiates an authentication request in the upper-layer application; Background or paused state: After the native identity authentication SDK launches the national network identity authentication APP, the upper layer application is moved to the background or paused; External application foreground status: The National Network Identity Authentication APP is in the foreground, performing identity authentication and communicating with the National Identity Authentication server; Rebound Activation Status: After the National Network Identity Authentication APP completes the authentication process, it reactivates the upper-layer application through a rebound event; Authentication completed: The upper-layer application receives the authentication result and completes the identity authentication process loop.

[0024] Through the management of the lifecycle states described above, this invention achieves consistency of authentication states and closed-loop process in an identity authentication process involving multiple applications.

Claims

1. A cross-platform identity authentication interface abstraction method based on a national network identity authentication APP, characterized in that, The method comprises the following steps: (1) receiving an identity authentication request initiated by an upper-layer application; (2) calling a native identity authentication SDK to start a national network identity authentication APP to execute an identity authentication process; (3) the national network identity authentication APP locally executes an identity authentication operation and checks an authentication result through networking to a national identity authentication server; (4) the national network identity authentication APP returns to the upper-layer application that initiates the identity authentication request through a back-jumping event after the identity authentication process is completed; (5) receiving the authentication result carried by the back-jumping event in the native layer and encapsulating the authentication result into structured data; 2. The method of claim 1, wherein, (6) returning the structured data to the upper-layer application in an asynchronous callback mode to complete an identity authentication process loop.

3. The method according to claim 1 or 2, characterized in that, The back-jumping event adopts a URL Scheme mode on an iOS platform and adopts an Activity callback mode on an Android platform.

4. The method according to any of the preceding claims, characterized in that The structured data adopts a Map structure.

5. The method of claim 4, wherein, The structured data comprises a session context field.

6. The method according to any of the preceding claims, characterized in that The session context field comprises at least one of a token, a session or a user identifier.

7. The method according to any of the preceding claims, characterized in that The authentication result is received through an Activity callback on an Android platform and is received through a URL Scheme back jump on an iOS platform.

8. The method according to any of the preceding claims, characterized in that The method does not require the upper-layer application to write cross-application jump and back-jump adaptation logic.

9. The method according to any of the preceding claims, characterized in that The identity authentication process supports a failure path branch, including cancellation, timeout, permission rejection or SDK authentication failure.

10. The method of any of the preceding claims, characterized in that The upper-layer application receives an authentication success or authentication failure result in an asynchronous mode. The identity authentication request and the identity authentication result are separated in time sequence.