Data processing method, device and equipment and computer readable storage medium

By controlling nodes to proactively send permission management information to business nodes and filtering irrelevant requesting nodes, the problem of resource consumption and information not being updated in a timely manner when business nodes poll to obtain permission information in the ZooKeeper system is solved, and the rationality and accuracy of permission management are improved. sex.

CN118734282APending Publication Date: 2024-10-01TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310342118.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the ZooKeeper system, business nodes need to regularly poll management nodes to obtain the latest permission management information, leading to problems such as excessive resource consumption or permission information not being updated in a timely manner.

Method used

The control node generates permission management information and actively sends it to the business node. The business node detects that the request node is associated with the business node based on the preset association relationship table between the request node and the business node. It performs response control, filters irrelevant request nodes, and reduces processing pressure and Improve the accuracy of permission management.

Benefits of technology

It improves the timeliness and accuracy of business nodes obtaining permission management information, reduces the polling pressure on management nodes, and enhances the rationality and accuracy of permission management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734282A_ABST
    Figure CN118734282A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device, equipment and a computer readable storage medium. The method comprises the following steps: receiving authority management information sent by a control node; wherein the authority management information is generated by the control node on the basis of support information that the business node provides business services for the plurality of request nodes and identification information corresponding to the plurality of request nodes; if an access request, sent by the control node, of any one of the multiple request nodes for the business service is received, response control is carried out on the access request based on the authority management information; wherein the access request is sent when the control node detects that any request node is associated with the service node based on a preset association relation table of the request node and the service node. Through the method, the reasonability of authority management can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a data processing method, apparatus, device and computer-readable storage medium. Background Art

[0002] Distributed application coordination service software (ZooKeeper) can encapsulate complex and error-prone key services and provide users with simple and easy-to-use interfaces and efficient and stable systems. Zookeeper is deployed in the server and can be called a zk node.

[0003] When a client accesses a zk node, it is necessary to determine whether the client has access rights. Currently, the zk node determines whether the client has access rights based on the rights management information. The rights management information is stored locally on the zk node, and the update operation of the rights management information of the zk node needs to be performed on the management node, which can save the latest rights management information of the zk node. Therefore, the zk node will periodically access the management node to poll the corresponding rights management information to determine whether an update has occurred. However, if the time interval is too long, the business node cannot obtain the latest rights management information in time, which will cause inaccurate rights management of the business node; if the time interval is too short, the business node will experience excessive processing pressure due to frequent access to the management node.

[0004] Therefore, how to improve the rationality of authority management is an urgent problem to be solved. Summary of the invention

[0005] To solve the above technical problems, the embodiments of the present application provide a data processing method, apparatus, device and computer-readable storage medium, which can improve the rationality of permission management.

[0006] Among them, the technical solution adopted in this application is:

[0007] A data processing method, applied to a business node, comprises: receiving authority management information sent by a control node; wherein the authority management information is generated by the control node based on support information for the business node to provide business services to multiple request nodes and identification information corresponding to the multiple request nodes respectively; if an access request for the business service from any one of the multiple request nodes sent by the control node is received, then response control is performed on the access request based on the authority management information; wherein the access request is sent by the control node when it is detected that any one of the request nodes is associated with the business node based on a preset association relationship table between the request node and the business node.

[0008] A data processing method, applied to a control node, comprises: generating permission management information of the business node for the business service based on support information of the business node providing business services to multiple request nodes and identification information corresponding to the multiple request nodes respectively; sending the permission management information to the business node; receiving an access request for the business service sent by any one of the multiple request nodes; if it is detected that any one of the request nodes is associated with the business node based on a preset association relationship table of request nodes and business nodes, sending the access request to the business node, so that the business node performs response control on the access request based on the permission management information.

[0009] A data processing device, applied to a business node, comprises: a transceiver unit, for receiving authority management information sent by a control node; wherein the authority management information is generated by the control node based on support information for the business node to provide business services to multiple request nodes and identification information corresponding to the multiple request nodes; a response unit, for, upon receiving an access request for the business service from any one of the multiple request nodes sent by the control node, performing response control on the access request based on the authority management information; wherein the access request is sent by the control node when it detects that any one of the request nodes is associated with the business node based on a preset association relationship table between the request node and the business node.

[0010] A data processing device is applied to a control node, the device comprising: an acquisition unit, used to generate permission management information of the business node for the business service based on support information of the business node providing business services to multiple request nodes and identification information corresponding to the multiple request nodes; a transceiver unit, used to send the permission management information to the business node; the transceiver unit is also used to receive an access request for the business service sent by any one of the multiple request nodes; a processing unit, used to send the access request to the business node if it is detected that any one of the request nodes is associated with the business node based on a preset association relationship table of request nodes and business nodes, so that the business node responds to the access request based on the permission management information.

[0011] A data processing device comprises a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the data processing method as described above is implemented.

[0012] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor of a computer, enable the computer to execute the data processing method as described above.

[0013] In the technical solution provided in the embodiments of the present application:

[0014] On the one hand, the control node generates permission management information and actively sends the permission management information to the business node, so that the business node can receive the permission management information in a timely manner without the need for the business node to poll the access control node to obtain the permission management information, thereby avoiding the phenomenon of resource consumption caused by the business node frequently polling the access control node to obtain the permission management information in the related technology, and also avoiding the phenomenon that the permission management information obtained by the access control node due to a long polling interval of the business node is not the latest permission management information, thereby improving the rationality of the business node obtaining the permission management information, and further improving the rationality of the business node's permission management of the access request of the requesting node.

[0015] On the other hand, the control node will send the access request sent by the request node to the business node only when the request node is associated with the business node. This can filter out irrelevant request nodes in the environment, reduce the number of access requests that the business node needs to process, thereby reducing interference with the business node and improving the accuracy of the business node's permission management.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0018] Figure 1 is a schematic diagram of a data processing system involved in the present application;

[0019] Figure 2 yes Figure 1 A schematic diagram of interaction timing corresponding to the data processing system shown;

[0020] Figure 3a is a schematic diagram of a process of creating a zk cluster according to an exemplary embodiment;

[0021] Figure 3b is a schematic diagram of a process of creating a zknode according to an exemplary embodiment;

[0022] Figure 3cis a schematic diagram of a process of creating a zk node pool according to an exemplary embodiment;

[0023] Figure 3d is a schematic diagram of a process of creating a client according to an exemplary embodiment;

[0024] Figure 4 is a flow chart of a data processing method according to an exemplary embodiment;

[0025] Figure 5 is a flow chart of a data processing method according to another exemplary embodiment;

[0026] Figure 6 is a flow chart of a data processing method according to another exemplary embodiment;

[0027] Figure 7 is a flow chart of a data processing method according to another exemplary embodiment;

[0028] Figure 8 is a flow chart of a data processing method according to another exemplary embodiment;

[0029] Fig. 9 is a flow chart of a data processing method according to another exemplary embodiment;

[0030] Fig.10 is a flow chart of a data processing method according to another exemplary embodiment;

[0031] Fig.11 is a flow chart showing a data processing method based on a mangle table according to an exemplary embodiment;

[0032] Fig.12 is a flow chart of a data processing method based on a filter table according to an exemplary embodiment;

[0033] Fig.13 is a block diagram of a data processing device according to an exemplary embodiment;

[0034] Fig.14 The figure is a schematic diagram of the hardware structure of a data processing device according to an exemplary embodiment. DETAILED DESCRIPTION

[0035] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments that are the same as the present application. Instead, they are only examples of devices and methods that are the same as some aspects of the present application as detailed in the attached claims.

[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0037] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0038] It should be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.

[0039] It should be noted that in the specific implementation of this application, user-related data is involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0040] Before introducing the technical solutions of the embodiments of the present application, the technical terms involved in the embodiments of the present application are first introduced here.

[0041] Iptables is an IP packet filtering system integrated into the Linux kernel. Iptables sets the filtering rules for the Linux kernel to filter IP packets. In the embodiment of the present application, the mangle table and the filter table can be used to filter IP packets.

[0042] The rule of the mangle table may be: marking the data packets sent by the IP addresses included in the whitelist; the rule of the filter table may be: releasing the data packets marked after passing through the mangle table.

[0043] GRPC (Google Remote Procedure Calls) is an open source remote procedure call system and a high-performance open source software framework based on the Hyper Text Transfer Protocol (HTTP). GRPC can provide an application programming interface (API) design method for managing and configuring network devices. In the embodiment of the present application, GRPC can achieve low-latency communication between the control node and the service node.

[0044] Load balancing (LB) is built on the existing network structure. It provides a cheap, effective and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability. The LB in the embodiment of the present application can be implemented based on the Domain Name System (DNS).

[0045] Zookeeper nodes, also known as zk nodes, are nodes that deploy the zookeeper service. Each zk node includes an agent module that can interact with the control node. Multiple zk nodes can form a zk cluster, and the implementation environment of the embodiment of the present application may include multiple zk clusters. In the embodiment of the present application, some zk nodes can be selected from the nodes included in the multiple zk clusters and placed in the zk node pool.

[0046] In the related art, the rights management list of the service node is stored in the management node, and the service node needs to access the management node regularly to poll the rights management list to determine whether the rights management information in the management node has been updated compared with the local rights management information of the service node. However, the time interval for the service node to access the management node and perform polling is difficult to control. If the time interval is too short, the service node and the management node will be under great operating pressure. If the time interval is too long, the service node will not be able to obtain the latest rights management information in time.

[0047] Based on this, the embodiments of the present application respectively propose a data processing method, a data processing device, a data processing equipment, a computer-readable storage medium, and a computer program product. In these embodiments, the control node can generate the authority management information of the business node for the business service, and send the authority management information to the business node, so that the business node can receive the authority management information in time, realize the automatic management of the authority management information of the business node, and improve the timeliness of the business node obtaining the latest authority management information.

[0048] See also Figure 1 , Figure 1 It is a schematic diagram of a data processing system involved in the present application.

[0049] Figure 1 The data processing system shown may include a service node and a control node. Among them, the control node may establish a connection with the request node through a load balancing (LB) module 103. The request node may include a request node 101 and a request node 102; the control node may include a control node 104 and other control nodes; the service node may be included in a service node pool, and the service node pool may include a service node pool 107 and other service node pools; the service node pool 107 may include a service node 106, and other service nodes. Each service node pool includes multiple service nodes. The embodiment of the present application is described by taking the service node 106 and the control node 104 in the data processing system as an example.

[0050] Among them, the request node 101 can be a node corresponding to the client, and the request node 102 can be a zk node. Among them, when the request node is a zk node, the zk node can be a zk node within the pool. Business node 106 and other business nodes can both be zk nodes. Each business node can support data synchronization services, cluster election services and client connection services. Among them, data synchronization services and cluster election services are services for request nodes that are zk nodes, and client connection services are services for request nodes that are nodes corresponding to the client. Several business nodes can form a business node pool, and this application does not limit the number of business nodes included in the business node pool 107 and other business node pools. In addition, the control node includes a controller, which can generate authority management information and can also receive access requests for business services sent by the request node. The number of control nodes can also be multiple, that is, the operating environment can include multiple control nodes, and a control node can be selected from multiple control nodes to implement the data processing method of the embodiment of the present application. The embodiment of the present application takes the interaction between the control node 104 and the business node 106 as an example for explanation.

[0051] The service node includes an agent module, which can establish a short connection with the control node 104. The short connection means that the duration of establishing the connection between the control node and the service node is short, and there is no need to maintain the connection for a long time. Since the control node 104 supports a large number of service nodes to be connected, the short connection can relieve the operating pressure of the control node 104.

[0052] The request node 101 or the request node 102 can interact with the LB through HTTP, and then interact with the control node through the LB. Among them, the control node can dynamically expand and shrink based on the LB. The information sent by the request node can be randomly assigned to a control node. If it is assigned to the control node 104, the control node 104 will process the information sent by the request node. The control node 104 can interact with each business node through GRPC.

[0053] It can be understood that the request node 101 is a client, which can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The control node 104 and the service node 106 can be a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc., which are not limited here.

[0054] Figure 2 yes Figure 1 The interactive timing diagram corresponding to the data processing system shown illustrates the process of the control node 104 sending the authority management information to the service node 106 , and the process of the requesting node 101 or the requesting node 102 requesting to access the service service of the service node 106 .

[0055] like Figure 2 As shown, first, the control node 104 can generate the authority management information for the business service of the service node 106 based on the support information of the business node 106 for providing business services to multiple request nodes and the identification information corresponding to the multiple request nodes. The authority management information may include a blacklist and a whitelist. After the control node 104 generates the authority management information, the authority management information can be sent to the service node 106 so that the service node 106 can obtain the authority management information in time. In this way, the authority management information stored locally by the service node 106 can be synchronized with the authority management information in the control node 104 in time to prevent the request node newly added to the blacklist from being passed through the access request.

[0056] When the request node 101 or the request node 102 needs to request a business service from the business node, it can send an access request for the business service to the control node 104. Before the request node 101 or the request node 102 sends the access request for the business service, the control node 104 can first bind the request node 101 or the request node 102 with the business node 106, that is, after the control node 104 receives the information sent by the request node 101 or the request node 102, it knows to forward the information to the business node 106. In this way, for the access request sent by the request node to which the control node is not bound to the business node, the control node 104 will reject the access request of the request node, thereby filtering the access request of the request node, alleviating the operating pressure of the business node, and preventing the waste of computing resources.

[0057] After the control node 104 forwards the access request to the service node 106, the service node 106 can obtain the corresponding authority management information and determine whether to respond to the service service to the requesting node 101 or the requesting node 102 based on the authority management information. The authority management information may include list use indication information, which may indicate how to use the blacklist and the whitelist to respond to the access request of the requesting node 101 or the requesting node 102.

[0058] Thus, on one hand, the control node 104 sends the authority management information for the business service to the business node 106, thereby realizing the management of the access rights of the business node 106 and improving the timely update of the authority management information of the business node 106. On the other hand, the authority management information also includes the list use indication information, and the business node 106 uses the blacklist and the whitelist to respond to the access request of the requesting node 101 or the requesting node 102 according to the list use indication information, so that the authority control is more flexible and can match different application scenarios.

[0059] Figures 3a to 3d Schematic diagram of the creation object in the embodiment of the present application, wherein the object includes a zk cluster, a zk node, a zk node pool, and a request node.

[0060] In an embodiment of the present application, before creating an object, the control node may create a permission management model, which includes at least a zk cluster (Cluster) table, a zk node (zknode) table, a zk node service type (service) table, a zk node service policy (service_sg) table, a zk node service policy bound to the request node (service_sg_bind) table, a service policy bound IP set (ipset) (service_sg_ipset) table, an IP set (ipset) table, a zk node pool (pool) table, a zk node pool and zk node binding relationship (pool_zknode) table, a request node (client) table, and a request node and zk node pool binding relationship (pool_client) table.

[0061] Among them, the zk cluster table is shown in Table 1.

[0062] Fields illustrate Cluster_id Cluster ID Alias Cluster Description Quorum_service_sg_id Data synchronization service policy ID Election_service_sg_id Cluster election service policy ID Client_service_sg_id Client Service Policy ID

[0063] Table 1

[0064] In Table 1, the zk cluster table has fields, in which relevant descriptions can be made and can be filled in by those skilled in the art, and are not limited here. The zk cluster table can represent zk cluster information, and describe the service policies supported by the zk cluster.

[0065] The zk node table is shown in Table 2.

[0066] Fields illustrate zknode_id zk node ID Cluster_id zk cluster ID Role zk node role Second_role Specific roles of zk nodes Ip zk node IP

[0067] Table 2

[0068] Among them, Role refers to the role of the zk node, including master and observer. Second_role refers to the specific role of the zk node, including leader, follower and observer. The zk node table can represent the information of the zk node, that is, which zk cluster it is included in, Role, Second_role and the IP address of the zk node.

[0069] The service type table of the zk node is shown in Table 3.

[0070] Fields illustrate Service_id Service Type ID Type Service Type Proto protocol port port

[0071] Table 3

[0072] The service type ID may include the ID of the data synchronization service, the ID of the cluster election service, and the ID of the client service. The service type table of the zk node may reflect the service types supported by a zk node, as well as the corresponding protocols and ports.

[0073] The service strategy (service_sg) table of the zk node is shown in Table 4.

[0074] Fields illustrate Service_sg_id Service Policy ID Service_id Service Type ID Total_conn_limit_value Total connection limit New_conn_limit_cps New connection rate limit New_conn_limit_burst Initial limit on the number of new connections

[0075] Table 4

[0076] The newly created connection refers to the newly created connection between the requesting node and the zk node. The service policy (service_sg) table of the zk node can reflect the total connection limit, the newly created connection rate limit and the newly created connection initial number limit of each service policy.

[0077] The table of request nodes (service_sg_bind) bound to the service policy of the zk node is shown in Table 5. The relationship between the zk node and the request node bound to its service policy can be called a service security group binding relationship.

[0078] Fields illustrate Service_sg_bind_id Service security group binding relationship ID Service_sg_id Service Policy ID Object_type Binding object type Object_id Binding object ID

[0079] Table 5

[0080] Among them, the service policy ID may include a data synchronization service policy ID, a cluster election service policy ID, and a client service policy ID. Each service policy can be bound to an object of a type, which is a requesting node, i.e., a zk node or a client. The table can reflect which service policies the requesting node can use. In the embodiment of the present application, when the requesting node is a zk node, data synchronization service and cluster election service can be used, and when the requesting node is a client node, client service can be used.

[0081] The service policy binding IP set (ipset) (service_sg_ipset) table is shown in Table 6.

[0082]

[0083]

[0084] Table 6

[0085] Wherein, Ipset can be a set of IP addresses, and based on Table 6, the blacklist and whitelist corresponding to each service policy can be obtained. For example, the blacklist and whitelist of the data synchronization service policy, the blacklist and whitelist of the cluster election service policy, and so on are obtained.

[0086] The IP set (ipset) table is shown in Table 7.

[0087] Fields property Ipset_id Ip Set Id Name name Cidr IP address

[0088] Table 7

[0089] The ipset table can reflect the name of each ipset and the IP addresses included in each ipset.

[0090] The zk node pool table is shown in Table 8.

[0091] Fields illustrate Pool_id zknode pool ID Cluster_id zk cluster ID Pool_type Pool Type Role Pool Role

[0092] Table 8

[0093] The pool roles may include master and observer. The zk node pool table may reflect which zk clusters the zk nodes included in the pool come from, as well as the type and role of the pool.

[0094] The binding relationship between the zk node pool and the zk node (pool_zknode) is shown in Table 9.

[0095]

[0096]

[0097] Table 9

[0098] The pool_zknode table can reflect which zk clusters the zk nodes included in a pool come from, and which zk nodes in each zk cluster are stored in the pool.

[0099] The client table is shown in Table 10.

[0100] Fields illustrate client_id Client ID client_type Client Type Ip Client IP

[0101] Table 10

[0102] The client table may reflect all client types and IP addresses acquired by the control node.

[0103] The binding relationship between the client and the zk node pool (pool_client) is shown in Table 11.

[0104] Fields illustrate Pool_client_id Relationship ID Pool_id The pool ID of the binding relationship Client_id The client ID of the binding relationship

[0105] Table 11

[0106] The pool_client table can reflect the information of all clients bound to a pool, that is, the types and IP addresses of all clients. That is, after the control node receives data sent by a client, it knows which pool to forward the data to.

[0107] In the embodiment of the present application, for Table 10 and Table 11, the control node can also create a request node table and a binding relationship table between the request node and the zk node pool. That is, Table 10 and Table 11 are the case where the request node is a client. When the request node is another zk node, it can also have a table similar to Table 10 and Table 11, which will not be repeated here.

[0108] Based on Tables 1 to 11 above, you can create a zk cluster, zk node, zk node pool, and client, as follows:

[0109] like Figure 3a As shown in the figure, when creating a zk cluster, you need to create a data synchronization service strategy, a cluster election service strategy, and a client service strategy. Among them, the data synchronization service strategy refers to the specific process of the requesting node using the data synchronization service to synchronize specific data from the business node when the requesting node is a zk node. The cluster election service strategy refers to the specific process of electing a master (leader) node from multiple zk nodes in a cluster. The client service strategy refers to the specific process of the client accessing the zk node to use a specific client service.

[0110] like Figure 3b As shown, creating a zk node includes the following steps:

[0111] 1. You can query the information of data synchronization service strategy and cluster election service strategy according to the zk cluster (Cluster) table (cluster_id). After querying, bind the two strategies to the zk cluster respectively so that the zk cluster supports data synchronization service strategy and cluster election service strategy.

[0112] 2. Create an Ipset for each service policy. Each Ipset includes a whitelist and a blacklist. Bind the Ipset to the corresponding service policy to create an Ipset for the data synchronization service and an Ipset for the cluster election service.

[0113] 3. Add the IP address of the requesting node as the zk node to the Ipset of the data synchronization service and the Ipset of the cluster election service respectively.

[0114] like Figure 3cAs shown, when creating a zk node pool (pool), you can bind the zk node to the zk node pool based on the binding relationship between the zk node pool and the zk node (pool_zknode) table.

[0115] like Figure 3d As shown, creating a client includes the following steps:

[0116] 1. Create a client object and bind the client to the pool based on the binding relationship between the client and the zk node pool (pool_client) table.

[0117] 2. Create a client service policy and bind the pool to the client service policy.

[0118] 3. Create an Ipset for the client service, which includes a blacklist and a whitelist, and bind the Ipset to the client service policy.

[0119] 4. According to actual needs, add the client's IP address to the blacklist and whitelist of the client service.

[0120] By creating the above objects, zknode is automatically added to the IPset of the data synchronization service and cluster election service, and the client's IP address is added to the blacklist or whitelist of the client service as needed.

[0121] See also Figure 4 , Figure 4 is a flow chart of a data processing method according to an exemplary embodiment. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the control node 104 therein, so that the control node 104 generates the authority management information for the business service of the business node 106. Of course, the method can also be applied to other implementation environments, such as node devices in other implementation environments, and the execution subject of the method is not limited here.

[0122] The data processing method will be described in detail below by taking the control node 104 as an exemplary execution subject.

[0123] like Figure 4 As shown, in an exemplary embodiment, the method comprises at least the following steps:

[0124] S410 , generating authority management information for the business service of the business node based on the support information of the business node providing business services to the multiple request nodes and the identification information respectively corresponding to the multiple request nodes.

[0125] The business service may be any one of a data synchronization service, a cluster election service, and a client service. The support information may indicate which requesting nodes the business node supports providing the business service to. For example, the support information may indicate that the business node supports providing client services to client node 1 and client node 2, and supports providing data synchronization services and cluster election services to zk node 1, zk node 2, and zk node 3.

[0126] The control node may also generate a list usage indication information, which is used to instruct the business node how to perform permission control on the access of the requesting node. In the embodiment of the present application, the list usage indication information may be: firstly mark the access request sent by the requesting node through the mangle table and the whitelist corresponding to the business service, and then filter the access request processed by the mangle table and the whitelist corresponding to the business service through the filter table. The list usage indication information may be designed by a person skilled in the art, and the embodiment of the present application is not limited thereto. The embodiment of the present application is described by taking the above rules as an example.

[0127] Specifically, the control node generates a rights management list for the service node based on the support information and the identification information of each requesting node, and the rights management list may include a white list and a black list. The control node then generates rights management information based on the rights management list and the list usage indication information.

[0128] It should be noted that, in an embodiment of the present application, for a business service, the types of communication connections that the requesting node needs to establish with the business node can be distinguished, and corresponding permission management lists can be generated for different types of communication connections. In an embodiment of the present application, the communication connections that the requesting node needs to establish with the business node can include new connections and arbitrary connections, wherein the new connection refers to the first time the requesting node establishes a connection with the business node, and the arbitrary connection refers to the connection that the requesting node has already established with the business node. Therefore, for a business service, the control node can generate 4 lists, namely, a new connection whitelist for the business service, a new connection blacklist for the business service, an arbitrary connection whitelist for the business service, and an arbitrary connection blacklist for the business service.

[0129] S420, sending the rights management information to the service node.

[0130] After the control node generates the rights management information, it can send the rights management information to the business node so that the business node can receive the rights management information in time to update the rights management information stored locally in the business node. The control node can send the rights management information to the business node via GRPC.

[0131] In the embodiment of the present application, the agent module of the service node can establish a short connection with the control node. When the short connection is disconnected, if the control node detects that the short connection is reestablished with the agent module of the service node next time, the authority management information can be sent to the service node again. Because the service node may be accidentally shut down, resulting in data loss, when the service node is restarted, the authority management information may be inconsistent with the authority management information of the service node of the control node. Therefore, this allows the service node to obtain the latest authority management information in a timely manner.

[0132] S430: Receive an access request for a business service sent by any one of the multiple request nodes.

[0133] When any requesting node sends an access request for a business service to the business node, the control node may first receive the access request.

[0134] S440: If any requesting node is detected to be associated with a service node based on the preset association relationship table of requesting nodes and service nodes, an access request is sent to the service node, so that the service node performs response control on the access request based on the authority management information.

[0135] The association table of the preset request node and the service node may be preset by the control node, and the control node may bind multiple request nodes to corresponding service nodes respectively, and when receiving an access request sent by a request node, if it is determined that there is a service node bound to the request node, the access request is sent to the service node. In this way, the service node can control the response to the access request based on the authority management information.

[0136] Through this method, on the one hand, after generating the authority management information of the business node for the business service, the control node can send the authority management information to the business node, so that the business node can receive the authority management information in time, avoid the business node from making erroneous access request response control, and avoid the business node from frequently accessing the control node to cause excessive processing pressure, thereby improving the rationality of authority management. On the other hand, the control node will send the access request sent by the request node to the business node only when the request node is associated with the business node, so that irrelevant request nodes in the environment can be filtered out, reducing the number of access requests that the business node needs to process, thereby reducing interference with the business node and improving the accuracy of the business node in authority management.

[0137] In one embodiment of the present application, another data processing method is provided, which can be executed by a control node. Figure 5As shown, the data processing method may include S510 to S520. Among them, S510 may include S511 to S513. That is, S511 to S513 are specific implementation methods of S510.

[0138] S510 to S520 are described below:

[0139] S510, updating the rights management information to obtain updated rights management information, and replacing the rights management information before the update with the updated rights management information.

[0140] The control node may update the rights management list or the list usage indication information. For example, an IP address may be added to the rights management list, or an IP address may be deleted. For another example, the list usage indication information may be modified.

[0141] S520: Send the updated authority management information to the service node, so that the service node performs response control on the access request based on the updated authority management information.

[0142] The control node can send the updated rights management information to the business node through GRPC so that the business node can receive the updated rights management information in a timely manner.

[0143] S511 to S513 are described below:

[0144] S511, detecting an update operation on the authority management information in the authority update interface.

[0145] A person skilled in the art may access the control node and perform an update operation on the authority management information through the authority update interface, and the control node may detect the update operation.

[0146] S512: In response to the detected update operation, update the rights management information based on the update operation.

[0147] After the control node detects the update operation, it can update the rights management information.

[0148] S513, replacing the rights management information before updating with the updated rights management information.

[0149] In this way, the control node can obtain the latest emotion management of the business node for the business service.

[0150] Through this method, the control node can update the authority management information and send the updated authority management information to the business node, so that the business node can receive the latest authority management information in time, realizing dynamic management of access rights of the requesting node.

[0151] In one embodiment of the present application, another data processing method is provided, which can be executed by a control node. Figure 6 As shown, the data processing method may include S610 to S630 and S420 to S440. That is, S610 to S630 are specific implementation methods of S410.

[0152] S610 to S630 are described below:

[0153] S610: Acquire support information for indicating that the business node supports providing the business service, and add identification information of the requesting node corresponding to the acquired support information to a whitelist.

[0154] The control node can determine, based on the support information, which request nodes the service node supports providing service to and which request nodes it does not support providing service to, and determine identification information of each request node, which may be an IP address.

[0155] If the support information indicates that the service node supports providing service to a requesting node, the identification information of the requesting node may be added to the whitelist to generate the whitelist.

[0156] S620: Acquire support information for indicating that the business node does not support providing the business service, and add identification information of the requesting node corresponding to the acquired support information to a blacklist.

[0157] If the support information indicates that the service node does not support providing service to a requesting node, the identification information of the requesting node may be added to a blacklist to generate a blacklist.

[0158] S630: Generate authority management information of the business node for the business service based on the whitelist and the blacklist.

[0159] The whitelist and blacklist can be used as permission management lists.

[0160] In an embodiment of the present application, the control node may also generate a list usage indication information; wherein the list usage indication information is used to indicate the list used by the service node when controlling access rights. Optionally, the list usage indication information may also indicate how to use a blacklist and a whitelist to control access rights. Further, based on the permission management list and the list usage indication information, permission management information for the service is generated.

[0161] It is understandable that the authority management information includes the authority management list and list use instruction information.

[0162] Through this method, on the one hand, the control node can generate a rights management list based on the support information, so that the identification information of the requesting node included in the rights management list is more accurate, and the accuracy and security of the business node's control over access rights are improved. On the other hand, the rights management information also includes list usage indication information, and the business node uses the blacklist and whitelist to respond to the access request of the requesting node according to the list usage indication information, making the rights control more flexible and matching different application scenarios.

[0163] See also Figure 7 , Figure 7 is a flowchart of another data processing method according to an exemplary embodiment. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the service node 106 therein, so that the service node responds to and controls the access request of the requesting node based on the authority management information. Of course, the method can also be applied to other implementation environments, such as node devices in other implementation environments, and the execution subject of the method is not limited here.

[0164] The data processing method will be described in detail below by taking the service node 106 as an exemplary execution subject.

[0165] like Figure 7 As shown, in an exemplary embodiment, the method comprises at least the following steps:

[0166] S710, receiving the authority management information sent by the control node; wherein the authority management information is generated by the control node based on the support information of the business node providing business services to multiple request nodes and the identification information corresponding to the multiple request nodes respectively.

[0167] In the embodiment of the present application, when the business node is started, the agent module of the business node will start the timing program, regularly request the control node for permission management information, and compare and update it with the locally stored permission management information to ensure the consistency of the permission management information issued in real time.

[0168] In the embodiment of the present application, the agent module of the service node will initialize all chain and list usage indication information when the service node is started, and can subsequently interact with the control node to update the permission management list to achieve the purpose of modifying the access rights of the requesting node. The chain can refer to a data processing link, and different data processing links can be selected for permission control according to the type of data packet included in the access request.

[0169] In the embodiment of the present application, the list usage indication information may include a mangle table and a filter table.

[0170] Among them, the mangle table may include links for business services to serve clients: ZK_INGRESS_CLIENT chain, ZK_SYNCONN_WHITE_CLIENT chain and ZK_ALLCONN_WHITE_CLIENT chain.

[0171] Among them, the ZK_INGRESS_CLIENT chain can determine the type of data packet included in the access request, thereby determining the type of communication connection that the requesting node needs to establish. If it is a new connection, it can be assigned to the ZK_SYNCONN_WHITE_CLIENT chain for processing; if it is an arbitrary connection, it can be assigned to the ZK_ALLCONN_WHITE_CLIENT chain for processing. The ZK_SYNCONN_WHITE_CLIENT chain can mark the data packets sent by the IP addresses included in the new connection whitelist corresponding to the client service: 0x1 / 0x1; the ZK_ALLCONN_WHITE_CLIENT chain can mark the data packets sent by the IP addresses included in the arbitrary connection whitelist corresponding to the client service: 0x2 / 0x2.

[0172] The mangle table also includes links for data synchronization services for business services: ZK_INGRESS_QUORUM chain, ZK_SYNCONN_WHITE_QUORUM chain and ZK_ALLCONN_WHITE_QUORUM chain.

[0173] The mangle table also includes links for cluster election services for business services: ZK_INGRESS_ELECTION chain, ZK_SYNCONN_WHITE_ELECTION chain, and ZK_ALLCONN_WHITE_ELECTION chain.

[0174] Among them, based on the rules of the mangle table, the functions of each chain in the link of the data synchronization service and the link of the cluster election service are similar to the functions of each chain in the link of the above-mentioned client service, and are not described in detail here.

[0175] The Filter table includes links for business services that serve clients: ZK_INGRESS_CLIENT chain, ZK_MANAGE_CLIENT chain, ZK_SYNCONN_BLACK_CLIENT chain, ZK_ALLCONN_BLACK_CLIENT chain, and ZK_SYNCONN_LIMIT_CLIENT chain.

[0176] Among them, the ZK_INGRESS_CLIENT chain can distribute the data packet sent by the requesting node to the corresponding link according to the type of communication connection to be established between the requesting node and the service node. When the ZK_INGRESS_CLIENT link receives the data packet sent by the requesting node, it first distributes the data packet to the ZK_MANAGE_CLIENT chain, and uses the ZK_MANAGE_CLIENT chain to determine whether the requesting node is a management machine. If so, it is released; if not, the type of the communication connection is determined. If the type of the communication connection is a new connection, it is distributed to the ZK_SYNCONN_BLACK_CLIENT chain for further processing; if the type of the communication connection is an arbitrary link, it is distributed to the ZK_ALLCONN_BLACK_CLIENT chain for further processing.

[0177] The Filter table also includes links for data synchronization services for business services: ZK_INGRESS_QUORUM chain, ZK_MANAGE_QUORUM chain, ZK_SYNCONN_BLACK_QUORUM chain, ZK_ALLCONN_BLACK_QUORUM chain, and ZK_SYNCONN_LIMIT_QUORUM chain.

[0178] The Filter table also includes links for cluster election services for business services: ZK_INGRESS_ELECTION chain, ZK_MANAGE_ELECTION chain, ZK_SYNCONN_BLACK_ELECTION chain, ZK_ALLCONN_BLACK_ELECTION chain, and ZK_SYNCONN_LIMIT_ELECTION chain.

[0179] Among them, based on the rules included in the filter table, the functions of each chain in the link of the data synchronization service and the link of the cluster election service are similar to the functions of each chain in the link of the above-mentioned client service, and are not described in detail here.

[0180] S720: If an access request for the business service from any one of the multiple request nodes sent by the control node is received, a response control is performed on the access request based on the authority management information; wherein, the access request is sent by the control node when it detects that any one of the request nodes is associated with the business node based on a preset association relationship table between the request node and the business node.

[0181] The designated requesting node may first send the access request of the business service to the control node, and the control node then forwards the access request to the business node, thereby achieving a filtering effect and preventing a large number of irrelevant access requests from entering the business node.

[0182] Through this method, the business node can receive the authority management information sent by the control node to respond to the access request of the requesting node. The business node does not need to poll the control node for the authority management information, but the control node sends it to the business node in real time, thereby improving the timeliness of the business node in obtaining the authority management information.

[0183] In one embodiment of the present application, another data processing method is provided, which can be executed by a service node. Figure 8 As shown, the data processing method may include S810 to S820.

[0184] Steps S810 to S820 are described below:

[0185] S810, receiving updated rights management information sent by a control node; wherein the updated rights management information is obtained by the control node updating the rights management information.

[0186] The service node can use GRPC to receive the updated rights management information sent by the control node.

[0187] S820, replacing the rights management information before updating with the updated rights management information.

[0188] After the replacement, it can be ensured that the rights management information stored in the service node is the latest rights management information generated by the control node.

[0189] S830: Control the response to the access request based on the updated authority management information.

[0190] The updated rights management information is the latest rights management information generated by the control node, which can make the rights management more accurate.

[0191] Through this method, the business node can update the permission management information in a timely manner to keep it synchronized with the corresponding permission management information in the control node, thereby achieving more accurate access permission control.

[0192] In one embodiment of the present application, another data processing method is provided, which can be executed by a service node. Fig. 9 As shown, the data processing method may include S710, S910 to S930. That is, S910 to S930 are Figure 7It should be noted that the business service is a client service in the embodiment of the present application. For the case where the business service is a data synchronization service and a cluster election service, the specific data processing method is similar to the data processing method when the business service is a client service, and will not be described in detail.

[0193] S910 to S930 are described below:

[0194] S910: If an access request for a business service sent by a designated requesting node is received, the identification information of the designated requesting node is matched with the identification information of the requesting nodes included in the whitelist based on the list usage indication information.

[0195] The whitelist includes a new connection whitelist and an arbitrary connection whitelist.

[0196] Specifically, the service node first uses the rules included in the mangle table and the ZK_INGRESS_CLIENT chain to determine the type of communication connection that the requesting node needs to establish. The specific implementation method is:

[0197]

[0198] The access request sent by the designated requesting node includes a data packet and identification information of the designated requesting node. The types of data packets may include the above-mentioned FIN, SYN, RST and ACK.

[0199] When the type of the data packet is SYN, it can be determined that the type of the communication connection is a new connection. Therefore, the service node can enter the ZK_SYNCONN_WHITE_CLIENT chain to continue processing. In the ZK_SYNCONN_WHITE_CLIENT chain, the service node can obtain the new connection whitelist (ZK_SYNCONN_WHITE_CLIENT) for the service service, and match the identification information of the specified request node with the identification information of the request node contained in the new connection whitelist.

[0200] When the type of the data packet is FIN, RST or ACK, it can be determined that the type of the communication connection is an arbitrary link. Therefore, the service node can enter the ZK_ALLCONN_WHITE_CLIENT chain to continue processing. In the ZK_ALLCONN_WHITE_CLIENT chain, the service node can obtain the arbitrary connection whitelist (ZK_SYNCONN_WHITE_CLIENT) for the service service, and match the identification information of the specified request node with the identification information of the request node contained in the arbitrary link whitelist.

[0201] S920: If there is identification information matching the identification information of the designated requesting node in the whitelist, a first matching result is obtained, which is used to indicate that the identification information of the designated requesting node successfully matches the whitelist.

[0202] For the ZK_SYNCONN_WHITE_CLIENT chain, the implementation method is:

[0203]

[0204] When the identification information of the designated node exists in the newly created connection whitelist, the data packet may be marked with 0x1 / 0x1, and a first matching result is obtained for indicating that the identification information of the designated requesting node successfully matches the newly created connection whitelist.

[0205] For the ZK_ALLCONN_WHITE_CLIENT chain, the implementation method is:

[0206]

[0207] When the identification information of the designated node exists in the arbitrary connection whitelist, the data packet may be marked with 0x2 / 0x2, and a first matching result is obtained for indicating that the identification information of the designated requesting node successfully matches the arbitrary connection whitelist.

[0208] S930: Perform response control on the access request based on the first matching result.

[0209] Specifically, the service node needs to use the rules included in the filter table to perform response control on the access request based on the first matching result.

[0210] First, the business node inputs the data packet processed by the mangle table into the ZK_INGRESS_CLIENT chain. In the filter table, the implementation method of the ZK_INGRESS_CLIENT chain is:

[0211]

[0212] That is, the service node first inputs the data packet into the ZK_MANAGE_CLIENT chain to determine whether the designated requesting node is a management machine type. The specific implementation method of the ZK_MANAGE_CLIENT chain is:

[0213] -m set—match-set ZK_MANAGE_CLIENT src-j ACCEPT

[0214] The business node may also store a list of management machines. When the identification information of the designated requesting node matches the identification information in the list of management machines, it indicates that the designated requesting node is a management machine, and thus the business node may respond successfully to the access request.

[0215] According to the ZK_INGRESS_CLIENT chain, if the specified request node is not a management machine, it can be determined whether the communication connection type is a new connection or an arbitrary connection. If it is a new connection, it will enter the ZK_SYNCONN_BLACK_CLIENT chain for further processing; if it is an arbitrary connection, it will enter the ZK_ALLCONN_BLACK_CLIENT chain for further processing. If it is determined that the specified request node has the authority to use the business service and the communication connection type is a new connection, it is also necessary to enter the ZK_SYNCONN_LIMIT_CLIENT chain for further processing.

[0216] Among them, the specific implementation method of the ZK_SYNCONN_BLACK_CLIENT chain is:

[0217]

[0218] In the ZK_SYNCONN_BLACK_CLIENT chain, the service node can determine whether the data packet includes the mark of 0x1 / 0x1. If so, it returns (return), that is, it determines that the specified requesting node has the authority to use the business service and can enter the ZK_SYNCONN_LIMIT_CLIENT chain to continue processing.

[0219] The specific implementation method of the ZK_ALLCONN_BLACK_CLIENT chain is:

[0220]

[0221] In the ZK_ALLCONN_BLACK_CLIENT chain, the service node can determine whether the data packet includes the mark 0x2 / 0x2. If so, it returns, that is, it determines that the specified request node has the authority to use the business service and can successfully respond to the access request of the specified request node.

[0222] Based on the ZK_SYNCONN_BLACK_CLIENT chain in the case of a new connection and the ZK_ALLCONN_BLACK_CLIENT chain in the case of any connection, if the data packet does not include the mark 0x1 / 0x1 or 0x2 / 0x2, it means that the data packet is not included in the whitelist, so the data packet needs to be matched with the blacklist.

[0223] In this way, the service node can give priority to releasing the data packets including the mark, so that the designated requesting node can establish a connection with the service node in time and use the client service.

[0224] Matching the data packet with the blacklist may include S931 to S932. The specific implementation method of S930 may include S931 to S932.

[0225] S931 to S932 are described below:

[0226] S931, if the first matching result indicates that the identification information of the designated requesting node fails to match the whitelist, the identification information of the designated requesting node is matched with the identification information of the requesting nodes in the blacklist to obtain a second matching result.

[0227] Based on the ZK_SYNCONN_BLACK_CLIENT chain in the case of a new connection and the ZK_ALLCONN_BLACK_CLIENT chain in the case of any connection, when the whitelist does not include the identification information of the specified request node, it is necessary to match the identification information of the specified request node with the identification information in the blacklist. Among them, the blacklist includes the new connection blacklist (ZK_SYNCONN_BLACK_CLIENT) and the any connection blacklist (ZK_ALLCONN_BLACK_CLIENT).

[0228] S932: Perform response control on the access request based on the second matching result.

[0229] If the second matching result indicates that the identification information of the designated requesting node fails to match the blacklist, a successful response is given to the access request.

[0230] Among them, when the blacklist is a new connection blacklist, if the match fails, it means that the identification information of the specified request node is not included in the blacklist or whitelist corresponding to the new connection, and the service node can input the specified request node into the ZK_SYNCONN_LIMIT_CLIENT chain for further processing. In this way, the service node can judge whether the operating pressure of the current service node can support the access to the specified request node based on the service capacity of the current service node.

[0231] When the blacklist is an arbitrary connection blacklist, if the match fails, a successful response may be made to the access request.

[0232] Optionally, when the blacklist is an arbitrary connection blacklist, if the match fails, it is also possible to determine whether the operating pressure of the current service node can support access to the designated request node based on the service capacity of the current service node.

[0233] If the second matching result indicates that the identification information of the designated requesting node matches the blacklist successfully, a rejection response is made to the access request.

[0234] Through this method, the service node can mark the data packets sent by the request node corresponding to the IP address in the whitelist through the mangle table, and then use the filter table to give priority to releasing the marked data packets, so as to establish a communication connection between the service node and the request node in time. For the data packets processed by the mangle table but not marked, they can be matched with the blacklist, which can enhance the accuracy of permission management and prevent the establishment of connection with the request node in the blacklist.

[0235] In one embodiment of the present application, another data processing method is provided, which can be executed by a service node. Fig.10 As shown, the data processing method may include S910 to S920 and S1010 to S1030. That is, S1010 to S1030 are specific implementation methods of S930.

[0236] S1010 to S1030 are described below:

[0237] S1010, obtaining a first number of request nodes currently connected to the service node, and obtaining a second number of request nodes connected within a preset time period.

[0238] The second number of requesting nodes connected within the preset time period refers to the number of requesting nodes connected to the service node within the preset time period. For example, the service node has connected 40 requesting nodes within 1 second.

[0239] The service node can input the designated request node into the ZK_SYNCONN_LIMIT_CLIENT chain for further processing. In this way, the service node can determine whether the operating pressure of the current service node can support the access to the designated request node based on the service capacity of the current service node.

[0240] Among them, the specific implementation method of the ZK_SYNCONN_LIMIT_CLIENT chain is:

[0241]

[0242] Wherein, limit-burst 50 represents the preset request node number threshold. When the first number is greater than the limit-burst50, it is necessary to limit the growth rate of the number of new connections of the request node accessing the service node, which can be specifically limited by limit50 / second. The limit 50 / second represents the preset limit request node number threshold within the preset time length, that is, a maximum of 50 new connections are allowed to be established per second. Wherein, the preset request node number threshold and the preset limit request node number threshold can be set by technical personnel in this field without limitation.

[0243] Optionally, the service node may also set a total connection limit, that is, the total number of request nodes that the service node is allowed to connect to, and no new request nodes may be connected if the number exceeds the limit.

[0244] S1020: If the first number is less than a preset request node number threshold, a successful response is made to the access request based on the first matching result.

[0245] For example, the first number is 45, which is less than the preset request node number threshold (50), so the designated request node can be accessed.

[0246] S1030: If the first number is greater than or equal to the preset request node number threshold, and the second number is greater than or equal to the preset limit request node number threshold, a rejection response is made to the access request based on the first matching result, and connection failure information is returned to the specified request node.

[0247] For example, the first number is 70, and within the most recent 1 second, the second number is 50, then the service node can no longer connect to the designated requesting node, and needs to respond to the access request with a rejection.

[0248] If the first number is greater than or equal to a preset request node number threshold, and the second number is less than a preset limit request node number threshold, a successful response is made to the access request based on the first matching result.

[0249] By using this method, when the service capacity of the service node exceeds the limit, the access speed of the requesting node can be limited, thereby alleviating the operating pressure of the service node.

[0250] In one embodiment of the present application, a data processing method based on the mangle table is provided, which can be executed by a service node. Fig.11 As shown, the data processing method may include:

[0251] S1110, input a data packet included in an access request of a designated requesting node through an input port (INPUT).

[0252] S1120, inputting a ZK_INGRESS chain, in which a request node is allocated to a corresponding link based on the type of business service requested by the designated request node.

[0253] If the specified request node applies for data synchronization service, the data packet will be assigned to the ZK_INGRESS_QUORUM chain.

[0254] If the designated requesting node applies for the cluster election service, the data packet is assigned to the ZK_INGRESS_ELECION chain.

[0255] If the specified request node applies for client service, the data packet is assigned to the ZK_INGRESS_CLIENT chain.

[0256] S1130, determining the type of the data packet in the ZK_INGRESS_QUORUM chain, the ZK_INGRESS_ELECION chain, or the ZK_INGRESS_CLIENT chain to determine whether the communication connection to be established between the designated requesting node and the service node is a new connection or an arbitrary connection.

[0257] If the data packet is of the SYN type, the communication connection is a new connection; if the data packet is of the FIN, RST or ACK type, the communication connection is an arbitrary connection.

[0258] S1140: If the communication connection is a newly established connection, the data packet is allocated to the ZK_SYNCONN_WHITE_QUORUM chain, the ZK_SYNCONN_WHITE_ELECION chain, and the ZK_SYNCONN_WHITE_CLIENT chain accordingly.

[0259] In these three chains, the business node can obtain the new connection whitelists corresponding to the three services respectively, and determine whether the identifier of the specified request node is included in the new connection whitelist. If included, the data packet is marked with 0x1 / 0x1.

[0260] S1150: If the communication connection is an arbitrary connection, the data packet is allocated to the ZK_ALLCONN_WHITE_QUARUM chain, the ZK_ALLCONN_WHITE_ELECION chain and the ZK_ALLCONN_WHITE_CLIENT chain accordingly.

[0261] In these three chains, the business node can obtain the arbitrary connection whitelists corresponding to the three services respectively, and determine whether the identifier of the specified request node is included in the arbitrary connection whitelist. If included, the data packet is marked with 0x2 / 0x2.

[0262] Through this method, the data packets corresponding to the IP addresses in the whitelist can be marked so that the service node can quickly identify the requesting node in the whitelist, thereby giving priority to responding to the access request of the requesting node.

[0263] In one embodiment of the present application, a data processing method based on a filter table is provided, which can be executed by a service node. Fig.12 As shown, the data processing method may include:

[0264] S1210, input the data packet processed by the mangle table through the input port (INPUT).

[0265] S1220, inputting a ZK_INGRESS chain, in which a request node is allocated to a corresponding link based on the type of business service requested by the designated request node.

[0266] If the specified request node applies for data synchronization service, the data packet will be assigned to the ZK_INGRESS_QUORUM chain.

[0267] If the designated requesting node applies for the cluster election service, the data packet is assigned to the ZK_INGRESS_ELECION chain.

[0268] If the specified request node applies for client service, the data packet is assigned to the ZK_INGRESS_CLIENT chain.

[0269] S1230, in the ZK_INGRESS_QUORUM chain, or the ZK_INGRESS_ELECION chain, or the ZK_INGRESS_CLIENT chain, input the data packet into the corresponding ZK_MANAGE_QUORUM chain, or the ZK_MANAGE_ELECION chain, or the ZK_MANAGE_CLIENT chain.

[0270] The ZK_MANAGE_QUORUM chain, or the ZK_MANAGE_ELECION chain, or the ZK_MANAGE_CLIENT chain can determine whether the designated requesting node is a management machine, and if so, directly establish a communication connection with the designated requesting node and provide corresponding services. If not, execute S1240.

[0271] S1240: Determine the type of the data packet in the ZK_INGRESS_QUORUM chain, the ZK_INGRESS_ELECION chain, or the ZK_INGRESS_CLIENT chain to determine whether the communication connection to be established between the designated requesting node and the service node is a new connection or an arbitrary connection.

[0272] If the data packet is of the SYN type, the communication connection is a new connection; if the data packet is of the FIN, RST or ACK type, the communication connection is an arbitrary connection.

[0273] S1250: If the communication connection is a newly established connection, the data packet is allocated to the ZK_SYNCONN_BLACK_QUORUM chain, the ZK_SYNCONN_BLACK_ELECION chain, and the ZK_SYNCONN_BLACK_CLIENT chain accordingly.

[0274] In these three chains, the service node can detect whether the data packet includes the 0x1 / 0x1 mark. If it does, S1270 is executed to enter the ZK_SYNCONN_LIMIT_QUORUM chain, or the ZK_SYNCONN_LIMIT_ELECION chain and the ZK_SYNCONN_LIMIT_CLIENT chain to continue processing the data packet.

[0275] If the data packet does not include the 0x1 / 0x1 tag, it is matched with the corresponding new connection blacklist. If the match is successful, the access request is rejected. If the match fails, S1270 is executed to enter the ZK_SYNCONN_LIMIT_QUORUM chain, or the ZK_SYNCONN_LIMIT_ELECION chain and the ZK_SYNCONN_LIMIT_CLIENT chain to continue processing the data packet.

[0276] S1260: If the communication connection is an arbitrary connection, the data packet is correspondingly allocated to the ZK_ALLCONN_BLACK_QUORUM chain, the ZK_ALLCONN_BLACK_ELECION chain and the ZK_ALLCONN_BLACK_CLIENT chain.

[0277] In these three chains, the service node can detect whether the data packet includes the 0x2 / 0x2 mark. If so, it allows the establishment of a communication connection with the specified requesting node through the access request and provides the corresponding service.

[0278] If the data packet does not include the 0x2 / 0x2 tag, it will match the corresponding new connection blacklist. If the match is successful, the access request will be rejected. If the match fails, the access request will be passed to allow the communication connection with the specified requesting node to be established and provide the corresponding service.

[0279] S1270, enter the ZK_SYNCONN_LIMIT_QUORUM chain, or the ZK_SYNCONN_LIMIT_ELECION chain and the ZK_SYNCONN_LIMIT_CLIENT chain, and determine whether to access the specified request node based on the current service capacity of the service node.

[0280] Through this method, the filter table can be used to give priority to passing data packets including 0x1 / 0x1 or 0x2 / 0x2, and establish a connection in time. In addition, for data packets that do not include 0x1 / 0x1 or 0x2 / 0x2, a blacklist can be used to match the specified request node, further improving the accuracy of permission management.

[0281] Fig.13 FIG. 1 is a block diagram of a data processing device according to an embodiment of the present application. Fig.13 As shown,

[0282] When the data processing device is applied to a service node, it includes:

[0283] The transceiver unit 1320 is used to receive the rights management information sent by the control node; wherein the rights management information is generated by the control node based on the support information of the service node providing service services to multiple request nodes and the identification information corresponding to the multiple request nodes;

[0284] The response unit 1340 is used to respond to and control the access request for the business service based on the authority management information if an access request for the business service from any of the multiple request nodes sent by the control node is received; wherein the access request is sent by the control node when it detects that any of the request nodes is associated with the business node based on the preset association relationship table of the request nodes and the business nodes.

[0285] In one embodiment of the present application, based on the aforementioned scheme, the transceiver unit 1320 is also used to receive updated permission management information sent by the control node; wherein the updated permission management information is obtained by the control node updating the permission management information; the processing unit 1330 is used to replace the permission management information before the update with the updated permission management information; and the access request is responded to and controlled based on the updated permission management information.

[0286] In one embodiment of the present application, based on the aforementioned scheme, the access request includes identification information of the specified request node; the authority management information includes a whitelist, and the whitelist contains identification information of request nodes that the business node supports to provide business services; the processing unit 1330 is also used to match the identification information of the specified request node with the identification information of the request node contained in the whitelist based on the list usage indication information; if there is identification information in the whitelist that matches the identification information of the specified request node, a first matching result is obtained for characterizing that the identification information of the specified request node successfully matches the whitelist; the response unit 1340 is also used to control the response to the access request based on the first matching result.

[0287] In one embodiment of the present application, based on the aforementioned scheme, the permission management information also includes a blacklist, and the blacklist contains identification information of request nodes that the business node does not support to provide business services; the processing unit 1330 is also used to match the identification information of the specified request node with the identification information of the request node contained in the blacklist to obtain a second matching result if the first matching result indicates that the identification information of the specified request node fails to match the whitelist; the response unit 1340 is also used to control the response to the access request based on the second matching result.

[0288] In one embodiment of the present application, based on the aforementioned scheme, the response unit 1340 is also used to respond successfully to the access request if the second matching result indicates that the identification information of the specified request node fails to match the blacklist; if the second matching result indicates that the identification information of the specified request node successfully matches the blacklist, then respond rejecting the access request.

[0289] In one embodiment of the present application, based on the aforementioned scheme, the acquisition unit 1310 is used to obtain a first number of request nodes currently connected to the business node, and to obtain a second number of request nodes connected within a preset time period; the response unit 1340 is also used to respond successfully to the access request based on the first matching result if the first number is less than the preset request node number threshold; if the first number is greater than or equal to the preset request node number threshold, and the second number is greater than or equal to the preset limit request node number threshold, then respond to the access request based on the first matching result.

[0290] When the data processing device is applied to a control node, it includes:

[0291] An acquiring unit 1310 is configured to generate permission management information for a business service of the business node based on support information of the business node providing business services to multiple requesting nodes and identification information corresponding to the multiple requesting nodes respectively;

[0292] The transceiver unit 1320 is used to send the authority management information to the service node;

[0293] The transceiver unit 1320 is used to send the authority management information to the service node; wherein the authority management information is used by the service node to control the response of multiple request nodes to the access requests for the service service.

[0294] Processing unit 1330 is used to send the access request to the business node if any request node is detected to be associated with the business node based on the preset association relationship table of the request node and the business node, so that the business node can respond to the access request based on the authority management information.

[0295] In one embodiment of the present application, based on the aforementioned scheme, the processing unit 1330 is also used to update the permission management information to obtain updated permission management information; the transceiver unit 1320 is also used to send the updated permission management information to the business node, so that the business node responds to the access request based on the updated permission management information.

[0296] In one embodiment of the present application, based on the above-mentioned solution, the processing unit 1330 is further used to detect an update operation for the permission management information in the permission update interface; in response to the detected update operation, the permission management information is updated based on the update operation.

[0297] In one embodiment of the present application, based on the aforementioned scheme, the acquisition unit 1310 is further used to obtain support information used to characterize that the business node supports the provision of business services, and add the identification information of the requesting node corresponding to the obtained support information to the whitelist; obtain support information used to characterize that the business node does not support the provision of business services, and add the identification information of the requesting node corresponding to the obtained support information to the blacklist; the processing unit 1330 is also used to generate the authority management information of the business node for the business service based on the whitelist and the blacklist.

[0298] In one embodiment of the present application, based on the aforementioned scheme, the processing unit 1330 is also used to generate list usage indication information; wherein the list usage indication information is used to indicate the list used; and to generate permission management information for the business service based on the whitelist, blacklist and list usage indication information.

[0299] It should be noted that the apparatus provided in the aforementioned embodiment and the method provided in the aforementioned embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment.

[0300] An embodiment of the present application also provides a data processing device, including: one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the above data processing method.

[0301] Fig.14 It is a structural diagram of a computer system suitable for implementing a data processing device of an embodiment of the present application.

[0302] It should be noted that Fig.14 The computer system 1400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0303] like Fig.14 As shown, the computer system 1400 includes a central processing unit (CPU) 1401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1402 or the program loaded from the storage part 1408 to the random access memory (RAM) 1403, such as executing the method in the above embodiment. In the RAM 1403, various programs and data required for system operation are also stored. The CPU 1401, the ROM 1402 and the RAM 1403 are connected to each other through the bus 1404. The input / output (I / O) interface 1405 is also connected to the bus 1404.

[0304] The following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. A removable medium 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1410 as needed so that a computer program read therefrom is installed into the storage section 1408 as needed.

[0305] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1409, and / or installed from a removable medium 1411. When the computer program is executed by a central processing unit (CPU) 1401, various functions defined in the system of the present application are executed.

[0306] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable media may be, for example, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0307] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0308] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0309] Another aspect of the present application also provides a computer readable medium having a computer program stored thereon, which implements the above data processing method when the computer program is executed by a processor. The computer readable medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0310] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable medium. A processor of a computer device reads the computer instruction from the computer-readable medium, and the processor executes the computer instruction, so that the computer device executes the data processing method provided in each of the above embodiments.

[0311] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A data processing method, characterized in that: Applied to business nodes, including: Receiving the rights management information sent by the control node; wherein the rights management information is generated by the control node based on the support information of the business node providing business services to multiple request nodes and the identification information corresponding to the multiple request nodes respectively; If an access request for the business service from any one of the multiple request nodes sent by the control node is received, the access request is responded to and controlled based on the authority management information; wherein the access request is sent by the control node when it detects that any one of the request nodes is associated with the business node based on a preset association relationship table between the request node and the business node.

2. The method according to claim 1, characterized in that The method further comprises: Receiving updated rights management information sent by the control node; wherein the updated rights management information is obtained by the control node updating the rights management information; Replace the rights management information before updating with the updated rights management information; The access request is responded to and controlled based on the updated authority management information.

3. The method according to claim 1 or 2, characterized in that: The access request includes identification information of the designated requesting node, the authority management information includes a whitelist and list use indication information, and the whitelist contains identification information of requesting nodes that the business node supports to provide the business service; The controlling the response to the access request based on the authority management information includes: Based on the list usage indication information, matching the identification information of the designated requesting node with the identification information of the requesting nodes contained in the whitelist; If there is identification information matching the identification information of the designated requesting node in the whitelist, a first matching result is obtained, which is used to indicate that the identification information of the designated requesting node successfully matches the whitelist; The access request is responded to and controlled based on the first matching result.

4. The method according to claim 3, characterized in that The rights management information also includes a blacklist, wherein the blacklist contains identification information of requesting nodes that the business node does not support to provide the business service; The controlling the response to the access request based on the first matching result includes: If the first matching result indicates that the identification information of the designated requesting node fails to match the whitelist, the identification information of the designated requesting node is matched with the identification information of the requesting nodes contained in the blacklist to obtain a second matching result; The access request is responded to and controlled based on the second matching result.

5. The method according to claim 4, characterized in that The controlling the response to the access request based on the second matching result includes: If the second matching result indicates that the identification information of the designated requesting node fails to match the blacklist, a successful response is given to the access request; If the second matching result indicates that the identification information of the designated requesting node matches the blacklist successfully, a rejection response is made to the access request.

6. The method according to claim 3, characterized in that The controlling the response to the access request based on the first matching result includes: Acquire a first number of request nodes that the service node is currently connected to, and acquire a second number of request nodes that have been connected within a preset time period; If the first number is less than a preset request node number threshold, responding successfully to the access request based on the first matching result; If the first number is greater than or equal to the preset request node number threshold, and the second number is greater than or equal to the preset limit request node number threshold, a rejection response is made to the access request based on the first matching result.

7. A data processing method, characterized in that: Applied to a control node, the method comprises: Generate authority management information of the business node for the business service based on support information of the business node providing business services to multiple requesting nodes and identification information corresponding to the multiple requesting nodes respectively; Sending the authority management information to the service node; Receiving an access request for the business service sent by any one of the multiple requesting nodes; If it is detected based on the preset association table of requesting nodes and service nodes that any one of the requesting nodes is associated with the service node, the access request is sent to the service node, so that the service node performs response control on the access request based on the authority management information.

8. The method according to claim 7, characterized in that The method further comprises: Updating the rights management information to obtain updated rights management information; The updated rights management information is sent to the service node, so that the service node performs response control on the access request based on the updated rights management information.

9. The method according to claim 8, characterized in that The updating of the rights management information to obtain updated rights management information includes: Detecting an update operation on the permission management information in the permission update interface; In response to the detected update operation, the rights management information is updated based on the update operation.

10. The method according to any one of claims 7 to 9, characterized in that The generating, based on the support information of the business node for providing business services to multiple requesting nodes and the identification information respectively corresponding to the multiple requesting nodes, the authority management information of the business node for the business service comprises: Acquire support information for indicating that the service node supports providing the service, and add identification information of the requesting node corresponding to the acquired support information to the whitelist; Acquire support information for indicating that the service node does not support providing the service, and add identification information of the requesting node corresponding to the acquired support information to a blacklist; The authority management information of the business node for the business service is generated based on the whitelist and the blacklist.

11. The method according to claim 10, characterized in that The generating the authority management information of the business node for the business service based on the whitelist and the blacklist includes: Generate list use indication information; wherein the list use indication information is used to indicate the list to be used; The authority management information for the business service is generated based on the whitelist, the blacklist and the list usage instruction information.

12. A data processing system, characterized in that: The system includes a control node and a service node, wherein: The control node generates the authority management information of the service node for the service service based on the support information of the service node for the service service provided by the multiple request nodes and the identification information respectively corresponding to the multiple request nodes, and sends the authority management information to the service node; The service node receives the rights management information sent by the control node; The control node further receives an access request for the business service sent by any one of the multiple request nodes, and sends the access request to the business node if it is detected that any one of the request nodes is associated with the business node based on a preset association relationship table of request nodes and business nodes; The business node also receives an access request for the business service from any one of the multiple requesting nodes sent by the control node, and performs response control on the access request based on the authority management information.

13. A data processing device, characterized in that: include: a memory storing computer-readable instructions; A processor reads the computer readable instructions stored in the memory to execute the method of any one of claims 1 to 6 or claims 7 to 11.

14. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method of any one of claims 1 to 6 or claims 7 to 11.

Citation Information

Cited By

  • Authorization determination method, device, medium and program product

    CN119783063A

  • Permission Determination Method, Device, Medium, and Program Product

    CN119783063B