Interface authentication method for large electric power model and related equipment

Through the interface authentication method of dynamic signature and public key verification, the credibility of the power big model interface caller is evaluated and the call permissions are authorized, which solves the security and reliability problems in the data exchange of power big model and realizes efficient and secure interface interaction.

CN119598524APending Publication Date: 2025-03-11BEIJING CHINA POWER INFORMATION TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510112982.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the process of data exchange of power large models, how to ensure security and reliability at the same time to prevent illegal access and tampering?

Method used

By receiving the interface call request sent by the interface caller, dynamically generate the signature and use the public key to verify the identity and content of the request, evaluate the trustworthiness of the interface caller, and authorize the interface call permissions based on the trustworthiness.

Benefits of technology

It realizes security and integrity verification of interface call requests, ensures the identity security of the interface caller, and improves reliability and security when interacting with power big models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598524A_ABST
    Figure CN119598524A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide an interface authentication method for an electric power large model and related equipment. The method comprises the steps that an interface calling request sent by an interface calling party is received, the interface calling request comprises a dynamic signature, and the dynamic signature is dynamically generated according to request content and a timestamp; verifying the interface calling request according to a public key to determine whether the identity of an interface calling party and the content of the interface calling request are reliable or not; the credibility of the interface calling party is evaluated in response to the fact that the interface calling request passes verification, and the credibility of the interface calling party is used for indicating the reliability and safety when the interface calling party interacts with the large electric power model; and in response to determining that the credibility of the interface calling party is greater than a preset threshold value, authorizing the calling permission of the interface corresponding to the electric power large model to the interface calling party according to the interface calling request. According to the invention, the data security and reliability in the calling process of the large power model interface in the power system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present disclosure relate to the technical field, and in particular, to an interface authentication method and related equipment for a large power model. Background Art

[0002] In today's digital and networked era, intelligent management and operation of power systems have become a new trend in the industry. With the continuous advancement of big data, cloud computing and artificial intelligence technologies, the safety and reliability of power big models, as an important tool for realizing intelligent analysis and decision-making of power systems, have received unprecedented attention.

[0003] In this process, how to ensure the security of data exchange during the large-scale power model while ensuring the reliability of data exchange has become a key issue that needs to be solved urgently. Summary of the invention

[0004] In view of this, an object of one or more embodiments of the present disclosure is to propose an interface authentication method for a large power model to solve the problems raised by the background technology.

[0005] Based on the above purpose, one or more embodiments of the present disclosure provide an interface authentication method for a large power model, including: Receiving an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; Verify the interface call request according to the public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; In response to the interface call request passing the verification, evaluating the credibility of the interface caller, the credibility of the interface caller being used to indicate the reliability and security of the interface caller when interacting with the power big model; In response to determining that the credibility of the interface caller is greater than a preset threshold, the interface caller is authorized to have a calling authority for the interface corresponding to the power model according to the interface calling request.

[0006] Optionally, the credibility of the interface caller is obtained by executing the following steps: Obtaining direct credibility of the interface caller based on historical interaction information between the interface caller and the power big model; Determine other interface callers that have an interactive relationship with both the interface caller and the power big model; Obtaining the indirect credibility of the interface caller according to the evaluation of the interface caller by the other interface callers and the similarity between the interface caller and the other calling interfaces; The credibility of the interface caller is obtained according to the direct credibility and the indirect credibility.

[0007] Optionally, a direct credibility weight is set for the direct credibility to adjust the weight of the direct credibility in the calculation of the comprehensive credibility; The direct credibility weight is obtained by executing the following steps: Selecting a plurality of direct credibility association factors and determining initial weights of the direct credibility association factors, wherein the direct credibility association factors include at least one of a historical interaction frequency between the interface caller and the power big model, a historical interaction success rate, and reliability of the interface caller; Constructing a fuzzy trust set of the interface caller, wherein the fuzzy trust set is constructed according to the evaluation of the interface caller by the other interface callers, and the evaluation levels of the fuzzy trust set include normal, abnormal and malicious; Inputting the initial weights of the direct credibility-related factors into a preset membership function to obtain a membership matrix based on the fuzzy trust set, wherein the membership in the membership matrix represents the degree of membership of the direct credibility-related factors mapped to the fuzzy trust set; Constructing a weight matrix of the direct credibility-related factors, wherein the diagonal elements in the weight matrix are initial weights of the corresponding direct credibility-related factors, and the non-diagonal elements in the weight matrix are correlation weights of the corresponding pairs of direct credibility-related factors, which are set to the product of the membership of the corresponding pairs of direct credibility-related factors; According to the weight matrix of the direct credibility association factors, a correlation weight of each direct credibility association factor is obtained, where the correlation weight of the direct credibility association factor is the sum of the correlation weights of all pairs of direct credibility association factors related to the direct credibility association factor; The direct credibility weight is obtained according to the initial weight of the direct credibility association factor and the correlation weight of the direct credibility association factor.

[0008] Optionally, a direct credibility weight is set for the indirect credibility to adjust the proportion of the indirect credibility in the calculation of the comprehensive credibility; The indirect credibility weight is obtained by executing the following steps: Selecting a plurality of indirect credibility association factors, wherein the credibility association factors include at least one of the frequency of data interaction, the quality of data interaction and the reliability between the interface caller and the other interface callers; Determining the similarity between the interface caller and the other interface callers according to the indirect credibility association factor; The similarity between the interface caller and the other interface callers is normalized to obtain the indirect credibility weight.

[0009] Optionally, it also includes: The credibility of the interface caller is optimized according to the credibility of the interface caller at the last historical moment and the credibility of the interface caller at the current moment, as well as a decay factor, wherein the decay factor is used to adjust the change speed of the credibility of the interface caller.

[0010] Optionally, it also includes: According to the credibility and the current trust relationship graph, the predicted credibility is obtained through the trained credibility prediction model, wherein the trust relationship graph represents the trust relationship between the interface caller and the calling interface of the power big model; According to the prediction credibility, the authorization policy of the power model to the interface caller is adjusted.

[0011] Optionally, the training step of the credibility prediction model includes: Get the historical credibility of the historical time series of the interface caller; Draw an autocorrelation function graph and a partial autocorrelation function graph according to the historical credibility sequence, and determine the autoregressive part order and the moving average part order in the autoregressive moving average model according to the autocorrelation function graph and the partial autocorrelation function graph; Constructing an initial autoregressive moving average model according to the autoregressive part order and the moving average part order; A trained autoregressive moving average model is obtained according to the historical credibility, the initial autoregressive moving average model and the maximum likelihood estimation evaluation model.

[0012] Based on the same inventive concept, one or more embodiments of the present disclosure further provide an interface authentication device for a large power model, including: A receiving module is configured to receive an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; A first verification module is configured to verify the interface call request according to a public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; A second verification module is configured to evaluate the credibility of the interface caller in response to the interface call request passing the verification, wherein the credibility of the interface caller is used to indicate the reliability and security of the interface caller when interacting with the power big model; The authorization module is configured to, in response to determining that the credibility of the interface caller is greater than a preset threshold, authorize the interface caller to have the calling authority of the interface corresponding to the power model according to the interface call request.

[0013] Based on the same inventive concept, one or more embodiments of the present disclosure also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, an interface authentication method for a large power model as described in any one of the above items is implemented.

[0014] Based on the same inventive concept, one or more embodiments of the present disclosure also provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute any of the above-mentioned interface authentication methods for the large power model.

[0015] From the above, it can be seen that the interface authentication method for the electric power big model provided by one or more embodiments of the present disclosure receives an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; verifies the interface call request according to a public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; in response to the interface call request passing the verification, evaluates the credibility of the interface caller, and the credibility of the interface caller is used to indicate the reliability and security of the interface caller when interacting with the electric power big model; in response to determining that the credibility of the interface caller is greater than a preset threshold, authorizes the interface caller to have the calling authority of the corresponding interface of the electric power big model according to the interface call request.

[0016] The implementation of the present disclosure dynamically generates an interface call request based on the request content and timestamp, and can ensure the security of the interface caller's identity by verifying the dynamically generated interface call request; further, the credibility of the interface caller is comprehensively considered, and the reliability and security of the interface caller when interacting with the large power model is further guaranteed through the credibility of the interface caller. The combination of the two verification methods not only ensures the security and integrity of the interface call request, and ensures that the interactive data between the calling interface and the large power model is not illegally accessed or tampered with, but also ensures the identity security of the calling interface, as well as the reliability and security of the calling interface when interacting with the large power model. In addition, the implementation of the present disclosure has a highly compatible authentication mechanism, which is suitable for various application scenarios of large power models, and significantly improves the operating efficiency and reliability of the power system; by optimizing encryption processing, the amount of data is reduced, and the performance of the system is further enhanced. The implementation of the present disclosure greatly improves the user experience and customer service quality.

[0017] The interface authentication device, electronic device and computer-readable storage medium for a large electric power model provided in the present disclosure are all capable of implementing the steps of the above-mentioned interface authentication method for a large electric power model, and therefore also have the beneficial effects of the above-mentioned interface authentication method for a large electric power model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only one or more embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flowchart of an interface authentication method for a large power model according to one or more embodiments of the present disclosure; Figure 2 A schematic diagram of the structure of an interface authentication device for a large power model according to one or more embodiments of the present disclosure; Figure 3 A schematic diagram of the hardware structure of an electronic device according to one or more embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in one or more embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0022] As mentioned in the background technology section, in the power industry, with the advancement of smart grids and digital transformation, the automation and intelligence level of power systems continues to improve. In this context, power large model integration plays an increasingly important role. They are one of the key technologies to realize functions such as power system operation data analysis, fault prediction, and intelligent customer service.

[0023] However, with the widespread application of large power models in various power business fields, the security, stability and efficiency of interfaces have become increasingly prominent. Especially in the field of customer service, interfaces may face malicious attacks from outside, such as replay attacks, man-in-the-middle attacks, etc. These attacks may lead to data leakage, service interruption and even financial loss. Therefore, developing an efficient and secure authentication mechanism is crucial to protect the safe operation of the large power model integrated interface software.

[0024] Considering that large power models have many calling interfaces and large data processing volumes, traditional interface authentication schemes for large power models mostly use static keys or certificates for identity authentication.

[0025] However, although this solution can ensure data security to a certain extent, it still has the following shortcomings: Low security: Once the static key is leaked, the security of the entire system will be threatened. Attackers can use the leaked key to impersonate legitimate users to access system resources, thereby obtaining sensitive information or performing malicious operations; Poor flexibility: In the power system, the number of interface callers and users is huge and changes frequently. It is difficult to quickly adapt to system changes using static keys. Each time an interface caller / user is added or deleted, the key needs to be reallocated, which increases the difficulty of management; Inability to monitor in real time: Traditional authentication mechanisms lack the ability to monitor access behavior in real time, and are unable to detect and respond to abnormal access behavior in a timely manner, which is particularly insufficient when facing a complex and changing network security environment.

[0026] For example, the authentication mechanism based on the application programming interface key (APIKey) is simple and easy to use. Users only need to apply for the APIKey from the authentication server and then attach the APIKey to the request header for each request to achieve authentication. However, once the APIKey is leaked, attackers can forge requests from legitimate users, and because it is not dynamic, it cannot effectively prevent replay attacks.

[0027] To this end, the related technologies have proposed interface authentication schemes based on dynamic encryption. For example, the related technologies have proposed a token-based authentication mechanism, where the server issues an access token to the client, and the client carries the token in each request; and an authentication mechanism based on a hashed message authentication code (HMAC), where the client uses the secret key provided by the server to perform an HMAC signature on the request data, and the server verifies the correctness of the signature.

[0028] However, if the dynamic encryption scheme is too simple, there is still a possibility of being forged or cracked by attackers; if the dynamic encryption scheme is too complex, it may lead to a sharp increase in the amount of data processing in the power system, increasing the burden on the power system.

[0029] To this end, according to some implementations of the present disclosure, an interface authentication scheme for a large power model is proposed, which ensures the identity security of the calling interface through an interface call request based on a dynamic signature; and on this basis, further ensures the reliability and security of the calling interface in the process of interacting with the large power model through credibility. The present disclosure aims to provide a large power model authentication mechanism that is both secure, dynamic, compatible and simple, and realizes a more secure, efficient and easy-to-implement large power model integrated interface authentication scheme.

[0030] refer to Figure 1 The interface authentication method for a large power model according to one or more embodiments of the present disclosure includes the following steps: Step S101: receiving an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; Step S102: verifying the interface call request according to the public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; Step S103: in response to the interface call request being verified, evaluating the credibility of the interface caller, where the credibility of the interface caller is used to indicate the reliability and security of the interface caller when interacting with the large power model; Step S104: in response to determining that the credibility of the interface caller is greater than a preset threshold, authorizing the interface caller to have a calling authority for the interface corresponding to the power model according to the interface call request.

[0031] In some implementations, the interface call request in the above step S101 adopts a dynamic signature technology based on a timestamp and request content. In some implementations, the above dynamic signature can be dynamically generated using a generate_signature function based on request parameters. Specifically, the generate_signature function can generate a dynamic signature using an hmac-sha256 algorithm in combination with an API Secret, and the HMAC-SHA256 algorithm is used to generate a dynamic signature based on a private key of the calling interface and request parameters.

[0032] Based on the above dynamic signature, an interface call request can be further generated, wherein the authentication header (Authorization Header) part of the interface call request can also be implemented by a specific algorithm.

[0033] In some examples, the request parameters may include: host, date, GET, and authorization. Specifically, host represents the requested host address, and its type is a string, such as "sgcc.cscllm.com"; date represents the current timestamp, which can be expressed in RFC1123 format, and its type is a string, such as "Fri,05May202418:23:08GMT"; GET represents a request method in the HTTP protocol, which is used to request the server to return the content of the specified resource, and may include the request method, request path, and HTTP version, and its type is a string, such as " / v1.1 / chatHTTP / 1.1"; authorization represents the signature information based on base64 encoding, which is used to provide the server with credentials for verifying the identity of the user agent, and its type is a string.

[0034] In some examples, the generation rule of the date parameter may include: first calling datetime.utcnow() to obtain the current Coordinated Universal Time (UTC), and then using the strftime method to format the time into the style required by RFC1123, that is, "%a,%d%b%Y%H:%M:%SGMT", %a is the abbreviated weekday name, %d is the day of the month, %b is the abbreviated month name, %Y is the full four-digit year, %H is the hour (24-hour system), %M is the minute, %S is the second, and GMT indicates that Greenwich Mean Time is used.

[0035] The rules for generating the Authorization parameter may include: obtaining the APIKey and APISecret parameters from the console; using the date above to dynamically concatenate and generate the string tmp95598; using the hmac-sha256 algorithm in combination with APISecret to sign the tmp95598 in the previous step, and obtaining the signed summary tmp_sha; performing base64 encoding on the tmp_sha above to generate a signature; using the generated signature to concatenate the string below to generate authorization_origin; and finally performing base64 encoding on the authorization_origin above to generate the final authorization.

[0036] The above request parameters can be set and adjusted according to the specific requirements of the power system, and the present disclosure does not limit the setting of the request parameters.

[0037] Finally, the final Uniform Resource Locator (URL) is generated based on the above authentication parameters.

[0038] In some examples, the code of the above URL generation process can be expressed as: import hmac import hashlib import base64 from datetime import datetime from time import mktime from wsgiref.handlers import format_date_time from urllib.parse import urlencode #Get the APIKey and APISecret API_KEY = "aeef32376g8io9e8abdd801236740xa6a" API_SECRET = "MjlmNzkzNmZkMDQ2OTc0ZDdmNGE2ZTZi" # Generate date parameters cur_time = datetime.now() date = format_date_time(mktime(cur_time.timetuple())) # Concatenate the generated string tmp host = "sgcc.cscllm.com"# Note: This is the host address, not APIKey request_line = "GET / v1.1 / chat HTTP / 1.1" tmp = f"host:{host}\ndate:{date}\n{request_line}" # Sign using hmac-sha256 algorithm signature = hmac.new( API_SECRET.encode('utf-8'), tmp.encode('utf-8'), digestmod=hashlib.sha256 ).digest() # Base64 encoded signature result signature_b64 = base64.b64encode(signature).decode('utf-8') # Generate authorization_origin authorization_origin = ( f"api_key='{API_KEY}', " f"algorithm='hmac-sha256', " f"headers='host date request-line', " f"signature='{signature_b64}'" ) # There is no need to encode authorization_origin in Base64, it can be used directly as the HTTP header # authorization = base64.b64encode(authorization_origin.encode('utf-8')).decode('utf-8') # Construct request URL parameters params = { "date": date, "host": host, } # Generate the final URL url = f"https: / / {host} / v1.1 / chat?{urlencode(params)}" # Output the final URL and Authorization header information print("Final URL:") print(url) print("\nAuthorization header information:") print(authorization_origin) According to the implementation of the present disclosure, each interface call request can be guaranteed to be unique through a real-time dynamically generated timestamp, which increases the difficulty of prediction and replication for attackers; a dynamic signature is generated by combining the hmac-sha256 algorithm with APISecret to ensure the security of the interface call request. In addition, the design of the authentication mechanism of the present disclosure takes into account the compatibility of different development languages, and the generation rules of the authentication parameters are simple and clear, which ensures that the authentication mechanism of the present disclosure is easy to understand and implement, and is convenient for developers to integrate and use in different environments.

[0039] That is to say, the mechanism for verifying the security and integrity of the interface call request and the security of the calling interface identity in the authentication mechanism disclosed in the present invention is dynamic, secure, simple and compatible.

[0040] In the process of implementing the present disclosure, the applicant discovered that although the integrity of the interface call request can guarantee data security to a certain extent, there are still some limitations in the interface call process of the power model.

[0041] In the large-scale integrated power model system, it usually involves interactions between multiple subjects (such as different clients, servers, devices, etc.). The interaction relationship between these subjects is complex and needs to consider multiple factors, such as trust relationship, authority management, data sharing, etc. In other words, if an interface caller has an interactive relationship with multiple other interface callers, the verification method based on hash functions can only ensure the data integrity of a single request, and it is difficult to evaluate the overall trust relationship and security between these interactive subjects. For example, even if each individual request data is complete, if an interface caller is controlled by a malicious attacker, the security of the entire system will still be threatened.

[0042] Therefore, in the interface authentication scheme for the power big model, it is necessary not only to ensure the integrity of the interface call request, but also to verify the security and reliability of the interaction between the calling interface and the power big model.

[0043] In the implementation of the present disclosure, the calling interface needs to be further verified by verifying the security and reliability of the interaction between the calling interface and the power model or with other calling interfaces.

[0044] The credibility in step S103 evaluates the reliability and security of the interface caller when interacting with the power model, reflecting the interface's ability to resist malicious attacks and its trust level in different scenarios. This indicator ensures that only callers with good security records and low risks can obtain higher access rights, thereby protecting the overall stability of the system and data security.

[0045] In some implementations, the above credibility can be divided into two aspects: direct credibility and indirect credibility. Direct credibility is evaluated based on the past interaction records between the interface caller and the power model, reflecting the behavior of the interface caller in direct interaction; while indirect credibility comes from the evaluation of the interface caller by other interface callers, reflecting its reputation in cross-interface interaction. The combination of the two comprehensively measures the security and reliability of the interface caller.

[0046] In some implementations, the direct credibility can be determined based on the number of successful interactive operations of the interface caller and the number of abnormal or erroneous operations.

[0047] In some implementations, the direct credibility can be calculated by fitting the direct credibility of the interface caller through Beta distribution, and the calculation formula is as follows: ; in, Indicates the interface caller Direct credibility, Indicates the interface caller The number of successful historical interactions with the power model, Indicates the interface caller Number of failures in historical interactions with the power model.

[0048] In some implementations, the indirect credibility can be determined based on the interaction evaluation of other interface callers in the interaction history between the interface caller and other interface callers, and the similarity between the interface caller and other interface callers. That is, when an interface caller has an interactive relationship with multiple other interface callers, the indirect credibility is determined by analyzing the evaluation of the interface caller by these other interface callers and the similarity between them. The evaluation indicators of the similarity can include interface caller type similarity, operation mode similarity, etc.

[0049] In some implementations, the above indirect credibility can be determined by the following calculation formula: ; in, Indicates the interface caller The indirect credibility of Indicates the interface caller With other calling interfaces The historical interaction traffic can be In the trust domain, historical interaction traffic is integrated. Indicates the interface caller With other interface callers in historical interaction The similarity of Indicates other interface callers In historical interactions, the interface caller Interaction evaluation, other interface callers have indivual.

[0050] In some implementations, the similarity of the above interface callers can be calculated by the following formula: ; in, Indicates the interface caller With other interface callers The similarity of Represents the index of the attribute, Indicates the total number of attributes, Indicates the interface caller No. properties, Indicates other interface callers No. properties, Indicates the interface caller The mean of all attributes, Indicates the interface caller The mean of all attributes.

[0051] In some implementations, the other interface callers In historical interactions, the interface caller The interaction evaluation can be calculated by the following formula: ; in, Trust Domain The total number of malicious attacks that occurred within Indicates the interface caller With other interface callers The number of malicious attack incidents that occurred during the interaction, Indicates other interface callers direct credibility.

[0052] In some implementations, the trustworthiness of an interface caller is the sum of the direct trustworthiness and indirect trustworthiness of the interface caller.

[0053] In some embodiments, in order to obtain more reasonable credibility, direct credibility weight and indirect credibility weight are set for direct credibility and indirect credibility respectively.

[0054] In some implementations, the above direct credibility weight can be implemented by the following steps: Step S201: selecting a plurality of direct credibility association factors and determining initial weights of the direct credibility association factors, wherein the direct credibility association factors include at least one of the historical interaction frequency and the historical interaction success rate between the interface caller and the power big model and the reliability of the interface caller; Step S202: constructing a fuzzy trust set of the interface caller, wherein the fuzzy trust set is constructed based on the evaluation of the interface caller by the other interface callers, and the evaluation levels of the fuzzy trust set include normal, abnormal and malicious; Step S203: inputting the initial weights of the above direct credibility-related factors into a preset membership function to obtain a membership matrix based on the above fuzzy trust set, wherein the membership in the above membership matrix represents the degree of membership of the above direct credibility-related factors mapped to the above fuzzy trust set; Step S204: constructing a weight matrix of the above direct credibility association factors, wherein the diagonal elements in the weight matrix are the initial weights of the corresponding direct credibility association factors, and the non-diagonal elements in the weight matrix are the correlation weights of the corresponding pairs of direct credibility association factors, which are set to the product of the membership of the corresponding pairs of direct credibility association factors; Step S205: according to the weight matrix of the direct credibility association factors, obtain the correlation weight of each direct credibility association factor, the correlation weight of the direct credibility association factor is the sum of the correlation weights of all direct credibility association factor pairs related to the direct credibility association factor; Step S206: Obtain the direct credibility weight according to the initial weight of the direct credibility association factor and the correlation weight of the direct credibility association factor.

[0055] The direct credibility-related factors in the above step S202 may include historical success rate, historical interaction frequency, reliability of the interface caller, etc.

[0056] In some examples, the above process can be expressed as: choose Direct credibility factors And determine the initial weight of the direct credibility association factor , the direct credibility association factor includes at least one of the historical interaction frequency between the interface caller and the power big model, the historical interaction success rate, and the reliability of the interface caller; Construct the fuzzy trust set of the above interface callers The above fuzzy trust set is constructed based on the evaluation of the above other interface callers on the above interface caller. The evaluation level of the above fuzzy trust set is , and They represent normal, abnormal and malicious respectively; The initial weights of the above direct credibility-related factors Input the preset membership function to obtain the membership matrix based on the above fuzzy trust set The membership in the above membership matrix represents the degree of membership of the above direct credibility-related factors mapped to the above fuzzy trust set. The size of the membership matrix is ; Construct the weight matrix of the above direct credibility related factors , the weight matrix The size is , the diagonal elements in the weight matrix are the initial weights of the corresponding direct credibility-related factors, and the off-diagonal elements in the weight matrix are the correlation weights of the corresponding direct credibility-related factor pairs, which are set to the product of the membership of the corresponding direct credibility-related factor pairs. That is, The element value of corresponds to the initial weight value of the direct credibility-related factor, and the other elements The element value of is the product of the membership degree of the corresponding direct credibility association factor pair , Indicates evaluation factors The membership degree of Indicates evaluation factors The degree of membership; According to the weight matrix of the above direct credibility related factors , the correlation weight of each direct credibility correlation factor is obtained. The correlation weight of the direct credibility correlation factor is the sum of the correlation weights of all direct credibility correlation factor pairs related to the direct credibility correlation factor. For example, the correlation weight of the first direct credibility correlation factor is ; According to the initial weights of the above direct credibility-related factors and the correlation weights of the above direct credibility-related factors, the above direct credibility weights are obtained. For example, the direct credibility weight of the first direct credibility-related factor is , the direct credibility weights of all direct credibility-related factors can form a direct credibility weight sequence.

[0057] In some implementations, the above indirect credibility weight can be implemented by the following steps: Step S301: selecting a plurality of indirect credibility association factors, wherein the credibility association factors include at least one of the frequency of data interaction, data interaction quality and reliability between the interface caller and the other interface callers; Step S302: determining the similarity between the interface caller and the other interface callers according to the indirect credibility association factors; Step S303: normalize the similarity between the above-mentioned interface caller and the above-mentioned other interface callers to obtain the above-mentioned indirect credibility weight.

[0058] In some implementations, the normalized indirect credibility weight can be expressed as: ; in, Indicates the interface caller and other interface callers The indirect trust weight between Indicates the interface caller With all other interface callers The minimum similarity between Indicates the interface caller With all other interface callers The maximum similarity between .

[0059] In this way, the calculation formula of credibility can be expressed as: .

[0060] In some implementations, in order to prevent malicious interface callers from improving their credibility through improper behavior in a short period of time, the update algorithm adjusts the speed of change of credibility by introducing a decay factor, so that the credibility of normal interface callers increases steadily, while the credibility of malicious interface callers decreases rapidly.

[0061] In this way, the calculation formula of trust can be expressed as: ; in, Indicates the credibility at the current moment, Indicates the credibility of the previous moment, Represents the decay factor. The size of the decay factor is affected by multiple factors, including the activity of the interface caller, the stability of historical credibility, etc.

[0062] In some implementations, in order to improve the processing efficiency of the power system, the credibility of the calling interface at the current moment and the historical moment can also be used to predict the credibility of the calling interface at the next moment, and adjust the authorization strategy in advance.

[0063] In some implementations, the authorization policy can be adjusted in advance by following the steps below: Step S401: According to the above credibility and the current trust relationship graph, the predicted credibility is obtained through the trained credibility prediction model, wherein the above trust relationship graph represents the trust relationship between the above interface caller and the calling interface of the power model; Step S402: According to the prediction credibility, the authorization policy of the power model to the interface caller is adjusted.

[0064] The trust relationship graph in step S401 can be expressed as .in, Represents different participants in different power systems, such as power interface callers, user interface callers, and software modules, etc. Represents the trust relationship between the above different parties, Represents a trust type set, which can include normal, abnormal, and malicious types. Represents the attribute characteristics of the interface caller, such as the performance parameters of the interface caller and the user's permission level.

[0065] It should be noted that the above trust relationship graph is directed, that is, the interface caller To the interface caller The trust relationship is not equivalent to the interface caller To the interface caller trust relationship.

[0066] According to the above trust relationship graph and the credibility at the current moment, the trained credibility prediction model can capture the trust relationship that is not observed in the trust relationship graph and obtain the credibility predicted by the interface caller.

[0067] The credibility prediction model disclosed in the present invention can be trained based on the AutoRegressive Integrated Moving Average (ARIMA) model. ARIMA is a statistical model widely used in time series prediction. It combines autoregression (AR), differential integration (I) and moving average (MA) to process non-stationary time series data, and can capture trends, seasonality and noise components in the data. Compared with other models, this model does not require a large amount of training data. At the same time, it can flexibly adjust the order of autoregressive terms and moving average terms, and can capture dynamic patterns and trends in time series data. It is more suitable for the credibility prediction of the power system interface caller. In some implementations of the present invention, the above model is trained based on the historical time series composed of the historical credibility of the interface call.

[0068] The above model training process may include: Step S501: Obtain the historical credibility of the historical time series of the interface caller; Step S502: drawing an autocorrelation function graph and a partial autocorrelation function graph according to the above historical credibility sequence, and determining the autoregressive part order and the moving average part order in the autoregressive moving average model according to the above autocorrelation function graph and the partial autocorrelation function graph; Step S503: constructing an initial autoregressive moving average model according to the autoregressive part order and the moving average part order; Step S504: Obtain a trained autoregressive moving average model based on the historical credibility, the initial autoregressive moving average model and the maximum likelihood estimation evaluation model.

[0069] The above model can be expressed as: ; in, Indicates the credibility of calling the interface at time t, is a constant term, represents the autoregressive coefficient, represents the moving average coefficient, represents the error term, represents the order of the autoregressive term, Indicates the order of the moving average term.

[0070] In summary, the interface authentication method for the electric power big model provided by the present disclosure not only ensures the authenticity of the identity of the interface caller by verifying the integrity of the request message, but also ensures the security and reliability of the data interaction between the interface caller and the electric power big model through trust evaluation. In particular, the concise and efficient authentication mechanism fully considers the needs of the electric power big model to process a large amount of interactive data in the power system, significantly improving the system's operating efficiency and user experience.

[0071] In addition, the method provided by the present disclosure has high reusability and wide compatibility, and can be seamlessly integrated into various power systems. This enables different power systems to be quickly deployed and benefit from advanced authentication technologies, thereby enhancing the security and stability of the overall system.

[0072] It can be understood that the method can be executed by any device, equipment, platform, or device cluster having computing and processing capabilities.

[0073] It should be noted that the method of one or more embodiments of the present disclosure may be performed by a single device, such as a computer or server. The method of this embodiment may also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices may only perform one or more steps in the method of one or more embodiments of the present disclosure, and the multiple devices may interact with each other to complete the described method.

[0074] It should be noted that the above is a description of a specific embodiment of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0075] The interface authentication method for the large power model provided by the present invention ensures the security, flexibility, compatibility and efficiency of the integration of the large power model, which can not only improve the data exchange security level of the large power model, but also promote the digital transformation and technological innovation of the power industry, and meet the high requirements of the intelligent development of the power system for data security.

[0076] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an interface authentication device for a large power model. Figure 2 As shown, the device comprises: The receiving module 11 is configured to receive an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; The first verification module 12 is configured to verify the interface call request according to the public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; The second verification module 13 is configured to evaluate the credibility of the interface caller in response to the interface call request passing the verification, wherein the credibility of the interface caller is used to indicate the reliability and security of the interface caller when interacting with the power model; The authorization module 14 is configured to, in response to determining that the credibility of the interface caller is greater than a preset threshold, authorize the interface caller to have the calling authority of the interface corresponding to the power model according to the interface call request.

[0077] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more embodiments of the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0078] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0079] Figure 3A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0080] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0081] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solution provided by the embodiment of the present disclosure is implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0082] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0083] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0084] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0085] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.

[0086] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0087] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0088] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0089] In addition, to simplify the description and discussion, and in order not to make one or more embodiments of the present disclosure difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid making one or more embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that one or more embodiments of the present disclosure may be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0090] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.

[0091] One or more embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. An interface authentication method for a large power model, characterized in that: include: Receiving an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; Verify the interface call request according to the public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; In response to the interface call request passing the verification, evaluating the credibility of the interface caller, the credibility of the interface caller being used to indicate the reliability and security of the interface caller when interacting with the power big model; In response to determining that the credibility of the interface caller is greater than a preset threshold, the interface caller is authorized to have a calling authority for the interface corresponding to the power model according to the interface calling request.

2. The method according to claim 1, characterized in that The credibility of the interface caller is obtained by executing the following steps: Obtaining direct credibility of the interface caller based on historical interaction information between the interface caller and the power big model; Determine other interface callers that have an interactive relationship with both the interface caller and the power big model; Obtaining the indirect credibility of the interface caller according to the evaluation of the interface caller by the other interface callers and the similarity between the interface caller and other calling interfaces; The credibility of the interface caller is obtained according to the direct credibility and the indirect credibility.

3. The method according to claim 2, characterized in that Setting a direct credibility weight for the direct credibility to adjust the weight of the direct credibility in the calculation of the comprehensive credibility; The direct credibility weight is obtained by executing the following steps: Selecting a plurality of direct credibility association factors and determining initial weights of the direct credibility association factors, wherein the direct credibility association factors include at least one of a historical interaction frequency between the interface caller and the power big model, a historical interaction success rate, and reliability of the interface caller; Constructing a fuzzy trust set of the interface caller, wherein the fuzzy trust set is constructed according to the evaluation of the interface caller by the other interface callers, and the evaluation levels of the fuzzy trust set include normal, abnormal and malicious; Inputting the initial weights of the direct credibility-related factors into a preset membership function to obtain a membership matrix based on the fuzzy trust set, wherein the membership in the membership matrix represents the degree of membership of the direct credibility-related factors mapped to the fuzzy trust set; Constructing a weight matrix of the direct credibility-related factors, wherein the diagonal elements in the weight matrix are initial weights of the corresponding direct credibility-related factors, and the non-diagonal elements in the weight matrix are correlation weights of the corresponding pairs of direct credibility-related factors, which are set to the product of the membership of the corresponding pairs of direct credibility-related factors; According to the weight matrix of the direct credibility association factors, a correlation weight of each direct credibility association factor is obtained, where the correlation weight of the direct credibility association factor is the sum of the correlation weights of all pairs of direct credibility association factors related to the direct credibility association factor; The direct credibility weight is obtained according to the initial weight of the direct credibility association factor and the correlation weight of the direct credibility association factor.

4. The method according to claim 2, characterized in that: Setting a direct credibility weight for the indirect credibility to adjust the weight of the indirect credibility in the calculation of the comprehensive credibility; The indirect credibility weight is obtained by executing the following steps: Selecting a plurality of indirect credibility association factors, wherein the credibility association factors include at least one of the frequency of data interaction, the quality of data interaction and the reliability between the interface caller and the other interface callers; Determining the similarity between the interface caller and the other interface callers according to the indirect credibility association factor; The similarity between the interface caller and the other interface callers is normalized to obtain the indirect credibility weight.

5. The method according to any one of claims 2 to 4, characterized in that: Also includes: The credibility of the interface caller is optimized according to the credibility of the interface caller at the last historical moment and the credibility of the interface caller at the current moment, as well as a decay factor, wherein the decay factor is used to adjust the change speed of the credibility of the interface caller.

6. The method according to claim 1, characterized in that Also includes: According to the credibility and the current trust relationship graph, the predicted credibility is obtained through the trained credibility prediction model, wherein the trust relationship graph represents the trust relationship between the interface caller and the calling interface of the power big model; According to the prediction credibility, the authorization policy of the power model to the interface caller is adjusted.

7. The method according to claim 6, characterized in that The training steps of the credibility prediction model include: Get the historical credibility of the historical time series of the interface caller; Draw an autocorrelation function graph and a partial autocorrelation function graph according to the historical credibility sequence, and determine the autoregressive part order and the moving average part order in the autoregressive moving average model according to the autocorrelation function graph and the partial autocorrelation function graph; Constructing an initial autoregressive moving average model according to the autoregressive part order and the moving average part order; A trained autoregressive moving average model is obtained according to the historical credibility, the initial autoregressive moving average model and the maximum likelihood estimation evaluation model.

8. An interface authentication device for a large power model, characterized in that: include: A receiving module is configured to receive an interface call request sent by an interface caller, wherein the interface call request includes a dynamic signature, and the dynamic signature is dynamically generated according to the request content and a timestamp; A first verification module is configured to verify the interface call request according to a public key to determine the identity of the interface caller and whether the content of the interface call request is reliable; A second verification module is configured to evaluate the credibility of the interface caller in response to the interface call request passing the verification, wherein the credibility of the interface caller is used to indicate the reliability and security of the interface caller when interacting with the power big model; The authorization module is configured to, in response to determining that the credibility of the interface caller is greater than a preset threshold, authorize the interface caller to have the calling authority of the interface corresponding to the power model according to the interface call request.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 7.

Citation Information

Patent Citations

  • Signature verification method, terminal and system

    CN107154853A

  • Auditable signature method based on secure multi-party and related components

    CN112272088A

  • API calling method, system and device based on dynamic timestamp and storage medium

    CN114374517A

  • Intelligent contract interface processing method and device, equipment, storage medium and product

    CN116980136A

  • Intranet security block chain auditing method based on security multiple parties

    CN119232388A