Distributed database service request execution method, device, electronic device and medium

By configuring seed nodes as network agents in the target subnet, the problem of network accessibility link detection in cross-subnet environments is solved, the accuracy and stability of detection are improved, and the high level of instable network environments is achieved Performance and robustness.

CN117785477BActive Publication Date: 2024-12-03OUSHU INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410064271.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2024-12-03
Estimated Expiration
2044-01-16

AI Technical Summary

Technical Problem

When the network is directly connected across the subnet environment, it is difficult to find indirect network accessibility links, poor performance and lack of retry mechanisms, resulting in network detection results being susceptible to short-term fluctuations and insufficient robustness of the solution. .

Method used

By determining and configuring seed nodes as network agents in the target subnet, link connection between the source node and the target node is realized, and a retry mechanism is adopted to improve the accuracy and stability of reachability link detection, combined with seed nodes Use of sets for improved performance and robustness.

Benefits of technology

In the subnet where the target node is located, the possibility of network agents being connected is improved by specifying seed nodes by human or automatic rules, and by configuring the proportion and retry mechanism of the detection seed nodes, the performance and robustness are improved, and the network is accessible by configuring the proportion and retry mechanism of the detection seed nodes. accuracy and stability of sexual link detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785477B_ABST
    Figure CN117785477B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a distributed database service request execution method, device, electronic device and medium. A specific implementation of the method includes: in response to determining that a target service request exists at a source node, determining a target node that executes the target service request in a target subnet according to the target service request; controlling the source node to send the target service request to the target node; and controlling the target node to execute the target service request. This implementation comprehensively considers accuracy, performance, and flexibility, and configures the corresponding proportion of detection seed nodes and retry mechanism according to specific requirements for performance and stability, which can balance and flexibly adjust performance and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a distributed database service request execution method, device, electronic device, and computer-readable medium. Background Art

[0002] Distributed database systems or other distributed applications generally have multiple nodes that are linked together through the network to work together and 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 operations, a source node in the system needs to always know the network reachability and links (directly or indirectly) of certain target nodes. When it needs to interact with the target node through the network, it sends a network request through the detected link. When the system network is not very stable, the significance of this reachability link detection is particularly important.

[0003] However, the network reachability detection mechanism in the existing technology has too many limitations. When the direct network connection is not available in a cross-subnet environment, it is difficult to find an indirect network reachability link, and the performance is poor. Using the indiscriminate proxy search method, it often takes multiple attempts to find a reachable link, and there is no retry mechanism. The robustness of the solution is also relatively poor. Once the network has a short-term fluctuation, it will affect the network detection results. Summary of the invention

[0004] 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.

[0005] Some embodiments of the present disclosure propose a distributed database service request execution method, device, electronic device and computer-readable medium to solve the technical problems mentioned in the above background technology section.

[0006] In a first aspect, some embodiments of the present disclosure provide a distributed database service request execution method, the method comprising: in response to determining that a target service request exists at a source node, determining a target node for executing the target service request in a target subnet according to the target service request; controlling the source node to send the target service request to the target node; and controlling the target node to execute the target service request.

[0007] In a second aspect, some embodiments of the present disclosure provide a distributed database service request execution device, the device comprising: a determination unit, configured to, in response to determining that a source node has a target service request, determine a target node in a target subnet that executes the target service request according to the target service request; a sending unit, configured to control the source node to send the target service request to the target node; and an execution unit, configured to control the target node to execute the target service request.

[0008] 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.

[0009] 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.

[0010] One of the above embodiments of the present disclosure has the following beneficial effects: BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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.

[0012] Figure 1 is a flow chart of some embodiments of the distributed database service request execution method according to the present disclosure;

[0013] Figure 2 It is a schematic diagram of the structure of some embodiments of the distributed database service request execution device according to the present disclosure;

[0014] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0015] 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.

[0016] 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 can be combined with each other.

[0017] 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.

[0018] 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".

[0019] 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.

[0020] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0021] refer to Figure 1 , shows a process 100 of some embodiments of the distributed database service request execution method according to the present disclosure. The distributed database service request execution method includes the following steps:

[0022] Step 101, in response to determining that a target service request exists at a source node, determining a target node for executing the target service request in a target subnet according to the target service request.

[0023] In some embodiments, in response to determining that a target service request exists at a source node, an executing entity (eg, a server) of the distributed database service request execution method may determine a target node in a target subnet that executes the target service request based on the target service request.

[0024] Here, the source node generally refers to a node that does not belong to the target subnet. The target subnet generally refers to a subnet that includes a target node for executing a service request. The target node generally refers to a node that can execute a target service request.

[0025] It is understandable that the distributed database service request execution 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 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.

[0026] Step 102: Control the source node to send the target service request to the target node.

[0027] In some embodiments, the execution entity (eg, a server) may control the source node to send the target service request to the target node.

[0028] In some optional implementations of some embodiments, the above-mentioned execution entity can determine whether there is a link connection between the above-mentioned source node and the above-mentioned target subnet; in response to determining that there is a link connection between the above-mentioned source node and the above-mentioned target subnet, determine the proxy node of the above-mentioned source node in the above-mentioned target subnet; control the above-mentioned source node to send the above-mentioned target service request to the above-mentioned target node through the above-mentioned proxy node.

[0029] Here, the link connection generally refers to the existence of a connection relationship. The proxy node generally refers to a node connected to the target node and having a data receiving and sending function.

[0030] In some optional implementations of some embodiments, the above-mentioned execution entity can determine whether there is a link connection between the above-mentioned source node and the above-mentioned target subnet; in response to determining that there is no link connection between the above-mentioned source node and the above-mentioned target subnet, determine whether the above-mentioned target node is a seed node; in response to determining that the above-mentioned target node is a seed node, control the above-mentioned source node to send the above-mentioned target service request to the above-mentioned target node.

[0031] Here, the seed node generally refers to a node having a communication capability outside the communication range of the target subnet.

[0032] In some optional implementations of some embodiments, the execution entity may determine whether there is a link connection between the source node and the target subnet; in response to determining that there is no link connection between the source node and the target subnet, determine whether the target node is a seed node; in response to determining that the target node is not a seed node, determine a seed node set in the target subnet; for each seed node in the seed node set, control the seed node to establish a link connection with the source node until a seed node that establishes a link connection with the source node exists in the seed node set; use the seed node in the subnode set that establishes a link connection with the source node as a proxy node, and control the source node to send the target service request to the target node through the proxy node.

[0033] As an example, the above execution subject can implement the distributed database service request execution method through the following steps:

[0034] 1. First, configure the seed nodes of each subnet and the ratio of the number of retries to the seed nodes you intend to use.

[0035] 2. Try to connect directly to the target node from the source node (for example, try to establish a TCP link).

[0036] If successful, the link is recorded and the process ends. If a network request needs to be sent from the source node to the target node later, the link will be given priority.

[0037] If it fails, retry step 2 according to the configured number of retries until the number of retries reaches the configured maximum number of retries.

[0038] 3. If the request fails after all retries are used up, try to select a seed node that has not been used as a proxy.

[0039] 4. Use the seed node as a proxy to connect to the target node.

[0040] If successful, the link is recorded and the process ends.

[0041] If it fails, retry step 4 until the number of retries reaches the configured maximum number of retries.

[0042] 5. If the maximum number of retries is reached and the connection still fails, repeat steps 3 and 4 until the number of seed nodes used this time reaches the configured usage ratio.

[0043] 6. If no reachable link is found in the end, record the target node as "unreachable" and end.

[0044] Step 103: Control the target node to execute the target service request.

[0045] In some embodiments, the execution entity may control the target node to execute the target service request.

[0046] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: taking into comprehensive consideration accuracy, performance, and flexibility, in the subnet where the target node is located, certain nodes are designated manually or through automatic rules as seed nodes of the network agent. These seed nodes generally have features such as management network cards, and are more likely to be connected to other subnets. According to the specific requirements for performance and stability, the corresponding proportion of detection seed nodes and retry mechanism are configured, which can balance and flexibly adjust performance and robustness.

[0047] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a distributed database service request execution device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0048] like Figure 2 As shown, the distributed database service request execution device 200 of some embodiments includes: a determination unit 201, a sending unit 202 and an execution unit 203. The determination unit 201 is configured to, in response to determining that a source node has a target service request, determine a target node in a target subnet to execute the target service request according to the target service request; the sending unit 202 is configured to control the source node to send the target service request to the target node; and the execution unit 203 is configured to control the target node to execute the target service request.

[0049] It is understood that the units described in the device 200 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.

[0050] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: taking into comprehensive consideration accuracy, performance, and flexibility, in the subnet where the target node is located, certain nodes are designated manually or through automatic rules as seed nodes of the network agent. These seed nodes generally have features such as management network cards, and are more likely to be connected to other subnets. According to the specific requirements for performance and stability, the corresponding proportion of detection seed nodes and retry mechanism are configured, which can balance and flexibly adjust performance and robustness.

[0051] Reference below Figure 3, which shows a structural diagram of an electronic device (eg, an execution subject server of a distributed database service request execution method) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 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 disclosure.

[0052] like Figure 3 As shown, 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.

[0053] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, 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 devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0054] 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.

[0055] 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 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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: in response to determining that a target service request exists at a source node, determines a target node in a target subnet that executes the target service request according to the target service request; controls the source node to send the target service request to the target node; and controls the target node to execute the target service request.

[0060] 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).

[0061] 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.

[0062] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes a determination unit, a sending unit, and an execution unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances, for example, the determination unit may also be described as "in response to determining that a source node has a target service request, determining a target node in a target subnet that executes the above target service request according to the above target service request".

[0063] 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0064] 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-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A distributed database service request execution method, comprising: In response to determining that the source node has a target service request, determining a target node for executing the target service request in a target subnet according to the target service request; Controlling the source node to send the target service request to the target node; Controlling the target node to execute the target service request; The controlling the source node to send the target service request to the target node includes: Determine whether there is a link connection between the source node and the target subnet; In response to determining that a link connection exists between the source node and the target subnet, determining a proxy node of the source node in the target subnet; Controlling the source node to send the target service request to the target node through the proxy node; The controlling the source node to send the target service request to the target node includes: Determine whether there is a link connection between the source node and the target subnet; In response to determining that there is no link connection between the source node and the target subnet, determining whether the target node is a seed node; In response to determining that the target node is a seed node, controlling the source node to send the target service request to the target node; The controlling the source node to send the target service request to the target node comprises: Determine whether there is a link connection between the source node and the target subnet; In response to determining that there is no link connection between the source node and the target subnet, determining whether the target node is a seed node; In response to determining that the target node is not a seed node, determining a set of seed nodes in the target subnet; For each seed node in the seed node set, controlling the seed node to establish a link connection with the source node until a seed node that establishes a link connection with the source node exists in the seed node set; The seed node in the sub-node set that establishes a link connection with the source node is used as a proxy node, and the source node is controlled to send the target service request to the target node through the proxy node.

2. A device for executing a distributed database service request, comprising: a determining unit configured to, in response to determining that a target service request exists at a source node, determine a target node for executing the target service request in a target subnet according to the target service request; a sending unit, configured to control the source node to send the target service request to the target node; an execution unit, configured to control the target node to execute the target service request; The sending unit is further configured to: Determine whether there is a link connection between the source node and the target subnet; In response to determining that a link connection exists between the source node and the target subnet, determining a proxy node of the source node in the target subnet; Controlling the source node to send the target service request to the target node through the proxy node; The sending unit is further configured to: Determine whether there is a link connection between the source node and the target subnet; In response to determining that there is no link connection between the source node and the target subnet, determining whether the target node is a seed node; In response to determining that the target node is a seed node, controlling the source node to send the target service request to the target node; The sending unit is further configured to: Determine whether there is a link connection between the source node and the target subnet; In response to determining that there is no link connection between the source node and the target subnet, determining whether the target node is a seed node; In response to determining that the target node is not a seed node, determining a set of seed nodes in the target subnet; For each seed node in the seed node set, controlling the seed node to establish a link connection with the source node until a seed node that establishes a link connection with the source node exists in the seed node set; The seed node in the sub-node set that establishes a link connection with the source node is used as a proxy node, and the source node is controlled to send the target service request to the target node through the proxy node.

3. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in claim 1.

4. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to claim 1 is implemented.