Access method, device, computer equipment and readable storage medium of user data
Patent Information
- Application Number
- CN202411723868.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-11-28
AI Technical Summary
然而,有一些应用程序并不适用于非标准的SSO协议,因而难以将这些应用程序的数据接入到平台应用
[0037]The aforementioned user data access methods, devices, computer equipment, computer-readable storage media, and computer program products, since the process adapter and data adapter are different adapters for the access process, can decouple the data access acquisition process and the structure conversion process, thus forming a process layer. The process layer is located between the protocol layer and the application layer. It can be adapted to the corresponding protocol through the process adapter and to various data structures through the data adapter. Therefore, it can access multiple protocols and applications and ensure high scalability.
Smart Images

Figure CN119629258B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud platform technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for accessing user data. Background Technology
[0002] As platform applications can connect to more and more applications, developers face the problem of repetitive work and increased maintenance difficulty when integrating APIs from multiple applications.
[0003] In traditional technologies, third-party authorization login utility libraries primarily rely on user access based on the standard SSO protocol, making them heavily dependent on SSO standard interface specifications. However, some applications are not compatible with non-standard SSO protocols, making it difficult to integrate their data into the platform application. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for accessing user data that can access multiple applications and has high scalability, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for accessing user data, the method comprising:
[0006] When the application to be accessed logs into the platform application with a user identifier, a process adapter and a data adapter adapted to the data access process are obtained according to the data access process of the application to be accessed.
[0007] The process adapter obtains the raw data corresponding to the user identifier from the application to be connected, and converts the raw data into target data with a preset data structure according to the data adapter.
[0008] The target data is transmitted to the business system of the platform application.
[0009] In one embodiment, obtaining a process adapter and a data adapter adapted to the data access process of the application to be accessed includes:
[0010] Based on the access process protocol matched by the application to be accessed, a process adapter corresponding to the access process protocol is derived; the process adapter includes the data processing process in the access process protocol.
[0011] The data adapter is determined based on the data structure that matches the application to be accessed; the data adapter includes a field mapping relationship, which is used to map the original data to the target data according to the fields.
[0012] In one embodiment, the process adapter includes a data acquisition process and a data-driven process adapted to the data access process, wherein the data acquisition process and the data-driven process are two processes in the data processing process;
[0013] The step of obtaining the original data corresponding to the user identifier from the application to be connected through the process adapter includes:
[0014] According to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be connected;
[0015] According to the data-driven process, the initial data is processed to obtain the original data corresponding to the user identifier.
[0016] In one embodiment, the step of processing the initial data according to the data-driven process to obtain the original data corresponding to the user identifier includes:
[0017] If the initial data is an identity identifier, the interface of the application to be accessed is called based on the identity identifier to obtain the original data corresponding to the user identifier;
[0018] If the initial data is the original data ciphertext, the original data ciphertext is parsed according to the preset decryption rules to obtain the original data corresponding to the user identifier;
[0019] If the initial data is a hypertext link, the page is redirected through the hypertext link, and the original data corresponding to the user identifier is obtained through the redirected page.
[0020] In one embodiment, the step of converting the raw data into target data with a preset data structure according to the data adapter includes:
[0021] Determine the user data template corresponding to the platform application; the user data template includes fields to be filled.
[0022] According to the field mapping relationship indicated by the data adapter, the original data is filled into the field to be filled to obtain the target data with the preset data structure.
[0023] In one embodiment, transmitting the target data to the business system of the platform application includes:
[0024] The target data is encrypted according to the encryption method corresponding to the platform application to obtain the target ciphertext data.
[0025] Distribute the target encrypted data to the business systems of the platform application;
[0026] The business processing flow in the business system is based on the target encrypted data.
[0027] In one embodiment, before transmitting the target data to the business system of the platform application, the method further includes:
[0028] The business system of the platform application is determined based on the user's session in the platform application using the user identifier;
[0029] The business system processes data in the session based on the target data.
[0030] Secondly, this application also provides a user data access device, comprising:
[0031] A module is created to obtain a process adapter and a data adapter that are adapted to the data access process of the application to be accessed when the application logs in to the platform application with a user identifier.
[0032] The access module is used to obtain the original data corresponding to the user identifier from the application to be accessed through the process adapter, and convert the original data into target data with a preset data structure according to the data adapter.
[0033] The conversion module is used to transmit the target data to the business system of the platform application.
[0034] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the user data access steps in any of the above embodiments.
[0035] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps for accessing user data in any of the above embodiments.
[0036] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps for accessing user data in any of the above embodiments.
[0037] The aforementioned user data access methods, devices, computer equipment, computer-readable storage media, and computer program products, since the process adapter and data adapter are different adapters for the access process, can decouple the data access acquisition process and the structure conversion process, thus forming a process layer. The process layer is located between the protocol layer and the application layer. It can be adapted to the corresponding protocol through the process adapter and to various data structures through the data adapter. Therefore, it can access multiple protocols and applications and ensure high scalability. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is an application environment diagram of a user data access method in one embodiment;
[0040] Figure 2 This is a flowchart illustrating a user data access method in one embodiment;
[0041] Figure 3 This is a schematic diagram of the process for creating an adapter in one embodiment;
[0042] Figure 4 This is a flowchart illustrating the adapter processing in one embodiment;
[0043] Figure 5 This is a schematic diagram of the process for obtaining raw data in one embodiment;
[0044] Figure 6 This is a schematic diagram of the overall process of a user data access method in one embodiment;
[0045] Figure 7 This is a schematic diagram illustrating a specific example of a user data access method in one embodiment;
[0046] Figure 8 This is a structural block diagram of a user data access device in one embodiment;
[0047] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] Integrating third-party login users is a fundamental function of most web services; only with users can one log in and operate the business system. However, the processes for integrating third-party users vary, including integration based on standard SSO protocols, non-standard SSO protocols, and other methods. The data structures for integrating third-party users also differ; for example, some third-party user information includes tenant ID, tenant name, user ID, and username fields, while others only have user ID and username fields.
[0050] Currently, there is no unified user access method that can adapt to the different user access processes and heterogeneous user data structures mentioned above. Most third-party authorization login utility libraries, such as JustAuth, are based on the standard SSO protocol and heavily rely on SSO standard integration specifications. However, they struggle to support non-standard SSO protocols, such as DCP and other user access middleware. Forcibly integrating these third-party authorization login utility libraries into business systems will lead to the following problems:
[0051] 1. Poor scalability. Directly using existing authorization login libraries, such as JustAuth, which are based on the SSO protocol, provides good support for existing third-party login platforms like WeChat, Weibo, and QQ. However, supporting new user access processes and heterogeneous user data structures results in extremely poor scalability. This is especially true for non-SSO protocol user access; forcibly adding development on top of these open-source frameworks leads to very poor code readability and hinders future code maintenance.
[0052] 2. Much repetitive work. Faced with numerous different user login and access processes and different user data structures, many common steps can actually be found. Some existing login tool libraries have not categorized and abstracted these processes, leading to a lot of repetitive development work when used directly.
[0053] 3. Low development efficiency. When integrating user data with new processes and structures, a new process must be developed, resulting in extremely low development efficiency and failing to meet the enterprise's need for rapid response.
[0054] Therefore, it is necessary to design a user access layer that is compatible with different methods, supports both standard SSO and non-standard SSO, and can adapt to heterogeneous user data structures. This layer can serve as a basic functional module of the business system, enabling the business system to extend its user access capabilities to different types and standards, thereby improving user access efficiency and reducing development workload.
[0055] The user data access method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0056] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0057] In one exemplary embodiment, such as Figure 2 As shown, a method for accessing user data is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 206. Wherein:
[0058] Step 202: When the application to be connected logs into the platform application with the user identifier, a process adapter and a data adapter that are adapted to the data access process are obtained according to the data access process of the application to be connected.
[0059] The application to be integrated is an application capable of providing user data; the application to be integrated is the user authentication provider for the platform application. Optionally, the application to be integrated may belong to applications of different clients, such as instant messaging (IM) applications. Optionally, the user data provided by the application to be integrated is stored in the server of the application to be integrated, and through this solution, the user data can be integrated into the platform application, allowing the platform application to reuse the application data therein.
[0060] A user identifier is identification data used to represent a user's identity. Since the application to be connected and the platform application do not necessarily share the same server, and there are many different types of applications to be connected, the user identifiers for different applications may have different definitions. Optionally, the user identifier for the first application to be connected may be a phone number, while the user identifier for the second application to be connected may be an email address.
[0061] A platform application is an application that serves multiple business systems. These business systems access the same user data through the platform application. Optionally, the platform application can be a database shared by multiple business systems, or it can be a web application system—a network platform / network application used to run various business systems.
[0062] The data access process corresponds to the adapter template of the integrated data processing process. The data access process does not correspond one-to-one with either the protocol or the application to be accessed. Instead, it forms a process layer between the protocol layer and the application layer, so that different applications to be accessed can use a common adapter. This ensures the efficiency of adapter development, high flexibility, and high scalability.
[0063] Since some applications seeking to access the system share common sub-processes in their data access procedures, these common sub-processes are treated as a common process. The processing methods and data structures of this common process are abstracted to obtain an adapter template, which can be used to generate corresponding process adapters and data adapters. Optionally, one data access process may include a Single Sign-On (SSO) protocol process and a process modified from the SSO protocol; another data access process may include a non-SSO protocol process and a process modified from the SSO protocol. This allows for application-specific solutions for different applications seeking to access the system.
[0064] A process adapter is an object used for data processing flows. A process adapter includes the data processing flow between the application to be integrated and the platform application, enabling at least part of the data integration process through this data interaction flow. Optionally, regarding the processing order, the process adapter includes a data acquisition flow and a data-driven flow. The data acquisition flow obtains the initial data to be processed, while the data-driven flow processes the initial data to achieve the corresponding data processing. Regarding the processing method, the process adapter includes, but is not limited to: functions for data processing, conditions for triggering functions, and the execution order of different functions.
[0065] Optionally, the data acquisition process includes, but is not limited to: functions for acquiring initial data, conditions for acquiring initial data, and the execution order of different functions in the process of acquiring initial data; the data-driven process includes, but is not limited to: functions for subsequent processing of initial data, conditions for triggering subsequent processing of initial data, and the execution order of different functions in the process of processing initial data.
[0066] A data adapter is an object used to map raw data. The data adapter includes a data structure transformation process between the application to be integrated and the platform application, enabling the transformation of heterogeneous data. Optionally, the data adapter includes field mapping. Optionally, the data adapter indicates how fields in the data integration process are mapped so that the data transmitted from the application to the platform application is converted into the corresponding preset data structure.
[0067] In an optional embodiment, based on the data access process of the application to be accessed, a process adapter and a data adapter adapted to the data access process are obtained, including: determining the application identifier of the application to be accessed; searching for an access process identifier that matches the application identifier in the access process identifier list corresponding to the data access process; and determining the process adapter and data adapter adapted to the data access process based on the access process identifier that matches the application identifier. Therefore, by searching for two types of adapters separately using the access process identifier, processing efficiency can be guaranteed.
[0068] Step 204: Obtain the raw data corresponding to the user identifier from the application to be connected through the process adapter, and convert the raw data into target data with a preset data structure according to the data adapter.
[0069] The raw data is the data to be transformed obtained from the application to be integrated through the process adapter. The raw data includes, but is not limited to, fields such as tenant ID, tenant name, user ID, user name, and user role, and may also include user source data to indicate the application to be integrated.
[0070] The default data structure is the data structure distributed within the platform application to different business systems for data processing. The default data structure includes, but is not limited to, field attributes, relationships between fields, table attributes, and relationships between tables.
[0071] Target data is data with a predefined data structure. The information represented by the target data contains information represented by the original data, and the data structures of the target data and the original data differ. Optionally, the target data includes, but is not limited to, fields such as tenant ID, tenant name, user ID, user name, and user role, as well as user source data used to represent the application to be connected.
[0072] In an optional embodiment, obtaining the raw data corresponding to the user identifier from the application to be connected via a process adapter includes: obtaining the raw data corresponding to the user identifier from the application to be connected according to the process flow contained in the process adapter. Thus, obtaining the raw data through the protocol flow ensures processing efficiency.
[0073] In an optional embodiment, obtaining the original data corresponding to the user identifier from the application to be accessed through a process adapter includes: searching for the original data corresponding to the user identifier in the data transmitted by the application to be accessed according to the data processing flow contained in the process adapter.
[0074] In an optional embodiment, according to the data adapter, converting the original data into target data with a preset data structure includes: converting the original data to the corresponding user data field mapping based on a common user data template as a standard, and filling empty fields to obtain user data with filled user data fields.
[0075] Step 206: Transmit the target data to the business system of the platform application.
[0076] A business system is an application system that acquires data through a platform application. When the target data is transmitted to the business system, some data within the business system can then be used for subsequent business processing. Optionally, the business system is a sub-business within the platform application, through which corresponding functions can be implemented.
[0077] In an optional embodiment, transmitting the target data to the business system of the platform application includes: distributing the target data to the business system of the platform application such that the target data populates a session of the business system, and performing data processing through the session.
[0078] In the aforementioned user data access method, since the process adapter and data adapter are different adapters for the access process, the data acquisition process and the structure transformation process can be decoupled, thus forming a process hierarchy. This process hierarchy sits between the protocol layer and the application layer, allowing it to adapt to corresponding protocols through the process adapter and various data structures through the data adapter. Therefore, it can access multiple protocols and applications while ensuring high scalability. Even for users accessing non-SSO protocols, the corresponding code can be reused, improving code readability and facilitating later code maintenance. Furthermore, given the numerous different user login and access processes and different user data structures, many common steps can be found. By classifying and abstracting these processes, process adapters and data adapters can be formed, reducing redundant development work. Moreover, when accessing user data with new processes and structures, as long as a similar access process exists, there is no need to redevelop a new process, resulting in high development efficiency and adaptability to enterprises' rapid demand response.
[0079] In one exemplary embodiment, such as Figure 3 As shown, based on the data access process of the application to be accessed, a process adapter and a data adapter adapted to the data access process are obtained, including:
[0080] Step 302: Based on the access process protocol matched by the application to be accessed, derive the process adapter corresponding to the access process protocol; the process adapter includes the data processing process in the access process protocol.
[0081] The access process protocol is a standard interaction process between a pre-defined application and a platform application. Since there is not a one-to-one correspondence between the application to be accessed and the access process protocol, the application to be accessed in this embodiment undergoes a matching process with the access process protocol, and a corresponding process adapter is derived through the access process protocol indicated by the matching result.
[0082] Optionally, the access process protocol can be a class in programming. Through this class, specific object instances can be created, each with its own attribute values and process functions to execute the corresponding process. Optionally, matching can be performed separately based on each sub-process in the access process protocol to create process adapters more flexibly. Optionally, matching can also be performed based on the first process contained in the access process protocol to directly construct the corresponding process adapter.
[0083] Optionally, the data processing flow in the access process protocol includes, but is not limited to, the data acquisition flow and the data-driven flow adapted to the data access flow, and may also include other types of sub-flows.
[0084] In an optional embodiment, a process adapter corresponding to the access process protocol is derived based on the access process protocol matched by the application to be accessed. This includes: matching the first sub-process based on the data sent by the application to be accessed; instantiating the first sub-process according to the access process protocol to which it belongs to obtain a process adapter corresponding to the access process protocol; the first sub-process is the first data processing process in each data access process. Therefore, determining the first sub-process using the processing flow and then directly instantiating it based on its access process protocol ensures high processing accuracy, while using data structures for matching allows for more flexible selection of one or more data adapter templates as the corresponding adapter.
[0085] In an optional embodiment, a process adapter corresponding to the access process protocol is derived based on the access process protocol matched by the application to be accessed, including: finding the access process protocol that matches the application identifier of the application to be accessed; creating a corresponding object based on the access process protocol, and using the object as the process adapter corresponding to the access process protocol.
[0086] Step 304: Determine the data adapter based on the data structure that matches the application to be connected; the data adapter includes field mapping relationships, which are used to map the original data to the target data according to the fields.
[0087] Field mapping relationships are the mapping relationships between raw data and target data on fields. Optionally, field mapping relationships represent mapping rules between field attributes to perform data transformation according to field attributes. Optionally, a data adapter can be identified through a corresponding data structure identifier.
[0088] In an optional embodiment, determining a data adapter based on a data structure matching the application to be accessed includes: matching the data sent by the application to be accessed with a preset data structure to obtain a data structure matching the data sent by the application to be accessed; determining a data adapter class for mapping the data structure based on the data structure matching the data sent by the application to be accessed in a mapping table of preset rules; and instantiating the data adapter class to obtain a data adapter. Thus, by matching at the data structure level and selecting a suitable data adapter class from multiple preset rules, the simultaneous occupation of memory by multiple data adapters can be avoided, ensuring data processing efficiency; and by allocating corresponding memory through the set of preset rules at the abstract level of the data adapter class to create the corresponding data adapter, flexibility can be ensured, thereby balancing data processing efficiency and flexibility.
[0089] In this embodiment, by constructing corresponding process adapters in real time through the access process protocol, data conflicts between different process adapters can be avoided, and resource waste caused by the simultaneous existence of multiple process adapters can be prevented. By determining the appropriate data adapter through matching data structures, the mapping relationship can be adaptively selected based on the data structure of the application to be accessed, enabling data transformation through mapping. Furthermore, since the process adapter and data adapter are matched separately, their selection process is further decoupled, allowing for more flexible adaptation to a wider variety of applications to be accessed. This results in a universal interface method, reducing the cost of interfacing with different protocols and minimizing repetitive development work.
[0090] In one embodiment, such as Figure 4 As shown, the process adapter includes a data acquisition process and a data-driven process that are adapted to the data access process. The data acquisition process and the data-driven process are two types of processes in the data processing process.
[0091] The data acquisition process is used to acquire the initial data to be processed. The data acquisition process includes, but is not limited to: the function used to acquire the initial data, the conditions used to acquire the initial data, and the execution order of different functions in the process of acquiring the initial data.
[0092] Data-driven processes are used to process initial data to achieve corresponding data processing. Different data-driven processes will produce different results. Data-driven processes include, but are not limited to: functions used to perform subsequent processing on the initial data, conditions used to trigger subsequent processing of the initial data, and the execution order of different functions in the process of processing the initial data.
[0093] Through the process adapter, the raw data corresponding to the user identifier is obtained from the application to be connected, including:
[0094] Step 402: Following the data acquisition process, obtain the initial data corresponding to the user identifier from the application to be connected.
[0095] Initial data refers to the data pre-transmitted by the application to be connected to the platform application during the authentication process. The initial data has an adapted data-driven process, which allows for adaptive adjustments to the method of acquiring the original data, further increasing flexibility. Optionally, the initial data can be matched with candidate data-driven processes contained in the platform application to determine the data-driven process used to process the initial data, thereby further decoupling the data matching process and improving flexibility.
[0096] In an optional embodiment, according to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be accessed, including: when the data sent by the terminal to which the application to be accessed belongs is the identity identifier corresponding to the user identifier, the identity identifier is used as the initial data corresponding to the user identifier.
[0097] In an optional embodiment, according to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be accessed, including: when the data sent by the gateway adapted to the application to be accessed is the original data ciphertext corresponding to the user identifier, the original data ciphertext is used as the original data ciphertext corresponding to the user identifier.
[0098] In an optional embodiment, according to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be accessed, including: when the data sent by the gateway adapted to the application to be accessed is a webpage link corresponding to the user identifier, the webpage link is used as the original data ciphertext corresponding to the user identifier.
[0099] Step 404: Following the data-driven process, process the initial data to obtain the original data corresponding to the user identifier.
[0100] In an optional embodiment, data processing is performed on the initial data according to the data-driven process to obtain the original data corresponding to the user identifier, including: determining the function of the data-driven process according to the type of the initial data; and performing data processing on the initial data according to the function of the data-driven process to obtain the original data corresponding to the user identifier.
[0101] In this embodiment, during the user login authentication process to the platform application, each data access process has its own data acquisition process and data-driven process. Therefore, these two processes are decoupled so that different initial data can be implemented simultaneously with the data-driven process, thus making it more flexible to be applied to the login process of various applications to be accessed.
[0102] In one alternative embodiment, such as Figure 5 As shown, following the data-driven process, the initial data is processed to obtain the raw data corresponding to the user identifier, including:
[0103] Step 502: If the initial data is an identity identifier, call the interface of the application to be connected based on the identity identifier to obtain the original data corresponding to the user identifier.
[0104] An identity identifier is an identifier used to represent a user's identity. Optionally, the identity identifier can be a temporary identity identifier or the user identifier mentioned above.
[0105] In an optional embodiment, the process of calling the interface of the application to be accessed based on the identity identifier to obtain the original data corresponding to the user identifier includes: using a temporary identity identifier (ticket), calling the data of the first application to be accessed through the interface getAccountByTicket, and obtaining the currently logged-in user data from the data through the interface as the original data corresponding to the user identifier. Therefore, the identity identifier is a temporary permission identifier, which helps increase its flexibility and helps ensure security.
[0106] Step 504: If the initial data is the original data ciphertext, the original data ciphertext is parsed according to the preset decryption rules to obtain the original data corresponding to the user identifier.
[0107] The original encrypted data is the original data that the application to be connected to encrypts using preset encryption rules. Optionally, the preset encryption rules include, but are not limited to, open standards for JSON (JSON Web Token, JWT), hash algorithms such as MD5, etc.
[0108] In an optional embodiment, when the initial data is the original data ciphertext, the original data ciphertext is parsed according to a preset decryption rule to obtain the original data corresponding to the user identifier, including: when it is detected that the initial data and jwt_token have the same data arrangement, the original data ciphertext is parsed according to the open standard of JSON to obtain the original data corresponding to the user identifier.
[0109] Step 506: If the initial data is a hypertext link, redirect the page via the hypertext link and obtain the original data corresponding to the user identifier through the redirected page.
[0110] If the initial data is a hypertext link, the hypertext link points to an authentication service page, allowing identity data to be retrieved through a page that integrates the authentication service.
[0111] In an optional embodiment, when the initial data is a hypertext link, the page is redirected via the hypertext link, and the original data corresponding to the user identifier is obtained through the redirected page, including: connecting with the application to be integrated via auth-url, and obtaining the original data corresponding to the user identifier of the page of the application to be integrated.
[0112] In this embodiment, the initial data can be one of the following types: identity identifier, encrypted original data, or hypertext link. The type of the original data and subsequent processing are adaptively adjusted to obtain the original data corresponding to the user identifier more flexibly. Based on this, the initial data in steps 502, 504, and 506 are different, thus the data-driven processes also differ. When the initial data is an identity identifier, directly calling the interface can reduce the computing resources required by the platform application, thereby adjusting the efficiency of obtaining the original data. When the initial data is encrypted original data, transmitting the corresponding original data in encrypted form can reduce the frequency of interactions, thereby adjusting the efficiency of obtaining the original data. When the initial data is a hypertext link, page adjustments are made to provide the original data more flexibly.
[0113] In one embodiment, converting raw data into target data with a preset data structure according to a data adapter includes: determining a user data template corresponding to the platform application; the user data template includes fields to be filled; and filling the raw data into the fields to be filled according to the field mapping relationship indicated by the data adapter to obtain the target data with the preset data structure.
[0114] A user data template is a data structure corresponding to the platform application. This data structure includes fields to be populated and attributes of these fields. The attributes of these fields to be populated include at least the field name and may also include the data type of the field. For example, if a field to be populated is a user identifier, its corresponding data type is string. Optionally, the fields of the user data template include, but are not limited to, data fields such as: "Owning Tenant ID", "Owning Tenant Name", "User ID", "User Name", "User Role", "User Source", "Phone Number", and "Email Address".
[0115] Field mapping relationships are mappings set based on field attributes. These relationships represent the mapping rules between field attributes, allowing data to be populated according to those attributes. Because the mapping is based on field attributes rather than the specific content of the fields, compatibility is further guaranteed. For example, if the user identifier for the first application to be integrated is a phone number, and the user identifier for the second application to be integrated is an email address, then by using the correspondence between the user identifier and "User ID," both the phone number and email address will be populated into the "User ID" field of the user data template, forming the target data with the preset data structure.
[0116] In an optional embodiment, determining the user data template corresponding to the platform application includes: generating the user data template corresponding to the platform application according to preset fields and their arrangement; and using the fields in the user data template as fields to be filled corresponding to the user identifier.
[0117] In an optional embodiment, according to the field mapping relationship indicated by the data adapter, the original data is filled into the fields to be filled to obtain target data with a preset data structure. This includes: filling the original data into a preset user data template with a preset data structure according to the mapping relationship, and using the preset user data template filled with the original data as the target data. Thus, by pre-defining the data structure through the preset user data template before filling, the generation of the data structure and the data filling are completed in two steps, thereby improving the accuracy of the target data.
[0118] In an optional embodiment, according to the field mapping relationship indicated by the data adapter, the original data is filled into multiple fields to obtain target data with a preset data structure, including: when the user identifier of the application to be accessed is a number identifier, the number identifier is filled into the user identifier field to obtain the data of the user identifier field; when the user identifier of the application to be accessed is an email identifier, the email identifier is filled into the user identifier field to obtain the data of the user identifier field.
[0119] In this embodiment, setting a corresponding user data template for the platform application ensures that the target data structure is established before the data population process. Under these conditions, data population is then performed using the field mapping relationships indicated by the data adapter, reducing the likelihood of data conflicts and ensuring relatively high population efficiency. This approach maps various heterogeneous user data into a unified user data structure, providing a common interface method for downstream processing and reducing the complexity of data structure integration.
[0120] In an optional embodiment, before transmitting the target data to the business system of the platform application, the method further includes: determining the business system of the platform application based on the user identifier's session in the platform application; wherein the data of the business system in the session is processed based on the target data.
[0121] A session represents the interaction state between the application to be connected and the platform application. A session can be used to determine the business system that needs to use the target data in the context, so as to send the corresponding data in a targeted manner.
[0122] The business system processes data within a session based on target data. This means that the business system's context needs to be processed based on the target data to continue executing the corresponding business coordination process. Optionally, the time period during which the target data is applied to the business system is associated with the session, allowing for more precise control over the duration of the target data's presence in the business system, thereby preventing the target data from existing for extended periods and ensuring data security.
[0123] In an optional embodiment, determining the business system of the platform application based on the user's session in the platform application includes: determining the business system of the platform application based on the user's page operations in the session in the platform application.
[0124] In this embodiment, the business systems that need to use target data in the context are identified by the user's session in the platform application. The propagation scope of the user's identifier is limited by the platform application, and the propagation of the user's identifier is made more targeted, thereby improving processing efficiency.
[0125] In an optional embodiment, transmitting the target data to the business system of the platform application includes: encrypting the target data according to the encryption method corresponding to the platform application to obtain target ciphertext data; distributing the target ciphertext data to the business system of the platform application; wherein the business processing flow in the business system is based on the target ciphertext data.
[0126] The target encrypted data is user data distributed from the platform application to the business system.
[0127] The business processing flow needs to process data including target encrypted data, which can be used to execute the next business processing step. Optionally, the business processing flow includes functions used for business processing and data used for those functions. For example, a business processing flow may look up corresponding data or functions based on the target encrypted data to perform calculations and obtain the corresponding results.
[0128] In an optional embodiment, the target data is encrypted according to the encryption method corresponding to the platform application to obtain target ciphertext data, including: when the encryption method corresponding to the platform application is the open standard JSON, the target data is encrypted according to the open standard JSON to obtain target jwt_token; and the target jwt_token is used as target ciphertext data.
[0129] In an optional embodiment, the target data is encrypted according to the encryption method corresponding to the platform application to obtain target ciphertext data, including: when the encryption method corresponding to the platform application is the SAML standard, the target data is encrypted according to the SAML standard to obtain target ciphertext data.
[0130] In this embodiment, the encryption method is set by the platform application, so that the encryption and decryption methods of the platform application and each business system are almost the same. Therefore, the distribution process of target data improves the security of data transmission and ensures the efficiency of data encryption and decryption.
[0131] In one embodiment, such as Figure 6As shown, the platform to be connected is an external user service platform. The external user service platform sends the user identifier to the platform application. The platform application, acting as the user access layer, enables the application to be connected to send data to the business systems under the user access layer. Specifically, the user access process adapter generates raw data and outputs this third-party user information to the heterogeneous user data adapter. The heterogeneous user data adapter fills the raw data into a general user data template, forming standardized output user information with a preset data structure. Then, based on the standardized output user information from the template, it is sent to the user data encryption processor for data encryption, resulting in the target ciphertext data, i.e., the encrypted user information. Finally, the encrypted user information is distributed to the business systems.
[0132] In one exemplary embodiment, such as Figure 7 As shown, the user access layer of the Data Management Service (DMS) is designed based on the platform application described in this embodiment, and includes the following modules:
[0133] First User Access Process Adapter: After a user logs into the first client, it interfaces with the first client to handle the user access process. The front end passes a usable temporary identity ticket to the Data Management Service (DMS) backend. The adapter's logic uses this ticket to call the first client's getAccountByTicket interface to obtain the currently logged-in user data and outputs it to the first client's user data adapter for processing.
[0134] Second User Access Process Adapter: After a user logs into the second client, the data management service interfaces with the second client to complete the user access process. The data interaction gateway transmits the user information from the second client to the backend of the data management service via a jwt_token. This adapter's logic involves parsing the user information from the second client's jwt_token into plaintext and outputting it to the second client's user data adapter for processing.
[0135] Third-party user access process adapter: After a user logs into the third client, the data management service connects with the third client's platform via the auth-url to obtain the user information from the third client and outputs it to the third client's user data adapter for processing.
[0136] First Client User Data Adapter: Takes the user data output by the First Client User Access Process Adapter, and performs operations such as user data field mapping and empty field filling based on the general user data template as a standard, to obtain a set of user data that includes general user data fields.
[0137] Second Client User Data Adapter: Takes the user data output by the second client user access process adapter, and performs operations such as user data field mapping and empty field filling based on the general user data template as a standard, to obtain a set of user data that includes general user data fields.
[0138] Third Client User Data Adapter: Takes the user data output by the third client user access process adapter, and performs operations such as user data field mapping and empty field filling based on the general user data template as a standard, to obtain a set of user data that includes general user data fields.
[0139] The general user data template includes data fields such as "tenant ID", "tenant name", "user ID", "user name", "user role", "user source", "phone number", and "email address".
[0140] User data encryption processor: Takes the standardized user data output from the first client user data adapter, the second client user data adapter, and the third client user data adapter, generates a jwt_token, and then distributes it to the context of each business subsystem of the data management service.
[0141] Therefore, different process adapters are derived and extended for different user access processes to achieve high scalability for adapting to access processes; different data adapters are also adapted and extended for heterogeneous user data to achieve high scalability for accessing heterogeneous user data; after processing various heterogeneous user data according to the general user data template, standard user structure information is obtained, and then processed uniformly through the user data encryption processor, which reduces repetitive processing work and improves development efficiency.
[0142] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0143] Based on the same inventive concept, this application also provides a user data access device for implementing the user data access method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more user data access device embodiments provided below can be found in the limitations of the user data access method described above, and will not be repeated here.
[0144] In one exemplary embodiment, such as Figure 8 As shown, a user data access device is provided, comprising:
[0145] The creation module 802 is used to obtain a process adapter and a data adapter that are adapted to the data access process of the application to be accessed when the application to be accessed logs into the platform application with a user identifier.
[0146] Access module 804 is used to obtain the original data corresponding to the user identifier from the application to be accessed through the process adapter, and convert the original data into target data with a preset data structure according to the data adapter;
[0147] The conversion module 806 is used to transmit the target data to the business system of the platform application.
[0148] In one embodiment, the creation module 802 is configured to:
[0149] Based on the access process protocol matched by the application to be accessed, a process adapter corresponding to the access process protocol is derived; the process adapter includes the data processing process in the access process protocol.
[0150] The data adapter is determined based on the data structure that matches the application to be accessed; the data adapter includes a field mapping relationship, which is used to map the original data to the target data according to the fields.
[0151] In one embodiment, the process adapter includes a data acquisition process and a data-driven process adapted to the data access process, wherein the data acquisition process and the data-driven process are two processes in the data processing process;
[0152] The access module 804 is used for:
[0153] According to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be connected;
[0154] According to the data-driven process, the initial data is processed to obtain the original data corresponding to the user identifier.
[0155] In one embodiment, the access module 804 is configured to:
[0156] If the initial data is an identity identifier, the interface of the application to be accessed is called based on the identity identifier to obtain the original data corresponding to the user identifier;
[0157] If the initial data is the original data ciphertext, the original data ciphertext is parsed according to the preset decryption rules to obtain the original data corresponding to the user identifier;
[0158] If the initial data is a hypertext link, the page is redirected through the hypertext link, and the original data corresponding to the user identifier is obtained through the redirected page.
[0159] In one embodiment, the access module 804 is configured to:
[0160] Determine the user data template corresponding to the platform application; the user data template includes fields to be filled.
[0161] According to the field mapping relationship indicated by the data adapter, the original data is filled into the field to be filled to obtain the target data with the preset data structure.
[0162] In one embodiment, the conversion module 806 is configured to:
[0163] The target data is encrypted according to the encryption method corresponding to the platform application to obtain the target ciphertext data.
[0164] Distribute the target encrypted data to the business systems of the platform application;
[0165] The business processing flow in the business system is based on the target encrypted data.
[0166] In one embodiment, the conversion module 806 is configured to:
[0167] The business system of the platform application is determined based on the user's session in the platform application using the user identifier;
[0168] The business system processes data in the session based on the target data.
[0169] Each module in the aforementioned user data access device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0170] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a user data access method.
[0171] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0172] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0173] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0178] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for accessing user data, characterized in that, The method includes: When the application to be accessed logs into the platform application with a user identifier, a process adapter and a data adapter adapted to the data access process are generated according to the adapter template corresponding to the data access process of the application to be accessed. The adapter template is aggregated into a data processing process, and the adapter template is an abstraction of the processing method and data structure of a common process. The common process is an abstraction of the same sub-processes of different access processes. The process adapter obtains the raw data corresponding to the user identifier from the application to be connected, and converts the raw data into target data with a preset data structure according to the data adapter. The target data is transmitted to the business system of the platform application.
2. The method according to claim 1, characterized in that, The step of generating a process adapter and a data adapter adapted to the data access process based on the adapter template corresponding to the data access process of the application to be accessed includes: Based on the adapter template corresponding to the access process protocol matched by the application to be accessed, a process adapter corresponding to the access process protocol is derived; the process adapter includes the data processing process in the access process protocol; The data adapter is determined based on the data structure that matches the application to be accessed; the data adapter includes a field mapping relationship, which is used to map the original data to the target data according to the fields.
3. The method according to claim 1, characterized in that, The process adapter includes a data acquisition process and a data-driven process adapted to the data access process. The data acquisition process and the data-driven process are two types of processes in the data processing process. The step of obtaining the original data corresponding to the user identifier from the application to be connected through the process adapter includes: According to the data acquisition process, the initial data corresponding to the user identifier is obtained from the application to be connected; According to the data-driven process, the initial data is processed to obtain the original data corresponding to the user identifier.
4. The method according to claim 3, characterized in that, The step of processing the initial data according to the data-driven process to obtain the original data corresponding to the user identifier includes: If the initial data is an identity identifier, the interface of the application to be accessed is called based on the identity identifier to obtain the original data corresponding to the user identifier; If the initial data is the original data ciphertext, the original data ciphertext is parsed according to the preset decryption rules to obtain the original data corresponding to the user identifier; If the initial data is a hypertext link, the page is redirected through the hypertext link, and the original data corresponding to the user identifier is obtained through the redirected page.
5. The method according to claim 1, characterized in that, The step of converting the raw data into target data with a preset data structure according to the data adapter includes: Determine the user data template corresponding to the platform application; the user data template includes fields to be filled. According to the field mapping relationship indicated by the data adapter, the original data is filled into the field to be filled to obtain the target data with the preset data structure.
6. The method according to claim 1, characterized in that, The step of transmitting the target data to the business system of the platform application includes: The target data is encrypted according to the encryption method corresponding to the platform application to obtain the target ciphertext data. Distribute the target encrypted data to the business systems of the platform application; The business processing flow in the business system is based on the target encrypted data.
7. The method according to claim 1, characterized in that, Before transmitting the target data to the business system of the platform application, the method further includes: The business system of the platform application is determined based on the user's session in the platform application using the user identifier; The business system processes data in the session based on the target data.
8. A user data access device, characterized in that, The device includes: A creation module is used to generate a process adapter and a data adapter that are adapted to the data access process when the application to be accessed logs into the platform application with a user identifier, based on the adapter template corresponding to the data access process of the application to be accessed. The adapter template is aggregated into a data processing process, and the adapter template is an abstraction of the processing method and data structure of a common process. The common process is an abstraction of the same sub-processes of different access processes. The access module is used to obtain the original data corresponding to the user identifier from the application to be accessed through the process adapter, and convert the original data into target data with a preset data structure according to the data adapter. The conversion module is used to transmit the target data to the business system of the platform application.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Login information integrated processing system and method
CN103023933A