Interface management method and device of integrated system
By configuring interface access rules in the full policy library and using grouping and parallel verification methods, the problem of low interface management efficiency in large integrated systems is solved, efficient and flexible interface management is achieved, and system performance and stability are ensured.
Patent Information
- Application Number
- CN202411610466.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-04-01
AI Technical Summary
In large integrated systems, there are hundreds or thousands of different types of interfaces that need to be interacted with. How to achieve effective interface management and ensure the flexibility of system performance and interface management is a difficult problem.
By preconfiguring the interface access rules for the interface in the full policy library, using grouping and parallel verification to perform interface verification, the unified management of the interface is achieved.
It improves the efficiency and flexibility of interface management, ensures system performance, and can realize reasonable and orderly call of interfaces during high-concurrent interface calls, maintaining the stability and reliability of the system.
Smart Images

Figure CN119740227A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of computer systems, and in particular, to an interface management method and device for an integrated system. Background Art
[0002] There are multiple subsystems and related systems in an integrated system, and multiple interfaces of different systems and different types need to be managed in a unified manner. Especially in large systems, there may be hundreds or thousands of different types of interfaces that need to interact. How to achieve effective interface management and ensure the performance of the entire system and the flexibility of interface management is a problem that needs to be solved. Summary of the invention
[0003] In view of this, the purpose of the embodiments of the present application is to propose an interface management method and device for an integrated system to solve the problem of unified management of interfaces.
[0004] Based on the above purpose, the embodiment of the present application provides an interface management method of an integrated system, including:
[0005] Receive an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier;
[0006] According to the request interface identifier, query and obtain the interface access rule for the request interface from a pre-configured full policy library;
[0007] Verify the request interface according to the interface access rule to obtain a verification result;
[0008] If the verification result is passed, the request interface exchanges data with the target interface corresponding to the target interface identifier.
[0009] Optionally, before receiving the interface request message of the request interface, the method further includes:
[0010] For the request interface, obtaining the configured interface access rules;
[0011] If the configured interface access rules are obtained, a personalized policy is formed by the configured interface access rules, and the personalized policy is saved in the full policy library;
[0012] If the configured interface access rule is not obtained, the interface access rule of the request interface is the interface access rule for all interfaces in the preset global policy.
[0013] Optionally, if there is an inconsistency between the interface access rules in the global policy and the interface access rules in the personalized policy, the configured interface access rules further include the priority of the global policy and the priority of the personalized policy;
[0014] Verifying the request interface according to the interface access rule includes:
[0015] The request interface is verified according to the interface access rule with a high priority.
[0016] Optionally, the interface access rule includes multiple rules;
[0017] Verifying the request interface according to the interface access rule includes:
[0018] When the number of the rules reaches a preset rule number threshold, the multiple rules are divided into multiple groups according to the number of the rules;
[0019] The rules in each group are verified in parallel.
[0020] Optionally, according to the number of the rules, the multiple rules are divided into multiple groups, including:
[0021] Determine whether there are rules with associated relationships among multiple rules;
[0022] If so, grouping the multiple rules according to the association relationship;
[0023] If not present, the rules are evenly divided into multiple groups according to the number of the rules.
[0024] Optionally, the verifying the rules in each group in parallel includes:
[0025] For each group, a corresponding verification thread is created, and each verification thread is used to simultaneously verify the rules in the corresponding group to obtain the verification results of each verification thread.
[0026] Optionally, corresponding verification threads are created, and the rules in each group are verified by using each verification thread at the same time to obtain verification results of each verification thread, including:
[0027] Creating the verification thread, and setting the execution state value of the verification thread to an initial state;
[0028] If the verification thread passes the verification of the rules in the group, the execution status value is set to a success status;
[0029] If the check thread fails to check the rules in the group, the execution status value is set to an abnormal state.
[0030] Optionally, each verification thread is used to verify the rules in each group at the same time, including:
[0031] Each verification thread is used to verify the rules in each group according to the policy chain mode.
[0032] Optionally, the interface request message includes access data; the interface access rule includes one or more of the allowed access time, allowed access traffic threshold, number of reconnections and allowed access interfaces;
[0033] Verifying the request interface according to the interface access rule includes:
[0034] Determining whether the target interface is an interface that is allowed to be accessed; and / or,
[0035] Determine whether the current time is a time that allows access; and / or,
[0036] Determining whether the number of times the connection request message is received exceeds the number of reconnection times; and / or,
[0037] It is determined whether the data volume of the access data exceeds the flow threshold.
[0038] The present application provides an interface management device for an integrated system, including:
[0039] A receiving module, used to receive an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier;
[0040] A query module, used to query and obtain the interface access rule for the request interface from a pre-configured full policy library according to the request interface identifier;
[0041] A verification module, used to verify the request interface according to the interface access rule to obtain a verification result;
[0042] A connection module is used for, if the verification result is passed, the request interface to perform data exchange with the target interface corresponding to the target interface identifier.
[0043] From the above, it can be seen that the interface management method and device of the integrated system provided by the embodiment of the present application, according to the request interface identifier in the interface request message, queries and obtains the interface access rules for the request interface from the pre-configured full policy library, verifies the request interface according to the interface access rules, and obtains the verification result. If the verification result is passed, the request interface and the target interface corresponding to the target interface identifier perform data exchange. The present application can realize effective interface management, ensure system performance, and improve the flexibility of interface management. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application 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 described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0046] Figure 2 This is a block diagram of the device structure of an embodiment of the present application;
[0047] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] 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.
[0049] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0050] As described in the background technology section, in a large integrated system, there are a large number of interfaces of different types that need to interact to achieve system-related functions. The relevant interface management tools manage interfaces by configuring the policies of each interface one by one, which is labor-intensive and inflexible. When there are high-concurrency interface calls, due to the large number of interfaces, the policy rules of each interface are checked one by one, which is inefficient and affects the overall performance of the system.
[0051] In view of this, the present application provides an interface management method for an integrated system, which configures interface access rules of interfaces based on a pre-built full policy library, wherein the full policy library includes global policies for all interfaces and personalized policies that can be personalized for some interfaces. There is no need to configure the policy of each interface one by one, and the configuration is flexible and the maintainability is high. When the interface is called, the interface access rules are verified by grouping and parallel verification, which can improve efficiency and ensure system performance.
[0052] The technical solution of the present application is further described in detail below through specific embodiments.
[0053] like Figure 1 As shown, the embodiment of the present application provides an interface management method for an integrated system, including:
[0054] S101: receiving an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier;
[0055] In this embodiment, the integrated system includes multiple internal interfaces and external interfaces, and the relevant functions of the system are realized by accessing the internal interface through the external interface, and / or the internal interface accessing the external interface and the data exchange between the interfaces. For example, a central system has multiple internal interfaces, and the interfaces of other subsystems or related systems serve as external interfaces, and the functions of the integrated system are realized by exchanging data with the internal interface of the central system. This application does not limit the type and form of the integrated system and the specific type and form of the interface.
[0056] When an interface call is required, the external interface or internal interface acts as a requesting interface to send an interface request message to the system. The interface request message includes the requesting interface identifier of the requesting interface and the target interface identifier of the target interface requested to be called, that is, the requesting interface sends an interface request message to the system for accessing the target interface.
[0057] S102: According to the request interface identifier, query and obtain the interface access rule for the request interface from the pre-configured full policy library;
[0058] In this embodiment, the system receives a request interface message, parses the target interface identifier and the request interface identifier in the message, queries the pre-configured full policy library according to the request interface identifier of the request interface, and obtains the interface access rules configured for the request interface, wherein the interface access rules configured for the request interface are pre-configured and saved in the full policy library.
[0059] In some embodiments, before receiving the interface request message of the request interface, it is necessary to configure the access policy of the request interface, and the method further includes:
[0060] For the request interface, obtain the configured interface access rules;
[0061] If the configured interface access rules are obtained, a personalized policy is formed by the configured interface access rules, and the personalized policy is saved in the full policy library;
[0062] If the configured interface access rule is not obtained, the interface access rule is the interface access rule for all interfaces in the preset global policy.
[0063] In this embodiment, when configuring the access policies of each interface for all interfaces of the integrated system, it is not necessary to configure each interface separately. A full policy library is pre-built, and the full policy library is used to save the global policies for all interfaces and the personalized policies for some interfaces. When the interface is not configured with a policy, that is, the interface access rules configured for the interface are not obtained, the interface access rules of the interface are defaulted to the interface access rules in the global policy. When the interface is configured with a policy, the configured interface access rules are saved in the full policy library as the personalized policies of the interface.
[0064] In some methods, the access policy of the interface can be configured on the interface configuration interface. If an interface is registered successfully but the corresponding interface access rules are not configured, the interface access rules of the interface are the interface access policies of the global policy. In this way, there is no need to configure rules one by one for most interfaces, which can greatly reduce the workload and improve efficiency. On the basis of the global policy, personalized policies can be flexibly configured for some interfaces to ensure the flexibility of different interface configurations and meet personalized business needs.
[0065] In some embodiments, if there is an inconsistency between the interface access rules in the global policy and the interface access rules in the personalized policy, the configured interface access rules also include the priority of the global policy and the priority of the personalized policy;
[0066] Verifying the request interface according to the interface access rule includes:
[0067] The requested interface is verified according to the interface access rule with the highest priority.
[0068] In this embodiment, for some interfaces configured with personalized policies, there may be inconsistencies between the global policy and the personalized policy of the interface. In this case, the interface also needs to configure the priority of the global policy and the priority of the personalized policy, so as to determine to verify according to one policy during verification, that is, to verify the interface according to the policy with higher priority. For example, the global policy configured in a certain technology system includes that all external interfaces can only access internal interfaces between 9:00 and 16:00. For the external interface of the security subsystem, a personalized policy that can access the internal interface 24 hours a day can be configured, and the priority of the personalized policy is set higher than the global policy, so that the external interface of the security subsystem is verified according to the personalized policy, and the security subsystem is used to ensure the security of the entire integrated system.
[0069] In some methods, if the configured personalized policy does not have inconsistencies with the global policy, and only the rules that need to meet the special requirements of the interface are configured, then for the interface, all interface verification rules in the global policy and personalized policy need to be verified at the same time. For example, the interface must meet the time rules and traffic rules in the global policy, and the business logic rules in the personalized policy.
[0070] In some methods, the global policy can be flexibly configured and dynamically expanded according to business scenarios and actual needs, such as using regular expressions or a pre-built policy engine to generate the interface access rules required for configuration, and save the generated interface access rules as global policies in the global policy library.
[0071] S103: Verify the request interface according to the interface access rule to obtain a verification result;
[0072] In this embodiment, after obtaining the interface access rules of the request interface from the full policy library, the request interface is verified according to the interface access rules. Wherein, when the interface access rules include multiple rules, the method for verifying the request interface includes:
[0073] When the number of rules reaches a preset rule number threshold, the multiple rules are divided into multiple groups according to the number of rules;
[0074] The rules in each group are verified in parallel.
[0075] In this embodiment, when the number of rules included in the interface access rules that the request interface needs to verify is large, if each rule is verified one by one and in sequence, the efficiency is not high, therefore, multiple rules are first grouped, and multiple rules in each group are verified at the same time, and the efficiency is improved by parallel verification. For example, when there are 20 rules in the interface verification rules, the 20 rules are divided into four groups, each group has 5 rules, and the rules in the four groups are verified at the same time.
[0076] In some embodiments, according to the number of rules, multiple rules are divided into multiple groups, including:
[0077] Determine whether there are rules with associated relationships among multiple rules;
[0078] If so, group multiple rules according to their associations;
[0079] If not present, divide each rule into multiple groups evenly according to the number of rules.
[0080] In this embodiment, when there are a large number of interface access rules and multiple rules need to be grouped, it is necessary to first consider whether there are rules with associated relationships among the multiple rules, and group the rules with associated relationships into one group, and then group the remaining rules. Among them, the rules with associated relationships are determined according to specific business needs, including rules with time relationships, rules with sequence relationships, rules with business logic relationships, etc. For example, the start time rule and the end time rule belong to the rules with time relationships, the budget rule and the reimbursement rule belong to the rules with business logic relationships, the process A rule and the process B rule belong to the rules with sequence relationships, etc. The above is only an exemplary description, and the specific interface access rules and the relationship between the rules are determined according to the specific application scenarios and business needs.
[0081] In some embodiments, grouping rules according to association relationships further includes: grouping rules with the same association relationship according to the type of association relationship and the number of rules. For example, if the number of rules with business logic relationships is large, the rules with business logic relationships are grouped together; if the number of rules with time relationships and rules with sequence relationships is small (for example, the total number of the two does not exceed a set rule threshold), the rules with time relationships and rules with sequence relationships are grouped together.
[0082] In some methods, after the rules with associated relationships are grouped, the remaining rules are grouped again according to the number of remaining rules. For example, if the number of remaining rules is large, the remaining rules need to be divided into multiple groups. If the number of remaining rules is small, the remaining rules can be directly grouped into one group.
[0083] If there are no rules with associated relationships among the multiple rules, then the multiple rules can be directly divided into multiple groups evenly according to the number of rules. The above rule grouping method is only an exemplary description, and the specific grouping method can be flexibly determined according to the number of rules, system performance, business requirements and other aspects, and this application does not make specific limitations.
[0084] In some embodiments, checking the rules in each group in parallel includes:
[0085] For each group, a corresponding verification thread is created, and each verification thread is used to simultaneously verify the rules in the corresponding group to obtain the verification results of each verification thread.
[0086] In this embodiment, after multiple rules are grouped, the multiple rules in each group are synchronously checked in parallel. The implementation method may be to create a verification thread for verifying the rules for each group, and use each verification thread to verify the multiple rules of the corresponding group respectively, that is, use multi-threading technology to synchronously verify multiple rules to improve the efficiency of verification.
[0087] In some embodiments, corresponding verification threads are created, and the rules in each group are verified by each verification thread at the same time to obtain verification results of each verification thread, including:
[0088] Create a verification thread and set the execution state value of the verification thread to the initial state;
[0089] If the verification thread passes the verification of the rules in the group, the execution status value is set to the success status;
[0090] If the verification thread fails to pass the rule verification in the group, the execution status value is set to an abnormal state.
[0091] In this embodiment, when multiple verification threads are used to verify each group, in order to monitor the verification results of each group of rules, the execution state value of the verification thread is set while creating the verification thread. During the verification process, the verification process and results are recorded by changing the execution state value. For example, when creating the verification thread, the execution state value is set to the initial state (for example, the execution state value is 0), and the verification thread is used to verify the rules in the group. If all the rules in the group are verified, the execution state value is modified to a successful state (for example, the execution state value is 1). If one or more of the rules in all the rules fail to pass the verification, the execution state value is modified to an abnormal state (for example, the execution state value is 2), and the abnormal rules and corresponding interfaces are added to the abnormal processing queue for subsequent processing.
[0092] In some embodiments, each verification thread is used to simultaneously verify the rules in each group, including:
[0093] Each verification thread is used to verify the rules in each group according to the policy chain mode.
[0094] In this embodiment, when each verification thread verifies multiple rules within a group, a pre-built policy chain model is used for parallel verification, that is, the policy model and the responsibility chain model are used in combination, and the policy model is used to define corresponding verification processing algorithms for different rules. Then, the verification processing algorithms are connected in series through the responsibility chain model to form a processing chain, which can dynamically adjust the processing flow and improve the flexibility and maintainability of the system.
[0095] In this way, the present application verifies multiple rules in each group in parallel through multi-threading, and each verification thread adopts the policy chain mode to synchronously verify multiple rules in the corresponding group, which can greatly improve the verification efficiency of the rules. When high-concurrency interface calls occur, it can significantly improve the system processing efficiency and maintain the stability and reliability of the system.
[0096] In some embodiments, the interface request message includes access data; the interface access rule includes one or more of the time allowed for access, the traffic threshold allowed for access, the number of reconnections, and the interfaces allowed for access;
[0097] Verify the requested interface according to the interface access rules, including:
[0098] Determine whether the target interface is an interface that is allowed to be accessed; and / or,
[0099] Determine whether the current time is a time that allows access; and / or,
[0100] Determine whether the number of times the connection request message is received exceeds the number of reconnection times; and / or,
[0101] Determine whether the amount of accessed data exceeds the traffic threshold.
[0102] This embodiment provides a possible interface access rule, which can be pre-configured as a global policy and saved in the full policy library, and some of the rules and / or other rules can also be configured as personalized policies and saved in the full policy library. The configurable interface access rules include the time allowed for access, the traffic threshold allowed for access, the number of reconnections, and the interface allowed for access, etc., that is, the time for the external interface to access the internal interface, the time for the internal interface to access the external interface, the traffic threshold for the access data that the external interface can carry to access the internal interface, the internal interface allowed to access the external interface, the external interface allowed to access the external interface, the external interface allowed to access the external interface, the number of reconnections allowed between the external interface and the internal interface, etc. When checking according to the configured interface access rules, it can be determined whether the target interface accessed by the requesting interface is an interface allowed for access, whether the current time of the interface request message is within the time allowed for access, whether the amount of access data carried in the interface request message reaches the traffic threshold, and if there is an abnormality in the previous connection between the requesting interface and the target interface, whether the number of times the requesting interface requests to access the target interface has exceeded the number of reconnections, etc. In this way, by performing a series of rule checks on the interfaces, it is possible to ensure normal and orderly connections between interfaces, ensure the stability and reliability of the entire system, and ensure the overall performance of the system.
[0103] S104: If the verification result is passed, the requesting interface exchanges data with the target interface corresponding to the target interface identifier.
[0104] In this embodiment, after the request interface is verified according to the interface access rule, a verification result is obtained, and whether the request interface can interact with the target interface is determined according to the verification result. When multiple verification threads are used to verify the rules in each group, the final verification result is determined according to the verification results of all verification threads. If the verification results of all verification threads are passed, the interface access rule verification of the request interface is passed. If the verification results of one or more verification threads are not passed, the interface access rule verification of the request interface is not passed.
[0105] When the interface verification rule of the request interface is passed, the access data carried in the interface request message is forwarded to the target interface, realizing data interaction between the request interface and the target interface, and implementing corresponding business logic between the interfaces, thereby realizing relevant functions of the system.
[0106] When the interface verification rule of the request interface fails, the abnormal rule and related information of the request interface are added to the abnormal processing queue, and further processing is performed on the abnormal processing queue, such as abnormal alarm, generation of abnormal log, etc.
[0107] In some implementations, the integrated system can manage all interfaces in the system, including interface registration, authority management, access policy configuration, early warning monitoring, exception handling, statistical analysis, etc., to ensure the scalability, stability and security of interface calls between systems. Among them, all interfaces that need to access the system need to be registered, and the interface call relationship can be bound during registration, that is, the interfaces allowed to be accessed by each interface can be set, and the successfully registered interfaces can be uniformly managed by the system; for the interfaces that have been successfully registered, the permissions of the interface can also be configured, and after the configuration is successful, the corresponding permissions of the interface are managed; for the successfully registered interface, if the access policy is not configured, the policy management is carried out according to the global policy, and when the interface is accessed, it is verified according to the interface access rules in the global policy, and if the personalized policy is configured, the policy management is carried out according to the global policy and the personalized policy, and if the personalized policy and the policy priority are configured, the policy management is carried out according to the policy with the highest priority.
[0108] In some methods, the interface request message sent by the request interface also includes verification information. After receiving the interface request message, the request interface is first verified based on the verification information to determine whether the request interface is a registered interface and whether it is an authorized interface. If the verification passes, the interface access rules of the request interface are obtained and verified according to the interface access rules.
[0109] In some methods, statistical analysis can be performed regularly on the call information of all interfaces, including the total number of external interfaces, the number of times each interface is called, the number of times each interface calls other interfaces, the success rate of each interface call, etc., and corresponding statistical charts can be generated. By performing statistical analysis on the usage of interfaces, it can be determined which interfaces are used too frequently and which interfaces are critical interfaces, etc., performance bottlenecks and optimization points can be analyzed, and support for system optimization can be provided.
[0110] In some implementations, in order to ensure the security and stability of the system, the system status is monitored in real time, and appropriate global policies are formulated according to the system status. For example, when the system load is not high and the resource usage is not high, a higher traffic threshold can be configured; when the load increases and the resource usage is high, flow limiting measures are taken, a lower traffic threshold is configured, and only a small amount of data access is allowed, and limited services are provided; when the resource usage is too high and the interface access service cannot be provided, fuse measures are taken, and interface calls are no longer allowed to ensure the normal operation of the system.
[0111] The interface management method of the integrated system provided in the embodiment of the present application is configured with a full policy library. For the interfaces under unified management, if the personalized policy is not configured, the interface access rules in the global policy are verified. If the personalized policy is configured, the interface access rules of the global policy and / or the personalized policy can be verified. Therefore, there is no need to configure access measurement for each interface one by one, which can improve the efficiency and flexibility of interface management. The configurable global and personalized policies can not only ensure the stability of the system, but also meet differentiated business needs. In the verification stage of the interface access rules, multiple rules are grouped, and multi-threading technology and policy chain mode are used to verify multiple rules in parallel, which can not only ensure the rationality and accuracy of the rule verification, but also improve the verification efficiency. When high-concurrency interface calls occur, the reasonable and orderly calls of each interface can be realized to ensure the stability and reliability of the system.
[0112] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to 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 can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0113] It should be noted that the above is a description of a specific embodiment of the present specification. 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.
[0114] like Figure 2 As shown, an embodiment of the present application provides an interface management device for an integrated system, including:
[0115] A receiving module, used to receive an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier;
[0116] A query module, used to query and obtain the interface access rule for the request interface from a pre-configured full policy library according to the request interface identifier;
[0117] A verification module, used to verify the request interface according to the interface access rule to obtain a verification result;
[0118] A connection module is used for, if the verification result is passed, the request interface to perform data exchange with the target interface corresponding to the target interface identifier.
[0119] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0120] 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.
[0121] Figure 3 A 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.
[0122] 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 in the embodiments of this specification.
[0123] 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 solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0124] 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.
[0125] 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 a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0126] 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).
[0127] 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 specification, and does not necessarily include all the components shown in the figure.
[0128] 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.
[0129] 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.
[0130] Those 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 the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0131] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application 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 to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0132] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, 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 embodiments discussed.
[0133] The embodiments of the present application 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 the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. An interface management method for an integrated system, characterized in that: include: Receive an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier; According to the request interface identifier, query and obtain the interface access rule for the request interface from a pre-configured full policy library; Verify the request interface according to the interface access rule to obtain a verification result; If the verification result is passed, the request interface exchanges data with the target interface corresponding to the target interface identifier.
2. The method according to claim 1, characterized in that Before receiving the interface request message of the request interface, the method further comprises: For the request interface, obtaining the configured interface access rules; If the configured interface access rules are obtained, a personalized policy is formed by the configured interface access rules, and the personalized policy is saved in the full policy library; If the configured interface access rule is not obtained, the interface access rule of the request interface is the interface access rule for all interfaces in the preset global policy.
3. The method according to claim 2, characterized in that If there is inconsistency between the interface access rules in the global policy and the interface access rules in the personalized policy, the configured interface access rules further include the priority of the global policy and the priority of the personalized policy; Verifying the request interface according to the interface access rule includes: The request interface is verified according to the interface access rule with a high priority.
4. The method according to claim 3, characterized in that The interface access rules include a plurality of rules; Verifying the request interface according to the interface access rule includes: When the number of the rules reaches a preset rule number threshold, the multiple rules are divided into multiple groups according to the number of the rules; The rules in each group are verified in parallel.
5. The method according to claim 4, characterized in that According to the number of the rules, the multiple rules are divided into multiple groups, including: Determine whether there are rules with associated relationships among multiple rules; If so, grouping the multiple rules according to the association relationship; If not present, the rules are evenly divided into multiple groups according to the number of the rules.
6. The method according to claim 4, characterized in that The checking of the rules in each group in parallel includes: For each group, a corresponding verification thread is created, and each verification thread is used to simultaneously verify the rules in the corresponding group to obtain the verification results of each verification thread.
7. The method according to claim 6, characterized in that Create corresponding verification threads, use each verification thread to verify the rules in each group at the same time, and obtain the verification results of each verification thread, including: Creating the verification thread, and setting the execution state value of the verification thread to an initial state; If the verification thread passes the verification of the rules in the group, the execution status value is set to a success status; If the check thread fails to check the rules in the group, the execution status value is set to an abnormal state.
8. The method according to claim 6, characterized in that Use each verification thread to verify the rules in each group at the same time, including: Each verification thread is used to verify the rules in each group according to the policy chain mode.
9. The method according to claim 1, characterized in that: The interface request message includes access data; the interface access rule includes one or more of the allowed access time, allowed access traffic threshold, number of reconnections and allowed access interfaces; Verifying the request interface according to the interface access rule includes: Determining whether the target interface is an interface that is allowed to be accessed; and / or, Determine whether the current time is a time that allows access; and / or, Determining whether the number of times the connection request message is received exceeds the number of reconnection times; and / or, It is determined whether the data volume of the access data exceeds the flow threshold.
10. An interface management device for an integrated system, characterized in that: include: A receiving module, used to receive an interface request message for requesting an interface; wherein the interface request message includes a target interface identifier and a request interface identifier; A query module, used to query and obtain the interface access rule for the request interface from a pre-configured full policy library according to the request interface identifier; A verification module, used to verify the request interface according to the interface access rule to obtain a verification result; A connection module is used for, if the verification result is passed, the request interface to perform data exchange with the target interface corresponding to the target interface identifier.