CN112291343A - Information acquisition method and device and electronic equipment - Google Patents

Information acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN112291343A
CN112291343A CN202011177446.3A CN202011177446A CN112291343A CN 112291343 A CN112291343 A CN 112291343A CN 202011177446 A CN202011177446 A CN 202011177446A CN 112291343 A CN112291343 A CN 112291343A
Authority
CN
China
Prior art keywords
domain name
configuration information
cache space
information
target domain
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.)
Granted
Application number
CN202011177446.3A
Other languages
Chinese (zh)
Other versions
CN112291343B (en
Inventor
鲜世伟
王小虎
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Knownsec Information Technology Co ltd
Original Assignee
Chengdu Knownsec Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chengdu Knownsec Information Technology Co ltd filed Critical Chengdu Knownsec Information Technology Co ltd
Priority to CN202011177446.3A priority Critical patent/CN112291343B/en
Publication of CN112291343A publication Critical patent/CN112291343A/en
Application granted granted Critical
Publication of CN112291343B publication Critical patent/CN112291343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides an information acquisition method, an information acquisition device and electronic equipment, and relates to the technical field of networks, wherein the method comprises the steps of determining whether domain name information matched with a target domain name exists in a first cache space according to the target domain name; when determining that the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value; and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting the returned success information. According to the method, the safety of the domain name configuration information in the CDN system is guaranteed, when the target domain name is the domain name maintained by the system, the domain name configuration information is preferentially acquired in the cache space of the service node, and the efficiency of acquiring the domain name configuration information by the node is improved.

Description

Information acquisition method and device and electronic equipment
Technical Field
The invention relates to the technical field of networks, in particular to an information acquisition method, an information acquisition device and electronic equipment.
Background
A Content Delivery Network (CDN) is a Network facility capable of improving internet service quality, and increases the speed of accessing Network resources by a user by assigning a relatively close and smooth service node to the user. A CDN generally consists of a service cluster, a plurality of packets are provided inside the cluster, each packet includes a plurality of service nodes, domain name configuration information related to a service node is generally stored in one configuration file in a conventional CDN system, and when a service node needs to query certain domain name configuration information, the domain name configuration file is searched for by the service node.
Disclosure of Invention
The invention aims to provide an information acquisition method, an information acquisition device and electronic equipment, for example, to solve the problems of untimely acquisition of configuration information, low synchronization efficiency and the like of the existing CDN system service node.
Embodiments of the invention may be implemented as follows:
in a first aspect, an embodiment of the present invention provides an information obtaining method, where the information obtaining method is applied to a service node in a redis configuration storage system, where the service node is provided with a first cache space and a second cache space, and the method includes:
determining whether domain name information matched with a target domain name exists in a first cache space according to the target domain name; the first cache space stores all domain name information of the redis configuration storage system;
when it is determined that the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value;
and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information.
In an optional embodiment, when domain name configuration information matching the target domain name does not exist in the second cache space, the method further includes:
sending a configuration information acquisition request to a slave node corresponding to the group to which the service node belongs, wherein the configuration information acquisition request comprises the target domain name;
acquiring domain name configuration information returned by the slave node;
and returning the domain name configuration information to the corresponding process or service, and storing the domain name configuration information to the second cache space.
In an optional embodiment, the service node is provided with a third cache space, and the method further includes:
and updating the domain name configuration information to the third cache space, wherein the third cache space is used for storing all domain name configuration information of the group to which the service node belongs.
In an optional implementation manner, when obtaining the domain name configuration information from the slave node fails, the method further includes:
determining whether domain name configuration information matched with the target domain name exists in the third cache space or not according to the target domain name;
when the domain name configuration information matched with the target domain name exists in the third cache space, returning the domain name configuration information to a corresponding process or service, and outputting returned success information;
and outputting return failure information under the condition that the domain name configuration information matched with the target domain name does not exist in the third cache space.
In an optional implementation manner, the information obtaining method further includes:
acquiring all domain name information corresponding to the group from the slave node corresponding to the group to which the service node belongs at preset time intervals;
and updating all domain name information corresponding to the group to the first cache space.
In an alternative embodiment, the method further comprises:
and outputting return failure information under the condition that the domain name information matched with the target domain name does not exist in the first cache space.
In a second aspect, an embodiment of the present invention provides an information acquisition apparatus, which is applied to the information acquisition method according to any one of the foregoing embodiments, and the information acquisition apparatus includes:
the acquisition module is used for determining whether domain name information matched with the target domain name exists in a first cache space according to the target domain name; the first cache space stores all domain name information of the redis configuration storage system;
the obtaining module is further configured to determine whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name when it is determined that domain name information matched with the target domain name exists in the first cache space, where the second cache space stores domain name configuration information in which the service node usage frequency is higher than a set value;
and the synchronization module is used for returning the domain name configuration information to the corresponding process or service and outputting returned success information under the condition that the domain name configuration information matched with the target domain name exists in the second cache space.
In an optional embodiment, when the domain name configuration information matched with the target domain name does not exist in the second cache space, the obtaining module is further configured to send a configuration information obtaining request to a slave node corresponding to the group to which the service node belongs, where the configuration information obtaining request includes the target domain name and obtains domain name configuration information returned by the slave node;
the synchronization module is further configured to return the domain name configuration information to a corresponding process or service, and store the domain name configuration information in the second cache space.
In an optional embodiment, the service node is provided with a third cache space, the synchronization module is further configured to update the domain name configuration information to the third cache space, and the third cache space is configured to store all domain name configuration information of a group to which the service node belongs.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, and the processor is configured to execute computer-readable program instructions, where the computer-readable program instructions, when executed, implement the steps of the information acquisition method according to any one of the foregoing embodiments.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
according to the information acquisition method, whether domain name information matched with a target domain name exists in a first cache space is determined according to the target domain name; when it is determined that the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value; and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information. According to the method, the safety of the domain name configuration information in the CDN system is guaranteed, when the target domain name is the domain name maintained by the system, the domain name configuration information is preferentially acquired in the cache space of the service node, the efficiency of acquiring the domain name configuration information by the node is improved, meanwhile, the domain name information of all the domain names is stored in the first cache space of the service node, even if the groups are switched, the corresponding domain name configuration information can be acquired according to the related domain name information, and the risk that the node cannot serve some domain names after being migrated among different groups is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram of a redis configuration storage system provided in this embodiment;
fig. 2 is a schematic diagram of a service node provided in this embodiment;
fig. 3 is a schematic flowchart of an information obtaining method according to this embodiment;
fig. 4 is a schematic flow chart of another information acquisition method provided in this embodiment;
fig. 5 is a schematic flow chart of another information acquisition method provided in this embodiment;
fig. 6 is a schematic flow chart of another information acquisition method provided in this embodiment;
FIG. 7 is a schematic diagram of functional modules of the information acquisition device provided in the present embodiment;
fig. 8 is a schematic view of an electronic device provided in this embodiment.
Icon: 100-redis configuration storage system; 110-a host node; 120-slave node; 130-a service node; 300-an information acquisition device; 310-an acquisition module; 320-a synchronization module; 410-a processor; 411-a memory; 412-a bus; 413 — a communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance. It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
A Content Delivery Network (CDN) is a Network facility capable of improving internet service quality, and increases the speed of accessing Network resources by a user by assigning a relatively close and smooth service node to the user. A CDN generally consists of a service cluster, a plurality of packets are provided inside the cluster, each packet includes a plurality of service nodes, domain name configuration information related to a service node is generally stored in one configuration file in a conventional CDN system, and when a service node needs to query certain domain name configuration information, the domain name configuration file is searched for by the service node.
In order to improve the technical problem, the present application provides a redis configuration storage system 100, and referring to fig. 1, the redis configuration storage system 100 includes a master node 110(redis _ master), a plurality of slave nodes 120(redis _ slave), and a plurality of service nodes 130, where each slave node 120 manages a group correspondingly, and the group includes the plurality of service nodes 130.
In the redis configuration storage system 100, when domain name configuration information stored in the master node 110 changes, the domain name configuration information is synchronized to all the slave nodes 120, so as to ensure that the domain name configuration information stored in each slave node 120 is consistent with the domain name configuration information stored in the master node 110.
The service node 130 actively synchronizes domain name configuration information related to a group in which the service node 130 is located from the redis configuration storage system 100, wherein domain name information with a small relative information amount (for example, a domain name character string, a domain name www.163.com) is fully synchronized, domain name configuration information with a large relative information amount (www.163.com: { white list: { ip address 1, ip address 2. }, interception mode: blocking, ipv6: closing, and other information about actions executed by accessing the domain name }), and only part of information related to the group in which the service node 130 is located is synchronized, so that the safety of domain name configuration information with a large data volume can be ensured, the reading efficiency is ensured, and if the service node 130 switches among different service groups, the efficiency is not affected.
Based on the redis configuration storage system shown in fig. 1, an embodiment of the present invention provides an information obtaining method, where the information obtaining method is applied to a service node in the redis configuration storage system, please refer to fig. 2, where the service node is provided with a first cache space, a second cache space, and a third cache space, where the first cache space is used to store all domain name information of the redis configuration storage system, the second cache space is used to store domain name configuration information with a higher frequency of use of the service node, and the third cache space is used to store all domain name configuration information of a group to which the service node belongs, and in a possible implementation manner, the domain name information may be information that can represent a domain name, such as a domain name string; the domain name configuration information is related information about the domain name access execution action, and understandably, the storage space occupied by the domain name information is small, and the storage space occupied by the domain name configuration information is large. Referring to fig. 3 based on the system architecture, fig. 3 is a schematic flow chart of the information acquisition method provided in the present embodiment, where the information acquisition method includes steps S210 to S230.
210: and determining whether domain name information matched with the target domain name exists in the first cache space according to the target domain name.
The CDN cluster comprises a plurality of groups, each group comprises a plurality of machines, each machine serves as a service node, a plurality of service processes are operated or maintained on each service node, and the service processes need to acquire domain name configuration information. When domain name configuration information needs to be acquired, firstly, whether domain name information matched with a target domain name exists in a first cache space is determined according to the target domain name, since all domain name information of a redis configuration storage system is stored in the first cache space, whether the domain name information matched with the target domain name exists is determined according to the searching or matching of the target domain name in the first cache space, if so, the domain name is indicated to belong to a domain name maintained by the redis configuration storage system (hereinafter referred to as the system), and the step 220 is executed; if the domain name information matched with the target domain name does not exist in the first cache space, it indicates that the domain name does not belong to the domain name maintained by the present redis configuration storage system, and step 211 is executed.
Step 220: and when determining that the domain name information matched with the target domain name exists in the first cache space, determining whether the domain name configuration information matched with the target domain name exists in the second cache space according to the target domain name.
The second cache space is used for storing domain name configuration information with higher service node use frequency, for example, storing domain name configuration information with higher service node use frequency than a set value. When the target domain name is determined to belong to the domain name maintained by the system, determining whether domain name configuration information matched with the target domain name exists in the second cache space according to the target domain name, if so, directly calling the domain name configuration information, improving the efficiency of acquiring the domain name configuration information, and executing step 230; if the domain name configuration information matched with the target domain name does not exist in the second cache space, it indicates that the target domain name is an unusual domain name, and the slave computer needs to acquire the relevant domain name configuration information, and then step 240 is executed.
Step 230: and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information.
And when the domain name configuration information matched with the target domain name exists in the second cache space, calling and returning by using an internal function interface, returning the domain name configuration information matched with the target domain name to the corresponding process or service, and outputting the returned success information.
In the information obtaining method provided in this embodiment, whether domain name information matched with a target domain name exists in a first cache space is determined according to the target domain name; when the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value; and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information. According to the method, the safety of the domain name configuration information in the CDN system is guaranteed, when the target domain name is the domain name maintained by the system, the domain name configuration information is preferentially acquired in the cache space of the service node, and the efficiency of acquiring the domain name configuration information by the node is improved.
In some possible implementations, referring to fig. 4, in order to ensure timeliness of domain name information, when initializing a service node, the information obtaining method further includes:
step 201: and acquiring all domain name information corresponding to the group from the slave node corresponding to the group to which the service node belongs at preset time intervals.
And acquiring all domain name information from the slave node at preset time intervals. All the domain name information corresponding to the group refers to the domain name information of all the domain names maintained by the system.
Step 202: and updating all domain name information corresponding to the groups to the first cache space.
The domain name information corresponding to the group is updated to the first cache space to ensure that the domain name information of the latest version is always stored in the first cache space, and because the domain name information of all the domain names maintained by the system is stored in the first cache space, even if the service node switches the group, when the relevant domain name configuration information needs to be obtained, the correct judgment can be made according to the target domain name (namely, whether the target domain name is available is determined), if the domain name information matched with the target domain name exists in the first cache space, the target domain name is indicated to be available, and the domain name configuration information corresponding to the target domain name can be obtained from the second cache space or a slave node to which the group belongs.
In some possible implementations, referring to fig. 5, the information obtaining method further includes:
step 211: and outputting return failure information under the condition that the domain name information matched with the target domain name does not exist in the first cache space.
If the first cache space does not have domain name information matched with the target domain name, the first cache space stores the domain name information of all domain names maintained by the system in the latest version, so that if the first cache space does not have related domain name information, the target domain name does not belong to the domain name maintained by the system, the domain name is unavailable, and return failure information is output.
In some possible implementation manners, the second cache space is used to store domain name configuration information with a higher service node usage frequency, and when the domain name configuration information matched with the target domain name does not exist in the second cache space, it indicates that the domain name configuration information is domain name configuration information at the bottom of the service node usage frequency, and it is required to acquire related domain name configuration information from the slave, referring to fig. 6, the information acquisition method further includes:
step 240: and sending a configuration information acquisition request to a slave node corresponding to the group to which the service node belongs, wherein the configuration information acquisition request comprises a target domain name.
When the domain name information matched with the target domain name exists in the first cache space and the domain name configuration information matched with the target domain name does not exist in the second cache space, the fact that the target domain name is the maintained domain name of the group to which the service node belongs but is not the common domain name of the service node is indicated, due to the fact that the use frequency is low, in order to guarantee timeliness of the domain name configuration information, a configuration information acquisition request is sent to a slave node corresponding to the group to which the service node belongs, the configuration information acquisition request comprises the target domain name, and therefore the domain name configuration information matched with the target domain name can be acquired from the corresponding slave node.
Step 250: and acquiring domain name configuration information returned by the slave node.
And after receiving the configuration information acquisition request of the service node, the slave node returns the domain name configuration information matched with the target domain name to the service node, and the service node acquires the domain name configuration information returned by the slave node.
Step 260: and returning the domain name configuration information to the corresponding process or service, and storing the domain name configuration information to the second cache space.
And after the domain name configuration information returned by the slave node is acquired, returning the domain name configuration information matched with the target domain name to the corresponding process or service by using the internal function interface, and storing the domain name configuration information to a second cache space. In a possible implementation manner, the second cache space may be optimized by using a Least Recently Used (LRU) algorithm, and only the domain name configuration information with a high recent usage frequency is stored, so as to ensure high efficiency of the service node in acquiring the domain name configuration information.
Step 270: and updating the domain name configuration information to a third cache space, wherein the third cache space is used for storing all domain name configuration information of the group to which the service node belongs.
And after storing the domain name configuration information to the second cache space, updating the domain name configuration information to a third cache space, wherein the third cache space is used for storing all the domain name configuration information of the group to which the service node belongs. It can be understood that the version of the domain name configuration information stored in the third cache space is older, the related domain name configuration information is stored in the third storage space, and when the latest domain name configuration information cannot be acquired from the slave node of the group to which the domain name configuration information belongs, the related domain name configuration information can be acquired from the third storage space.
In some possible implementations, when obtaining the domain name configuration information from the slave node fails, the method further includes:
step 241: and determining whether domain name configuration information matched with the target domain name exists in the third cache space according to the target domain name.
Failure to acquire domain name configuration information from the slave node corresponding to the belonging group may be caused by communication failure or by operation error of a worker. And if the latest domain name configuration information cannot be acquired from the slave node corresponding to the group, according to whether the domain name configuration information matched with the target domain name exists in the third cache space of the target domain name.
And when the domain name configuration information matched with the target domain name exists in the third cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information.
And outputting return failure information under the condition that the domain name configuration information matched with the target domain name does not exist in the third cache space.
It can be understood that, when normal communication with the slave node cannot be successfully established, the scheme provided in this embodiment may acquire the domain name configuration information of the "older version" from the third cache space to meet the user requirement, and after a connection is successfully established with the slave node and the updated domain name configuration information is acquired, the updated domain name configuration information is also updated to the third storage space so as to be used when communication cannot be successfully established with the slave node.
In order to execute the corresponding steps in the foregoing embodiments and various possible implementations, an implementation of the log processing apparatus is provided below, please refer to fig. 7, and fig. 7 is an information obtaining apparatus 300 according to a preferred embodiment of the present invention. It should be noted that the basic principle and the technical effect of the information acquiring apparatus 300 provided in the present embodiment are substantially the same as those of the information acquiring method provided in the above embodiment, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiment. The information acquiring apparatus 300 of the present embodiment includes an acquiring module 310 and a synchronizing module 320.
An obtaining module 310, configured to determine whether domain name information matched with a target domain name exists in a first cache space according to the target domain name; the first cache space stores all domain name information of the redis configuration storage system.
It is to be understood that, in one possible implementation manner, the obtaining module 310 may be configured to execute the step 210 in the above-mentioned figures to achieve the corresponding technical effect.
The obtaining module 310 is further configured to determine whether domain name configuration information matching the target domain name exists in a second cache space according to the target domain name when it is determined that domain name information matching the target domain name exists in the first cache space, where the second cache space stores domain name configuration information whose service frequency of the service node is higher than a set value.
It is to be understood that, in one possible implementation manner, the obtaining module 310 may be configured to execute the step 220 in the above-mentioned figures to achieve the corresponding technical effect.
The synchronization module 320 is configured to, when domain name configuration information matching the target domain name exists in the second cache space, return the domain name configuration information to the corresponding process or service, and output return success information.
It will be appreciated that in one possible implementation, the synchronization module 320 may be configured to perform step 230 in the above-described figures to achieve a corresponding technical effect.
In some possible implementation manners, when the domain name configuration information matched with the target domain name does not exist in the second cache space, the obtaining module 310 is further configured to send a configuration information obtaining request to a slave node corresponding to the group to which the service node belongs, where the configuration information obtaining request includes the target domain name, and obtain domain name configuration information returned by the slave node.
It is understood that, in a possible implementation manner, the obtaining module 310 may also be configured to perform steps 240 to 250 in the above-mentioned figures to achieve a corresponding technical effect.
The synchronization module 320 is further configured to return the domain name configuration information to the corresponding process or service, and store the domain name configuration information in the second cache space. In some possible implementation manners, the service node is provided with a third cache space, the synchronization module is further configured to update the domain name configuration information to the third cache space, and the third cache space is used to store all domain name configuration information of the group to which the service node belongs.
It is to be understood that, in one possible implementation, the synchronization module 320 may be configured to perform the steps 260 to 270 in the above-mentioned figures to achieve the corresponding technical effect.
An embodiment of the present invention further provides an electronic device, which may be the service node shown in fig. 1. Referring to fig. 8, fig. 8 is a schematic structural diagram of the electronic device according to the embodiment. The electronic device includes a processor 410, a memory 411, and a bus 412. The processor 410 and the memory 411 are connected by a bus 412, and the processor 410 is used for executing executable modules stored in the memory 411, such as computer readable program instructions, which when executed by the processor 410 implement the steps of the information acquisition method provided by the above-mentioned embodiments.
The processor 410 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the information obtaining method provided by this embodiment may be implemented by integrated logic circuits of hardware in the processor 410 or instructions in the form of software. The Processor 410 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The Memory 411 may include a Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The bus 412 may be an ISA (Industry Standard architecture) bus, a PCI (peripheral Component interconnect) bus, an EISA (extended Industry Standard architecture) bus, or the like. Only one bi-directional arrow is shown in fig. 8, but this does not indicate only one bus 412 or one type of bus 412.
The memory 411 is used for storing programs such as program instructions corresponding to the information acquisition apparatus. The information acquiring means includes at least one software functional module which may be stored in the memory 411 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device. The processor 410, upon receiving the execution instruction, executes the program to implement the steps of the information acquisition method.
Possibly, the electronic device provided in the embodiment of the present application further includes a communication interface 413. Communication interface 413 is connected to processor 410 by a bus. This communication interface 413 may be used to enable communication with a slave node to obtain domain name information or domain name configuration information from the slave node of the packet to which it belongs.
It should be understood that the structure shown in fig. 8 is only a schematic structural diagram of a portion of an electronic device, and the electronic device may further include more or less components than those shown in fig. 8, or have a different configuration than that shown in fig. 8, and each component shown in fig. 8 may be implemented in hardware, software, or a combination thereof.
In summary, the information obtaining method provided by the present application determines whether domain name information matching a target domain name exists in a first cache space according to the target domain name; when the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value; and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information. According to the method, the safety of the domain name configuration information in the CDN system is guaranteed, the domain name configuration information is preferentially obtained in the cache space of the service node, the efficiency of the node for reading the domain name configuration information is improved, meanwhile, the domain name information of all domain names is stored in the first cache space of the service node, even if the grouping is switched, the corresponding domain name configuration information can be obtained according to the related domain name information, and the risk that the node cannot serve some domain names after being migrated among different groupings is reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An information obtaining method is applied to a service node in a redis configuration storage system, wherein the service node is provided with a first cache space and a second cache space, and the method comprises the following steps:
determining whether domain name information matched with a target domain name exists in a first cache space according to the target domain name; the first cache space stores all domain name information of the redis configuration storage system;
when it is determined that the domain name information matched with the target domain name exists in the first cache space, determining whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name, wherein the second cache space stores the domain name configuration information of which the service node use frequency is higher than a set value;
and when the domain name configuration information matched with the target domain name exists in the second cache space, returning the domain name configuration information to the corresponding process or service, and outputting returned success information.
2. The information acquisition method according to claim 1, wherein when domain name configuration information matching the target domain name does not exist in the second cache space, the method further comprises:
sending a configuration information acquisition request to a slave node corresponding to the group to which the service node belongs, wherein the configuration information acquisition request comprises the target domain name;
acquiring domain name configuration information returned by the slave node;
and returning the domain name configuration information to the corresponding process or service, and storing the domain name configuration information to the second cache space.
3. The information acquisition method according to claim 2, wherein the service node is provided with a third cache space, and the method further comprises:
and updating the domain name configuration information to the third cache space, wherein the third cache space is used for storing all domain name configuration information of the group to which the service node belongs.
4. The information acquisition method according to claim 2, wherein when acquiring domain name configuration information from the slave node fails, the method further comprises:
determining whether domain name configuration information matched with the target domain name exists in a third cache space or not according to the target domain name; the third cache space is used for storing all domain name configuration information of the group to which the service node belongs;
when the domain name configuration information matched with the target domain name exists in the third cache space, returning the domain name configuration information to a corresponding process or service, and outputting returned success information;
and outputting return failure information under the condition that the domain name configuration information matched with the target domain name does not exist in the third cache space.
5. The information acquisition method according to claim 1, characterized by further comprising:
acquiring all domain name information corresponding to the group from the slave node corresponding to the group to which the service node belongs at preset time intervals;
and updating all domain name information corresponding to the group to the first cache space.
6. The information acquisition method according to claim 1, characterized in that the method further comprises:
and outputting return failure information under the condition that the domain name information matched with the target domain name does not exist in the first cache space.
7. An information acquisition apparatus to which the information acquisition method according to any one of claims 1 to 6 is applied, the information acquisition apparatus comprising:
the acquisition module is used for determining whether domain name information matched with the target domain name exists in a first cache space according to the target domain name; the first cache space stores all domain name information of the redis configuration storage system;
the obtaining module is further configured to determine whether domain name configuration information matched with the target domain name exists in a second cache space according to the target domain name when it is determined that domain name information matched with the target domain name exists in the first cache space, where the second cache space stores domain name configuration information in which the service node usage frequency is higher than a set value;
and the synchronization module is used for returning the domain name configuration information to the corresponding process or service and outputting returned success information under the condition that the domain name configuration information matched with the target domain name exists in the second cache space.
8. The information acquisition device according to claim 7, wherein when domain name configuration information that matches the target domain name does not exist in the second cache space, the acquisition module is further configured to send a configuration information acquisition request to a slave node corresponding to a group to which the service node belongs, where the configuration information acquisition request includes the target domain name, and acquire domain name configuration information returned by the slave node;
the synchronization module is further configured to return the domain name configuration information to a corresponding process or service, and store the domain name configuration information in the second cache space.
9. The information acquisition device according to claim 8, wherein the service node is provided with a third cache space, the synchronization module is further configured to update the domain name configuration information to the third cache space, and the third cache space is configured to store all domain name configuration information of the group to which the service node belongs.
10. An electronic device, comprising a processor configured to execute computer-readable program instructions that, when executed, implement the steps of the information acquisition method of any of claims 1-6.
CN202011177446.3A 2020-10-28 2020-10-28 Information acquisition method and device and electronic equipment Active CN112291343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011177446.3A CN112291343B (en) 2020-10-28 2020-10-28 Information acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011177446.3A CN112291343B (en) 2020-10-28 2020-10-28 Information acquisition method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112291343A true CN112291343A (en) 2021-01-29
CN112291343B CN112291343B (en) 2022-11-22

Family

ID=74373806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011177446.3A Active CN112291343B (en) 2020-10-28 2020-10-28 Information acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112291343B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695049A (en) * 2022-12-29 2023-02-03 江苏云工场信息技术有限公司 CDN metadata distribution method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096166A (en) * 2011-10-18 2013-05-08 南京中新赛克科技有限责任公司 Internet protocol television (IPTV) front-end monitoring system and method
CN105025025A (en) * 2015-07-22 2015-11-04 国家计算机网络与信息安全管理中心 Cloud-platform-based domain name active detecting method and system
CN106612339A (en) * 2015-10-27 2017-05-03 中国电信股份有限公司 Domain name updating method, system and main DNS (Domain Name System) server
CN108064444A (en) * 2017-04-19 2018-05-22 北京大学深圳研究生院 A kind of domain name analysis system based on block chain
CN108881515A (en) * 2018-07-09 2018-11-23 迈普通信技术股份有限公司 Domain name analytic method, device and the network equipment
WO2019080673A1 (en) * 2017-10-27 2019-05-02 华为技术有限公司 Domain name access method and device
CN109714443A (en) * 2017-10-25 2019-05-03 中国电信股份有限公司 Name server, domain name backup method and computer readable storage medium
CN110445886A (en) * 2019-07-05 2019-11-12 网宿科技股份有限公司 A kind of method and system realizing domain name access and accelerating
WO2019237557A1 (en) * 2018-06-13 2019-12-19 网宿科技股份有限公司 Method and device for controlling multi-cname traffic ratio
CN111327461A (en) * 2020-01-23 2020-06-23 华为技术有限公司 Domain name management method, device, equipment and medium based on CDN system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096166A (en) * 2011-10-18 2013-05-08 南京中新赛克科技有限责任公司 Internet protocol television (IPTV) front-end monitoring system and method
CN105025025A (en) * 2015-07-22 2015-11-04 国家计算机网络与信息安全管理中心 Cloud-platform-based domain name active detecting method and system
CN106612339A (en) * 2015-10-27 2017-05-03 中国电信股份有限公司 Domain name updating method, system and main DNS (Domain Name System) server
CN108064444A (en) * 2017-04-19 2018-05-22 北京大学深圳研究生院 A kind of domain name analysis system based on block chain
CN109714443A (en) * 2017-10-25 2019-05-03 中国电信股份有限公司 Name server, domain name backup method and computer readable storage medium
WO2019080673A1 (en) * 2017-10-27 2019-05-02 华为技术有限公司 Domain name access method and device
WO2019237557A1 (en) * 2018-06-13 2019-12-19 网宿科技股份有限公司 Method and device for controlling multi-cname traffic ratio
CN108881515A (en) * 2018-07-09 2018-11-23 迈普通信技术股份有限公司 Domain name analytic method, device and the network equipment
CN110445886A (en) * 2019-07-05 2019-11-12 网宿科技股份有限公司 A kind of method and system realizing domain name access and accelerating
CN111327461A (en) * 2020-01-23 2020-06-23 华为技术有限公司 Domain name management method, device, equipment and medium based on CDN system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
左晓军等: "基于域名系统流量的Fast-Flux僵尸网络检测方法", 《计算机工程》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695049A (en) * 2022-12-29 2023-02-03 江苏云工场信息技术有限公司 CDN metadata distribution method and device

Also Published As

Publication number Publication date
CN112291343B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN108234641B (en) Data reading and writing method and device based on distributed consistency protocol
CN109587271B (en) Main chain parallel chain architecture system, block synchronization method, equipment and storage medium
CN111327647B (en) Method and device for providing service to outside by container and electronic equipment
CN111182089A (en) Container cluster system, method and device for accessing big data assembly and server
CN107181686B (en) Method, device and system for synchronizing routing table
CN106873970B (en) Installation method and device of operating system
CN107357885B (en) Data writing method and device, electronic equipment and computer storage medium
CN111400777B (en) Network storage system, user authentication method, device and equipment
CN104268229A (en) Resource obtaining method and device based on multi-process browser
CN113434249A (en) Mirror image synchronization method and device, docker host and storage medium
CN112954088A (en) Equipment address allocation method and equipment of CAN network and electronic equipment
CN109756533B (en) Mirror image acceleration method and device and server
CN111064786B (en) Account identifier management method and device
CN112291343B (en) Information acquisition method and device and electronic equipment
CN111444278A (en) Data synchronization method and device and transfer server
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN109617817B (en) Method and device for generating forwarding table entry of MLAG networking
CN112637339A (en) Network acceleration method and device, electronic equipment and storage medium
CN110798358A (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN112000850A (en) Method, device, system and equipment for data processing
CN111708763A (en) Data migration method and device of fragment cluster and fragment cluster system
CN113541987A (en) Method and device for updating configuration data
CN111367921A (en) Data object refreshing method and device
CN115993979A (en) Configuration conversion method, smooth upgrading method, device, equipment and storage medium
US9378140B2 (en) Least disruptive cache assignment

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 9/F, Building C, No. 28, North Tianfu Avenue, China (Sichuan) Pilot Free Trade Zone, Hi tech Zone, Chengdu, 610000, Sichuan

Patentee after: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 610000, 11th floor, building 2, no.219, Tianfu Third Street, Chengdu pilot Free Trade Zone, hi tech Zone, Chengdu, Sichuan Province 610000

Patentee before: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.