Data interaction method and device, terminal equipment and computer readable storage medium
By introducing data call permission information and token verification mechanism on the server side, the problem of privacy data leakage in data interaction between micro-applications and main applications is solved, ensuring the security and privacy of data.
Patent Information
- Application Number
- CN202310456664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2024-10-25
AI Technical Summary
During the data interaction process between the micro application and the main application, private data may be illegally sent, leading to data leakage.
By introducing data call permission information and token verification mechanisms on the server side, the data interaction permissions between applications are determined, and tokens are used for legality verification in data call requests to ensure that only pre-specified data is allowed to be accessed.
It effectively prevents illegal data call requests, ensures data security and privacy, and prevents private data leakage between micro-applications.
Smart Images

Figure CN118839318A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data interaction, and more specifically, to a data interaction method, apparatus, terminal device, and computer-readable storage medium. Background Art
[0002] In the related art, micro-applications are independently operable units / modules that implement independent functions based on a unique / unique data system. In addition, micro-applications that implement different functions can be spliced together to form a main application with complex functions.
[0003] Multiple micro-applications and / or main applications can usually run in a terminal device. Since each micro-application runs based on a unique data system, when data interacts between different micro-applications or between different microservices and the main application, the privacy / property data of the micro-application may be illegally sent to other micro-applications / main applications, thereby causing the problem of privacy data leakage. Summary of the invention
[0004] The present application provides a data interaction method, apparatus, terminal device and computer-readable storage medium.
[0005] The present application provides a data interaction method applied to a server, the method comprising:
[0006] In response to a token issuance request from the first application corresponding to the second application, determining whether the first application has a calling permission to call target data of the second application based on data calling permission information, wherein the data calling permission information records data that the first application can call;
[0007] If available, a token is generated;
[0008] Saving the token and sending the token to the first application;
[0009] In response to a data call request from the first application corresponding to the second application, verifying whether a token carried in the data call request is consistent with a stored token;
[0010] If they are consistent, authentication success information is sent to the second application, so that the second application provides the target data to the first application.
[0011] In the data interaction method applied to the server provided by the present application, after receiving the token issuance request from the first application corresponding to the second application, the server will determine whether the first application has the calling authority to call the target data of the second application based on the pre-stored data calling authority information; if it does, a token will be generated; then, the server will save the token and send a copy of the token to the first application at the same time; then, when the server receives the data calling request from the first application corresponding to the second application, the server will verify the data calling request to verify whether the token carried by the data calling request is consistent with the token stored in itself; if they are consistent, the first application is deemed to be legally calling the target data, so the server sends authentication information to the second application to enable the second application to provide the target data to the first application.
[0012] In this way, based on the introduction of data call permission information, the present application enables the data that each application can call / acquire to be pre-defined / set. Therefore, when data is interacted between different micro-applications, or when data is interacted between different microservices and the main application, each micro / main application can only call pre-defined / set data, thereby ensuring data security; and, based on the introduction and verification of tokens, when the data call request is tampered with, the present application can also verify the legitimacy of the data call request through the token, so that illegal data call requests will not be responded to correctly, thereby further ensuring data security.
[0013] The present application provides a data interaction method applied to a first application, the method comprising:
[0014] Generate a token issuance request corresponding to the second application, and send the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application;
[0015] Saving the token sent by the server;
[0016] Based on the token, generate a data call request corresponding to the second application, and send the data call request to the server, so that the server determines whether the token carried by the data call request is consistent with the token stored by the server;
[0017] When the server determines that the token carried in the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application, the target data of the second application is obtained.
[0018] The present application provides a data interaction method applied to a second application, the method comprising:
[0019] When receiving authentication information generated by the server based on a data call request sent by a first application and the token carried in the data call request is consistent with the token stored in the server, target data is provided to the first application.
[0020] The present application provides a data interaction device applied to a server, the device comprising:
[0021] A first response module, configured to respond to a token issuance request from a first application corresponding to a second application, and determine whether the first application has a calling permission to call target data of the second application based on data calling permission information, wherein the data calling permission information records data that the first application can call;
[0022] The token generation module generates a token if it has the required features;
[0023] A first sending module, used for saving the token and sending the token to the first application;
[0024] A second response module, configured to respond to a data call request of the first application corresponding to the second application, and verify whether a token carried in the data call request is consistent with a stored token;
[0025] The second sending module is used to send authentication pass information to the second application if they are consistent, so that the second application provides the target data to the first application.
[0026] The present application provides a data interaction device applied to a first application, the device comprising:
[0027] A first request generation module, used to generate a token issuance request corresponding to the second application, and send the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application;
[0028] A token storage module, used for storing the token sent by the server;
[0029] A second request generating module, configured to generate a data calling request corresponding to the second application based on the token, and send the data calling request to the server, so that the server determines whether the token carried in the data calling request is consistent with the token stored in the server;
[0030] The data acquisition module is used to acquire the target data of the second application after the server determines that the token carried by the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application.
[0031] The present application provides a data interaction device applied to a second application, the device comprising:
[0032] The data providing module is used to provide target data to the first application when receiving authentication information generated by a data calling request sent by the server based on the first application and the token carried in the data calling request is consistent with the token stored by the server.
[0033] The present application provides a terminal device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the above-mentioned data interaction method is implemented.
[0034] The present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by one or more processors, the above-mentioned data interaction method is implemented.
[0035] The data interaction method applied to the first application, the data interaction method applied to the second application, the data interaction apparatus, the terminal device and the computer-readable storage medium provided by the present application are based on the introduction of data call permission information, so that the data that each application can call / acquire is pre-defined / set. Therefore, when data is interacted between different micro-applications, or when data is interacted between different microservices and the main application, each micro / main application can only call pre-defined / set data, thereby ensuring data security; and, based on the introduction and verification of tokens, when the data call request is tampered with, the present application can also verify the legitimacy of the data call request through the token, so that illegal data call requests will not be correctly responded to, thereby further ensuring data security.
[0036] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0038] Figure 1 A schematic diagram of a data interaction system for certain embodiments of the present application;
[0039] Figure 2 It is a schematic diagram of application interaction;
[0040] Figure 3 A flowchart of a data interaction method for certain embodiments of the present application;
[0041] Figure 4A swim lane diagram of a data interaction method for certain embodiments of the present application;
[0042] Figure 5 A swim lane diagram of a data interaction method for certain embodiments of the present application;
[0043] Figure 6 A swim lane diagram of a data interaction method for certain embodiments of the present application;
[0044] Figure 7 A schematic diagram of a server according to some embodiments of the present application;
[0045] Figure 8 A swim lane diagram of a data interaction method for certain embodiments of the present application;
[0046] Fig. 9 A schematic diagram of application scenarios of certain embodiments of the present application;
[0047] Fig.10 A schematic diagram of application scenarios of certain embodiments of the present application;
[0048] Fig.11 A flowchart of a data interaction method for certain embodiments of the present application;
[0049] Fig.12 A flowchart of a data interaction method for certain embodiments of the present application;
[0050] Fig.13 A schematic diagram of a data interaction device according to an embodiment of the present application;
[0051] Fig.14 A schematic diagram of a data interaction device according to an embodiment of the present application;
[0052] Fig.15 A schematic diagram of a data interaction device according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.
[0054] See also Figure 1 , Figure 1 A schematic diagram of a data interaction system according to certain embodiments of the present application. Figure 1In the data interaction system 100 , any two of the first application 101 , the second application 102 and the server 103 are connected, and this connection relationship can be understood as a communication connection.
[0055] It is not difficult to understand that the data interaction system 100 in the embodiments of the present application can be implemented by any architecture / framework. For example, in some embodiments, the data interaction system 100 is implemented based on the MVC (Model View Controller) three-layer architecture. In other embodiments, the data interaction system 100 is implemented based on a presentation layer responsible for visual and user interaction, a business layer that implements business logic, a persistence layer that provides data, and a database that stores data.
[0056] It should be understood that, due to the interaction between micro-applications and main applications, or when micro-applications interact with each other, it is possible that a main / micro-application wants to illegally obtain the data of another main / micro-application. Therefore, in the relevant technology, a verification module is set in each micro / main application to verify whether other main / micro-applications have the authority to obtain their own data.
[0057] For example, please refer to Figure 2 , Figure 2 Five applications are shown, namely data analysis application 201, health record application 202, health data application 203, smart catering application 204 and health equipment application 205. Among them, data analysis application 201 is a main application, or a module that implements data analysis functions in the main application. Health record application 202, health data application 203, smart catering application 204 and health equipment application 205 are all micro applications.
[0058] Furthermore, the health data application 203 is used to store the user's health data and medical privacy data. The health data includes heart rate, blood pressure, blood oxygen, etc., and the medical privacy data includes disease history. The smart catering application 204 stores daily diet data and diet privacy data. The daily diet data includes daily diet preferences, nutritional intake, etc., and the diet privacy data includes dining location, meal expenses, and others. The health equipment application 205 stores daily exercise preference data and health privacy data. The daily exercise preference data includes walking steps, etc., and the health privacy data includes menstrual cycle, etc.
[0059] Furthermore, the health data application 203, the smart catering application 204 and the health equipment application 205 will all send / synchronize their own data to the health record application 202, so that the health record application 202 can generate a complete health record for the user. The health record application 202 sends / synchronizes its own data to the data analysis application 201, so that the data analysis application 201 can generate a sports and fitness plan.
[0060] It is conceivable that if the health record application 202 does not need data related to user privacy (i.e., medical privacy data, dietary privacy data, and health privacy data) when generating a health record, then the health data application 203, the smart catering application 204, and the health device application 205 should not synchronize the data related to user privacy to the health record application 202 when synchronizing data with the health record application 202. Similarly, when the health record application 202 synchronizes data with the data analysis application 201, it should not synchronize all of its own data to the data model application 201. In other words, the data call / acquisition / access / interaction permissions of each micro-application / main application need to be controlled to prevent privacy data from being unreasonably sent / synchronized to other micro-applications / main applications.
[0061] Based on this, Figure 1 The server 103 in the data interaction system 100 shown will verify whether the request of the first application 101 is legal for the second application 102, and when the request is verified to be legal or illegal, feedback corresponding information to the first application 101 and / or the second application 102. Therefore, when the first application 101 attempts to illegally obtain data in the second application 102, the second application 102 can refuse to provide data to the first application 101 based on the information fed back by the server 103, thereby effectively avoiding the leakage of its own data.
[0062] It can be understood that the first application / second application in the implementation manner of the present application is a micro application or a main application.
[0063] It can also be understood that the form in which the micro-applications in the embodiments of the present application are deployed in the virtual environment can be set according to actual conditions. For example, in some embodiments, in order to facilitate the maintenance and modification of the micro-applications after they are launched and to facilitate the porting of the micro-applications to different virtual environments, different micro-applications will be independently deployed in the virtual environment based on containers.
[0064] To more clearly illustrate the role of the server 103 in the implementation scheme provided in this application, please refer to Figure 3 The present application provides a data interaction method applied to a server, the method comprising:
[0065] 0110, in response to the token issuance request of the first application corresponding to the second application, determine whether the first application has the calling permission to call the target data of the second application based on the data calling permission information, wherein the data calling permission information records the data that the first application can call.
[0066] That is, before the first application in the implementation mode of the present application obtains / calls the target data stored / used / generated by the second application, the first application 101 needs to request the server to issue a token so that when the target data needs to be obtained later, it can verify its authority / ability to obtain the target data based on the token.
[0067] To more clearly illustrate the implementation methods provided by this application, please refer to Figure 4 , Figure 4 A swim lane diagram of the data interaction method of the present application embodiment. Figure 4 In the interaction process shown, the first application 101 sends a token issuance request corresponding to the second application 102 to the server 103; the server 103 verifies the token issuance request and issues a token to the first application 101 after the verification is passed.
[0068] It should be understood that any main application and micro application in the implementation mode of the present application stores / uses one or more types of data, and each type of data can be referred to by a corresponding identifier, that is, each type of data in each application can be referred to by a data identifier. Therefore, the data identifier can be used to refer to at least one of the multiple types of data stored in the second application. Exemplarily, the second application can be Figure 1 In the health data application 203 , the data identifier can be used to refer to the health data stored in the health data application 203 .
[0069] It should also be understood that the data calling permission information in the implementation manner of the present application records the data that each application in the data interaction system 100 can obtain.
[0070] In addition, it is not difficult to understand that the acquisition method and information storage form of data call permission information are contents that can be set according to actual conditions. Exemplarily, in some embodiments, data call permission information is implemented based on a knowledge graph, that is, each node / entity / vertex in the knowledge graph represents a micro application or a main application, and the pointing relationship between any two nodes represents what kind of data a micro application can read in another micro application.
[0071] 0120, if available, generate a token.
[0072] That is, when the server 103 determines, based on the data calling permission information, that the first application 101 has the permission to call the target data of the second application 102 , a token will be generated.
[0073] It can be understood that the token in the implementation manner of the present application can be understood as a token.
[0074] 0130, save the token and send the token to the first application.
[0075] That is, when the server 103 in the embodiment of the present application saves the generated token to the corresponding storage space (such as cache), it also sends the token to the first application 101. After the first application 101 receives and saves the token, it will generate a data call request through the token to request the second application to provide the target data to itself.
[0076] 0140, in response to the data call request of the first application corresponding to the second application, verify whether the token carried in the data call request is consistent with the saved token.
[0077] That is, after the first application 101 receives the token in the implementation manner of the present application, if it needs to read the target data of calling the second application 102, the first application 101 will generate a data call request based on the token and send the data call request to the server 103.
[0078] After receiving the data call request, the server 103 will parse the data call request to obtain the token carried by the data call request. Subsequently, because the server 103 has determined that the first application 101 has the calling authority for the target data (of the second application 102) before receiving the data call request, a token is generated and saved, and this token is also sent to the "first application 101 with the calling authority for the target data". Therefore, after parsing and obtaining the token carried by the data call request, the server 103 will determine whether the "token carried by the data call request" is consistent with the "previously generated and stored token", thereby determining whether the "first application 101 that sends the data call request" is the above-mentioned "first application 101 with the calling authority for the target data".
[0079] It is not difficult to understand that if they are consistent, it means that the first application 101 is legally calling the target data (of the second application 102) at the current moment; if they are inconsistent, it means that the token carried by the data call request is wrong or false data, in other words, the first application 101 attempts to illegally obtain the target data.
[0080] 0150, if they are consistent, send authentication pass information to the second application so that the second application provides the target data to the first application.
[0081] To more clearly explain 0140 and subsequent 0150 in the implementation mode of this application, please refer to Figure 5 , Figure 5A swim lane diagram of the data interaction method of the present application embodiment. Figure 5 In the interactive process shown, the first application 101 sends a data call request corresponding to the second application 102 to the server 103; the server 103 verifies the data call request and sends authentication pass information to the second application 102 after the verification is passed.
[0082] Furthermore, when the server 103 in the implementation mode of the present application determines based on verification that the "token carried by the data call request" is consistent with the "previously generated and stored token", it will send authentication success information to the second application 102; based on the receipt of the authentication success information, the second application 102 knows that the server 103 has determined that the first application 101 is legally calling (its own) target data, so the second application 102 provides the target data to the first application 101.
[0083] It should be understood that, in the implementation mode of the present application, any target application needs to apply for a corresponding token from the server before requesting another application to provide a specific data, so that the server knows that it wants to obtain the token, and will use the token to call the above specific data in the subsequent moments after obtaining the token; after the server passes a series of verifications to verify that the target application is legitimate, it will generate a token and send it to the target application. Therefore, when the token in the data call request sent by the target application is consistent with the token stored by the server itself, it indicates that the target application is legally calling the above specific data.
[0084] In this way, based on the introduction of data call permission information, the present application enables the data that each application can call / acquire to be pre-defined / set. Therefore, when data is interacted between different micro-applications, or when data is interacted between different microservices and the main application, each micro / main application can only call pre-defined / set data, thereby ensuring data security; and, based on the introduction and verification of tokens, when the data call request is tampered with, the present application can also verify the legitimacy of the data call request through the token, so that illegal data call requests will not be responded to correctly, thereby further ensuring data security.
[0085] To more clearly illustrate the data interaction method of the present application embodiment, please refer to Figure 6 , Figure 6 This is a swim lane diagram of the data interaction method of the implementation method of the present application. That is, before any first application 101 of the present application obtains the target data of the second application 102, it sends a token issuance request to the server 103; the server 103 will verify according to the data calling permission information, and if it is determined after verification that the first application 101 has the permission to call the target data of the second application 102, the token issuance request verification is passed, and then a token is generated and issued to the first application 101.
[0086] When the first application 101 needs to call the target data of the second application 102, the first application 101 can generate a data call request based on the previously issued token and send the data call request to the server 103; after the server 103 parses the data call request to obtain the token, it checks whether the token carried in the data call request is consistent with any token stored in the server 103; if they are consistent, the data call request is verified, so the server 103 sends an authentication pass information to the second application 102; after receiving the authentication pass information, the second application 102 provides its own target data to the first application 101.
[0087] Optionally, to further ensure the security of interaction between applications, in certain embodiments of the present application, both the token issuance request and the data call request include the first application identifier of the first application, the second application identifier of the second application, and the data identifier of the target data.
[0088] Furthermore, after the token is saved, the following steps are also included:
[0089] Binding the token, the first application identifier, the second application identifier and the data identifier to each other to generate binding relationship information;
[0090] Furthermore, the above 0150 includes:
[0091] If they are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier and the data identifier in the data call request are bound to each other, then authentication information is sent to the second application so that the second application provides the target data to the first application.
[0092] That is, the first application 101 of the implementation mode of the present application generates the above token issuance request based on the identifier of the data to be read (i.e., the data identifier), the identifier of the application to which the data to be read belongs (i.e., the second application identifier), and its own identifier (i.e., the first application identifier). The server 103 will verify whether there is a mapping relationship between the first application identifier, the second application identifier, and the data identifier based on the preset / prestored data call permission information, and this mapping relationship can indicate that the first application 101 corresponding to the first application identifier has the authority to read / access / obtain / call the target data corresponding to the data identifier from the second application 102 corresponding to the second application identifier.
[0093] If the above-mentioned mapping relationship exists and can represent that the first application has the permission to read the target data, the server 103 will bind / associate / correspond the token, the first application identifier, the second application identifier and the data identifier to each other after the token is generated, so that a mapping relationship exists among the token, the first application identifier, the second application identifier and the data identifier, so as to generate binding relationship information indicating that "the first application 101 corresponding to the first application identifier can read the first data corresponding to the data identifier from the second application 102 corresponding to the second application identifier through the token" and store it.
[0094] Therefore, when server 103 receives a data call request "containing a first application identifier, a second application identifier, a data identifier and a token", it will verify whether the token carried in the data call request is consistent with the token stored by itself based on the previously stored binding relationship information and token, and verify whether the "first application identifier, second application identifier, data identifier and token in the data call request" match the "first application identifier, second application identifier, data identifier and token in the binding relationship information" previously stored by itself.
[0095] If the tokens are consistent, and the "first application identifier, second application identifier, data identifier and token in the data call request" match the "first application identifier, second application identifier, data identifier and token in the binding relationship information", the server 103 generates authentication pass information and sends it to the second application 102.
[0096] In this way, based on the introduction of binding relationship information, this application enables, even if the data call request is tampered with, this application can also verify the legitimacy of the data call request by checking whether there is a binding / mapping relationship between the token and other identifiers, so that illegal requests will not be responded to correctly, thereby further ensuring data security.
[0097] In addition, it can be understood that the step of "sending the token to the first application" and the step of "binding the token, the first application identifier, the second application identifier and the data identifier to generate binding relationship information" can be executed in parallel or asynchronously, and the order of execution of the two steps can be set according to actual conditions.
[0098] Optionally, to further ensure the security of data interaction, in some embodiments, the first application is used to obtain the user's user identification when receiving a user login instruction, and the token issuance request and the data call request also include the user identification, and the second application stores target data corresponding to different user identifications.
[0099] Furthermore, the above-mentioned binding the token, the first application identifier, the second application identifier and the data identifier to each other to generate binding relationship information includes:
[0100] The token, the first application identifier, the second application identifier, the data identifier and the user identifier are bound to each other to generate binding relationship information.
[0101] Furthermore, if the above are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier and the data identifier in the data call request are bound to each other, then the authentication pass information is sent to the second application so that the second application provides the target data to the first application, including:
[0102] If they are consistent, and based on the binding relationship information, it is determined that the token, first application identifier, second application identifier, data identifier and user identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data corresponding to the user identifier to the first application.
[0103] It should be understood that a micro-application / main application may store data of multiple users, such as Figure 2 The health data application 203 in the data may store the first heartbeat data D1 of the first user U1, the second heartbeat data D2 of the second user U2, and the third heartbeat data D3 of the third user U3. When the health record application 202 wants to build the profile of the first user U1, the health record application 202 should only obtain the first heartbeat data D1 of the first user U1 in the health data application 203, and should not obtain the second heartbeat data D2 of the second user U2 and the third heartbeat data D3 of the third user U3.
[0104] Based on this, in the implementation mode provided in the present application, each user will be assigned a unique identifier, namely, a user identifier, and each user's unique data will be associated / bound / corresponded to its unique user identifier. In addition, any micro / main application, after responding to the startup instruction / login instruction triggered by the user, will obtain the user identifier of the account / user corresponding to the startup instruction / login instruction, so that in the subsequent process, the micro / main application can obtain the data associated / corresponding to the user identifier.
[0105] Therefore, the first application 101 in the implementation manner of the present application needs to indicate through a token issuance request which application and which user's data it wants to read. That is, in addition to the application identifier to be read (second application identifier), the data identifier to be read (data identifier) and its own identifier, the token issuance request will also include the identifier of the user to whom the data is to be read (user identifier), and generate a token issuance request based on the first application identifier, the second application identifier, the data identifier and the user identifier, and send it to the server 103.
[0106] Subsequently, after the server 103 obtains the first application identifier, the second application identifier, the data identifier and the user identifier in the token issuance request and generates a token, it binds the first application identifier, the second application identifier, the data identifier and the user identifier and generates the token to each other to generate corresponding binding relationship information.
[0107] Then, the server 103 receives the data call request of the first application 101, and parses the data call request to obtain the first application identifier, the second application identifier, the data identifier, the user identifier and the token, and then determines whether the "parsed first application identifier, the second application identifier, the data identifier, the user identifier and the token" match / match / correspond with the content in the previously generated binding relationship information. If so, an authentication pass message is generated and sent to the second application 102.
[0108] Finally, the second application 102 provides the target data associated with the user identifier to the first application 101 based on the authentication success message.
[0109] In this way, the present application enables each micro / main application to only obtain data associated with the user ID of the logged-in user / account when obtaining data, thereby avoiding the situation where the micro / main application unreasonably obtains data of other users / accounts, thereby ensuring data security.
[0110] In addition, it should be understood that in the above-mentioned implementation, the server 103 of the present application determines that the token issuance request is legal when the first application identifier, the second application identifier and the data identifier match / comply with the data call permission information. However, in some implementations, the data call permission information may also include the "user identifier of the user to whom the target data belongs". Then, in the process of verifying the token issuance request, the server 103 will verify whether the first application identifier, the second application identifier, the data identifier and the user identifier match / comply with the data call permission information, so as to further ensure the security of data interaction and further reduce the possibility of data leakage.
[0111] Optionally, in some embodiments of the present application, the server includes an authentication management module, which is used to store the token and binding relationship information;
[0112] Verify whether the token carried in the data call request is consistent with the saved token, including:
[0113] Based on the authentication management module, verify whether the token carried in the data call request is consistent with the saved token;
[0114] If they are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier, and the data identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data to the first application, including:
[0115] If they are consistent, and based on the binding relationship information stored in the authentication management module, it is determined that the token, first application identifier, second application identifier and data identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data to the first application.
[0116] To more clearly illustrate the implementation scheme provided in this application, please refer to Figure 7 , showing a schematic diagram of the server 103 in certain embodiments of the present application.
[0117] That is, the server 103 of the present application will complete the storage of the above-mentioned token and binding relationship information based on the authentication management module 104. Therefore, when verifying the data call request, the server 103 will call the authentication management module 104 to complete the verification of the token and the binding relationship.
[0118] In this way, the present application enables the storage of tokens and binding relationship information to be completed by a separate authentication management module 104, so the server 103 can efficiently complete the verification of tokens and binding relationship information based on the authentication management module 104, thereby improving the efficiency of data interaction.
[0119] Optionally, in certain embodiments of the present application, the server includes a permission management module, which is used to store data call permission information. The data call permission information is generated before the first application and the second application are put on the shelves. The data call permission information includes multiple sets of permission data. The permission data indicates that the data consumer application can access the data provider application and can call the data corresponding to the call data identifier of the data provider application. Each set of permission data includes the identifier of the data consumer application, the identifier of the data provider application and the call data identifier.
[0120] Furthermore, the above 0110 includes:
[0121] Based on the data calling permission information stored in the permission management module, determine whether the first application identifier, the second application identifier and the data identifier in the token issuance request match the identifier of the consumer application, the identifier of the data provider application and the calling data identifier in a set of permission data in sequence;
[0122] If they match, it is determined that the first application has the calling permission;
[0123] If there is no match, it is determined that the first application does not have the calling permission.
[0124] Please refer to Figure 7 The server 103 of the implementation mode of the present application will store and manage data call permission information through the permission management module 105. Then, when the verification token is issued, the server 103 will call the permission management module 105 to complete the corresponding verification process.
[0125] Further, to more clearly illustrate the authority data in the implementation scheme provided by this application, please refer to Table 1, namely:
[0126] Table 1
[0127] Data consumer application identifier Data provider application identifier Call data identification First micro application logo Second micro application logo User information identification, health data identification Third micro application logo Fourth micro-application logo User information ID, diet data ID First main application identifier First micro application logo User information identification, health data identification
[0128] It should be understood that, in the data call permission information shown in Table 1, any row represents a set of permission data.
[0129] It should also be understood that any set of permission data in the implementation methods of the present application can represent the data supply and demand relationship between one application and another application in the data interaction system 100, that is, the data consuming application (corresponding to the data consuming application identifier) can call the target data (corresponding to the calling data identifier) from the data providing application (corresponding to the data providing application identifier).
[0130] It is not difficult to understand that when the data call permission information is as shown in Table 1, the server 103 parses the token issuance request to obtain the first application identifier, the second application identifier and the data identifier, and then traverses each row of permission data in Table 1 stored in the permission management module 105 to determine whether there is a row of permission data in each row of permission data in which the data consumer application identifier is the first application identifier, the data provider application identifier is the second application identifier, and the calling data identifier includes the first data identifier; if so, it indicates that the first application 101 can call the target data of the second application 102, so the server 103 generates a token to send it to the first application.
[0131] Exemplarily, if the first application identifier is the "first micro-application identifier" in Table 1, the second application identifier is the "second micro-application identifier" and the data identifier is the "user information identifier" and / or the "health data identifier", that is, the first application identifier, the second application identifier and the first data identifier match the second row of data in Table 1, then this application determines that the first application 101 has the authority to call the first data in the second application 102, so a token is generated.
[0132] In this way, the implementation method of the present application enables the data call permission information to clearly indicate the data supply and demand relationship between each application, so the terminal can determine whether the first application has the call permission for the target data with relatively fast efficiency, thereby improving the data interaction / processing rate; and, because the information shown in the data call permission information is relatively clear, the maintenance of the data call permission information can be conveniently completed later; not only that, because the server 103 can efficiently complete the verification of the token issuance request based on the permission management module 105, the execution efficiency of data interaction is improved.
[0133] Optionally, in order to make it easier to maintain the data call permission information at a later stage, in some implementations, the data call permission information is stored in a relational database software in the form of a table.
[0134] Optionally, in some implementations, after the above 0110, the data interaction method provided by the present application further includes:
[0135] If not, a token application failure message is sent to the first application.
[0136] That is, after the server 103 verifies the token issuance request of the first application 101 to obtain the verification result, if the verification result of the token issuance request is passed, the server 103 will send the token to the first application 101; and when the verification result of the token issuance request is failed, the server 103 will send a token application failure message to the first application 101.
[0137] It is not difficult to understand that when the first application 101 receives the token application failure information, because the first application 101 did not receive the token, the first application 101 cannot generate the above-mentioned data call request (containing the token), or in other words, the first application 101 can only generate an illegal data call request that does not contain the token, and thus the first application 101 cannot obtain the target data through the data call request.
[0138] It is conceivable that the failure of verification of the token issuance request indicates that the first application 101 does not have the authority to call the target data of the second application 102. Therefore, in some embodiments, when the first application 101 receives the application failure information, the user may be prompted to perform the corresponding permission application operation.
[0139] In this way, the implementation mode of the present application enables the first application 101 to accurately determine whether it has obtained a token based on the token or token application failure information sent by the server 103, thereby ensuring the stable operation of data interaction.
[0140] Optionally, in some implementations, after the above 0140, the data interaction method provided by the present application further includes:
[0141] If they are inconsistent, an authentication failure message is sent to the second application.
[0142] That is, when the server 103 determines that the "token carried in the data call request" is not the "token generated and stored by itself previously", the server 103 will determine that the first application 101 is attempting to illegally call the target data in the second application 102, and then determine that the second application 102 should not provide the target data to the first application 101. Therefore, the server 103 sends an authentication failure information to the second application 102, so that the second application 102 refuses to provide the target data to the first application 101.
[0143] In this way, the implementation method of the present application enables each micro-application / main application to clearly know whether the data calls of each other application are legal, so that data interaction can be completed accurately and efficiently.
[0144] Optionally, in some implementations, after the above 0120 and before the above 0150, the data interaction method provided by the present application further includes:
[0145] Set the validity period of the token.
[0146] Furthermore, in some embodiments, the above 0150 specifically includes:
[0147] If the current time is a valid time, authentication pass information is sent to the second application, so that the second application provides the target data to the second application.
[0148] That is, after generating a token, the server 103 of the embodiment of the present application will set a validity period for the token so that any micro / master application can only obtain data of other micro / master applications within the validity period of the token after being issued the token.
[0149] Specifically, the server 103 of the embodiment of the present application will verify whether the token carried by the data call request is consistent with the token previously stored by itself, and whether the current time is within the validity period of the token. If the current time is within the validity period of the token, when the token carried by the data call request is consistent with the token previously stored by itself, authentication information is generated and sent to the second application 102. If the current time is not within the validity period, or the token carried by the data call request is inconsistent with the token previously stored by itself, no authentication information is generated.
[0150] In some embodiments, the validity period is 10 minutes. That is, within 10 minutes of obtaining the token, any micro / master application can pass the data call request corresponding to another micro / master application. After 10 minutes, if the data of another micro / master application is still needed, it is necessary to regenerate and send a token issuance request to apply for a new token.
[0151] In this way, the present application introduces the validity period, so that any data call request generated by a micro / master application based on the token can only be verified within the validity period, avoiding the situation where the micro / master application can obtain data without restriction based on a token; and, after being issued a token, any micro / master application can only call specific data within a specific period of time, thereby ensuring data security.
[0152] Optionally, to reduce data redundancy, in some implementations, when the validity period of a token has expired, the server 103 will delete the token.
[0153] Optionally, the above 0140 in certain embodiments of the present application specifically includes:
[0154] After the second application receives the data access request sent by the first application, a data call request generated by the second application based on the token in the data access request is received.
[0155] That is, the first application 101 in the implementation manner of the present application will send a data access request to the second application 102 to request the second application 102 to provide its own target data to itself; after the second application 102 receives the data access request, it generates the above-mentioned data call request according to the token in the data access request, and sends it to the server 103, so that the server 103 verifies whether the first application 101 can legally call its own target data.
[0156] To more clearly illustrate the implementation of this application, please refer to Figure 8 , Figure 8 This is a swim lane diagram of the data interaction method of the implementation mode of this application. Figure 8 As shown, the first application 101 generates a data access request based on the previously issued token, and sends the data access request to the second application 102 to request the second application 102 to provide the target data; the second application 102 generates a data call request based on the token in the data call request, and sends the data call request to the server 103; the server 103 performs a series of verifications on the data call request to determine whether the data call request is legal based on the various data in the request.
[0157] In this way, since the data access request of the micro-application / main application will be converted into a data call request by another micro-application / main application, the server 103 of the implementation mode of the present application will then process the data call request accordingly, thereby avoiding the unexpected situations that may arise when the server 103 needs to directly process the data access request, reducing the load of the server 103, and ensuring the smooth operation of the server 103.
[0158] Optionally, in certain embodiments of the present application, the target data includes one or more of medical record data, medical expense data, and related outpatient data, and the second application is used to store the target data.
[0159] In addition, it is conceivable that the data interaction method provided in the embodiment of the present application is used to complete Figure 2 When the applications in the interaction, each application will complete the corresponding verification through the server 103, for details, please refer to Fig. 9 and Fig.10 , Fig. 9 and Fig.10 All of them are schematic diagrams of application scenarios of the implementation methods of the present application.
[0160] That is, before each micro / master application obtains data from another micro / master application, the server 103 will receive a corresponding data call request, and the other micro / master application will decide whether to provide data to the micro / master application based on the authentication result of the data call request.
[0161] Exemplarily, when the health data application 203 requests the health record application 202 to provide health record data, the health data application 203 will generate a data call request based on the token previously issued to itself, its own application identifier, the application identifier of the health record data 102, and the data identifier of the health record data, and send the data call request to the health record application 202; the health record application 202 then generates the data call request and sends it to the server 103; the server 103 verifies the data call request, and if the verification is successful, it will generate and send the information "the authentication result is authentication passed" to the health record application 202. After receiving the information "the authentication result is authentication passed", the health record application 202 provides the health record data to the health data application 203.
[0162] It is not difficult to understand that if the authentication fails, the server 103 can generate a message "authentication result is not authentication passed" to the health record application 202, and then the health record application 202 will refuse to provide health record data to the health data application 203.
[0163] Furthermore, it is understandable that Fig. 9 and Fig.10 This is only one of the application scenarios to which the present application can be applied. For example, in some other implementations, the data interaction method provided by the present application is also applied in smart home scenarios.
[0164] Specifically, in the smart home scenario, the room temperature collection micro-application is used to collect the room temperature in the house, and the furniture control main application is used to send control instructions to each smart home. Then: the furniture control main application sends a token issuance request corresponding to the room temperature collection micro-application to the server and obtains a token.
[0165] When the furniture control main application wants to obtain the room temperature data of the room temperature collection micro-application, it generates a data call request based on the token corresponding to the room temperature collection micro-application, and sends this data call request to the server, so that when the server determines that the token in this data call request matches the token previously stored by itself, it sends the authentication pass information to the room temperature collection micro-application. Then, the room temperature collection micro-application provides the room temperature data to the furniture control main application. If the furniture control main application determines that the room temperature exceeds the preset threshold based on the room temperature data provided by the room temperature collection micro-application, the furniture control main application will control the air conditioner to turn on to perform the cooling function, and control the curtains to close to reduce the incidence of sunlight into the room.
[0166] Please refer to Fig.11 , the present application provides a data interaction method applied to a first application, comprising:
[0167] 0310, generating a token issuance request corresponding to the second application, and sending the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application;
[0168] 0320, save the token sent by the server;
[0169] 0330, based on the token, generate a data call request corresponding to the second application, and send the data call request to the server, so that the server determines whether the token carried in the data call request is consistent with the token stored in the server;
[0170] 0340. When the server determines that the token carried in the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application, the target data of the second application is obtained.
[0171] That is, before calling the target data of the second application 102, the first application 101 in the implementation mode of the present application needs to apply for a token of the target data from the server 103, so the first application 101 will send a token application request to the server 103 to enable the server to verify whether it has the right to call the target data. It is not difficult to understand that when the server 103 determines that the first application 101 has the right to call the target data in the second application based on the preset data calling permission information, the server 103 will generate a token and send the token to the first application 101.
[0172] After the first application 101 receives the token and saves it, if it needs to read the target data of the second application 102 at a certain moment, the first application 101 can generate a data call request according to the token and send it to the server 103. The server 103 parses the data call request to obtain the token carried by the data call request, and then determines whether the token carried by the data call request is consistent with the token previously generated by itself. If they are consistent, the server 103 feeds back the authentication pass information to the second application 102.
[0173] When the second application 102 receives the authentication success information, it knows that the first application 101 is legally calling its own target data, so the second application 102 provides the target data to the first application 101, so that the first application 101 can obtain the target data to complete the corresponding business operation.
[0174] In this way, based on the introduction of data call permission information, the present application enables the data that each application can call / acquire to be pre-defined / set. Therefore, when data is interacted between different micro-applications, or when data is interacted between different microservices and the main application, each micro / main application can only call pre-defined / set data, thereby ensuring data security; and, based on the introduction and verification of tokens, when the data call request is tampered with, the present application can also verify the legitimacy of the data call request through the token, so that illegal data call requests will not be responded to correctly, thereby further ensuring data security.
[0175] In addition, it can be understood that the first application in the data interaction method applied to the server provided by the present application and the first application in the data interaction method applied to the first application provided by the present application can be understood as the same concept / definition. Therefore, all the steps that can be executed by the first application in the data interaction method applied to the server can also be executed by the first application in the data interaction method applied to the first application, and can achieve the same technical effect. In order to avoid repetition, no further explanation will be given.
[0176] Optionally, in some embodiments, the data interaction method provided by the present application further includes:
[0177] When the server determines that the first application does not have the calling permission, receiving token application failure information sent by the server;
[0178] Based on the token application failure information, the user is prompted with the first prompt information that the first application does not have the calling authority for the target data.
[0179] That is, when the first application 101 does not have the calling permission for the target data of the second application 102, but the first application 101 still generates a token generation request and sends it to the server 103, the server 103 will determine that the first application 101 cannot obtain the target data, and therefore refuse to generate a token for the first application 101, and send a token application failure message to the first application 101.
[0180] When the first application 101 receives the token application failure information, it will know that it does not have the calling authority of the target data, so the first application 101 will prompt the user based on the preset first prompt information to enable the user to apply for the calling authority of the target data for the first application 101.
[0181] It is understandable that the specific method of prompting the user based on the first prompt information can be set according to actual conditions. For example, in some embodiments, the first application 101 will display the first prompt information "no permission to read data" on the display screen of the user terminal.
[0182] In this way, the implementation manner of the present application enables the user to clearly know whether each micro / master application in the user terminal has the calling authority for the target data.
[0183] Optionally, in some embodiments, the interaction method provided by the present application further includes:
[0184] When the second application receives the authentication failure information sent by the server and generates the data refusal information, receiving the data refusal information sent by the second application;
[0185] Based on the data refusal to provide information, the second prompt information is used to prompt the user that the first application does not have a legal token.
[0186] That is, when the first application 101 fails to apply for a token for the target data but still sends data call permission information to the server 103, causing the server 103 to determine that the first application 101 attempts to illegally obtain the target data, the server 103 will send authentication failure information to the second application 102 to let the second application 102 know that the first application 101 illegally obtains the target data. After the second application 102 knows that the first application 101 illegally obtains the target data based on the authentication failure information, it will also send data refusal information to the first application 101 to let the first application 101 know that it cannot obtain the target data.
[0187] After obtaining the data refusal information, the first application 101 will prompt the user based on the preset second prompt information to enable the user to apply for a token for the first application and / or apply for the calling authority of the target data for the first application.
[0188] In some implementations, the first application 101 controls the display screen of the user terminal to display a second prompt message that “reading data is an illegal operation”.
[0189] In this way, the implementation mode of the present application enables the user to clearly know whether each main / micro application has a token, and thus to know the data that each main / micro application can obtain.
[0190] refer to Fig.12 , the present application provides a data interaction method applied to a second application, the method comprising:
[0191] 0410. When receiving authentication information generated by the server based on a data call request sent by the first application and the token carried in the data call request is consistent with the token stored by the server, the target data is provided to the first application.
[0192] That is, before the first application 101 in the implementation manner of the present application obtains the target data of the second application 102, it needs to apply to the server 103 for a corresponding token as a credential for obtaining the target data; after the first application obtains the token, the first application 101 can generate a data call request corresponding to the second application 102 based on the token, so as to request the second application 102 to provide the target data to the first application 101.
[0193] After the data call request is sent to the server 103, the server 103 determines whether the first application 101 can legally call the target data based on a consistency comparison result between a token previously generated by itself and the token carried in the data call request.
[0194] If server 103 determines that the "token previously generated by itself" is consistent with the "token carried in the data call request", it will be deemed that the first application 101 can legally call the target data of the second application 102, so it will send authentication information to the second application 102; if they are inconsistent, it will be deemed that the first application 101 attempted to illegally obtain the target data.
[0195] If the second application 102 can receive the authentication success information, it is determined that the first application 101 has legally obtained the target data, so the second application 102 provides the target data to the first application 101 .
[0196] In this way, based on the introduction of data call permission information, the present application enables the data that each application can call / acquire to be pre-defined / set. Therefore, when data is interacted between different micro-applications, or when data is interacted between different microservices and the main application, each micro / main application can only call pre-defined / set data, thereby ensuring data security; and, based on the introduction and verification of tokens, when the data call request is tampered with, the present application can also verify the legitimacy of the data call request through the token, so that illegal data call requests will not be responded to correctly, thereby further ensuring data security.
[0197] In addition, it can be understood that the second application in the data interaction method applied to the server provided by the present application and the second application in the data interaction method applied to the second application provided by the present application can be understood as the same concept / definition. Therefore, each step that can be executed by the second application in the data interaction method applied to the server can also be executed by the second application in the data interaction method applied to the second application, and can achieve the same technical effect. In order to avoid repetition, no further explanation will be given.
[0198] refer to Fig.13 The present application provides a data interaction device 500, which is applied to a server and includes:
[0199] A first response module 510 is used to respond to the token issuance request of the first application corresponding to the second application, and determine whether the first application has the calling authority to call the target data of the second application based on the data calling authority information, wherein the data calling authority information records the data that the first application can call;
[0200] A token generation module 520, which generates a token if available;
[0201] A first sending module 530, configured to save the token and send the token to the first application;
[0202] The second response module 540 is used to respond to the data call request of the first application corresponding to the second application, and verify whether the token carried in the data call request is consistent with the stored token;
[0203] The second sending module 550 is used to send authentication pass information to the second application if they are consistent, so that the second application provides the target data to the first application.
[0204] The data interaction device 500 provided in the embodiment of the present application can implement each process of the above-mentioned data interaction method applied to the server, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0205] refer to Fig.14The present application provides a data interaction device 600, which is applied to a first application, and the device includes:
[0206] A first request generation module 610 is used to generate a token issuance request corresponding to the second application, and send the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application;
[0207] The token storage module 620 is used to store the token sent by the server;
[0208] A second request generation module 630 is used to generate a data call request corresponding to the second application based on the token, and send the data call request to the server so that the server determines whether the token carried in the data call request is consistent with the token stored in the server;
[0209] The data acquisition module 640 is used to acquire the target data of the second application after the server determines that the token carried in the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application.
[0210] The data interaction device 600 provided in the present application can implement each process of the data interaction method applied to the first application and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0211] refer to Fig.15 The present application provides a data interaction device 700, which is applied to a second application, and the device includes:
[0212] The data providing module 710 is used to provide target data to the first application when receiving authentication information generated by the server based on a data calling request sent by the first application and the token carried in the data calling request is consistent with the token stored in the server.
[0213] The data interaction device 700 provided in the present application can implement each process of the above-mentioned data interaction method applied to the second application, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0214] The present application also provides a terminal device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the data interaction method of the present application is implemented.
[0215] The present application also provides a computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the one or more processors execute the data interaction method of the present application.
[0216] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0217] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0218] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A data interaction method, characterized in that: Applied to a server, the method comprises: In response to a token issuance request from the first application corresponding to the second application, determining whether the first application has a calling permission to call target data of the second application based on data calling permission information, wherein the data calling permission information records data that the first application can call; If available, a token is generated; Saving the token and sending the token to the first application; In response to a data call request from the first application corresponding to the second application, verifying whether a token carried in the data call request is consistent with a stored token; If they are consistent, authentication success information is sent to the second application, so that the second application provides the target data to the first application.
2. The data interaction method according to claim 1, characterized in that: The token issuance request and the data call request both include a first application identifier of the first application, a second application identifier of the second application, and a data identifier of the target data; After the token is saved, the method further includes: Binding the token, the first application identifier, the second application identifier and the data identifier to each other to generate binding relationship information; If the authentication data are consistent, sending authentication pass information to the second application so that the second application provides the target data to the first application, including: If they are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier and the data identifier in the data call request are bound to each other, then authentication information is sent to the second application so that the second application provides the target data to the first application.
3. The data interaction method according to claim 2, characterized in that: The first application is used to obtain the user identification of the user when receiving the user login instruction, the token issuance request and the data call request both also include the user identification, and the second application stores the target data corresponding to different user identifications; The step of binding the token, the first application identifier, the second application identifier, and the data identifier to generate binding relationship information includes: Binding the token, the first application identifier, the second application identifier, the data identifier and the user identifier to each other to generate the binding relationship information; If the two are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier, and the data identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data to the first application, including: If they are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier, the data identifier and the user identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data corresponding to the user identifier to the first application.
4. The data interaction method according to claim 2, characterized in that: The server comprises an authentication management module, and the authentication management module is used to store the token and the binding relationship information; The verifying whether the token carried in the data call request is consistent with the saved token includes: Based on the authentication management module, verify whether the token carried in the data call request is consistent with the saved token; If the two are consistent, and based on the binding relationship information, it is determined that the token, the first application identifier, the second application identifier, and the data identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data to the first application, including: If they are consistent, and based on the binding relationship information stored in the authentication management module, it is determined that the token, the first application identifier, the second application identifier and the data identifier in the data call request are bound to each other, then authentication pass information is sent to the second application so that the second application provides the target data to the first application.
5. The data interaction method according to claim 1, characterized in that: The server includes a permission management module, the permission management module is used to store the data call permission information, the data call permission information is generated before the first application and the second application are put on the shelf, the data call permission information includes multiple groups of permission data, the permission data indicates that the data consumer application can access the data provider application and can call the data corresponding to the call data identifier of the data provider application, each group of the permission data includes the identifier of the data consumer application, the identifier of the data provider application and the call data identifier; The determining, based on the data calling permission information, whether the first application has the calling permission to call the target data of the second application includes: Based on the data calling permission information stored in the permission management module, determine whether the first application identifier, the second application identifier and the data identifier in the token issuance request match the identifier of the consumer application, the identifier of the data provider application and the calling data identifier in a set of the permission data in sequence; If they match, it is determined that the first application has the calling permission; If there is no match, it is determined that the first application does not have the calling permission.
6. The data interaction method according to claim 1, characterized in that: After determining whether the first application has the calling authority to call the target data of the second application based on the data calling authority information, the method further includes: If not, a token application failure message is sent to the first application.
7. The data interaction method according to claim 1, characterized in that: After verifying whether the token carried in the data call request is consistent with the stored token, the method further includes: If they are inconsistent, an authentication failure message is sent to the second application.
8. The data interaction method according to claim 1, characterized in that: After generating the token and before sending authentication pass information to the second application so that the second application provides the target data to the first application, the method further includes: Set the validity period of the token; The sending authentication success information to the second application so that the second application provides the target data to the first application includes: If the current time belongs to the valid time, authentication pass information is sent to the second application, so that the second application provides the target data to the second application.
9. The data interaction method according to claim 1, characterized in that: The responding to the data calling request of the first application corresponding to the second application includes: After the second application receives the data access request sent by the first application, the second application receives the data call request generated by the second application based on the token in the data access request.
10. The data interaction method according to claim 1, characterized in that: The target data includes one or more of medical record data, medical expense data, and outpatient data, and the second application is used to store the target data.
11. A data interaction method, characterized in that: Applied to the first application, the method comprises: Generate a token issuance request corresponding to the second application, and send the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application; Saving the token sent by the server; Based on the token, generate a data call request corresponding to the second application, and send the data call request to the server, so that the server determines whether the token carried by the data call request is consistent with the token stored by the server; When the server determines that the token carried in the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application, the target data of the second application is obtained.
12. The data interaction method according to claim 11, characterized in that: The method further comprises: When the server determines that the first application does not have the calling authority, receiving token application failure information sent by the server; Based on the token application failure information, the user is prompted with first prompt information that the first application does not have the calling authority for the target data.
13. The data interaction method according to claim 11, characterized in that: The method further comprises: When the second application receives the authentication failure information sent by the server and generates data refusal information, receiving the data refusal information sent by the second application; The information provision is refused based on the data, and a second prompt message is used to prompt the user that the first application does not have a legal token.
14. A data interaction method, characterized in that: Applied to the second application, the method comprises: When receiving authentication information generated by the server based on a data call request sent by a first application and the token carried in the data call request is consistent with the token stored in the server, target data is provided to the first application.
15. A data interaction device, characterized in that: Applied to a server, the device comprises: A first response module, configured to respond to a token issuance request from a first application corresponding to a second application, and determine whether the first application has a calling permission to call target data of the second application based on data calling permission information, wherein the data calling permission information records data that the first application can call; The token generation module generates a token if it has the required features; A first sending module, used for saving the token and sending the token to the first application; A second response module, configured to respond to a data call request of the first application corresponding to the second application, and verify whether a token carried in the data call request is consistent with a stored token; The second sending module is used to send authentication pass information to the second application if they are consistent, so that the second application provides the target data to the first application.
16. A data interaction device, characterized in that: Applied to the first application, the device comprises: A first request generation module, used to generate a token issuance request corresponding to the second application, and send the token issuance request to the server, so that the server generates a token when determining that the first application has the calling authority of the target data of the second application; A token storage module, used for storing the token sent by the server; A second request generating module, configured to generate a data calling request corresponding to the second application based on the token, and send the data calling request to the server, so that the server determines whether the token carried in the data calling request is consistent with the token stored in the server; The data acquisition module is used to acquire the target data of the second application after the server determines that the token carried by the data call request is consistent with the token stored in the server and sends the generated authentication pass information to the second application.
17. A data interaction device, characterized in that: Applied to the second application, the device comprises: The data providing module is used to provide target data to the first application when receiving authentication information generated by a data calling request sent by the server based on the first application and the token carried in the data calling request is consistent with the token stored by the server.
18. A terminal device, characterized in that: The terminal device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the data interaction method according to any one of claims 1 to 14 is implemented.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the data interaction method according to any one of claims 1 to 14 is implemented.
