Domain name management method and system, storage medium and electronic device

By establishing a domain name business fingerprint database and calculating similarity to optimize cache management, the problem of cache storage redundancy caused by similar domain names in security equipment has been solved, achieving efficient and accurate domain name replacement and improving resource utilization.

CN121000697APending Publication Date: 2025-11-21ZHEJIANG DAHUA TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511287821.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In the security industry, IoT devices in real-time video streaming and cloud data synchronization scenarios suffer from unresolved cache storage redundancy issues due to frequent changes and expansions of similar domain names.

Method used

By establishing a domain name business fingerprint database, calculating domain name similarity using edit distance and weight coefficients, and combining business type and lifespan, we can optimize cache database management, eliminate low-priority or redundant domain names, and achieve efficient and accurate domain name replacement.

Benefits of technology

It effectively solves the problem of cache storage redundancy, improves the accuracy and efficiency of domain name management, and reduces the waste of cache resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000697A_ABST
    Figure CN121000697A_ABST
Patent Text Reader

Abstract

The invention discloses a domain name management method and device, a storage medium and an electronic device, and the method comprises the steps: determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint database, and the domain name service fingerprint database is used for storing a plurality of third domain names; under the condition that it is determined that the second domain name does not exist in the domain name service fingerprint database, the relative editing distance between a first field of the first domain name and a second field of a fourth domain name is determined according to the editing distance between the first field of the first domain name and the second field of the fourth domain name, the fourth domain name is stored in a cache database, and the cache database is used for storing a plurality of fifth domain names; the plurality of fifth domain names comprise a plurality of third domain names; determining the comprehensive similarity of the first field relative to the second field according to the relative editing distance and a first weight coefficient corresponding to the first field type; and determining whether to manage a plurality of fifth domain names in the cache database according to the comprehensive similarity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, in particular to a domain name management method and system, a storage medium and an electronic device. BACKGROUND

[0002] In real-time video stream transmission and cloud data synchronization scenarios, security industry Internet of Things devices need to establish an accurate domain name resolution mechanism to ensure fast stream pulling and efficient cloud uploading capabilities. Since security services involve cloud video, cloud pictures and other types of services, their associated domain names are often dynamically adjusted according to business strategies or load balancing. Due to frequent changes and expansion of domain names, similar services may cache multiple similar but not completely identical domain names, resulting in redundant cache storage.

[0003] For the problem of redundant cache storage caused by similar domain names in the related art, an effective solution has not been proposed. SUMMARY

[0004] Embodiments of the present application provide a domain name management method and device, a storage medium and an electronic device to at least solve the problem of redundant cache storage caused by similar domain names in the related art.

[0005] According to an embodiment of the present application, a domain name management method is provided, comprising: determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names; in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determining a relative edit distance of a first field of the first domain name and a second field of a fourth domain name according to an edit distance of the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names; determining a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; and determining whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0006] In an example embodiment, after determining whether a second domain name consistent with the first domain name exists in the domain name service fingerprint library, the method further comprises: in a case where it is determined that the second domain name exists in the domain name service fingerprint library, obtaining a first service type corresponding to the first domain name and a plurality of second service types corresponding to the plurality of third domain names one by one; determining a first priority of the first service type and a plurality of second priorities of the plurality of second service types according to a formula: i-th priority = a x (service weight of i-th service type) + b x (access frequency of the i-th service type) + g x (service life cycle of the i-th service type), where i is a positive integer, a, b, g are adjustable coefficients, the plurality of second service types correspond to the plurality of second priorities one by one; in a case where it is determined that a fourth priority with the lowest priority exists in a plurality of third priorities, and a quantity of sixth domain names corresponding to the fourth priority is a preset quantity, deleting the sixth domain names in the cache database, wherein the plurality of third priorities include the first priority and the plurality of second priorities.

[0007] In an example embodiment, before determining whether a second domain name consistent with the first domain name exists in the domain name service fingerprint library, the method further comprises: periodically obtaining a plurality of first survival times of the plurality of third domain names through a timer, wherein the plurality of third domain names correspond to the plurality of first survival times one by one; in a case where it is determined that a second survival time is less than or equal to a first preset value in the plurality of first survival times, updating a seventh domain name corresponding to the second survival time.

[0008] In an example embodiment, before determining whether a second domain name consistent with the first domain name exists in the domain name service fingerprint library, the method further comprises: determining a plurality of third service types corresponding to a plurality of fifth domain names, wherein the plurality of fifth domain names correspond to the plurality of third service types one by one; determining a plurality of structures of the plurality of fifth domain names according to service feature codes of the plurality of third service types and the plurality of fifth domain names, wherein the plurality of structures correspond to the plurality of fifth domain names one by one, and the plurality of structures are used to indicate the plurality of third service types.

[0009] In an example embodiment, the relative edit distance between the first field of the first domain name and the second field of the fourth domain name is determined according to an edit distance between the first field and the second field, comprising: in a case where the first field type is a field type allowing modification, determining a first parameter L i : in a case where the first field type is a field type not allowing modification, determining the first parameter L i : The relative edit distance RED(i X ,i Y ) is determined according to the following formula: where ED(i X ,i Y ) is the edit distance, and L i is the first parameter.

[0010] In an example embodiment, determining the comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient comprises: determining the comprehensive similarity D(X, Y) according to the following formula: D(X, Y) =∑ i∈{R,S,N,O} w i ·RED(i X ,i Y ), where R is a region field type, S is a service field type, N is a number field type, O is a field type other than the region field type, the service field type, and the number field type, and w i is the first weight coefficient.

[0011] In an example embodiment, before determining the comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, the method further comprises: determining the first weight coefficient as a first value in a case where the first field type is the service field type or the other field type; determining the first weight coefficient as a second value in a case where the first field type is the region field type; and determining the first weight coefficient as a third value in a case where the first field type is the number field type, where the first value is greater than the second value, and the second value is greater than the third value.

[0012] According to another embodiment of the present application, a domain name management system is also provided, comprising: a first determining module configured to determine whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is configured to store a plurality of third domain names; a second determining module configured to, when it is determined that the second domain name does not exist in the domain name service fingerprint library, determine a relative edit distance between a first field of the first domain name and a second field of a fourth domain name according to an edit distance between the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, the fourth domain name is stored in a cache database, the cache database is configured to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names; a third determining module configured to determine a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is configured to determine whether the first field and the second field are similar; and an adding module configured to determine whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0013] According to another aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the above-mentioned domain name management method when running.

[0014] According to yet another aspect of the present application, an electronic device is also provided, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the above-mentioned domain name management method through the computer program.

[0015] In the embodiment of the present application, first, it is determined whether a second domain name consistent with the first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names; in the case that it is determined that the second domain name does not exist in the domain name service fingerprint library, a relative edit distance of a first field of the first domain name and a second field of a fourth domain name is determined according to an edit distance of the first field and the second field, wherein the first field type of the first field and the second field type of the second field are the same, and the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names contain the plurality of third domain names; further, a comprehensive similarity of the first field relative to the second field is determined according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; finally, it is determined whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity. By using the above technical scheme, the problem of cache storage redundancy caused by similar domain names in the related art is solved, and efficient and accurate domain name replacement is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0016] The drawings described herein are used to provide further understanding of the present application, form a part of the present application, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute improper limitation on the present application. In the drawings:

[0017] Figure 1 is a hardware structure block diagram of a camera device of a domain name management method according to an embodiment of the present application;

[0018] Figure 2 is a flow chart of a domain name management method according to an embodiment of the present application;

[0019] Figure 3 is a first schematic diagram of a domain name management method according to an embodiment of the present application;

[0020] Figure 4 is a second schematic diagram of a domain name management method according to an embodiment of the present application;

[0021] Figure 5 is a structure block diagram of a domain name management system according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should be within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] The method embodiments provided by the embodiments of the present application can be executed in a camera device or similar operation system. Taking the running on the camera device as an example, Figure 1 is a hardware structure block diagram of a camera device of a domain name management method according to an embodiment of the present application. As shown in Figure 1 , the computer terminal can include one or more (only one is shown in Figure 1 ) processor 102 (the processor 102 can include but is not limited to a processing system such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, in an exemplary embodiment, the above-mentioned camera device can also include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned computer terminal. For example, the camera device can also include more or less components than Figure 1 shown, or have a different configuration with the same function as Figure 1 or more functions than Figure 1 shown.

[0025] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the domain name management method in the embodiments of the present application. The processor 102 performs various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage systems, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the secure text through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0026] The transmission system 106 is used to receive or send data via a network. Specific examples of the above network can include a wireless network provided by a communication provider of the camera device. In one example, the transmission system 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.

[0027] In the embodiments, a domain name management method is provided, which is applied to the above camera device, Figure 2 is a flowchart of a domain name management method according to the embodiments of the present application, which includes the following steps:

[0028] In step S202, it is determined whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names.

[0029] In step S204, in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, a relative edit distance of a first field of the first domain name and a second field of a fourth domain name is determined according to an edit distance of the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names.

[0030] In step S206, a comprehensive similarity of the first field with respect to the second field is determined according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar.

[0031] Step S208, determining whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0032] In the embodiment of the present application, first, it is determined whether a second domain name consistent with the first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names; in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, a relative edit distance of a first field of the first domain name and a second field of a fourth domain name is determined according to an edit distance of the first field and the second field, wherein the first field type of the first field and the second field type of the second field are the same, and the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names contain the plurality of third domain names; further, a comprehensive similarity of the first field relative to the second field is determined according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; finally, it is determined whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity. Therefore, the problem of cache storage redundancy caused by similar domain names in the related art can be solved, and efficient and accurate domain name replacement is achieved.

[0033] In one exemplary embodiment, after it is determined whether a second domain name consistent with the first domain name exists in a domain name service fingerprint library, the method further comprises: in a case where it is determined that the second domain name exists in the domain name service fingerprint library, a first service type corresponding to the first domain name and a plurality of second service types corresponding to the plurality of third domain names are obtained; a first priority of the first service type and a plurality of second priorities of the plurality of second service types are determined according to the following formula: i-th priority = α × (service weight of i-th service type) + β × (access frequency of the i-th service type) + γ × (survival period of the i-th service type), wherein i is a positive integer, α, β, γ are adjustable coefficients, and the plurality of second service types correspond to the plurality of second priorities one by one; in a case where it is determined that a fourth priority with the lowest priority exists in the plurality of third priorities, and the number of sixth domain names corresponding to the fourth priority is a preset number, the sixth domain names are deleted from the cache database, wherein the plurality of third priorities include the first priority and the plurality of second priorities.

[0034] First, it's necessary to check if a second domain similar to or related to the first domain to be inserted already exists in the domain business fingerprint database. If the second domain exists in the database, the business types associated with the first domain and multiple third domains (stored in the cache database) are obtained, namely the first business type and multiple second business types. Then, the priority of each business type is calculated based on its different attributes (business weight, access frequency, and lifespan). Business weight reflects the importance of the business itself, access frequency reflects the activity of the business, and lifespan indicates the expected lifespan or stability of the business. After calculating the priorities of the first business type and multiple second business types, the size of multiple third priorities is compared. These multiple third priorities include the first priority and multiple second priorities. If there is a lowest priority fourth priority among the multiple third priorities, for example, if there are domains A, B, C, and D, and their priorities are in the order of domain A > domain B > domain C > domain D, and domain D is unique, then domain D is evicted from the cache database.

[0035] In an exemplary embodiment, before determining whether there is a second domain name consistent with the first domain name in the domain name business fingerprint database, the method further includes: periodically acquiring multiple first lifetimes of the multiple third domain names through a timer, wherein the multiple third domain names correspond one-to-one with the multiple first lifetimes; and updating the seventh domain name corresponding to the second lifetime if it is determined that there is a second lifetime less than or equal to a first preset value among the multiple first lifetimes.

[0036] A timer mechanism is used to continuously track and monitor the first lifetime of multiple third-party domains in the domain name business fingerprint database to ensure their validity. When one or more second lifetimes among the multiple first lifetimes are detected to be less than or equal to a first preset value, the seventh domain corresponding to the aforementioned one or more second lifetimes is updated to extend the lifetime of high-value domains.

[0037] Optionally, assume that the domain name business fingerprint database stores 10 third-party domains. The lifespan (first lifespan) of these 10 third-party domains is periodically monitored by a timer. If the lifespan (second lifespan) of two sixth-party domains among these 10 third-party domains is less than or equal to a first preset value (e.g., 30%), then the lifespan of these two seventh-party domains is updated.

[0038] In an example embodiment, before determining whether the second domain name consistent with the first domain name exists in the domain name service fingerprint library, the method further comprises: determining a plurality of third service types corresponding to a plurality of fifth domain names, wherein the plurality of fifth domain names and the plurality of third service types are in one-to-one correspondence; determining a plurality of structures of the plurality of fifth domain names according to the service characteristic codes of the plurality of third service types and the plurality of fifth domain names, wherein the plurality of structures and the plurality of seventh domain names are in one-to-one correspondence, and the plurality of structures are used to indicate the plurality of third service types.

[0039] A conventional Domain Name System (DNS) client is only responsible for domain name resolution and does not carry service type information. In this application, service type information will be embedded into the DNS client, so that the client can consider service types when performing domain name resolution, thereby realizing service-aware cache management. This is usually achieved by the server platform issuing a service type rule library to the DNS client, and the client resolves and marks the domain name according to these rules. Specifically, a plurality of third service types corresponding to a plurality of seventh domain names are determined, wherein the plurality of third service types include different service scenarios or functions, such as login, registration, video streaming, etc. The definition of these third service types is standardized, and each service type is assigned a unique integer value, starting from unknown type = 0 to service type = N. This allows the service type to be encoded in numerical form (equivalent to a service characteristic code), which is convenient for computer understanding and processing.

[0040] The above-mentioned service characteristic code is embedded into the DNS client, and a structure Domain Descriptor is defined, wherein the structure Domain Descriptor includes three main fields: domain name identifier, service characteristic code, and extension storage area. The domain name identifier is used to store the domain name itself, with a maximum length of 256 bytes. The service characteristic code is the value corresponding to the plurality of third service types, which is used to represent the service type associated with the domain name. The extension storage area is a byte array used to store additional information that may be needed, such as the resolution history of the domain name, access frequency, etc., with a maximum length of 64 bytes. In this way, the DNS client can create a structure Domain Descriptor instance for each resolved domain name, tightly binding the domain name and service type. When the cache capacity reaches a preset warning value, the client will identify the priority of the domain name according to the service characteristic code, and preferentially eliminate low-priority or redundant domain name resolution records, thereby ensuring the cache hit rate of high-priority services.

[0041] In an example embodiment, determining the relative edit distance between the first field and the second field according to the edit distance between the first field of the first domain name and the second field of the fourth domain name comprises: in the case that the first field type is a field type that allows modification, determining a first parameter L for length normalization according to the following formula i : In the case that the first field type is a field type that does not allow modification, determining the first parameter L according to the following formula i : Determining the relative edit distance RED(i X ,i Y ) according to the following formula : Where ED(i X ,i Y ) is the edit distance, and L i is the first parameter.

[0042] For the first field and the second field of the same field type, determining the edit distance ED(i X ,i Y ) between the first field and the second field, i.e. the minimum number of single-character operations (addition, deletion, modification) required to convert from one string to another. Since the lengths of different fields can differ greatly, directly using the edit distance can result in the small differences of short fields being underestimated and the significant differences of long fields being overestimated. Therefore, the edit distance needs to be divided by the first parameter L i (for length normalization) to obtain the relative edit distance RED(i X ,i Y ) between the first field and the second field: Thus eliminating the length bias.

[0043] It should be noted that in the business scenarios of login, registration, and stream pulling, the mode features of domain name generation include fixed business domain name, elastic expansion domain name, and regional expansion mode. Fixed business domain name: adopting a hierarchical structure of “<business function>.<region identifier>.domain.com” (such as login.us.domain.com). Elastic expansion domain name: following the dynamic generation rule of “<node group>-<instance serial number>.stream.domain.com”, and expanding the domain name by incrementing the serial number when expanding (such as nodegroup-012.stream.domain.com). Regional expansion mode: adopting the naming specification of “<region code>.<service type>.domain.com” (such as regionA.login.domain.com). Therefore, in the case that the field type allows modification (for example, the field type is a region field type or a number field type), the first parameter L is determined according to the following formulai : When the field type does not allow to be modified (for example, the field type is a service field type), the first parameter L is determined according to the following formula i : It is necessary to clarify that L i is the length of the domain name string.

[0044] In an example embodiment, determining the comprehensive similarity of the first field relative to the second field according to the relative edit distance and the first weight coefficient comprises: determining the comprehensive similarity D(X, Y) according to the following formula: D(X, Y) =∑ i∈{R,S,N,O} w i ·RED(i X ,i Y ), wherein R is a region field type, S is a service field type, N is a number field type, O is a field type other than the region field type, the service field type and the number field type, w i is the first weight coefficient.

[0045] In an example embodiment, before determining the comprehensive similarity of the first field relative to the second field according to the relative edit distance and the first weight coefficient, the method further comprises: determining the first weight coefficient as a first value when the first field type is the service field type or the other field type; determining the first weight coefficient as a second value when the first field type is the region field type; determining the first weight coefficient as a third value when the first field type is the number field type, wherein the first value is greater than the second value, and the second value is greater than the third value.

[0046] In the similarity calculation process of the domain name, the domain name is disassembled into multiple fields, wherein the field types corresponding to the multiple fields include a region field type, a service field type, a number field type and other field types. The field of the service field type is a business core field, which requires strict matching, and is therefore set to a high weight, w i = 1.0 (the first value). The field of the region field type allows a certain degree of expansion (such as region expansion), and is therefore set to a medium weight, w i = 0.5 (the second value). The field of the number field type can be flexibly changed (such as instance number increase or decrease), and is therefore set to a low weight, w i = 0.3 (the third value). Further, the comprehensive similarity D(X, Y) is determined according to the following formula: D(X, Y) =∑ i∈{R,S,N,O} w i ·RED(i X ,iY ), wherein RED(i X ,i Y ) is the relative edit distance between the first field and the second field. It can be seen that the relative edit distances of the multiple field types are multiplied by the weights corresponding to the multiple field types and then added to obtain the comprehensive similarity D(X, Y). The smaller the value of the comprehensive similarity D(X, Y) is, the higher the similarity of the two domain names in the business logic is; on the contrary, the larger the value of the comprehensive similarity D(X, Y) is, the greater the difference between the two domain names is.

[0047] In order to better understand the process of the management of the domain name, the management method of the domain name is described below in combination with optional embodiments, but is not used to limit the technical solutions of the embodiments of the present application.

[0048] Figure 3 is a first schematic diagram of a domain name management method according to an embodiment of the present application, according to the embodiment shown in Figure 3 , the overall process of the domain name management method is clarified, and as shown in Figure 3 , the specific process includes the following processes:

[0049] Step S302: When it is detected that the first domain name (equivalent to the entry to be cached in the figure) requests to join the cache database, jump to step S304.

[0050] Step S304: Determine whether the first domain name has been cached to the cache database. When it is determined that the first domain name has been cached to the cache database, jump to step S306; when it is determined that the first domain name has not been cached to the cache database, jump to step S310.

[0051] Step S306: Update the domain name in the cache database, and jump to step S308.

[0052] Step S308: End.

[0053] Step S310: Determine whether the cache quantity of the first domain name is greater than or equal to a preset alert value. In the case where it is determined that the cache quantity of the first domain name is greater than or equal to the preset alert value, jump to step S312; in the case where it is determined that the cache quantity of the first domain name is less than the preset alert value, jump to step S340.

[0054] Step S312: Access the domain name business fingerprint library, and jump to step S314.

[0055] Step S314: Determine whether there is a second domain name consistent with the first domain name in the domain name business fingerprint library. In the case where it is determined that there is the second domain name in the domain name business fingerprint library, jump to step S316; in the case where it is determined that there is no second domain name in the domain name business fingerprint library, jump to step S328.

[0056] Step S316: compare the first priority of the first domain name with the plurality of second priorities of the plurality of third domain names (domain names in the domain name service fingerprint library), and jump to step S318 in a case where it is determined that there is a fourth priority with the lowest priority among the first priority and the plurality of second priorities.

[0057] Step S318: determine whether the sixth domain name corresponding to the fourth priority is unique, and jump to step S320 in a case where it is determined that the sixth domain name is unique, and jump to step S322 in a case where it is determined that the sixth domain name is not unique.

[0058] Step S320: eliminate the sixth domain name, and jump to step S340.

[0059] Step S322: determine whether the access frequencies of the plurality of sixth domain names are the same, and jump to step S324 in a case where it is determined that the access frequencies of the plurality of sixth domain names are the same, and jump to step S326 in a case where it is determined that the access frequencies of the plurality of sixth domain names are not the same.

[0060] Step S324: eliminate the domain name that expires earliest among the plurality of sixth domain names, and jump to step S340.

[0061] Step S326: eliminate the domain name with the lowest frequency among the plurality of sixth domain names, and jump to step S340.

[0062] Step S328: perform domain name service fingerprint analysis, determine the fourth domain name that is most similar to the first domain name by calculating the comprehensive similarity between the first domain name and the plurality of domain names in the cache database, and jump to step S330.

[0063] Step S330: determine whether the number of fourth domain names is unique, and jump to step S332 in a case where it is determined that the number of fourth domain names is unique, and jump to step S334 in a case where it is determined that the number of fourth domain names is not unique.

[0064] Step S332: eliminate the fourth domain name, and jump to step S340.

[0065] Step S334: determine whether the access frequencies of the plurality of fourth domain names are the same, and jump to step S336 in a case where it is determined that the access frequencies of the plurality of fourth domain names are the same, and jump to step S338 in a case where it is determined that the access frequencies of the plurality of fourth domain names are not the same.

[0066] Step S336: eliminate the domain name that expires earliest among the plurality of fourth domain names, and jump to step S340.

[0067] Step S328: eliminate the domain name with the lowest frequency among the plurality of fourth domain names, and jump to step S340.

[0068] Step S340: Add the first domain name to the cache database.

[0069] Figure 4 This is a second schematic diagram of a domain name management method according to an embodiment of this application. Figure 4 The illustrated embodiment clarifies the cache renewal process based on business fingerprints, such as Figure 4 As shown, it specifically includes the following:

[0070] Access the DNS cache table (equivalent to a cache database), and periodically check whether the first lifetime of multiple third-party domains in the domain name business fingerprint database is less than or equal to a first preset value (e.g., 30%) through a timer. If it is determined that multiple first lifetimes are greater than the first preset value, continue to periodically monitor the first lifetime of multiple third-party domains through a timer. If it is determined that one or more second lifetimes among the multiple first lifetimes are less than or equal to the first preset value, perform asynchronous pre-resolution on the seventh domain corresponding to these one or more second lifetimes to update the aforementioned seventh domain, and update the DNS cache table according to the updated seventh domain.

[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0072] Figure 5 This is a structural block diagram of a domain name management system according to an embodiment of this application; as shown below. Figure 5 As shown, it includes:

[0073] The first determining module 52 is used to determine whether there is a second domain name that is consistent with the first domain name in the domain name business fingerprint database, wherein the domain name business fingerprint database is used to store multiple third domain names;

[0074] The second determining module 54 is configured to, in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determine a relative edit distance between the first field of the first domain name and the second field of the fourth domain name according to an edit distance between the first field and the second field, wherein the first field type of the first field and the second field type of the second field are the same, and the fourth domain name is stored in a cache database, and the cache database is configured to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names.

[0075] The third determining module 56 is configured to determine a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar.

[0076] The adding module 58 is configured to determine whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0077] Through the above system, first, it is determined whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is configured to store a plurality of third domain names; in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, a relative edit distance between a first field of the first domain name and a second field of a fourth domain name is determined according to an edit distance between the first field and the second field, wherein the first field type of the first field and the second field type of the second field are the same, and the fourth domain name is stored in a cache database, and the cache database is configured to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names; further, a comprehensive similarity of the first field relative to the second field is determined according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; finally, whether to manage the plurality of fifth domain names in the cache database is determined according to the comprehensive similarity. Through the above technical solution, the problem of cache storage redundancy caused by similar domain names in related technologies is solved, and efficient and accurate domain name replacement is achieved.

[0078] In an exemplary embodiment, the first determining module 52 is further configured to, when determining that the second domain name exists in the domain name business fingerprint database, obtain the first business type corresponding to the first domain name and a plurality of second business types corresponding one-to-one with the plurality of third domain names; determine the first priority of the first business type and the plurality of second priorities of the plurality of second business types according to the following formula: i-th priority = α × (business weight of i-th business type) + β × (access frequency of i-th business type) + γ × (lifetime of i-th business type), where i is a positive integer, α, β, and γ are all adjustable coefficients, and the plurality of second business types correspond one-to-one with the plurality of second priorities; when determining that there is a fourth priority with the lowest priority among the plurality of third priorities, and the number of sixth domain names corresponding to the fourth priority is a preset number, delete the sixth domain name in the cache database, wherein the plurality of third priorities include the first priority and the plurality of second priorities.

[0079] In an exemplary embodiment, the first determining module 52 is further configured to periodically acquire multiple first lifetimes of the multiple third domain names through a timer, wherein the multiple third domain names correspond one-to-one with the multiple first lifetimes; and when it is determined that there is a second lifetime among the multiple first lifetimes that is less than or equal to a first preset value, update the seventh domain name corresponding to the second lifetime.

[0080] In an exemplary embodiment, the first determining module 52 is further configured to determine a plurality of third service types corresponding to a plurality of fifth domain names, wherein the plurality of fifth domain names correspond one-to-one with the plurality of third service types; and to determine a plurality of structures of the plurality of fifth domain names based on the service feature codes of the plurality of third service types and the plurality of fifth domain names, wherein the plurality of structures correspond one-to-one with the plurality of fifth domain names and the plurality of structures are used to indicate the plurality of third service types.

[0081] In one exemplary embodiment, the second determining module 54 is further configured to determine a first parameter L for length normalization according to the following formula, if the first field type is a field type that allows modification. i : When the first field type is a field type that cannot be modified, the first parameter L is determined according to the following formula. i : The relative edit distance RED(i) is determined according to the following formula. X i Y ): Wherein, ED(i X i Y ) represents the edit distance, L iThe first parameter.

[0082] In an example embodiment, the third determining module 56 is further configured to determine the comprehensive similarity D(X, Y) according to the following formula: i∈{R,S,N,O} w i ·RED(i X ,i Y ), where R is a region field type, S is a service field type, N is a number field type, O is a field type other than the region field type, the service field type, and the number field type, w i is the first weight coefficient.

[0083] In an example embodiment, the third determining module 56 is further configured to determine the first weight coefficient as a first value when the first field type is the service field type or the other field type, determine the first weight coefficient as a second value when the first field type is the region field type, and determine the first weight coefficient as a third value when the first field type is the number field type, where the first value is greater than the second value, and the second value is greater than the third value.

[0084] Embodiments of the present application also provide a storage medium including a stored program, where the above-mentioned program, when executed, performs the method of any of the above.

[0085] Optionally, in the present embodiment, the above-mentioned storage medium can be configured to store program code for performing the following steps:

[0086] S1, determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, where the domain name service fingerprint library is configured to store a plurality of third domain names;

[0087] S2, in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determining a relative edit distance between a first field of the first domain name and a second field of a fourth domain name according to an edit distance between the first field and the second field, where a first field type of the first field and a second field type of the second field are the same, and the fourth domain name is stored in a cache database, where the cache database is configured to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names;

[0088] S3, determining a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, where the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is configured to determine whether the first field and the second field are similar.

[0089] S4, determining whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0090] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0091] The specific examples in the embodiment can refer to the examples described in the above embodiments and example implementations, which will not be described here again.

[0092] The embodiment of the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0093] Optionally, in the embodiment, the processor can be configured to perform the following steps by the computer program:

[0094] S1, determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names;

[0095] S2, in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determining a relative edit distance between a first field of the first domain name and a second field of a fourth domain name according to an edit distance between the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, and the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names;

[0096] S3, determining a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar;

[0097] S4, determining whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

[0098] Optionally, the electronic device described above can further include a transmission device and an input and output device, wherein the transmission device is connected with the processor, and the input and output device is connected with the processor.

[0099] Optionally, the specific examples in the embodiments can refer to the examples described in the above embodiments and optional implementation manners, and the embodiments will not be described here.

[0100] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by a general computing system, which can be centralized on a single computing system or distributed on a network composed of multiple computing systems, and optionally, they can be realized by program codes executable by the computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in different order, or they can be made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to realize. Thus, the present application is not limited to any specific combination of hardware and software.

[0101] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method of managing domain names, characterized by, The method comprises the following steps: determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names; in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determining a relative edit distance between a first field of the first domain name and a second field of a fourth domain name according to an edit distance between the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names include the plurality of third domain names; determining a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; determining whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

2. The domain name management method according to claim 1, wherein After determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, the method further comprises: in a case where it is determined that the second domain name exists in the domain name service fingerprint library, obtaining a first service type corresponding to the first domain name and a plurality of second service types corresponding to the plurality of third domain names one by one; determining a first priority of the first service type and a plurality of second priorities of the plurality of second service types according to the following formula: i-th priority = α × (service weight of i-th service type) + β × (access frequency of the i-th service type) + γ × (survival period of the i-th service type), wherein i is a positive integer, α, β and γ are adjustable coefficients, and the plurality of second service types correspond to the plurality of second priorities one by one; in a case where it is determined that a fourth priority with the lowest priority exists in a plurality of third priorities, and a quantity of sixth domain names corresponding to the fourth priority is a preset quantity, deleting the sixth domain names in the cache database, wherein the plurality of third priorities include the first priority and the plurality of second priorities.

3. The domain name management method according to claim 2, wherein Before determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, the method further comprises: periodically obtaining a plurality of first survival times of the plurality of third domain names through a timer, wherein the plurality of third domain names correspond to the plurality of first survival times one by one; in a case where it is determined that a second survival time is less than or equal to a first preset value in the plurality of first survival times, updating a seventh domain name corresponding to the second survival time.

4. The domain name management method of claim 1, wherein, Before determining whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, the method further comprises: determining a plurality of third service types corresponding to a plurality of fifth domain names, wherein the plurality of fifth domain names correspond to the plurality of third service types one by one; Determine a plurality of structures of the plurality of fifth domain names according to the plurality of third service type service feature codes and the plurality of fifth domain names, wherein the plurality of structures correspond to the plurality of fifth domain names one by one, and the plurality of structures are used to indicate the plurality of third service types.

5. The domain name management method of claim 1, wherein, Determine a relative edit distance between the first field of the first domain name and the second field of the fourth domain name according to an edit distance between the first field and the second field, including: In case the first field type is a field type that allows modification, a first parameter L for length normalization is determined according to the following formula i : In case the first field type is a field type not allowed to be modified, the first parameter L is determined according to the following formula i : The relative edit distance RED(i X ,i Y ) is determined according to the following formula: where ED(i X ,i Y ) is the edit distance, L i is the first parameter.

6. The domain name management method according to claim 5, wherein Determine a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, including: Determine the comprehensive similarity D(X, Y) according to the following formula: D(X,Y) =∑ i∈{R,S,N,O} w i ·RED(i X ,i Y ), where R is a region field type, S is a service field type, N is a number field type, O is a field type other than the region field type, the service field type, and the number field type, w i is the first weight coefficient.

7. The domain name management method according to claim 6, wherein Before determining the comprehensive similarity of the first field relative to the second field according to the relative edit distance and the first weight coefficient, the method further includes: In a case where the first field type is the service field type or the other field type, determine that the first weight coefficient is a first numerical value; In a case where the first field type is the area field type, determine that the first weight coefficient is a second numerical value; In a case where the first field type is the number field type, determine that the first weight coefficient is a third numerical value, wherein the first numerical value is greater than the second numerical value, and the second numerical value is greater than the third numerical value.

8. A domain name management system, characterized by comprising: including: A first determination module configured to determine whether a second domain name consistent with a first domain name exists in a domain name service fingerprint library, wherein the domain name service fingerprint library is used to store a plurality of third domain names; A second determination module configured to, in a case where it is determined that the second domain name does not exist in the domain name service fingerprint library, determine a relative edit distance between a first field of the first domain name and a second field of a fourth domain name according to an edit distance between the first field and the second field, wherein a first field type of the first field and a second field type of the second field are the same, and the fourth domain name is stored in a cache database, the cache database is used to store a plurality of fifth domain names, and the plurality of fifth domain names contain the plurality of third domain names; A third determination module configured to determine a comprehensive similarity of the first field relative to the second field according to the relative edit distance and a first weight coefficient, wherein the first weight coefficient is a weight coefficient corresponding to the first field type, and the comprehensive similarity is used to determine whether the first field and the second field are similar; An adding module configured to determine whether to manage the plurality of fifth domain names in the cache database according to the comprehensive similarity.

9. A computer readable storage medium, characterized in that, The computer readable storage medium includes a stored program, wherein the program runs to execute the method in any one of claims 1 to 7. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method in any one of claims 1 to 7 by the computer program.

Citation Information

Patent Citations

  • Method and system for removing redundant domain names and firewall equipment

    CN108696599A

  • Domain name resolution method and device, computer equipment and computer readable storage medium

    CN118368270A

  • Determining string similarity using syntactic edit distance

    US20160294852A1

  • Method for domain name detection, device and storage medium

    US20250080578A1