技术领域Technical field
本发明属于计算机技术领域,具体涉及一种基于订阅发送模式的跨域用户数据同步方法。The invention belongs to the field of computer technology, and specifically relates to a cross-domain user data synchronization method based on a subscription sending mode.
背景技术Background technique
近年来,各类基于数据订阅发布模式的消息中间件已被广泛应用于各类信息系统中,用于处理应用系统内部的消息收发。消息中间件是基于队列与消息传递技术,在网络环境中提供异步或同步、可靠地消息传输的支撑性软件系统。In recent years, various message middleware based on the data subscription and publishing model have been widely used in various information systems to handle the sending and receiving of messages within the application system. Message middleware is a supporting software system based on queue and message passing technology that provides asynchronous or synchronous and reliable message transmission in a network environment.
在特定的网络环境中,在每个区域内部署一套用户管理服务,用于提供本区域内的用户信息、角色信息、权限信息、登录认证等功能的服务。每个区域之间,也就是跨域场景,在特定的网络环境下,由于安全考虑,只允许开放特定的一个或几个端口用于数据交互,普通的HTTP请求无法进行跨域场景的服务访问。因此,现有的消息中间件并不适用于这种特定的具有安全限制的网络环境。目前,用于实现跨域用户数据同步的方案依靠导出用户数据至离线文件中,再通过人工或可实现跨域传输文件的软件将该离线用户数据文件发送至目的域,再在目的域通过导入离线用户数据文件的方式,将源域的用户数据导入至该域内的用户服务。这种方案虽然可实现跨域用户数据的同步,但无法对全域的用户数据形成统一的编配管理,操作繁琐,跨域用户数据同步困难。In a specific network environment, a set of user management services is deployed in each area to provide user information, role information, permission information, login authentication and other functional services in this area. Between each area, that is, cross-domain scenarios, in specific network environments, due to security considerations, only one or a few specific ports are allowed to be opened for data interaction. Ordinary HTTP requests cannot access services in cross-domain scenarios. . Therefore, existing message middleware is not suitable for this specific network environment with security restrictions. Currently, the solution for achieving cross-domain user data synchronization relies on exporting user data to an offline file, and then sending the offline user data file to the destination domain manually or through software that can realize cross-domain file transfer, and then importing it in the destination domain. Using offline user data files, import user data from the source domain to user services in that domain. Although this solution can achieve cross-domain user data synchronization, it cannot form a unified orchestration and management of user data in the entire domain. The operation is cumbersome and cross-domain user data synchronization is difficult.
发明内容Contents of the invention
发明目的:本发明所要解决的技术问题是针对现有技术中,在具有安全限制的网络环境下,跨域用户数据同步困难的问题,提供一种基于订阅发送模式的跨域用户数据同步方法。Purpose of the invention: The technical problem to be solved by this invention is to provide a cross-domain user data synchronization method based on the subscription sending mode in view of the difficulty in cross-domain user data synchronization in a network environment with security restrictions in the existing technology.
为了解决上述技术问题,本发明公开了一种基于订阅发送模式的跨域用户数据同步方法,包括如下步骤:In order to solve the above technical problems, the present invention discloses a cross-domain user data synchronization method based on subscription sending mode, which includes the following steps:
步骤S1:以当前用户所在区域的节点作为发送节点,其他区域的节点作为订阅节点,在每个节点内部署用户管理服务;Step S1: Use the node in the area where the current user is located as the sending node, and the nodes in other areas as the subscribing node, and deploy user management services in each node;
所述用户管理服务用于提供本区域的用户数据目录,所述用户数据目录包括用户信息数据、角色信息数据以及权限信息数据;所述用户管理服务能够为本区域内的用户信息数据、角色信息数据以及权限信息数据提供统一的管理功能以及全域唯一标识的管理与分配;所述用户管理服务还能够提供统一的用户登录认证功能;The user management service is used to provide a user data directory in this area. The user data directory includes user information data, role information data and permission information data; the user management service can provide user information data, role information data in this area. Data and permission information data provide unified management functions and management and distribution of unique identifiers in the entire domain; the user management service can also provide unified user login authentication functions;
各节点的用户管理服务通过指定的传输软件提供的接口进行用户数据传输;The user management service of each node transmits user data through the interface provided by the designated transmission software;
步骤S2:用户在发送节点的用户管理服务内配置其他订阅节点的通信属性,配置完成后,发送节点拉取并形成全域用户数据目录;所述全域用户数据目录为全部区域的用户数据目录的集合;Step S2: The user configures the communication attributes of other subscription nodes in the user management service of the sending node. After the configuration is completed, the sending node pulls and forms a global user data directory; the global user data directory is a collection of user data directories in all regions. ;
步骤S3:用户在步骤S2中生成的全域用户数据目录中选择对应订阅节点内需要拉取的用户数据,并向该订阅节点发送订阅用户数据请求,且发送节点将该次订阅用户数据请求记录至本节点内的订阅订单中;Step S3: The user selects the user data that needs to be pulled from the corresponding subscription node in the global user data directory generated in step S2, and sends a user data subscription request to the subscription node, and the sending node records the user data subscription request to In the subscription order within this node;
步骤S4:订阅节点收到步骤S3中发送节点发送的订阅用户数据请求,解析后通过传输软件发送对应用户数据至发送节点,且订阅节点将此次发送信息记录至本节点内的发送订单中;Step S4: The subscribing node receives the subscribed user data request sent by the sending node in step S3, parses it and sends the corresponding user data to the sending node through the transmission software, and the subscribing node records the sending information into the sending order in this node;
步骤S5:发送节点收到步骤S4中订阅节点发送的用户数据后,将用户数据持久化至本节点;Step S5: After receiving the user data sent by the subscribing node in step S4, the sending node persists the user data to this node;
步骤S6:订阅节点内用户数据发生变化,订阅节点发送用户数据变化信息至发送节点,或者发送节点订阅用户数据变化信息。Step S6: The user data in the subscribing node changes. The subscribing node sends the user data change information to the sending node, or the sending node subscribes to the user data change information.
进一步地,步骤S1中,所述全域唯一标识共14位;其中,前5位为地域标识,地域标识的前2位代表大地域划分,如东部、西部、南部、北部等,使用数字标识;后3位为大地域下的小区域划分,使用数字标识;第6位标识数据类型,Y代表用户信息数据、J代表角色数据、Q代表权限数据;后8位由当前时间为输入生成的8位随机字符串;用户管理服务可通过解析该全域唯一标识,判断该数据属于的区域、类型等信息。Further, in step S1, the global unique identifier has a total of 14 digits; among them, the first 5 digits are regional identifiers, and the first 2 digits of the regional identifier represent large regional divisions, such as east, west, south, north, etc., using digital identification; The last 3 digits are divided into small areas under the large region and are identified by numbers; the 6th digit identifies the data type, Y represents user information data, J represents role data, and Q represents authority data; the last 8 digits are generated from the current time as input. bit random string; the user management service can determine the region, type and other information to which the data belongs by parsing the global unique identifier.
进一步地,订阅节点与发送节点间通过传输软件进行数据传输,所述传输软件基于UDP传输协议,数据传输时,只需指定目的端IP地址以及传输软件的端口号。Furthermore, data is transmitted between the subscribing node and the sending node through transmission software. The transmission software is based on the UDP transmission protocol. When transmitting data, only the destination IP address and the port number of the transmission software need to be specified.
进一步地,所述步骤S2中,用户在发送节点登录用户管理服务,通过用户管理服务的管理页面配置其他订阅节点的通信属性,所述通信属性为传输软件进行UDP传输时所需的目的端IP地址和消息标识号。Further, in step S2, the user logs in to the user management service at the sending node, and configures the communication attributes of other subscribing nodes through the management page of the user management service. The communication attributes are the destination IP required by the transmission software for UDP transmission. Address and message identification number.
进一步地,所述步骤S3中,利用键值对来表示订阅用户数据请求,键为订阅节点ID以及订阅数据类型,值为所需订阅数据在所属订阅节点内的全域唯一标识ID;订阅订单记录了发送节点向订阅节点发送的所有订阅用户数据请求的记录,订阅订单为键值对的集合。Further, in step S3, a key-value pair is used to represent the subscription user data request. The key is the subscription node ID and the subscription data type, and the value is the globally unique identification ID of the required subscription data in the subscription node to which it belongs; the subscription order record A record of all subscription user data requests sent by the sending node to the subscribing node. The subscription order is a collection of key-value pairs.
进一步地,所述订阅数据类型包括:用户信息数据、角色信息数据以及权限信息数据;用户信息数据包括用户名称、用户登录名、用户性别以及用户民族;角色信息数据包括角色名称以及角色描述;权限信息数据包括权限类型、权限名称以及权限描述信息。Further, the subscription data types include: user information data, role information data and permission information data; user information data includes user name, user login name, user gender and user ethnicity; role information data includes role name and role description; permissions Information data includes permission type, permission name, and permission description information.
进一步地,所述步骤S4包括:Further, the step S4 includes:
步骤S41:订阅节点收到步骤S3中发送节点通过传输软件发送过来的订阅用户数据请求;Step S41: The subscribing node receives the subscriber data request sent by the sending node through the transmission software in step S3;
步骤S42:订阅节点对收到的订阅用户数据请求进行解析,根据订阅数据类型以及所需订阅数据在所属订阅节点内的全域唯一标识ID,搜索本节点内对应的数据;Step S42: The subscription node parses the received subscription user data request, and searches for the corresponding data in this node according to the subscription data type and the globally unique identification ID of the required subscription data in the subscription node to which it belongs;
步骤S43:订阅节点将搜索到的数据通过传输软件传输至发送节点;Step S43: The subscribing node transmits the searched data to the sending node through the transmission software;
步骤S44:订阅节点将此次发送信息记录至本节点内的发送订单中;所述发送信息包括订阅数据类型、发送节点ID、所需订阅数据在本节点内的全域唯一标识ID以及所需订阅数据在本节点内的更新时间;所述发送订单记录了本订阅节点向发送节点发送的所有发送信息,发送订单为发送信息的集合。Step S44: The subscribing node records the sending information into the sending order in this node; the sending information includes the subscription data type, the sending node ID, the globally unique identification ID of the required subscription data in this node, and the required subscription. The update time of the data in this node; the sending order records all the sending information sent by this subscription node to the sending node, and the sending order is a collection of sending information.
进一步地,步骤S4中,发送节点的用户管理服务接收到来自订阅节点的用户数据,将其新增至本节点内;新增完成后,将新增成功回执消息发送至发送订阅节点,确认新增完成;若两次新增数据不成功,标记该条数据为推送失败记录,可由用户手动进行发送或取消订阅的操作。Further, in step S4, the user management service of the sending node receives the user data from the subscribing node and adds it to the node; after the addition is completed, a new addition success receipt message is sent to the sending subscribing node to confirm the new addition. The addition is completed; if the new data is unsuccessful twice, the data will be marked as a push failure record, and the user can manually send or cancel the subscription.
进一步地,所述步骤S6包括:Further, the step S6 includes:
(1)订阅节点更新或删除了对应用户数据,更新或删除后的用户数据在本订阅节点内的全域唯一标识ID在发送订单中进行遍历,匹配后将会启动新的线程执行发送更新或删除数据消息至发送节点;(1) The subscription node updates or deletes the corresponding user data. The globally unique identification ID of the updated or deleted user data in this subscription node is traversed in the sending order. After matching, a new thread will be started to execute the sending update or deletion. Data message to sending node;
(2)订阅节点内新增了用户数据,若发送节点需要拉取该条新增用户数据,则需重复步骤S2至S5,进行订阅操作。(2) New user data is added to the subscription node. If the sending node needs to pull the new user data, it needs to repeat steps S2 to S5 to perform the subscription operation.
进一步地,步骤S6中,若订阅节点内的该条用户数据信息进行了更新,在更新成功后,根据该条数据的全域唯一标识扫描发送订单内的记录,将相关数据通过订单内记录的节点信息发送至发送节点的用户管理服务或其他订阅该条记录的发送节点中,并标识该条数据的操作类型为更新操作。Further, in step S6, if the user data information in the subscription node is updated, after the update is successful, the record in the sending order is scanned according to the global unique identifier of the data, and the relevant data is sent through the node recorded in the order. The information is sent to the user management service of the sending node or other sending nodes that subscribe to the record, and the operation type of the data is identified as an update operation.
进一步地,步骤S6中,发送节点收到来自订阅节点的更新或删除数据消息后,将更新的用户数据更新至本节点内或删除本节点内的对应用户数据,完成后发送回执消息至订阅节点,确认更新或删除完成。Further, in step S6, after the sending node receives the update or delete data message from the subscribing node, it updates the updated user data to this node or deletes the corresponding user data in this node. After completion, it sends a receipt message to the subscribing node. , confirm the update or deletion is completed.
进一步地,步骤S6中,若订阅节点收到发送节点发送的确认更新或删除完成消息,则更新或删除操作完成,否则订阅节点会重新向发送节点发送更新或删除数据消息;若两次以上更新或删除数据不成功,则标记该条数据为推送失败记录,可由用户手动进行更新或删除操作。Further, in step S6, if the subscribing node receives the confirmation update or deletion completion message sent by the sending node, the update or deletion operation is completed, otherwise the subscribing node will re-send the update or delete data message to the sending node; if it is updated twice or more Or if the deletion of data is unsuccessful, the data will be marked as a push failure record and can be manually updated or deleted by the user.
进一步地,步骤S6中,若订阅节点内新增了某条用户数据,若发送节点需要拉取该条新增用户数据,则需要在订阅节点中重新进行订阅操作。Further, in step S6, if a certain piece of user data is added to the subscribing node, and if the sending node needs to pull the new piece of user data, it needs to perform the subscription operation again in the subscribing node.
进一步地,步骤S6中,当发送节点的用户管理服务不再需要之前订阅的用户数据,则在发送节点中选择需要退订的用户数据,进行退订操作后,发送节点内相关的用户数据将不再保留,并删除发送节点相关的订阅订单,同时将退订信息发送至订阅节点,订阅节点也将删除相关的发送订单。Further, in step S6, when the user management service of the sending node no longer needs the previously subscribed user data, the user data that needs to be unsubscribed is selected in the sending node. After the unsubscription operation is performed, the relevant user data in the sending node will be No longer retained, and the subscription orders related to the sending node will be deleted. At the same time, the unsubscription information will be sent to the subscribing node, and the subscribing node will also delete the related sending orders.
进一步地,所述节点内的用户只对本节点的用户数据具有操作权限,即属地操作权限。Further, users in the node only have operation permissions on the user data of this node, that is, local operation permissions.
有益效果:在具有安全限制的网络环境中,各节点间只能通过指定的传输软件进行通信,这限制了各个节点间的正常通信,各个节点间的用户数据无法通过普通的HTTP等方式进行汇总和同步。因此,本发明提供了基于订阅发送模式下的用户数据同步的方式,通过用户管理服务使用传输软件作为通信手段,实现了各节点间跨域用户数据的同步。此外,基于订阅发送的模式进行的用户数据同步能够最大程度的与用户服务业务的解耦,订阅、发送功能通过新起的线程进行,不影响本节点内的正常业务的流转处理。基于订阅发送的模式进行的用户数据同步可有效的利用带宽资源,将用户数据进行按需的订阅和发送、同步推送功能。最后,所述属地修改的用户数据权限可有效的避免用户数据的修改冲突,并能够保护用户数据的安全性。Beneficial effects: In a network environment with security restrictions, each node can only communicate through designated transmission software, which limits the normal communication between each node. User data between each node cannot be summarized through ordinary HTTP and other methods. and sync. Therefore, the present invention provides a user data synchronization method based on the subscription sending mode, and uses the transmission software as a communication means through the user management service to realize the synchronization of cross-domain user data between nodes. In addition, user data synchronization based on the subscription and sending mode can decouple the user service business to the greatest extent. The subscription and sending functions are performed through new threads and do not affect the normal business flow processing within this node. User data synchronization based on the subscription sending mode can effectively utilize bandwidth resources to subscribe and send user data on demand, and perform synchronous push functions. Finally, the locally modified user data permissions can effectively avoid modification conflicts of user data and protect the security of user data.
附图说明Description of the drawings
图1是本发明提供的一种基于订阅发送模式的跨域用户数据同步方法的示意图;Figure 1 is a schematic diagram of a cross-domain user data synchronization method based on the subscription sending mode provided by the present invention;
图2是本发明具体实施方式提供的一种基于订阅发送模式的跨域用户数据同步方法流程图;Figure 2 is a flow chart of a cross-domain user data synchronization method based on the subscription sending mode provided by a specific embodiment of the present invention;
图3是本发明具体实施例中的订阅发送流程图。Figure 3 is a flow chart of subscription sending in a specific embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施方式对本发明做更进一步的具体说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
如图1所示,本发明提出的一种基于订阅发送模式的跨域用户数据同步方法,包括如下步骤:As shown in Figure 1, the cross-domain user data synchronization method based on the subscription sending mode proposed by the present invention includes the following steps:
步骤S1:以当前用户所在区域的节点作为发送节点,其他区域的节点作为订阅节点,在每个节点内部署用户管理服务;Step S1: Use the node in the area where the current user is located as the sending node, and the nodes in other areas as the subscribing node, and deploy user management services in each node;
所述用户管理服务用于提供本区域的用户数据目录,所述用户数据目录包括用户信息数据、角色信息数据以及权限信息数据;所述用户管理服务能够为本区域内的用户信息数据、角色信息数据以及权限信息数据提供统一的管理功能以及全域唯一标识的管理与分配;所述用户管理服务还能够提供统一的用户登录认证功能;The user management service is used to provide a user data directory in this area. The user data directory includes user information data, role information data and permission information data; the user management service can provide user information data, role information data in this area. Data and permission information data provide unified management functions and management and distribution of unique identifiers in the entire domain; the user management service can also provide unified user login authentication functions;
各节点的用户管理服务通过指定的传输软件提供的接口进行用户数据传输;The user management service of each node transmits user data through the interface provided by the designated transmission software;
步骤S2:用户在发送节点的用户管理服务内配置其他订阅节点的通信属性,配置完成后,发送节点拉取并形成全域用户数据目录;所述全域用户数据目录为全部区域的用户数据目录的集合;Step S2: The user configures the communication attributes of other subscription nodes in the user management service of the sending node. After the configuration is completed, the sending node pulls and forms a global user data directory; the global user data directory is a collection of user data directories in all regions. ;
步骤S3:用户在步骤S2中生成的全域用户数据目录中选择对应订阅节点内需要拉取的用户数据,并向该订阅节点发送订阅用户数据请求,且发送节点将该次订阅用户数据请求记录至本节点内的订阅订单中;Step S3: The user selects the user data that needs to be pulled from the corresponding subscription node in the global user data directory generated in step S2, and sends a user data subscription request to the subscription node, and the sending node records the user data subscription request to In the subscription order within this node;
步骤S4:订阅节点收到步骤S3中发送节点发送的订阅用户数据请求,解析后通过传输软件发送对应用户数据至发送节点,且订阅节点将此次发送信息记录至本节点内的发送订单中;Step S4: The subscribing node receives the subscribed user data request sent by the sending node in step S3, parses it and sends the corresponding user data to the sending node through the transmission software, and the subscribing node records the sending information into the sending order in this node;
步骤S5:发送节点收到步骤S4中订阅节点发送的用户数据后,将用户数据持久化至本节点;Step S5: After receiving the user data sent by the subscribing node in step S4, the sending node persists the user data to this node;
步骤S6:订阅节点内用户数据发生变化,订阅节点发送用户数据变化信息至发送节点,或者发送节点订阅用户数据变化信息。Step S6: The user data in the subscribing node changes. The subscribing node sends the user data change information to the sending node, or the sending node subscribes to the user data change information.
以节点A为发送节点,节点B作为订阅节点,结合如图2所示的流程图,对本发明所述方法做详细说明。Taking node A as the sending node and node B as the subscribing node, the method of the present invention will be described in detail with reference to the flow chart shown in Figure 2.
在本节点A内的用户管理服务配置其他节点的通信属性,具体为:通过用户管理服务的管理页面和命令行配置其他发送节点的通信属性,所述通信属性为传输软件进行UDP传输时所需的目的端IP地址和消息标识号,配置完成后,能够通过其通信属性获取用户数据目录以及用户数据的跨域发送,在节点A内生成全域用户数据目录;The user management service in this node A configures the communication attributes of other nodes. Specifically, it configures the communication attributes of other sending nodes through the management page and command line of the user management service. The communication attributes are required by the transmission software for UDP transmission. The destination IP address and message identification number. After the configuration is completed, the user data directory and cross-domain sending of user data can be obtained through its communication attributes, and a global user data directory is generated in node A;
在节点A的用户管理服务的全域用户数据目录中订阅需要拉取的节点B的用户数据,记录该订阅用户数据请求为一条订阅订单记录;Subscribe to the user data of node B that needs to be pulled in the global user data directory of the user management service of node A, and record the subscribed user data request as a subscription order record;
节点A的用户管理服务依托已配置的节点B的通信属性,将订阅用户数据请求发送至节点B;The user management service of node A relies on the configured communication attributes of node B to send the user data subscription request to node B;
节点B的用户管理服务接收到来自节点A的订阅用户数据请求,将该条请求记录至发送订单中,并将节点A选择的用户数据信息发送至节点A;The user management service of node B receives the user data subscription request from node A, records the request in the sending order, and sends the user data information selected by node A to node A;
节点A的用户管理服务接收到来自节点B的用户数据,将其新增至本节点内;新增完成后,将新增成功回执消息发送至节点B,确认新增完成;若两次新增数据不成功,标记该条数据为推送失败记录,可由用户手动进行发送或取消订阅的操作;The user management service of node A receives the user data from node B and adds it to this node; after the addition is completed, a new success receipt message is sent to node B to confirm that the addition is completed; if it is added twice If the data is unsuccessful, mark the data as a push failure record, and the user can manually send or cancel the subscription;
若节点B将该条用户数据信息进行了修改,修改成功后,根据该条数据的全域唯一标识ID遍历发送订单内的记录,将相关数据通过订单内记录的节点信息发送至节点A的用户管理服务或其他订阅该条记录的节点中,并标识该条数据的操作类型为更新操作;If node B modifies the user data information, after the modification is successful, it traverses the records in the sending order based on the globally unique identification ID of the data, and sends the relevant data to the user management of node A through the node information recorded in the order. In the service or other node that subscribes to the record, and identifies the operation type of the data as an update operation;
节点A的用户管理服务接收到来自节点B的更新用户数据信息,将更新的用户数据更新至本节点内,更新成功后发送回执消息至节点B,确认更新完成;The user management service of node A receives the updated user data information from node B, updates the updated user data to this node, and sends a receipt message to node B after the update is successful to confirm that the update is completed;
若节点B的用户管理服务收到了节点A发送的确认更新完成消息,则更新推送流程完成,否则将尝试重新发送更新消息,若两次尝试失败则标记该条更新数据未发送成功;If the user management service of node B receives the update completion confirmation message sent by node A, the update push process is completed, otherwise it will try to resend the update message. If the two attempts fail, the update data will be marked as not sent successfully;
若节点B新增了某条用户数据,若节点A需要拉取该条记录,则需要在节点A重新进行订阅操作;If node B adds a new piece of user data, and node A needs to pull the record, it needs to re-subscribe on node A;
当节点A的用户管理服务不再需要之前订阅的用户数据,则在节点A选择需要退订的用户数据,进行退订操作后,节点A内相关的用户数据将不再保留,并删除节点A相关的订阅订单,同时将退订信息发送至节点B,节点B也将删除相关的发送订单。When the user management service of node A no longer requires the previously subscribed user data, select the user data that needs to be unsubscribed at node A. After the unsubscription operation is performed, the relevant user data in node A will no longer be retained, and node A will be deleted. The related subscription order will be sent to Node B at the same time, and Node B will also delete the related sending order.
实施例1Example 1
在节点A使用节点B内的用户“张三”进行跨域登录的执行步骤如下:The steps to perform cross-domain login on node A using the user "Zhang San" in node B are as follows:
步骤1,用户在节点A登录用户管理服务,在用户管理服务的界面中配置节点B的通信属性,获取节点B的用户数据目录,形成全域用户数据目录;Step 1: The user logs in to the user management service on node A, configures the communication attributes of node B in the user management service interface, obtains the user data directory of node B, and forms a global user data directory;
步骤2,在节点A的用户管理服务中的全域用户数据目录中选择节点B内的用户“张三”;Step 2: Select the user "Zhang San" in node B from the global user data directory in the user management service of node A;
步骤3,节点B的用户管理服务接收到订阅请求,将“张三”的用户数据通过传输软件发送至节点A的用户管理服务内;Step 3: The user management service of node B receives the subscription request and sends the user data of "Zhang San" to the user management service of node A through the transmission software;
步骤4,节点A的用户管理服务接收到节点B发送来的“张三”的数据,将该数据存储至本节点内;Step 4: The user management service of node A receives the data of "Zhang San" sent by node B and stores the data in this node;
步骤5,用户可通过跨域的“张三”用户在节点A进行登录。Step 5: Users can log in to node A through the cross-domain "Zhang San" user.
实施例2Example 2
用户数据订阅发送流程的执行步骤如下,如图3所示:The execution steps of the user data subscription and sending process are as follows, as shown in Figure 3:
步骤1,节点A(节点A的ID为01001)内的用户管理服务向节点B(节点B的ID为01002)内的用户管理服务发起订阅用户数据(用户数据ID分别为Step 1: The user management service in node A (the ID of node A is 01001) initiates a subscription to the user data (the user data ID is respectively) to the user management service in node B (the ID of node B is 01002).
01002Y12345678、01002Y23456789)请求,节点A将此次订阅用户数据请求记录至节点A内的订阅订单中,其订阅订单包含订阅数据类型(User,用户信息数据)、订阅节点ID(节点B的ID为01002)以及所需订阅数据在所属订阅节点内的全域唯一标识ID(分别为01002Y12345678、01002Y23456789);01002Y12345678, 01002Y23456789) request, node A records this user data subscription request into the subscription order in node A. The subscription order contains the subscription data type (User, user information data), subscription node ID (node B’s ID is 01002 ) and the globally unique identification ID of the required subscription data in the corresponding subscription node (01002Y12345678, 01002Y23456789 respectively);
节点A的用户管理服务向节点C(节点C的ID为01003)内的用户管理服务发起订阅角色信息数据(ID为01003J12345678)、权限信息数据(ID为01003Q12345678)的请求,节点A的用户管理服务将此次订阅用户数据请求记录至节点A用户管理服务内的订阅订单中,其订阅订单包含订阅数据类型(分别为Role,角色信息数据;Resource,权限信息数据)、订阅节点ID(节点C的ID01003)以及所需订阅数据在所属订阅节点内的全域唯一标识ID(分别为01003J12345678、01003Q12345678);The user management service of node A initiates a request to subscribe to the role information data (ID is 01003J12345678) and permission information data (ID is 01003Q12345678) to the user management service in node C (the ID of node C is 01003). The user management service of node A Record this subscription user data request to the subscription order in the user management service of node A. The subscription order contains the subscription data type (respectively Role, role information data; Resource, permission information data), subscription node ID (node C's ID01003) and the globally unique identification ID of the required subscription data in the corresponding subscription node (01003J12345678, 01003Q12345678 respectively);
步骤2,节点B的用户管理服务接收到请求后,解析从节点A发送的订阅用户数据请求,根据订阅数据类型、所需订阅数据在所属订阅节点内的全域唯一标识ID,搜索本域内对应的数据,返回至节点A;同时记录该发送记录至节点B用户管理服务的发送订单内,其发送订单包含订阅数据类型(User,用户信息数据)、发送节点ID(节点A的ID为01001)、以及所需订阅数据在所属订阅节点内的全域唯一标识ID(分别为01002Y12345678、01002Y23456789);Step 2: After receiving the request, the user management service of node B parses the subscriber data request sent from node A, and searches for the corresponding user data request in this domain based on the subscription data type and the globally unique identification ID of the required subscription data in the subscription node to which it belongs. The data is returned to node A; at the same time, the sending record is recorded in the sending order of the user management service of node B. The sending order contains the subscription data type (User, user information data), sending node ID (the ID of node A is 01001), And the globally unique identification ID of the required subscription data in the corresponding subscription node (01002Y12345678, 01002Y23456789 respectively);
节点C的用户管理服务接收到请求后,解析从节点A发送的订阅用户数据请求,根据订阅数据类型、所需订阅数据在所属订阅节点内的全域唯一标识ID,搜索本节点内对应的数据,返回至节点A;同时记录该发送记录至节点C用户管理服务的发送订单内,其发送订单包含订阅数据类型(分别为Role,角色信息数据;Resource,权限信息数据)、发送节点ID(节点A的ID01001),以及所需订阅数据在所属订阅节点内的全域唯一标识ID(分别为01003J12345678、01003Q12345678);After receiving the request, the user management service of node C parses the subscription user data request sent from node A, and searches for the corresponding data in this node based on the subscription data type and the globally unique identification ID of the required subscription data in the subscription node to which it belongs. Return to node A; at the same time, record the sending record to the sending order of the user management service of node C. The sending order contains the subscription data type (respectively Role, role information data; Resource, permission information data), sending node ID (node A ID01001), and the globally unique identification ID of the required subscription data in the corresponding subscription node (01003J12345678, 01003Q12345678 respectively);
步骤3,节点A的用户管理服务接收到节点B返回的用户数据,将其存储至本地;节点A的用户管理服务接收到节点C返回的用户数据,将其存储至本地。Step 3: The user management service of node A receives the user data returned by node B and stores it locally; the user management service of node A receives the user data returned by node C and stores it locally.
本发明提供了一种基于订阅发送模式的跨域用户数据同步方法,具体实现该技术方案的方法和途径很多,以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。本实施例中未明确的各组成部分均可用现有技术加以实现。The present invention provides a cross-domain user data synchronization method based on the subscription transmission mode. There are many methods and ways to implement this technical solution. The above is only the preferred implementation mode of the present invention. It should be pointed out that for ordinary people in this technical field For those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented using existing technologies.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111010309.5ACN113709250B (en) | 2021-08-31 | 2021-08-31 | Cross-domain user data synchronization method based on subscription transmission mode |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111010309.5ACN113709250B (en) | 2021-08-31 | 2021-08-31 | Cross-domain user data synchronization method based on subscription transmission mode |
| Publication Number | Publication Date |
|---|---|
| CN113709250A CN113709250A (en) | 2021-11-26 |
| CN113709250Btrue CN113709250B (en) | 2023-09-15 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111010309.5AActiveCN113709250B (en) | 2021-08-31 | 2021-08-31 | Cross-domain user data synchronization method based on subscription transmission mode |
| Country | Link |
|---|---|
| CN (1) | CN113709250B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115174352B (en)* | 2022-07-08 | 2024-12-13 | 中国电信股份有限公司 | Event notification sending method, device and medium based on network configuration protocol |
| CN116566805B (en)* | 2023-07-10 | 2023-09-26 | 中国人民解放军国防科技大学 | System disaster-tolerant and anti-destruction oriented node cross-domain scheduling method and device |
| CN117097443B (en)* | 2023-10-20 | 2024-01-19 | 中国电子科技集团公司第二十八研究所 | An information system with key data transmission feedback function and its transmission method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102843432A (en)* | 2012-08-30 | 2012-12-26 | 西可通信技术设备(河源)有限公司 | Network communication system applicable to sharing and synchronous updating of data at multiple clients |
| CN103944924A (en)* | 2014-05-15 | 2014-07-23 | 重庆邮电大学 | Ubiquitous network publish-subscribe middleware model based on RESTful |
| CN106210053A (en)* | 2016-07-12 | 2016-12-07 | 国家电网公司 | A kind of electrical power system wide-area information management method |
| CN107370809A (en)* | 2017-07-13 | 2017-11-21 | 广州市百果园信息技术有限公司 | Method of data synchronization and data search system |
| CN109325008A (en)* | 2018-09-07 | 2019-02-12 | 国电南瑞科技股份有限公司 | Method and system for cross-domain data synchronization for message middleware |
| CN109766322A (en)* | 2018-12-30 | 2019-05-17 | 三盟科技股份有限公司 | A kind of data share exchange method and system |
| CN109960710A (en)* | 2019-01-16 | 2019-07-02 | 平安科技(深圳)有限公司 | Method of data synchronization and system between database |
| CN109981772A (en)* | 2019-03-22 | 2019-07-05 | 西安电子科技大学 | A kind of multiple domain data share exchange platform architecture based on block chain |
| CN110166296A (en)* | 2019-05-23 | 2019-08-23 | 南京大学 | A method of information centre's network architecture towards manned deep space exploration |
| CN110266783A (en)* | 2019-06-13 | 2019-09-20 | 中国铁道科学研究院集团有限公司通信信号研究所 | A Communication Platform of Railway CTC System Based on DDS |
| CN110309231A (en)* | 2019-07-12 | 2019-10-08 | 焦点科技股份有限公司 | A method and system for data synchronization across computer rooms |
| CN110688254A (en)* | 2019-09-06 | 2020-01-14 | 北京达佳互联信息技术有限公司 | Data synchronization method and device, electronic equipment and storage medium |
| CN111177254A (en)* | 2019-12-05 | 2020-05-19 | 武汉达梦数据库有限公司 | Method and device for data synchronization between heterogeneous relational databases |
| CN111444029A (en)* | 2020-03-05 | 2020-07-24 | 中国司法大数据研究院有限公司 | Cross-domain micro-service calling method and system based on file exchange |
| CN111716353A (en)* | 2020-05-20 | 2020-09-29 | 西安交通大学 | A method for synchronizing virtual and real digital twins based on publish/subscribe mode |
| CN112148679A (en)* | 2020-09-21 | 2020-12-29 | 江苏锐创软件技术有限公司 | Data interaction method, system, device and storage medium based on multiple data platforms |
| CN112667928A (en)* | 2020-12-11 | 2021-04-16 | 北京中数创新科技股份有限公司 | Prefix and identification data secure subscription method and system based on Handle system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7305420B2 (en)* | 2005-05-25 | 2007-12-04 | Microsoft Corporation | Synchronizing modifiable documents with multiple clients using document subsections |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102843432A (en)* | 2012-08-30 | 2012-12-26 | 西可通信技术设备(河源)有限公司 | Network communication system applicable to sharing and synchronous updating of data at multiple clients |
| CN103944924A (en)* | 2014-05-15 | 2014-07-23 | 重庆邮电大学 | Ubiquitous network publish-subscribe middleware model based on RESTful |
| CN106210053A (en)* | 2016-07-12 | 2016-12-07 | 国家电网公司 | A kind of electrical power system wide-area information management method |
| CN107370809A (en)* | 2017-07-13 | 2017-11-21 | 广州市百果园信息技术有限公司 | Method of data synchronization and data search system |
| CN109325008A (en)* | 2018-09-07 | 2019-02-12 | 国电南瑞科技股份有限公司 | Method and system for cross-domain data synchronization for message middleware |
| CN109766322A (en)* | 2018-12-30 | 2019-05-17 | 三盟科技股份有限公司 | A kind of data share exchange method and system |
| CN109960710A (en)* | 2019-01-16 | 2019-07-02 | 平安科技(深圳)有限公司 | Method of data synchronization and system between database |
| CN109981772A (en)* | 2019-03-22 | 2019-07-05 | 西安电子科技大学 | A kind of multiple domain data share exchange platform architecture based on block chain |
| CN110166296A (en)* | 2019-05-23 | 2019-08-23 | 南京大学 | A method of information centre's network architecture towards manned deep space exploration |
| CN110266783A (en)* | 2019-06-13 | 2019-09-20 | 中国铁道科学研究院集团有限公司通信信号研究所 | A Communication Platform of Railway CTC System Based on DDS |
| CN110309231A (en)* | 2019-07-12 | 2019-10-08 | 焦点科技股份有限公司 | A method and system for data synchronization across computer rooms |
| CN110688254A (en)* | 2019-09-06 | 2020-01-14 | 北京达佳互联信息技术有限公司 | Data synchronization method and device, electronic equipment and storage medium |
| CN111177254A (en)* | 2019-12-05 | 2020-05-19 | 武汉达梦数据库有限公司 | Method and device for data synchronization between heterogeneous relational databases |
| CN111444029A (en)* | 2020-03-05 | 2020-07-24 | 中国司法大数据研究院有限公司 | Cross-domain micro-service calling method and system based on file exchange |
| CN111716353A (en)* | 2020-05-20 | 2020-09-29 | 西安交通大学 | A method for synchronizing virtual and real digital twins based on publish/subscribe mode |
| CN112148679A (en)* | 2020-09-21 | 2020-12-29 | 江苏锐创软件技术有限公司 | Data interaction method, system, device and storage medium based on multiple data platforms |
| CN112667928A (en)* | 2020-12-11 | 2021-04-16 | 北京中数创新科技股份有限公司 | Prefix and identification data secure subscription method and system based on Handle system |
| Title |
|---|
| 数据订阅分发技术的研究与实现;李耿;朱美正;;计算机工程与设计(第12期);全文* |
| 跨领域信息交换与共享研究;戴剑伟;冯勤群;;兵工自动化(第09期);全文* |
| Publication number | Publication date |
|---|---|
| CN113709250A (en) | 2021-11-26 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113709250B (en) | Cross-domain user data synchronization method based on subscription transmission mode | |
| JP3396223B2 (en) | Method and apparatus for moving a subtree in a network directory | |
| US8171171B2 (en) | Data synchronization method and system between devices | |
| US6915309B1 (en) | Automatically generating replication topology information for use by a directory service | |
| US10579595B2 (en) | Method and device for calling a distributed file system | |
| US20140259005A1 (en) | Systems and methods for managing files in a cloud-based computing environment | |
| CN107861686A (en) | File memory method, service end and computer-readable recording medium | |
| JP2005316993A (en) | System and method for sharing objects between computers on a network | |
| JP7538287B2 (en) | Information propagation through network nodes | |
| CN101771723A (en) | Data synchronization method | |
| CN108829539A (en) | Data backup, data reconstruction method and equipment | |
| WO2011100904A2 (en) | Method, device and system for synchronizing contact information | |
| JP2002189646A (en) | Relay device | |
| CN101170540A (en) | A XML document management method and its client and server | |
| CN101789963A (en) | Data synchronization system | |
| CN101778131A (en) | Data synchronization system | |
| US8826026B2 (en) | Systems and methods for tracking electronic files in computer networks using electronic signatures | |
| JP2000148611A (en) | Intranet, database server and data transfer method thereof | |
| JP2000250832A (en) | Distributed directory management system | |
| US7313598B1 (en) | Method and apparatus for partial replication of directory information in a distributed environment | |
| JP2015121886A (en) | Information processing device, information processing method, and program | |
| CN107241422A (en) | It is a kind of in real time by the method for external user and subscriber group information with stepping Apache Ranger | |
| CN106657360A (en) | Synchronization method and system for NIS servers under Linux system | |
| CN116095081A (en) | Event processing method and device based on block chain system, equipment and medium | |
| CN115883583A (en) | Data synchronization method and device and multi-stage platform data synchronization system |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |