Service authentication method and device

By obtaining user operation behavior and service request information, combined with the microservice association map and service records, the authentication results are generated, which solves the problem of cumbersome authentication process in the microservice architecture and achieves convenient user authentication and stable service capabilities. supply.

CN118740429APending Publication Date: 2024-10-01北京艾迪信科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410753328.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the microservice architecture, existing service authentication methods require multiple verifications of different levels of secret keys and identity information, making the user verification process cumbersome and inconvenient, and may affect the stability of the microservice.

Method used

By obtaining the user's service request information and operation behavior information, combined with the pre-obtained microservice association map and service records, the authentication results are generated, and authorization, rejection or request verification are determined based on the behavior verification confidence and service load, simplifying authentication. processes, and optimize the delivery of service capabilities.

Benefits of technology

It reduces the frequency of users actively providing authentication information, improves the stability and reliability of the service capabilities of the microservice architecture, and provides users with a convenient authentication experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740429A_ABST
    Figure CN118740429A_ABST
Patent Text Reader

Abstract

The invention provides a service authentication method and device, belongs to the field of micro-service architecture, and is used for solving the problem that service authentication of micro-service brings inconvenience to a user in the related art. In the method and device, service authentication can be assisted according to operation behavior information of the user and the load condition of requesting the micro-service, and the service authentication efficiency is improved. The user-oriented service authentication process is simplified, convenience is provided for the user, and the service authentication process is also beneficial to ensuring that each service capability of the micro-service architecture is continuously, stably and reliably provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of microservice architecture, and in particular to a service authentication method and device. Background Art

[0002] Microservice architecture is a new framework service structure that replaces traditional monolithic applications. Microservice architecture contains multiple microservices, which are functional modules used to provide specific service functions. There will also be collaboration between different microservices. Before using the microservice architecture, it is necessary to determine whether the user requesting the microservice has the permission to use the microservice, that is, to perform service authentication. At present, service authentication requires verification based on secret keys, identity information, etc. If it is used to use microservices that require different permissions, it may require multiple verifications with different levels of secret keys and different degrees of identity information. This verification process will bring inconvenience to users. Summary of the invention

[0003] The present application provides a service authentication method, which is conducive to simplifying the service authentication process and providing convenience for users.

[0004] In a first aspect, the present application provides a service authentication method. The method comprises:

[0005] Obtain the user's service request information and operation behavior information, wherein the service request information carries the type identifier of the microservice;

[0006] Determine the service load of each microservice according to the type identifier, the pre-acquired microservice association graph, and the service record of the microservice architecture;

[0007] An authentication result is generated according to the operation behavior information and the service load condition, and the authentication result includes authorization service, rejection of request or request verification.

[0008] By adopting the above technical solution, service authentication can be assisted according to the user's operation behavior information and the load of the requested microservice, which is conducive to simplifying the user-oriented service authentication process and providing convenience for users. The service authentication process is also conducive to ensuring that each service capability of the microservice architecture is continuously, stably and reliably provided.

[0009] Further, the microservice architecture includes a number of service functions, the service functions include a number of service nodes and dependencies between the service nodes, and the association relationship graph includes the correspondence between microservices and service nodes and the dependencies between the service nodes;

[0010] The service record carries a timestamp and a function identifier;

[0011] Determining the service load of each microservice according to the type identifier, the pre-acquired microservice association graph, and the service record of the microservice architecture includes:

[0012] Determine the predicted usage frequency of each service function within the node unit duration from the current moment according to the service record, and the node unit duration corresponds to the type identification preset one by one;

[0013] The service load of each microservice is determined based on the predicted usage frequency and the association relationship map.

[0014] Further, determining the service load of each microservice according to the predicted usage frequency and the association relationship map includes:

[0015] Determine the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment;

[0016] The predicted execution frequency of all service functions of each service node is summed to obtain the predicted cumulative frequency of the service node. One service node corresponds to one microservice.

[0017] The service load condition of each microservice is determined according to the predicted usage frequency and the pre-acquired service capability data of the relative category identifier.

[0018] Further, generating an authentication result according to the operation behavior information and the service load condition includes:

[0019] Determining the behavior verification confidence of the service request information according to the operation behavior information;

[0020] Determining a set of low verification thresholds and high verification thresholds according to the service load condition;

[0021] Determine the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold. If the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request. If the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service. If the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.

[0022] In a second aspect, the present application provides a service authentication device. The device includes a data acquisition module, a load determination module and a result generation module;

[0023] The data acquisition module is used to obtain the user's service request information and operation behavior information, and the service request information carries the type identification of the microservice;

[0024] The load determination module is used to determine the service load of each microservice according to the type identification and the pre-acquired microservice association relationship map and the service record of the microservice architecture;

[0025] The result generation module is used to generate an authentication result according to the operation behavior information and the service load condition, and the authentication result includes authorization service, rejection of request or request verification.

[0026] Further, the microservice architecture includes a number of service functions, the service functions include a number of service nodes and dependencies between the service nodes, and the association relationship graph includes the correspondence between microservices and service nodes and the dependencies between the service nodes;

[0027] The service record carries a timestamp and a function identifier;

[0028] The load determination module is further configured to determine the service load of each microservice according to the type identifier and the pre-acquired microservice association graph and the service record of the microservice architecture, including:

[0029] Determine the predicted usage frequency of each service function within the node unit duration from the current moment according to the service record, and the node unit duration corresponds to the type identification preset one by one;

[0030] The service load of each microservice is determined based on the predicted usage frequency and the association relationship map.

[0031] Furthermore, the load determination module is further configured to determine the service load of each microservice according to the predicted usage frequency and the association relationship map, including:

[0032] Determine the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment;

[0033] The predicted execution frequency of all service functions of each service node is summed to obtain the predicted cumulative frequency of the service node. One service node corresponds to one microservice.

[0034] The service load condition of each microservice is determined according to the predicted usage frequency and the pre-acquired service capability data of the relative category identifier.

[0035] Further, generating an authentication result according to the operation behavior information and the service load condition includes:

[0036] Determining the behavior verification confidence of the service request information according to the operation behavior information;

[0037] Determining a set of low verification thresholds and high verification thresholds according to the service load condition;

[0038] Determine the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold. If the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request. If the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service. If the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.

[0039] In summary, this application at least has the following beneficial effects:

[0040] 1. Provides a service authentication method and device, which, when applied to a microservice architecture, helps reduce the frequency of users actively providing authentication information for service authentication, thereby providing convenience for users;

[0041] 2. The service authentication result is related to the user's operation behavior information and the service load of the microservice, so this technology is also helpful in ensuring that each service capability of the microservice architecture is provided continuously, stably and reliably.

[0042] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0044] Figure 1 A flow chart of a service authentication method in an embodiment of the present application is shown;

[0045] Figure 2 A block diagram of a service authentication device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0048] The present application provides a service authentication method and device, which are conducive to simplifying the service authentication process and providing convenience for users.

[0049] In a first aspect, the present application provides a service authentication method. The method can be executed by a server and applied to a microservice in a microservice architecture, wherein the microservice architecture includes a plurality of service functions, and the service functions include a plurality of service nodes and dependencies between the service nodes.

[0050] Specifically, the microservice architecture contains multiple service functions, each of which is specifically manifested as a service process. The service process is supported and implemented by multiple service nodes. The service process also reflects the dependency relationship between service nodes. The execution of child nodes depends on parent nodes, and each service node is executed by a microservice. It should be understood that there are common service nodes in the service processes of different service functions, that is, the service functions are not manifested as independent service processes, but as a network structure composed of service nodes.

[0051] Figure 1 A flow chart of a service authentication method in an embodiment of the present application is shown.

[0052] Reference Figure 1 , the method specifically comprises the following steps:

[0053] S110: Obtaining the user's service request information and operation behavior information.

[0054] The service request information carries a type identifier of the microservice.

[0055] The user's service request information may be a request for a certain service function, or it may be a direct request for a certain service node. The service request information includes a request for a certain service function, and it may also be expressed as a request for a series of service nodes. A request for a service node is a request for a microservice, so the service request information contains at least one type of microservice identifier.

[0056] Since the microservice architecture is deployed in the cloud, users are generally required to log in. After the user logs in, the operation behavior information will be obtained and recorded. The operation behavior information obtained here includes the user's operation behavior within a preset time period before initiating the service request information. The operation behavior information includes the operation process, operation frequency, and selected microservices for certain microservices, etc. The types of operation behavior information are not exhaustive.

[0057] S120: Determine the service load of each microservice according to the type identifier, the pre-acquired microservice association graph, and the service record of the microservice architecture.

[0058] The association relationship graph includes the correspondence between microservices and service nodes and the dependency relationship of service nodes; the service record carries a timestamp and a function identifier.

[0059] The method of this step specifically includes: determining the predicted usage frequency of each service function within the node unit time from the current moment based on the service record, and the node unit time has a one-to-one correspondence with the type identification preset; determining the service load of each microservice based on the predicted usage frequency and the association relationship map.

[0060] The service record contains the usage records of all service functions. By performing data analysis on the service records, such as the usage frequency change trend analysis and change cycle analysis of each service function in the service record, the predicted usage frequency of each service function within the node unit time from the current moment can be predicted. For a service node corresponding to a microservice, its execution time is relatively certain. The node unit time here corresponds to a microservice, that is, the execution time of a service node.

[0061] In the method of this step, determining the service load situation of each microservice based on the predicted usage frequency and the association relationship map includes: determining the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment; summing the predicted execution frequencies of all service functions for each service node to obtain the predicted cumulative frequency of the service node, one service node corresponds to one microservice; and determining the service load situation of each microservice based on the service capability data pre-acquired according to the predicted usage frequency and the relative type identifier.

[0062] The predicted execution frequency is expressed as the expected number of executions of a service function within the node unit time from the current moment. Since a service node may be used to support multiple service functions, to predict the expected number of executions of a service node within the node unit time from the current moment, it is necessary to calculate the sum of the expected execution frequencies of all associated service functions within the node unit time from the current moment, that is, to obtain the predicted cumulative frequency, reflecting the expected execution frequency of the service node within the node unit time from the current moment.

[0063] For a microservice corresponding to a service node, the total number of users that can be supported is determined, and the predicted cumulative frequency is expressed as the number of users expected to request the service node within the unit time of the node from the current moment. Therefore, the ratio value obtained by dividing the predicted cumulative frequency by the total number of users that the service node can support is the service load of this microservice.

[0064] S130: Generate an authentication result according to the operation behavior information and service load conditions.

[0065] The authentication result includes authorization of service, rejection of request or request verification.

[0066] The method of this step specifically includes: determining the behavior verification confidence of the service request information based on the operation behavior information; determining a set of low verification thresholds and high verification thresholds based on the service load conditions; judging the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold; if the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request; if the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service; if the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.

[0067] In the method of this step, each behavior confidence can be specifically identified as an authority value, a base authority value is determined for each user, and then an adjustment coefficient value is determined for each operation behavior feature group. Based on the behavior analysis theory, it is judged whether the user behavior has an operation behavior feature group, and then the adjustment coefficient value is determined to be the adjustment coefficient value corresponding to the operation behavior feature group with the highest adjustment coefficient value possessed by the user. In this way, the behavior verification confidence of the user requesting this service can be obtained by multiplying the base authority value by the adjustment coefficient value.

[0068] If the service load reflects the expected number of requests for the service, the higher the service load, the higher the threshold for users, since the total number of users that the service can support within the node unit time is limited. In this way, by appropriately scaling the behavior verification confidence and service load, the comparison result of the two can reflect the service authentication result, and the threshold for user access to the microservice can be adjusted according to the expected service load, ensuring that the microservice can be provided to users with higher permissions, and users do not need to provide additional keys, identity information, etc. for secondary verification unless necessary, which is more user-friendly.

[0069] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0070] In a second aspect, the present application provides a service authentication device, which can be implemented as a server.

[0071] Figure 2 A block diagram of a service authentication device in an embodiment of the present application is shown.

[0072] Reference Figure 2 The device specifically includes a data acquisition module 210, a load determination module 220 and a result generation module 230;

[0073] The data acquisition module 210 is used to obtain the user's service request information and operation behavior information, and the service request information carries the type identification of the microservice;

[0074] The load determination module 220 is used to determine the service load of each microservice according to the type identification and the pre-acquired microservice association relationship map and the service record of the microservice architecture;

[0075] The result generation module 230 is used to generate an authentication result according to the operation behavior information and the service load condition, and the authentication result includes authorization service, rejection of request or request verification.

[0076] Further, the microservice architecture includes a number of service functions, the service functions include a number of service nodes and dependencies between the service nodes, and the association relationship graph includes the correspondence between microservices and service nodes and the dependencies between the service nodes;

[0077] The service record carries a timestamp and a function identifier;

[0078] The load determination module 220 is further configured to determine the service load of each microservice according to the type identifier and the pre-acquired microservice association graph and the service record of the microservice architecture, including:

[0079] Determine the predicted usage frequency of each service function within the node unit duration from the current moment according to the service record, and the node unit duration corresponds to the type identification preset one by one;

[0080] The service load of each microservice is determined based on the predicted usage frequency and the association relationship map.

[0081] Furthermore, the load determination module 220 is further configured to determine the service load of each microservice according to the predicted usage frequency and the association relationship map, including:

[0082] Determine the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment;

[0083] The predicted execution frequency of all service functions of each service node is summed to obtain the predicted cumulative frequency of the service node. One service node corresponds to one microservice.

[0084] The service load condition of each microservice is determined according to the predicted usage frequency and the pre-acquired service capability data of the relative category identifier.

[0085] Further, generating an authentication result according to the operation behavior information and the service load condition includes:

[0086] Determining the behavior verification confidence of the service request information according to the operation behavior information;

[0087] Determining a set of low verification thresholds and high verification thresholds according to the service load condition;

[0088] Determine the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold. If the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request. If the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service. If the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.

[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0090] In summary, this application at least has the following beneficial effects:

[0091] 1. Provides a service authentication method and device, which, when applied to a microservice architecture, helps reduce the frequency of users actively providing authentication information for service authentication, thereby providing convenience for users;

[0092] 2. The service authentication result is related to the user's operation behavior information and the service load of the microservice, so this technology is also helpful in ensuring that each service capability of the microservice architecture is provided continuously, stably and reliably.

[0093] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A service authentication method, characterized in that: include: Obtain the user's service request information and operation behavior information, wherein the service request information carries the type identifier of the microservice; Determine the service load of each microservice according to the type identifier, the pre-acquired microservice association graph, and the service record of the microservice architecture; An authentication result is generated according to the operation behavior information and the service load condition, and the authentication result includes authorization service, rejection of request or request verification.

2. The method according to claim 1, characterized in that The microservice architecture includes a number of service functions, the service functions include a number of service nodes and dependencies between the service nodes, and the association relationship graph includes the correspondence between microservices and service nodes and the dependencies between the service nodes; The service record carries a timestamp and a function identifier; Determining the service load of each microservice according to the type identifier, the pre-acquired microservice association graph, and the service record of the microservice architecture includes: Determine the predicted usage frequency of each service function within the node unit duration from the current moment according to the service record, and the node unit duration corresponds to the type identification preset one by one; The service load of each microservice is determined based on the predicted usage frequency and the association relationship map.

3. The method according to claim 2, characterized in that Determining the service load of each microservice according to the predicted usage frequency and the association relationship graph includes: Determine the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment; The predicted execution frequency of all service functions of each service node is summed to obtain the predicted cumulative frequency of the service node. One service node corresponds to one microservice. The service load condition of each microservice is determined according to the predicted usage frequency and the pre-acquired service capability data of the relative category identifier.

4. The method according to claim 3, characterized in that Generating an authentication result according to the operation behavior information and service load conditions includes: Determining the behavior verification confidence of the service request information according to the operation behavior information; Determining a set of low verification thresholds and high verification thresholds according to the service load condition; Determine the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold. If the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request. If the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service. If the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.

5. A service authentication device, characterized in that: It includes a data acquisition module (210), a load determination module (220) and a result generation module (230); The data acquisition module (210) is used to acquire the user's service request information and operation behavior information, wherein the service request information carries a type identifier of the microservice; The load determination module (220) is used to determine the service load of each microservice according to the type identification and the pre-acquired microservice association relationship map and the service record of the microservice architecture; The result generation module (230) is used to generate an authentication result according to the operation behavior information and the service load condition, wherein the authentication result includes authorization service, rejection of request or request verification.

6. The device according to claim 5, characterized in that The microservice architecture includes a number of service functions, the service functions include a number of service nodes and dependencies between the service nodes, and the association relationship graph includes the correspondence between microservices and service nodes and the dependencies between the service nodes; The service record carries a timestamp and a function identifier; The load determination module (220) is further configured to determine the service load of each microservice according to the type identifier and the pre-acquired microservice association graph and the service record of the microservice architecture, including: Determine the predicted usage frequency of each service function within the node unit duration from the current moment according to the service record, and the node unit duration corresponds to the type identification preset one by one; The service load of each microservice is determined based on the predicted usage frequency and the association relationship map.

7. The device according to claim 6, characterized in that The load determination module (220) is further configured to determine the service load of each microservice according to the predicted usage frequency and the association relationship map, including: Determine the predicted usage frequency of the service function within the node unit time from the current moment as the predicted execution frequency of all service nodes of the service function within the node unit time from the current moment; The predicted execution frequency of all service functions of each service node is summed to obtain the predicted cumulative frequency of the service node. One service node corresponds to one microservice. The service load condition of each microservice is determined according to the predicted usage frequency and the pre-acquired service capability data of the relative category identifier.

8. The device according to claim 7, characterized in that Generating an authentication result according to the operation behavior information and service load conditions includes: Determining the behavior verification confidence of the service request information according to the operation behavior information; Determining a set of low verification thresholds and high verification thresholds according to the service load condition; Determine the relationship between the behavior verification confidence and the low verification threshold and the high verification threshold. If the behavior verification confidence is lower than the low verification threshold, the authentication result is a rejection of the request. If the behavior verification confidence is higher than the high verification threshold, the authentication result is an authorization service. If the behavior verification confidence is between the low verification confidence and the high verification confidence, the authentication result is a request verification.