CN118138597A - Multi-subnet distributed database data transmission method, device, equipment and medium - Google Patents
Multi-subnet distributed database data transmission method, device, equipment and medium Download PDFInfo
- Publication number
- CN118138597A CN118138597A CN202410064849.9A CN202410064849A CN118138597A CN 118138597 A CN118138597 A CN 118138597A CN 202410064849 A CN202410064849 A CN 202410064849A CN 118138597 A CN118138597 A CN 118138597A
- Authority
- CN
- China
- Prior art keywords
- target
- node
- subnet
- seed node
- seed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本公开的实施例公开了一种多子网分布式数据库数据传输方法、装置、设备和介质。该方法的一具体实施方式包括:在目标子网中的节点集合中确定种子节点,得到种子节点集;利用种子节点集与目标子网连接;响应于检测到与目标子网中存在数据传输任务,利用种子节点完成数据传输任务。该实施方式能够避免单点故障,减少监控信息的丢失,突破单点瓶颈,增加系统的健壮性。
The embodiments of the present disclosure disclose a multi-subnet distributed database data transmission method, device, equipment and medium. A specific implementation of the method includes: determining a seed node in a node set in a target subnet to obtain a seed node set; using the seed node set to connect to the target subnet; in response to detecting that there is a data transmission task in the target subnet, using the seed node to complete the data transmission task. This implementation can avoid single point failures, reduce the loss of monitoring information, break through single point bottlenecks, and increase the robustness of the system.
Description
技术领域Technical Field
本公开的实施例涉及计算机技术领域,具体涉及一种多子网分布式数据库数据传输方法、装置、电子设备和计算机可读介质。Embodiments of the present disclosure relate to the field of computer technology, and in particular to a multi-subnet distributed database data transmission method, device, electronic device, and computer-readable medium.
背景技术Background technique
分布式数据库系统或者其他分布式的应用一般都有多个节点,通过网络链接在一起协同工作,共同处理日常事务,如SQL的执行。这些节点的数量从几个到上千甚至上万个不等,往往分布比较复杂,可能会跨多个子网。因为日常监控运维的需求,需要采集每一个节点的监控指标(如CPU、内存占用率),并通过某中方式上报给监控中心存储(通常是Prometheus或者其他类似存储),供后面展示、告警所需。Distributed database systems or other distributed applications generally have multiple nodes that are linked together through the network to work together to handle daily affairs, such as SQL execution. The number of these nodes ranges from a few to thousands or even tens of thousands, and the distribution is often complex and may span multiple subnets. Due to the needs of daily monitoring and operation, it is necessary to collect monitoring indicators of each node (such as CPU, memory usage), and report them to the monitoring center for storage (usually Prometheus or other similar storage) in some way for later display and alarm.
但现有方案存在单点瓶颈,监控信息往往是时序的,每一个指标,每一个节点,每一时间间隔(比如10秒)都会产生一条数据,所以,单节点监控的数据量已经相当客观,如果是上千个节点以及更多的时候,Leader节点可能会成为网络的瓶颈。在子网内节点增加或者删除,或者在网络不稳定的情况下的情况下,会出现脑裂等不稳定的现象。如果Leader节点因某些原因出现故障,会触发重新选举,重新选举的过程中,监控信息容易丢失(节点上并没有缓存的情况下)However, the existing solution has a single point bottleneck. Monitoring information is often time-series. Each indicator, each node, and each time interval (such as 10 seconds) will generate a piece of data. Therefore, the amount of data monitored by a single node is already quite objective. If there are thousands of nodes or more, the Leader node may become a bottleneck of the network. When nodes are added or deleted within the subnet, or when the network is unstable, unstable phenomena such as brain split may occur. If the Leader node fails for some reason, it will trigger a re-election. During the re-election process, monitoring information is easily lost (when there is no cache on the node)
发明内容Summary of the invention
本公开的内容部分用于以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本公开的内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
本公开的一些实施例提出了一种多子网分布式数据库数据传输方法、装置、电子设备和计算机可读介质,来解决以上背景技术部分提到的技术问题。Some embodiments of the present disclosure propose a multi-subnet distributed database data transmission method, device, electronic device and computer-readable medium to solve the technical problems mentioned in the above background technology section.
第一方面,本公开的一些实施例提供了一种多子网分布式数据库数据传输方法,该方法包括:在目标子网中的节点集合中确定种子节点,得到种子节点集;利用上述种子节点集与上述目标子网连接;响应于检测到上述与上述目标子网中存在数据传输任务,利用上述种子节点完成上述数据传输任务。In a first aspect, some embodiments of the present disclosure provide a multi-subnet distributed database data transmission method, the method comprising: determining a seed node in a node set in a target subnet to obtain a seed node set; using the above-mentioned seed node set to connect with the above-mentioned target subnet; in response to detecting the existence of a data transmission task in the above-mentioned target subnet, using the above-mentioned seed node to complete the above-mentioned data transmission task.
第二方面,本公开的一些实施例提供了一种多子网分布式数据库数据传输装置,装置包括:确定单元,被配置成在目标子网中的节点集合中确定种子节点,得到种子节点集;连接单元,被配置成利用上述种子节点集与上述目标子网连接;传输单元,被配置成响应于检测到上述与上述目标子网中存在数据传输任务,利用上述种子节点完成上述数据传输任务。In a second aspect, some embodiments of the present disclosure provide a multi-subnet distributed database data transmission device, the device comprising: a determination unit, configured to determine a seed node from a set of nodes in a target subnet to obtain a seed node set; a connection unit, configured to connect to the target subnet using the seed node set; a transmission unit, configured to complete the data transmission task using the seed node in response to detecting the presence of a data transmission task in the target subnet.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement a method as described in any implementation method in the first aspect.
第四方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如第一方面中任一实现方式描述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
本公开的上述各个实施例中的一个实施例具有如下有益效果:本发明首先通过一定规则在每一个子网内部选取部分节点作为种子节点,这些节点可以访问本子网之外的网络,并把这些种子节点信息广播给子网内每一个节点,在每一个需要上报监控信息的节点上,每一次上报信息时,随机从种子节点列表中选取其中一个作为代理,发送监控信息,种子节点收到监控信息后进行转发,从而能够避免单点故障,减少监控信息的丢失,突破单点瓶颈,增加系统的健壮性。One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: the present invention first selects some nodes as seed nodes in each subnet through certain rules. These nodes can access the network outside the subnet, and broadcasts the seed node information to each node in the subnet. At each node that needs to report monitoring information, each time the information is reported, one of them is randomly selected from the seed node list as an agent to send the monitoring information. The seed node forwards the monitoring information after receiving it, thereby avoiding single point failures, reducing the loss of monitoring information, breaking through single point bottlenecks, and increasing the robustness of the system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
图1是根据本公开的多子网分布式数据库数据传输方法的一些实施例的流程图;FIG1 is a flow chart of some embodiments of a multi-subnet distributed database data transmission method according to the present disclosure;
图2是根据本公开的多子网分布式数据库数据传输装置的一些实施例的结构示意图;FIG2 is a schematic diagram of the structure of some embodiments of a multi-subnet distributed database data transmission device according to the present disclosure;
图3是适于用来实现本公开的一些实施例的电子设备的结构示意图。FIG. 3 is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例。相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
下面将参考附图并结合实施例来详细说明本公开。The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
参考图1,示出了根据本公开的多子网分布式数据库数据传输方法的一些实施例的流程100。该多子网分布式数据库数据传输方法,包括以下步骤:Referring to FIG1 , a process 100 of some embodiments of the multi-subnet distributed database data transmission method according to the present disclosure is shown. The multi-subnet distributed database data transmission method comprises the following steps:
步骤101,在目标子网中的节点集合中确定种子节点,得到种子节点集。Step 101, determining a seed node in a node set in a target subnet to obtain a seed node set.
在一些实施例中,多子网分布式数据库数据传输方法的执行主体(例如服务器)可以在目标子网中的节点集合中确定种子节点,得到种子节点集。具体的,上述目标子网通常是指需要进行数据传输的子网。In some embodiments, the execution subject (eg, server) of the multi-subnet distributed database data transmission method can determine the seed node in the node set in the target subnet to obtain the seed node set. Specifically, the target subnet usually refers to the subnet that needs to perform data transmission.
在这里,上述执行主体可以在目标子网中选取具有在目标子网范围之外的外部通讯能力以及在目标子网范围之内的内容通讯能力的节点作为种子节点。Here, the execution subject may select nodes in the target subnet that have external communication capabilities outside the target subnet and content communication capabilities within the target subnet as seed nodes.
可以理解的是,多子网分布式数据库数据传输方法可以是由终端设备来执行,或者也可以是由服务器来执行,上述方法的执行主体还可以包括上述终端设备与上述服务器通过网络相集成所构成的设备,或者还可以是各种软件程序来执行。其中,终端设备可以是具有信息处理能力的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。执行主体也可以体现为服务器、软件等。当执行主体为软件时,可以安装在上述所列举的电子设备中。其可以实现成例如用来提供分布式服务的多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。It is understandable that the multi-subnet distributed database data transmission method can be executed by a terminal device, or it can also be executed by a server. The execution subject of the above method can also include a device formed by integrating the above terminal device and the above server through a network, or it can also be executed by various software programs. Among them, the terminal device can be various electronic devices with information processing capabilities, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. The execution subject can also be embodied as a server, software, etc. When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
步骤102,利用上述种子节点集与上述目标子网连接。Step 102: Use the seed node set to connect to the target subnet.
在一些实施例中,上述执行主体(例如服务器)可以利用上述种子节点集与上述目标子网连接。In some embodiments, the execution entity (eg, a server) may utilize the seed node set to connect to the target subnet.
具体的,上述执行主体可以通过上述种子节点集与上述目标子网中的节点进行数据传输。Specifically, the execution subject may perform data transmission with the nodes in the target subnet through the seed node set.
在一些实施例的一些可选的实现方式中,上述执行主体可以将上述目标子网中的剩余节点确定为子网节点,得到子网节点集;对于上述子网节点集中的每个子网节点,利用上述种子节点集将种子节点集对应的种子节点信息发送至上述子网节点;控制上述子网节点集中的子网节点按照上述种子节点信息与上述种子节点集进行数据传输。In some optional implementation methods of some embodiments, the above-mentioned execution entity may determine the remaining nodes in the above-mentioned target subnet as subnet nodes to obtain a subnet node set; for each subnet node in the above-mentioned subnet node set, use the above-mentioned seed node set to send the seed node information corresponding to the seed node set to the above-mentioned subnet node; control the subnet nodes in the above-mentioned subnet node set to transmit data with the above-mentioned seed node set according to the above-mentioned seed node information.
在这里,上述种子节点信息通常是指种子节点列表。Here, the above seed node information generally refers to a seed node list.
步骤103,响应于检测到上述与上述目标子网中存在数据传输任务,利用上述种子节点完成上述数据传输任务。Step 103, in response to detecting that there is a data transmission task in the target subnet, using the seed node to complete the data transmission task.
在一些实施例中,响应于检测到上述与上述目标子网中存在数据传输任务,上述执行主体可以利用上述种子节点完成上述数据传输任务。In some embodiments, in response to detecting that there is a data transmission task in the target subnet, the execution entity may use the seed node to complete the data transmission task.
具体的,上述数据传输任务可以是单向传输也可以是双向传输。Specifically, the above data transmission task can be unidirectional transmission or bidirectional transmission.
在一些实施例的一些可选的实现方式中,上述执行主体可以根据上述数据传输任务在上述目标子网中确定目标节点。具体的,上述目标节点通常是指存放目标数据的节点。确定上述数据传输任务对应的目标数据。在这里,上述目标数据通常是指需要传输的数据。In some optional implementations of some embodiments, the execution subject may determine a target node in the target subnet according to the data transmission task. Specifically, the target node generally refers to a node storing target data. The target data corresponding to the data transmission task is determined. Here, the target data generally refers to data to be transmitted.
响应于确定上述目标节点为子网节点,控制上述目标节点将上述目标数据发送至上述种子节点集中的目标种子节点,以及利用上述目标种子节点传输上述目标数据。In response to determining that the target node is a subnet node, controlling the target node to send the target data to a target seed node in the seed node set, and using the target seed node to transmit the target data.
响应于确定上述目标节点为种子节点,控制上述目标节点传输上述目标数据。In response to determining that the target node is a seed node, the target node is controlled to transmit the target data.
在一些实施例的一些可选的实现方式中,响应于确定上述目标节点未将上述目标数据发送至上述种子节点集中的目标种子节点,上述执行主体可以根据上述种子节点信息从上述种子节点集中重新选取种子节点作为目标种子节点,直至上述目标节点将上述目标数据发送至上述目标种子节点。In some optional implementations of some embodiments, in response to determining that the above-mentioned target node has not sent the above-mentioned target data to the target seed node in the above-mentioned seed node set, the above-mentioned execution entity may reselect a seed node from the above-mentioned seed node set as the target seed node according to the above-mentioned seed node information until the above-mentioned target node sends the above-mentioned target data to the above-mentioned target seed node.
作为示例,上述执行主体可以通过以下步骤执行上述多子网分布式数据库数据传输方法:As an example, the execution subject may execute the multi-subnet distributed database data transmission method through the following steps:
1.首先通过配置各子网种子节点,可以手动干预调整种子节点个数。原则是种子节点可以连通外网,可以发送数据给监控中心(例如执行主体服务器)。并下发种子节点列表给所有本子网内节点。1. First, by configuring the seed nodes of each subnet, you can manually intervene to adjust the number of seed nodes. The principle is that the seed nodes can connect to the external network and send data to the monitoring center (such as the execution subject server). And send the seed node list to all nodes in this subnet.
可用种子节点个数越多,出现网络瓶颈或者单点故障的概率越小,系统健壮性越好。The more available seed nodes there are, the lower the probability of network bottlenecks or single point failures, and the better the system robustness.
2.对于每一个需要上报监控信息的节点,需要重复如下步骤:2. For each node that needs to report monitoring information, repeat the following steps:
3.每一次上报,随机从可用的种子节点列表中挑选某一个种子节点。3. Each time a report is submitted, a seed node is randomly selected from the list of available seed nodes.
4.发送监控信息给该种子节点。4. Send monitoring information to the seed node.
5.如果成功则等待下一次监控信息的发送,重复步骤3.5. If successful, wait for the next monitoring information to be sent and repeat step 3.
6.如果失败,则标记当前种子节点暂时不可用(有效期为本次发送),然后从剩余的种子节点中随机选取下一个,重复步骤4。6. If it fails, mark the current seed node as temporarily unavailable (valid for this transmission), then randomly select the next one from the remaining seed nodes and repeat step 4.
本公开的上述各个实施例中的一个实施例具有如下有益效果:本发明首先通过一定规则在每一个子网内部选取部分节点作为种子节点,这些节点可以访问本子网之外的网络,并把这些种子节点信息广播给子网内每一个节点,在每一个需要上报监控信息的节点上,每一次上报信息时,随机从种子节点列表中选取其中一个作为代理,发送监控信息,种子节点收到监控信息后进行转发,从而能够避免单点故障,减少监控信息的丢失,突破单点瓶颈,增加系统的健壮性。One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: the present invention first selects some nodes as seed nodes in each subnet through certain rules. These nodes can access the network outside the subnet, and broadcasts the seed node information to each node in the subnet. At each node that needs to report monitoring information, each time the information is reported, one of them is randomly selected from the seed node list as an agent to send the monitoring information. The seed node forwards the monitoring information after receiving it, thereby avoiding single point failures, reducing the loss of monitoring information, breaking through single point bottlenecks, and increasing the robustness of the system.
进一步参考图2,作为对上述各图所示方法的实现,本公开提供了一种多子网分布式数据库数据传输装置的一些实施例,这些装置实施例与图2所示的那些方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 2 , as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a multi-subnet distributed database data transmission device, which device embodiments correspond to the method embodiments shown in FIG. 2 , and the device can be specifically applied to various electronic devices.
如图2所示,一些实施例的多子网分布式数据库数据传输装置200包括:确定单元201、连接单元202和传输单元203。其中,确定单元201,被配置成在目标子网中的节点集合中确定种子节点,得到种子节点集;连接单元202,被配置成利用上述种子节点集与上述目标子网连接;传输单元203,被配置成响应于检测到上述与上述目标子网中存在数据传输任务,利用上述种子节点完成上述数据传输任务。As shown in Fig. 2, a multi-subnet distributed database data transmission device 200 of some embodiments includes: a determination unit 201, a connection unit 202 and a transmission unit 203. The determination unit 201 is configured to determine a seed node in a node set in a target subnet to obtain a seed node set; the connection unit 202 is configured to connect to the target subnet using the seed node set; the transmission unit 203 is configured to complete the data transmission task using the seed node in response to detecting that there is a data transmission task in the target subnet.
可以理解的是,该装置200中记载的诸单元与参考图1描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作、特征以及产生的有益效果同样适用于装置200及其中包含的单元,在此不再赘述。It is understandable that the units recorded in the device 200 correspond to the steps in the method described with reference to Figure 1. Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units contained therein, and will not be repeated here.
本公开的上述各个实施例中的一个实施例具有如下有益效果:本发明首先通过一定规则在每一个子网内部选取部分节点作为种子节点,这些节点可以访问本子网之外的网络,并把这些种子节点信息广播给子网内每一个节点,在每一个需要上报监控信息的节点上,每一次上报信息时,随机从种子节点列表中选取其中一个作为代理,发送监控信息,种子节点收到监控信息后进行转发,从而能够避免单点故障,减少监控信息的丢失,突破单点瓶颈,增加系统的健壮性。One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: the present invention first selects some nodes as seed nodes in each subnet through certain rules. These nodes can access the network outside the subnet, and broadcasts the seed node information to each node in the subnet. At each node that needs to report monitoring information, each time the information is reported, one of them is randomly selected from the seed node list as an agent to send the monitoring information. The seed node forwards the monitoring information after receiving it, thereby avoiding single point failures, reducing the loss of monitoring information, breaking through single point bottlenecks, and increasing the robustness of the system.
下面参考图3,其示出了适于用来实现本公开的一些实施例的电子设备(例如一种多子网分布式数据库数据传输方法的执行主体服务器)300的结构示意图。图3示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring to FIG3 below, it shows a schematic diagram of the structure of an electronic device (e.g., a server for executing a multi-subnet distributed database data transmission method) 300 suitable for implementing some embodiments of the present disclosure. The electronic device shown in FIG3 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
如图3所示,电子设备300可以包括处理装置(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储装置308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理装置301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG3 , the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304.
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储装置308;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图3示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图3中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Typically, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 3 shows an electronic device 300 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively. Each box shown in FIG. 3 may represent one device, or may represent multiple devices as needed.
特别地,根据本公开的一些实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的一些实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的一些实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储装置308被安装,或者从ROM 302被安装。在该计算机程序被处理装置301执行时,执行本公开的一些实施例的方法中限定的上述功能。In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
需要说明的是,本公开的一些实施例上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。It should be noted that the computer-readable medium described above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage 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 or 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 some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。The 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. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:在目标子网中的节点集合中确定种子节点,得到种子节点集;利用上述种子节点集与上述目标子网连接;响应于检测到上述与上述目标子网中存在数据传输任务,利用上述种子节点完成上述数据传输任务。The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines a seed node in a node set in a target subnet to obtain a seed node set; uses the seed node set to connect to the target subnet; and in response to detecting that a data transmission task exists in the target subnet, uses the seed node to complete the data transmission task.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的一些实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the 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 implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart 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.
描述于本公开的一些实施例中的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括确定单元、连接单元和传输单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,确定单元还可以被描述为“在目标子网中的节点集合中确定种子节点,得到种子节点集的单元”。The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be set in a processor, for example, it may be described as: a processor includes a determination unit, a connection unit, and a transmission unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the determination unit may also be described as "a unit that determines a seed node in a set of nodes in a target subnet and obtains a set of seed nodes."
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
以上描述仅为本公开的一些较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410064849.9A CN118138597A (en) | 2024-01-16 | 2024-01-16 | Multi-subnet distributed database data transmission method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410064849.9A CN118138597A (en) | 2024-01-16 | 2024-01-16 | Multi-subnet distributed database data transmission method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118138597A true CN118138597A (en) | 2024-06-04 |
Family
ID=91231417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410064849.9A Pending CN118138597A (en) | 2024-01-16 | 2024-01-16 | Multi-subnet distributed database data transmission method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118138597A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180176261A1 (en) * | 2016-12-16 | 2018-06-21 | Nicira, Inc. | Providing application visibility for micro-segmentation of a network deployment |
CN112416591A (en) * | 2020-11-25 | 2021-02-26 | 广州虎牙科技有限公司 | Distributed task processing method, device, equipment, storage medium and system |
CN112737864A (en) * | 2021-01-15 | 2021-04-30 | 北京开物数智科技有限公司 | Edge cloud network division monitoring method |
CN115049002A (en) * | 2022-06-15 | 2022-09-13 | 重庆理工大学 | Complex network influence node identification method based on reverse generation network |
CN115086319A (en) * | 2022-06-13 | 2022-09-20 | 杭州复杂美科技有限公司 | Multi-subnet blockchain network, transaction broadcasting method and device thereof, and storage medium |
CN117061365A (en) * | 2023-10-11 | 2023-11-14 | 浪潮电子信息产业股份有限公司 | Node selection method, device, equipment and readable storage medium |
-
2024
- 2024-01-16 CN CN202410064849.9A patent/CN118138597A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180176261A1 (en) * | 2016-12-16 | 2018-06-21 | Nicira, Inc. | Providing application visibility for micro-segmentation of a network deployment |
CN112416591A (en) * | 2020-11-25 | 2021-02-26 | 广州虎牙科技有限公司 | Distributed task processing method, device, equipment, storage medium and system |
CN112737864A (en) * | 2021-01-15 | 2021-04-30 | 北京开物数智科技有限公司 | Edge cloud network division monitoring method |
CN115086319A (en) * | 2022-06-13 | 2022-09-20 | 杭州复杂美科技有限公司 | Multi-subnet blockchain network, transaction broadcasting method and device thereof, and storage medium |
CN115049002A (en) * | 2022-06-15 | 2022-09-13 | 重庆理工大学 | Complex network influence node identification method based on reverse generation network |
CN117061365A (en) * | 2023-10-11 | 2023-11-14 | 浪潮电子信息产业股份有限公司 | Node selection method, device, equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112363879B (en) | Cache server performance test method, device, equipment and medium | |
CN112416632B (en) | Event communication method and device, electronic equipment and computer readable medium | |
CN112131013A (en) | Method, device, device and storage medium for monitoring call chain in distributed system | |
CN113760536A (en) | Data caching method and device, electronic equipment and computer readable medium | |
WO2024066374A1 (en) | Service degradation method and apparatus, device, computer-readable medium and program product | |
CN114035861B (en) | Cluster configuration method, device, electronic device and computer readable medium | |
CN114430364B (en) | Information display method, information display device, electronic equipment and computer readable medium | |
CN112507676B (en) | Method and device for generating energy report, electronic equipment and computer readable medium | |
CN118138597A (en) | Multi-subnet distributed database data transmission method, device, equipment and medium | |
CN113553206B (en) | Data event execution method and device, electronic equipment and computer readable medium | |
CN115269645A (en) | Information query method and device, electronic equipment and computer readable medium | |
CN115996187A (en) | Routing information processing method and device, routing information interaction system and routing equipment | |
CN114785770A (en) | Mirror layer file sending method and device, electronic equipment and computer readable medium | |
CN112182002A (en) | Data disaster tolerance method and device, electronic equipment and computer readable medium | |
CN113760927A (en) | Data processing method and device, electronic equipment and computer readable medium | |
CN113765692A (en) | Current limiting method, current limiting device, electronic equipment and computer readable medium | |
CN114172946B (en) | Request result sending method, device, electronic equipment and computer readable medium | |
CN116319322B (en) | Power equipment node communication connection method, device, equipment and computer medium | |
CN117785477B (en) | Distributed database service request execution method, device, electronic device and medium | |
CN111404824B (en) | Method, apparatus, electronic device, and computer-readable medium for forwarding request | |
CN118784648A (en) | Request processing method, device, apparatus, computer readable medium and program product | |
CN112311894B (en) | Method, apparatus, electronic device, and computer-readable medium for generating information | |
CN111314457B (en) | Method and device for setting virtual private cloud | |
CN113472565B (en) | Method, apparatus, device and computer readable medium for expanding server function | |
CN113407493B (en) | Operation method, data reading and writing method, device, electronic equipment and medium |
Legal Events
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 |