WO2021139240A1 - Domain name compression method and product related thereto - Google Patents
Domain name compression method and product related thereto Download PDFInfo
- Publication number
- WO2021139240A1 WO2021139240A1 PCT/CN2020/118337 CN2020118337W WO2021139240A1 WO 2021139240 A1 WO2021139240 A1 WO 2021139240A1 CN 2020118337 W CN2020118337 W CN 2020118337W WO 2021139240 A1 WO2021139240 A1 WO 2021139240A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- types
- offset table
- domain name
- byte offset
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
Definitions
- This application relates to the field of computer technology, in particular to a domain name compression method and related products.
- the inventor found that in the high-traffic scenario, the domain name server needs to resolve a large number of domain names. At this time, the DNS server will face greater processing pressure, and the response time of the domain name server will become longer. . Therefore, how to further reduce the processing time of the domain name server and increase the processing rate of the domain name server has become a problem to be solved.
- the DNS server In high-access scenarios, the DNS server has the problem of slow processing a large number of domain names.
- the embodiments of the present application provide a presentation generation method, device, electronic equipment, and computer-readable storage medium.
- an embodiment of the present application provides a domain name compression method.
- the method includes: acquiring first data, where the first data is data recorded by a DNS resolution of a domain name system protocol; and classifying the first data, Obtain five types of data; respectively perform partial compression on the five types of data to obtain second data; perform associated compression on the second data to obtain target data.
- an embodiment of the present application provides a domain name compression device, the domain name compression device includes: an acquiring unit configured to acquire first data, where the first data is data of a DNS resolution record of the Domain Name System Protocol; and a classification unit , Used to classify the first data to obtain five types of data; a local compression unit, used to locally compress the five types of data respectively, to obtain the second data; an associated compression unit, used to obtain the second data Second, the data is associated and compressed to obtain the target data.
- an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured by the above
- the processor executes the following steps: acquiring first data, the first data being the data recorded by the DNS resolution of the domain name system protocol; classifying the first data to obtain five types of data; respectively Perform partial compression to obtain the second data; perform associated compression on the second data to obtain the target data.
- an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program causes the computer to perform the following steps: Data, the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; the five types of data are respectively compressed locally to obtain the second data; Perform associative compression on the second data to obtain the target data.
- the embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in this application.
- the computer program product may be a software installation package.
- the domain name server of the embodiment of the application obtains first data, which is the data recorded by the DNS resolution of the domain name system protocol; classifies the first data to obtain five types of data; respectively, the five types of data Perform partial compression to obtain second data; perform associated compression on the second data to obtain target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization of system resources.
- FIG. 1 is a schematic diagram of a domain name processing flow provided by an embodiment of the application.
- FIG. 2A is a schematic flowchart of a domain name compression method provided by an embodiment of the application.
- FIG. 2B is a schematic diagram of analysis records of five types of data provided by an embodiment of the application.
- FIG. 3 is a schematic flowchart of a domain name compression method provided by an embodiment of the application.
- Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- Fig. 5 is a block diagram of functional units of a domain name compression device provided by an embodiment of the present application.
- DNS is a domain name system. It is a distributed database on the World Wide Web as a mapping between domain names and IP addresses. It can make it easier for users to access the Internet without having to remember IP numbers that can be directly read by machines.
- the purpose of DNS is to resolve domain names into IP addresses. In high-traffic scenarios, it is necessary to resolve a large number of domain names. At this time, the DNS server will face processing pressure, and users can obviously feel that the server's response time becomes longer.
- the percentage of server processing time is an important evaluation index. Therefore, the domain name compression technology that can increase the percentage of server processing time is very valuable in the DNS field, which can help websites improve user experience and create high-quality website services.
- FIG. 1 is a schematic diagram of a domain name processing flow provided by an embodiment of the present application.
- this application provides a domain name compression method, specifically as shown in FIG. 2A, the method may include but is not limited to the following steps S201-S204.
- the domain name server obtains the first data.
- the first data is the data recorded by the DNS resolution of the domain name system protocol.
- the data of each DNS resolution record includes: the main domain name of the DNS resolution record, host record, record type, record value, and the time-to-live (TTL) of the domain name resolution record in the DNS server.
- the record types include any of the following: address (Address, A) records, AAAA records, alias records CNAME records, mail exchange (mail exchanger, MX) records, and domain name server (Name Server, NS) records.
- the domain name server classifies the first data to obtain five types of data.
- the five types of data include: the first type of data, the second type of data, the third type of data, the fourth type of data, and the fifth type of data.
- the first type of data is the resolution records of the same primary domain name, the same host record, and the same record type, which are recorded as type I;
- the second type of data is the resolution records of the same primary domain name, the same host record, and the resolution of different record types.
- FIG. 2B is a schematic diagram of analyzing and recording five types of data.
- the domain name server classifies the first data to obtain five types of data, including but not limited to: the domain name server records the analysis record in the first data according to the main domain name, host record, and record type in the analysis record , Divided into resolution records of the same primary domain name, same host record, and same record type; resolution records of the same primary domain name, same host record, and resolution records of different record types; resolution record of the same primary domain name, different host records, and same record type ; Resolution records of the same primary domain name, different host records, and different record types; resolution records of different primary domain names and the same host record.
- the domain name server performs partial compression on the five types of data respectively to obtain second data.
- the domain name server performs partial compression on the five types of data to obtain the second data, including but not limited to: the domain name server performs partial compression on the five types of data according to the first byte offset table to obtain the second data .
- the method further includes: the domain name server establishes a first byte offset table corresponding to the five types of data, and the first byte offset table is established by the domain name server.
- the one-byte offset table is used to locally compress the five types of data; the domain name server detects each of the five types of data to be detected and the first byte of each parsing record to be detected Whether the detected analysis record in the offset table is redundant; if so, the domain name server saves the offset size of the analysis record to be detected in each of the five types of data in the first word Section offset table; if not, the domain name server adds the aforementioned parsing record to be detected in the first byte offset table.
- the domain name server establishes the first byte offset table corresponding to the five types of data, including but not limited to: performing the same internal analysis on each type of the five types of data. After partial compression, the domain name server determines the first position of the parsing record of each of the five types of data, where the first position is the reference position in each type of data of the five types of data; the domain name server is based on The first position sets the first offset size corresponding to each of the five types of data; the domain name server determines the first byte offset based on the first offset size and the first position Move the table.
- S204 The domain name server performs associated compression on the second data to obtain target data.
- the domain name server associates and compresses the second data to obtain the target data, including but not limited to: the domain name server divides the second data into three types of regional data; the domain name server analyzes records in the three types of regional data Perform associative compression.
- the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data are different from each other.
- the domain name server associates and compresses the analysis records in the three types of area data, including but not limited to: the domain name server compares the first area data with the second area data according to the second byte offset table. The area data are respectively jointly compressed to obtain the third data; the domain name server jointly compresses the third data and the third area data according to the second byte offset table.
- the second byte offset table can be determined through the following specific steps: establish the second byte offset table; determine the reference position, current position, and offset position of each analytical record of the three types of area data; The base position, current position, and offset position of a parsing record are saved in the position byte offset table.
- the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
- the classification of the first data to obtain five types of data includes: recording the DNS resolution of the first data according to the data characteristics of the DNS resolution record in the first data Divide into five types and get five types of data.
- the five types of data include: the first type of data, the second type of data, the third type of data, the fourth type of data, and the fifth type of data.
- the first type of data is the resolution records of the same primary domain name, the same host record, and the same record type
- the second type of data is the resolution records of the same primary domain name, the same host record, and the resolution records of different record types
- the third type of data is resolution records of the same primary domain name, the same host record, and different record types.
- the data is the resolution records of the same primary domain name, different host records, and the same record type; the fourth type of data is resolution records of the same primary domain name, different host records, and different record types; the fifth type of data is different primary domain names, the same host record Analytical records.
- the main domain name, host record, record type, record value, and duration of the domain name resolution record in the DNS server of the DNS resolution record are included in the five types of data.
- the data characteristics of the DNS resolution record include: the main domain name, host record, and record type of the DNS resolution record.
- the domain name server divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data, including but not limited to: the domain name server according to the first data
- the primary domain name, host record, and record type of the DNS resolution record in the first data divide the DNS resolution record of the first data into five types to obtain five types of data.
- the domain name server divides the resolution records of the same primary domain name, the same host record, and the same record type in the first data into the first type data among the five types of data; the domain name server divides the same primary domain name and the same host in the first data Records and resolution records of different record types are divided into the second type of data among the five types of data; the domain name server divides the resolution records of the same primary domain name, different host records, and the same record type in the first data into five types of data The third type of data; the domain name server divides the resolution records of the same primary domain name, different host records, and different record types in the first data into the fourth type of data among the five types of data; the domain name server divides the different primary data in the first data The analysis records of the domain name and the same host record are divided into the fifth type of data among the five types of data.
- the domain name server in this embodiment divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data.
- the data are respectively compressed locally to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
- the performing partial compression on the five types of data to obtain the second data includes: performing partial compression on the five types of data respectively according to the first byte offset table, Obtain the second data.
- the five types of data are respectively locally compressed according to the first byte offset table to obtain the second data, including but not limited to: according to each of the first byte offset tables
- the offset size in the analytic record performs partial compression on the five types of data respectively to obtain the second data.
- the domain name server in this embodiment divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data:
- the one-byte offset table performs partial compression on the five types of data respectively to obtain the second data; performs associative compression on the second data to obtain the target data, which improves the processing speed of the domain name server for a large number of domain names and improves the system resources Utilization rate.
- the method before the partial compression is performed on the five types of data to obtain the second data, the method further includes: establishing a first byte offset table corresponding to the five types of data , The first byte offset table is used to locally compress the five types of data; each of the five types of data to be detected is detected with each of the analysis records to be detected and the first Whether the detected analysis records in the byte offset table are redundant; if so, the offset size of each analysis record to be detected in each of the five types of data is recorded in the first In the one-byte offset table; if not, add each of the analytical records to be detected in the first byte offset table.
- the establishment of the first byte offset table corresponding to the five types of data includes but is not limited to: triggering the first word when the attribute value of the analysis record in the five types of data changes
- the section offset table update operation updates the attribute value data of the first byte offset table and the resolution record, where the attribute value of the resolution record includes: the main domain name, host record, and record type of the DNS resolution record.
- each of the five types of data to be detected is different from the detected analysis record in the first byte offset table. Redundancy, after each of the analysis records to be detected is added to the first byte offset table, it further includes: offsetting the analysis records to be detected in each of the five types of data The size is recorded in the first byte offset table.
- the analysis record of the third type of data Take the analysis record of the third type of data as an example. First, establish a byte offset table for the analysis record of the third type of data; then, check whether the main domain name, host record, and record type of each analysis record are the same as those that have been checked. The resolution record is redundant; if it is redundant, the relative offset size of the main domain name and host record must be recorded in the byte offset table; if it is not redundant, the original index value must be recorded in the byte offset table.
- the domain name server in this embodiment establishes a first byte offset table corresponding to the five types of data, and the first byte offset table is used to locally compress the five types of data; Whether each analytical record to be detected in each of the five types of data is redundant with the analytical record that has been detected in the first byte offset table; if so, the five types of data
- the offset size of each analysis record to be detected in each type of data in the type data is recorded in the first byte offset table; if not, it is added to the first byte offset table
- Each of the analysis records to be detected is convenient to increase the rate at which the domain name server processes a large number of domain names, and improves the utilization rate of system resources.
- the establishment of the first byte offset table corresponding to the five types of data includes: performing local compression of the same type of analysis records for each type of the five types of data. Afterwards, determine the first position of the analysis record of each type of the five types of data, where the first position is the reference position in each type of data of the five types of data; set according to the first position A first offset size corresponding to each of the five types of data; the first offset size and the first position are used to determine the first byte offset table.
- the first position is the reference position in each of the five types of data, that is, the first position is 0.
- the domain name server establishes the first byte offset table corresponding to the five types of data, including: after the analysis records of each type of the five types of data are locally compressed within the same type, the domain name The server determines the first position of the parsing record of each of the five types of data, where the first position is the reference position in each type of data of the five types of data; the domain name server calculates five types of data according to the first position. A first offset size corresponding to each type of data of each type of data; the domain name server determines the first byte offset table based on the first offset size and the first position. As shown in Table 1, Table 1 is the first byte offset table corresponding to the analysis records of the five types of data.
- the domain name server determines the first analysis record of each of the five types of data after locally compressing the analysis records of each type of the five types of data.
- a position where the first position is a reference position in each type of data of the five types of data; the first offset size corresponding to each type of data of the five types of data is set according to the first position ;
- the first offset size and the first location determine the first byte offset table, it is convenient to improve the domain name server processing a large number of domain names, and improve the utilization of system resources.
- the performing associative compression on the second data to obtain the target data includes: dividing the second data into three types of regional data; performing associative compression on the analysis records in the three types of regional data .
- the second data is divided into three types of regional data; the analysis records in the three types of regional data are associated and compressed, including but not limited to: dividing the second data into three types of regional data according to five types of data, Perform associative compression on the analysis records in the three types of regional data.
- the domain name server divides the second data into three types of regional data; the analysis records in the three types of regional data are associated and compressed, which is convenient to increase the speed of the domain name server to process a large number of domain names. Utilization of system resources.
- the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; said performing associative compression on the analysis records in the three types of area data includes: jointly compressing the first area data and the second area data respectively according to a second byte offset table, Obtain third data; and jointly compress the third data and the third area data according to the second byte offset table.
- the second data is divided into three types of regional data; the analysis records in the three types of regional data are associated and compressed, including but not limited to: according to the primary domain name and host of the analysis records in the second data Record, complete the establishment of the dynamic data dictionary, and store the newly added analysis record information; divide the second data corresponding to the first type of data and the second data corresponding to the second type of data into one area, which is recorded as three types of area data
- the first area data in the data is the I field;
- the second data corresponding to the third type data and the second data corresponding to the fourth type data are divided into one area, which is recorded as the second area data in the three types of area data, namely Domain II; divide the second data corresponding to the fifth type of data into one area, and record it as the third area data of the three types of area data, that is, type V; by searching the analysis records in the dynamic data dictionary, respectively
- the II domains respectively carry out cross-type region association compression; then the I domain, II domain and the third region data are associated, which is marked
- the cross-type zone association compression is performed on domain I and domain II respectively, including: referring to the second byte offset table, first parse the main domain name and host record of the record for domain I and domain II respectively. Perform compression offset size correction operation.
- the cross-type zone association compression of the III domain includes: the main domain name and host record of the resolution record of the III domain, and the compression offset correction operation.
- a byte offset table needs to be established for each area, and the offset of the associated compression
- the shift size is recorded in the shift table.
- the step of determining the offset size of the associated compression is as follows: the offset size of the associated compression needs to be dynamically calculated according to the current position of the analysis record, where the current position may be the position of the first domain name resolution record in each zone. As shown in Table 2, Table 2 is the second byte offset table.
- the domain name server in this embodiment jointly compresses the first area data and the second area data according to the second byte offset table to obtain the third data; according to the second byte offset table
- the table shifting joint compresses the third data and the third area data, which is convenient to increase the rate at which the domain name server processes a large number of domain names, and improves the utilization of system resources.
- FIG. 3 is a schematic flowchart of a platform-based danger prevention method provided by an embodiment of the present application, and the method includes S301-S305.
- the domain name server obtains first data, where the first data is data recorded by the DNS resolution of the domain name system protocol.
- the domain name server divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data.
- the domain name server performs partial compression on the five types of data respectively according to the first byte offset table to obtain second data.
- the domain name server divides the second data into three types of regional data.
- the domain name server associates and compresses the analysis records in the three types of area data.
- the domain name server in the embodiment of the application obtains the first data, and the first data is the data of the DNS resolution record of the domain name system protocol; according to the data characteristics of the DNS resolution record in the first data, the first data is Five types of DNS resolution records are divided into five types to obtain five types of data; the five types of data are respectively compressed locally according to the first byte offset table to obtain the second data; according to the second data Divided into three types of regional data; performing correlation compression on the analysis records in the three types of regional data. Increasing the rate at which the domain name server processes a large number of domain names and improving the utilization of system resources
- FIG. 4 is a schematic structural diagram of an electronic device 400 provided by an embodiment of the present application.
- the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more A program 421, wherein the one or more programs 421 are stored in the foregoing memory 420 and configured to be executed by the foregoing application processor 410, and the one or more programs 421 include steps for performing the following steps: Data, the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; the five types of data are respectively compressed locally to obtain the second data; Perform associative compression on the second data to obtain the target data.
- the one or more programs 421 include the steps specifically for performing the following steps: According to the data characteristics of the DNS resolution record of the first data, the DNS resolution record of the first data is divided into five types, and five types of data are obtained.
- the one or more programs 421 include specifically configured to perform the following steps:
- the section offset table performs partial compression on the five types of data respectively to obtain the second data.
- the one or more programs 421 further include the steps specifically configured to perform the following steps: The first byte offset table corresponding to the type data, where the first byte offset table is used to locally compress the five types of data; and detect every type of data in the five types of data. Whether the parsing records to be detected and the parsing records that have been detected in the first byte offset table are redundant; if so, each of the five types of data to be detected is The offset size of the analysis record is recorded in the first byte offset table; if not, the each analysis record to be detected is added to the first byte offset table.
- the one or more programs 421 include specifically configured to perform the following steps: After the analysis records of each type of data of each type are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is the position of the five types of data.
- the one or more programs 421 include specifically configured to perform the following steps: dividing the second data into three types of regional data ; Perform associative compression on the analysis records in the three types of regional data.
- the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; in the aspect of associating and compressing the parsed records in the three types of area data, the one or more programs 421 include specifically configured to perform the following steps: according to the second byte offset table The first area data and the second area data are respectively jointly compressed to obtain third data; the third data and the third area data are jointly compressed according to the second byte offset table.
- the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
- an electronic device includes hardware structures and/or software modules corresponding to each function.
- this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
- the embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples.
- each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
- FIG. 5 is a block diagram of the functional unit composition of the domain name compression device 500 involved in an embodiment of the present application.
- the domain name compression device 500 includes: an acquisition unit 501, a classification unit 502, a local compression unit 503, and an association compression unit 504.
- the obtaining unit 501 is configured to obtain first data, where the first data is data of a DNS resolution record of a domain name system protocol.
- the classification unit 502 is configured to classify the first data to obtain five types of data.
- the local compression unit 503 is configured to perform local compression on the five types of data respectively to obtain second data.
- the associative compression unit 504 is configured to perform associative compression on the second data to obtain target data.
- the domain name compression apparatus 500 may further include a storage unit 505 for storing program codes and data of the electronic device.
- the acquiring unit 501 may be a transceiver, and the storage unit 505 may be a memory.
- the classification unit 502 is specifically configured to: according to the data characteristics of the DNS resolution record in the first data, The DNS resolution records of the first data are divided into five types, and five types of data are obtained.
- the local compression unit 503 is specifically configured to: compare the five types of data according to the first byte offset table. Each type of data is locally compressed to obtain the second data.
- the partial compression unit 503 is further specifically configured to: establish the first byte corresponding to the five types of data. Offset table, the first byte offset table is used to locally compress the five types of data; detect each of the five types of data to be detected and the analysis record and all Whether the detected analytical records in the first byte offset table are redundant; if so, the offset size of each analytical record to be detected in each of the five types of data is recorded in In the first byte offset table; if not, add each parsing record to be detected in the first byte offset table.
- the local compression unit 503 is specifically configured to: in the analysis of each type of the five types of data After the records are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is the reference position in each type of the five types of data Set the first offset size corresponding to each of the five types of data according to the first position; determine the first byte offset by combining the first offset size and the first position Move the table.
- the associative compression unit 504 is specifically configured to: divide the second data into three types of regional data; Analyze records in the associated compression.
- the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; in terms of associating and compressing the analysis records in the three types of area data, the associating compression unit 504 is specifically configured to: compare the first area data with the first area data according to a second byte offset table The two area data are respectively jointly compressed to obtain the third data; the third data and the third area data are jointly compressed according to the second byte offset table.
- the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
- An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment ,
- the above-mentioned computer includes electronic equipment.
- the computer-readable storage medium may be non-volatile or volatile.
- the embodiments of the present application also provide a computer program product.
- the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program.
- the above-mentioned computer program is operable to cause a computer to execute any of the methods described in the above-mentioned method embodiments. Part or all of the steps of the method.
- the computer program product may be a software installation package, and the above-mentioned computer includes electronic equipment.
- the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
- the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
- a number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
- the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard drives, magnetic disks, or CD-ROMs and other media that can store program codes.
- the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-Only Memory (English: Read-Only Memory, abbreviated as: ROM), Random Access Memory (English: Random Access Memory, abbreviated as: RAM), magnetic disk or CD, etc.
- ROM Read-Only Memory
- RAM Random Access Memory
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The present application relates to the field of data processing. Disclosed are a domain name compression method and a related product. The domain name compression method comprises: acquiring first data, wherein the first data is data of a domain name system (DNS) protocol resolution record; classifying the first data to obtain five types of data; locally compressing the five types of data, respectively, to obtain second data; and carrying out associated compression on the second data to obtain target data. The processing speed of a large number of domain names by a domain name server is improved, and the utilization rate of system resources is improved.
Description
本申请要求于2020年07月28日提交中国专利局、申请号为202010742846.8、申请名称为“一种域名压缩方法及其相关产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 28, 2020, the application number is 202010742846.8, and the application name is "a domain name compression method and related products", the entire content of which is incorporated herein by reference Applying.
本申请涉及计算机技术领域,尤其涉及一种域名压缩方法及其相关产品。This application relates to the field of computer technology, in particular to a domain name compression method and related products.
随着科技水平不断发展和进步,大数据和智能化管理已经植入各行各业,人们的生活得到了极大的便利。而域名压缩,极大地减少人们浏览网页的时间。With the continuous development and progress of science and technology, big data and intelligent management have been implanted in all walks of life, and people's lives have been greatly facilitated. The domain name compression greatly reduces the time people spend browsing the web.
目前,在域名压缩领域,发明人发现,在高访问量的场景下,就域名服务器需要对大量域名进行解析操作,此时的DNS服务器会面临较大的处理压力,域名服务器的响应时间变长。因此,对于如何进一步减少域名服务器处理时间,提高域名服务器处理速率,成为了有待解决的问题。At present, in the field of domain name compression, the inventor found that in the high-traffic scenario, the domain name server needs to resolve a large number of domain names. At this time, the DNS server will face greater processing pressure, and the response time of the domain name server will become longer. . Therefore, how to further reduce the processing time of the domain name server and increase the processing rate of the domain name server has become a problem to be solved.
在高访问的场景下,域名服务器处理大量域名存在速率慢的问题。In high-access scenarios, the DNS server has the problem of slow processing a large number of domain names.
基于在高访问的场景下域名服务器处理大量域名速率慢的问题,本申请实施方式提供了一种演示文稿生成方法、装置、电子设备及计算机可读存储介质。Based on the problem that the domain name server processes a large number of domain names at a slow rate in a high-access scenario, the embodiments of the present application provide a presentation generation method, device, electronic equipment, and computer-readable storage medium.
第一方面,本申请实施例提供了一种域名压缩方法,所述方法包括:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据。In a first aspect, an embodiment of the present application provides a domain name compression method. The method includes: acquiring first data, where the first data is data recorded by a DNS resolution of a domain name system protocol; and classifying the first data, Obtain five types of data; respectively perform partial compression on the five types of data to obtain second data; perform associated compression on the second data to obtain target data.
第二方面,本申请实施例提供了一种域名压缩装置,所述域名压缩装置包括:获取单元,用于获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;分类单元,用于将所述第一数据进行分类,得到五种类型的数据;局部压缩单元,用于对所述五种类型数据分别进行局部压缩,得到第二数据;关联压缩单元,用于对第二数据进行关联压缩,得到目标数据。In a second aspect, an embodiment of the present application provides a domain name compression device, the domain name compression device includes: an acquiring unit configured to acquire first data, where the first data is data of a DNS resolution record of the Domain Name System Protocol; and a classification unit , Used to classify the first data to obtain five types of data; a local compression unit, used to locally compress the five types of data respectively, to obtain the second data; an associated compression unit, used to obtain the second data Second, the data is associated and compressed to obtain the target data.
第三方面,本申请实施例提供了一种电子设备,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行以下步骤:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据。In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured by the above The processor executes the following steps: acquiring first data, the first data being the data recorded by the DNS resolution of the domain name system protocol; classifying the first data to obtain five types of data; respectively Perform partial compression to obtain the second data; perform associated compression on the second data to obtain the target data.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行以下步骤:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program causes the computer to perform the following steps: Data, the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; the five types of data are respectively compressed locally to obtain the second data; Perform associative compression on the second data to obtain the target data.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, the embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in this application. For example, part or all of the steps described in any method of the first aspect. The computer program product may be a software installation package.
本申请实施例域名服务器获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。The domain name server of the embodiment of the application obtains first data, which is the data recorded by the DNS resolution of the domain name system protocol; classifies the first data to obtain five types of data; respectively, the five types of data Perform partial compression to obtain second data; perform associated compression on the second data to obtain target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization of system resources.
图1为本申请实施例提供的一种域名处理流程示意图。FIG. 1 is a schematic diagram of a domain name processing flow provided by an embodiment of the application.
图2A为本申请实施例提供的一种域名压缩方法的流程示意图。FIG. 2A is a schematic flowchart of a domain name compression method provided by an embodiment of the application.
图2B为本申请实施例提供的一种五种类型的数据的解析记录示意图。FIG. 2B is a schematic diagram of analysis records of five types of data provided by an embodiment of the application.
图3为本申请实施例提供的一种域名压缩方法的流程示意图。FIG. 3 is a schematic flowchart of a domain name compression method provided by an embodiment of the application.
图4是本申请实施例提供的一种电子设备的结构示意图。Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图5是本申请实施例提供的一种域名压缩装置的功能单元组成框图。Fig. 5 is a block diagram of functional units of a domain name compression device provided by an embodiment of the present application.
DNS是一个域名系统,是万维网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。DNS的存在意义是为了将域名解析为IP地址。在高访问量的场景下,就需要对大批量域名进行解析操作,此时的DNS服务器会面临处理压力,用户也能明显感受到服务器的响应时间变长。在评价DNS服务性能的参数中,服务器处理时间百分比是重要的评价指标。因此,对于能提升服务器处理时间百分比的域名压缩技术,在DNS领域是很有价值的,这能够帮助网站改善用户体验,营造高品质的网站服务。DNS is a domain name system. It is a distributed database on the World Wide Web as a mapping between domain names and IP addresses. It can make it easier for users to access the Internet without having to remember IP numbers that can be directly read by machines. The purpose of DNS is to resolve domain names into IP addresses. In high-traffic scenarios, it is necessary to resolve a large number of domain names. At this time, the DNS server will face processing pressure, and users can obviously feel that the server's response time becomes longer. Among the parameters for evaluating DNS service performance, the percentage of server processing time is an important evaluation index. Therefore, the domain name compression technology that can increase the percentage of server processing time is very valuable in the DNS field, which can help websites improve user experience and create high-quality website services.
现有的域名压缩方法会受到业务规则的约束,压缩过程必须依赖于域名所在数据包的绝对位置,并且仅支持在请求与响应的过程中进行域名的实时压缩,当出现大规模的用户访问时,这种压缩方法无法预判出需要的解析资源,不能让DNS服务器在短时间内处理大量域名,更无法降低响应的实时消耗,不仅不能有效利用系统资源,用户体验也达不到预期。Existing domain name compression methods are subject to business rules. The compression process must depend on the absolute position of the data packet where the domain name is located, and only supports real-time compression of the domain name during the request and response process. When large-scale user access occurs This compression method cannot predict the required resolution resources, cannot allow the DNS server to process a large number of domain names in a short period of time, and cannot reduce the real-time consumption of responses. It not only fails to effectively utilize system resources, but also fails to meet expectations.
下面对本申请实施例进行详细介绍。The following describes the embodiments of the application in detail.
请参阅图1,图1是本申请实施例提供的一种域名处理流程示意图。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a domain name processing flow provided by an embodiment of the present application.
为解决在高访问的场景下域名服务器处理大量域名速率慢的问题,本申请提供了一种域名压缩方法,具体如图2A所示,该方法可以包括但不限于如下步骤S201-S204。In order to solve the problem that the domain name server processes a large number of domain names at a slow rate in a high-access scenario, this application provides a domain name compression method, specifically as shown in FIG. 2A, the method may include but is not limited to the following steps S201-S204.
S201、域名服务器获取第一数据。S201. The domain name server obtains the first data.
其中,第一数据为域名系统协议DNS解析记录的数据。其中,每条DNS解析记录的数据包括:DNS解析记录的主域名、主机记录、记录类型、记录值、域名解析记录在DNS服务器中的存留时间(Time-To-Live,TTL)。其中记录类型包括以下任意一种:地址(Address ,A)记录、AAAA记录、别名记录CNAME记录、邮件交换(mail exchanger,MX)记录及域名服务器(Name Server,NS)记录。Among them, the first data is the data recorded by the DNS resolution of the domain name system protocol. Among them, the data of each DNS resolution record includes: the main domain name of the DNS resolution record, host record, record type, record value, and the time-to-live (TTL) of the domain name resolution record in the DNS server. The record types include any of the following: address (Address, A) records, AAAA records, alias records CNAME records, mail exchange (mail exchanger, MX) records, and domain name server (Name Server, NS) records.
S202、域名服务器将所述第一数据进行分类,得到五种类型的数据。S202. The domain name server classifies the first data to obtain five types of data.
其中,五种类型的数据包括:第一类型数据、第二类型数据、第三类型数据、第四类型数据和第五类型数据。其中,第一类型数据为相同主域名、相同主机记录、相同记录类型的解析记录,记为Ⅰ类;第二类型数据为是相同主域名、相同主机记录的解析记录、不相同记录类型的解析记录,记为Ⅱ类;第三类型数据为相同主域名、不同主机记录、相同记录类型的解析记录,记为Ⅲ类;第四类型数据为相同主域名、不同主机记录、不相同记录类型的解析记录,记为Ⅳ类;第五类型数据为不同主域名、相同主机记录的解析记录,记为Ⅴ类。如图2B所示,图2B为一种五种类型的数据的解析记录示意图。Among them, the five types of data include: the first type of data, the second type of data, the third type of data, the fourth type of data, and the fifth type of data. Among them, the first type of data is the resolution records of the same primary domain name, the same host record, and the same record type, which are recorded as type I; the second type of data is the resolution records of the same primary domain name, the same host record, and the resolution of different record types. Records are recorded as type II; the third type of data is the resolution records of the same main domain name, different host records, and the same record type, recorded as type III; the fourth type of data is the same main domain name, different host records, and different record types The analysis records are recorded as category IV; the fifth type of data is the analysis records of different main domain names and the same host record, and is recorded as category V. As shown in FIG. 2B, FIG. 2B is a schematic diagram of analyzing and recording five types of data.
具体实现中,域名服务器将所述第一数据进行分类,得到五种类型的数据,包括但不限于:域名服务器根据解析记录中的主域名、主机记录、记录类型将第一数据中的解析记录,分成相同主域名、相同主机记录、相同记录类型的解析记录;相同主域名、相同主机记录的解析记录、不相同记录类型的解析记录;相同主域名、不同主机记录、相同记录类型的解析记录;相同主域名、不同主机记录、不相同记录类型的解析记录;不同主域名、相同主机记录的解析记录。In specific implementation, the domain name server classifies the first data to obtain five types of data, including but not limited to: the domain name server records the analysis record in the first data according to the main domain name, host record, and record type in the analysis record , Divided into resolution records of the same primary domain name, same host record, and same record type; resolution records of the same primary domain name, same host record, and resolution records of different record types; resolution record of the same primary domain name, different host records, and same record type ; Resolution records of the same primary domain name, different host records, and different record types; resolution records of different primary domain names and the same host record.
S203、域名服务器对五种类型数据分别进行局部压缩,得到第二数据。S203. The domain name server performs partial compression on the five types of data respectively to obtain second data.
具体实现中,域名服务器对五种类型数据分别进行局部压缩,得到第二数据,包括但不限于:域名服务器根据第一字节偏移表对五种类型数据分别进行局部压缩,得到第二数据。In specific implementation, the domain name server performs partial compression on the five types of data to obtain the second data, including but not limited to: the domain name server performs partial compression on the five types of data according to the first byte offset table to obtain the second data .
具体实现中,域名服务器在对五种类型数据分别进行局部压缩,得到第二数据之前,该方法还包括:域名服务器建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;域名服务器检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;若是,则域名服务器将所述五种类型数据中的每种类型数据中的待检测的解析记录的偏移大小保存到所述第一字节偏移表中;若否,则域名服务器在第一字节偏移表中增加上述待检测的解析记录。In specific implementation, before the domain name server locally compresses the five types of data to obtain the second data, the method further includes: the domain name server establishes a first byte offset table corresponding to the five types of data, and the first byte offset table is established by the domain name server. The one-byte offset table is used to locally compress the five types of data; the domain name server detects each of the five types of data to be detected and the first byte of each parsing record to be detected Whether the detected analysis record in the offset table is redundant; if so, the domain name server saves the offset size of the analysis record to be detected in each of the five types of data in the first word Section offset table; if not, the domain name server adds the aforementioned parsing record to be detected in the first byte offset table.
需要进一步说明的时,域名服务器建立所述五种类型数据对应的第一字节偏移表,包括但不限于:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,域名服务器确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;域名服务器根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;域名服务器将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。Where further explanation is needed, the domain name server establishes the first byte offset table corresponding to the five types of data, including but not limited to: performing the same internal analysis on each type of the five types of data. After partial compression, the domain name server determines the first position of the parsing record of each of the five types of data, where the first position is the reference position in each type of data of the five types of data; the domain name server is based on The first position sets the first offset size corresponding to each of the five types of data; the domain name server determines the first byte offset based on the first offset size and the first position Move the table.
S204、域名服务器对第二数据进行关联压缩,得到目标数据。S204: The domain name server performs associated compression on the second data to obtain target data.
具体实现中,域名服务器对第二数据进行关联压缩,得到目标数据,包括但不限于:域名服务器根据对第二数据划分为三类区域数据;域名服务器对所述三类区域数据中的解析记录进行关联压缩。In specific implementation, the domain name server associates and compresses the second data to obtain the target data, including but not limited to: the domain name server divides the second data into three types of regional data; the domain name server analyzes records in the three types of regional data Perform associative compression.
其中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同。Wherein, the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data are different from each other.
需要进一步解释的是,域名服务器对所述三类区域数据中的解析记录进行关联压缩,包括但不限于:域名服务器根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;域名服务器根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。It needs to be further explained that the domain name server associates and compresses the analysis records in the three types of area data, including but not limited to: the domain name server compares the first area data with the second area data according to the second byte offset table. The area data are respectively jointly compressed to obtain the third data; the domain name server jointly compresses the third data and the third area data according to the second byte offset table.
其中,第二字节偏移表可以是通过以下具体步骤确定的:建立第二字节偏移表;确定三类区域数据的每条解析记录的基准位置、当前位置、偏移位置;将每条解析记录的基准位置、当前位置、偏移位置保存到地位字节偏移表中。Among them, the second byte offset table can be determined through the following specific steps: establish the second byte offset table; determine the reference position, current position, and offset position of each analytical record of the three types of area data; The base position, current position, and offset position of a parsing record are saved in the position byte offset table.
可以看出,本申请实施例域名服务器获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
在一个可能的示例中,所述将所述第一数据进行分类,得到五种类型的数据,包括:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。In a possible example, the classification of the first data to obtain five types of data includes: recording the DNS resolution of the first data according to the data characteristics of the DNS resolution record in the first data Divide into five types and get five types of data.
其中,五种类型的数据包括:第一类型数据、第二类型数据、第三类型数据、第四类型数据和第五类型数据。其中,第一类型数据为相同主域名、相同主机记录、相同记录类型的解析记录;第二类型数据为是相同主域名、相同主机记录的解析记录、不相同记录类型的解析记录;第三类型数据为相同主域名、不同主机记录、相同记录类型的解析记录;第四类型数据为相同主域名、不同主机记录、不相同记录类型的解析记录;第五类型数据为不同主域名、相同主机记录的解析记录。Among them, the five types of data include: the first type of data, the second type of data, the third type of data, the fourth type of data, and the fifth type of data. Among them, the first type of data is the resolution records of the same primary domain name, the same host record, and the same record type; the second type of data is the resolution records of the same primary domain name, the same host record, and the resolution records of different record types; the third type of data is resolution records of the same primary domain name, the same host record, and different record types. The data is the resolution records of the same primary domain name, different host records, and the same record type; the fourth type of data is resolution records of the same primary domain name, different host records, and different record types; the fifth type of data is different primary domain names, the same host record Analytical records.
其中,五种类型的数据中的DNS解析记录的主域名、主机记录、记录类型、记录值、域名解析记录在DNS服务器中的存留时间。DNS解析记录的数据特征包括:DNS解析记录的主域名、主机记录、记录类型。Among them, in the five types of data, the main domain name, host record, record type, record value, and duration of the domain name resolution record in the DNS server of the DNS resolution record. The data characteristics of the DNS resolution record include: the main domain name, host record, and record type of the DNS resolution record.
具体实现中,域名服务器根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据,包括但不限于:域名服务器根据第一数据中的DNS解析记录的主域名、主机记录、记录类型将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。In specific implementation, the domain name server divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data, including but not limited to: the domain name server according to the first data The primary domain name, host record, and record type of the DNS resolution record in the first data divide the DNS resolution record of the first data into five types to obtain five types of data.
举例说明,域名服务器将第一数据中相同主域名、相同主机记录、相同记录类型的解析记录分成五种类型的数据中的第一类型数据;域名服务器将第一数据中相同主域名、相同主机记录、不相同记录类型的解析记录分成五种类型的数据中的第二类型数据;域名服务器将第一数据中相同主域名、不同主机记录、相同记录类型的解析记录分成五种类型的数据中的第三类型数据;域名服务器将第一数据中相同主域名、不同主机记录、不相同记录类型的解析记录分成五种类型的数据中的第四类型数据;域名服务器将第一数据中不同主域名、相同主机记录的解析记录分成五种类型的数据中的第五类型数据。For example, the domain name server divides the resolution records of the same primary domain name, the same host record, and the same record type in the first data into the first type data among the five types of data; the domain name server divides the same primary domain name and the same host in the first data Records and resolution records of different record types are divided into the second type of data among the five types of data; the domain name server divides the resolution records of the same primary domain name, different host records, and the same record type in the first data into five types of data The third type of data; the domain name server divides the resolution records of the same primary domain name, different host records, and different record types in the first data into the fourth type of data among the five types of data; the domain name server divides the different primary data in the first data The analysis records of the domain name and the same host record are divided into the fifth type of data among the five types of data.
可以看出,本实施例中域名服务器根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据,所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in this embodiment divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data. The data are respectively compressed locally to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
在一个可能的示例中,所述对所述五种类型数据分别进行局部压缩,得到第二数据,包括:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。In a possible example, the performing partial compression on the five types of data to obtain the second data includes: performing partial compression on the five types of data respectively according to the first byte offset table, Obtain the second data.
具体实现中,根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据,包括但不限于:根据所述第一字节偏移表中每条解析记录中的偏移大小对所述五种类型数据分别进行局部压缩,得到所述第二数据。In specific implementation, the five types of data are respectively locally compressed according to the first byte offset table to obtain the second data, including but not limited to: according to each of the first byte offset tables The offset size in the analytic record performs partial compression on the five types of data respectively to obtain the second data.
可以看出,本实施例中域名服务器根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据,:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in this embodiment divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data: The one-byte offset table performs partial compression on the five types of data respectively to obtain the second data; performs associative compression on the second data to obtain the target data, which improves the processing speed of the domain name server for a large number of domain names and improves the system resources Utilization rate.
在一个可能的示例中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据之前,所述方法还包括:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。In a possible example, before the partial compression is performed on the five types of data to obtain the second data, the method further includes: establishing a first byte offset table corresponding to the five types of data , The first byte offset table is used to locally compress the five types of data; each of the five types of data to be detected is detected with each of the analysis records to be detected and the first Whether the detected analysis records in the byte offset table are redundant; if so, the offset size of each analysis record to be detected in each of the five types of data is recorded in the first In the one-byte offset table; if not, add each of the analytical records to be detected in the first byte offset table.
其中,需要进一步说明的是,建立所述五种类型数据对应的第一字节偏移表,包括但不限于:当五种类型数据中的解析记录的属性值发生变化时,触发第一字节偏移表更新操作,更新第一字节偏移表表内与解析记录的属性值的数据,其中,解析记录的属性值包括:DNS解析记录的主域名、主机记录、记录类型。Among them, it needs to be further explained that the establishment of the first byte offset table corresponding to the five types of data includes but is not limited to: triggering the first word when the attribute value of the analysis record in the five types of data changes The section offset table update operation updates the attribute value data of the first byte offset table and the resolution record, where the attribute value of the resolution record includes: the main domain name, host record, and record type of the DNS resolution record.
其中,需要进一步说明的是,若检测到所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录不冗余,则所述第一字节偏移表中增加所述每条待检测的解析记录之后,还包括:将五种类型数据中的每种类型数据中的待检测的解析记录的偏移大小记录到所述第一字节偏移表中。Among them, it should be further explained that if it is detected that each of the five types of data to be detected is different from the detected analysis record in the first byte offset table. Redundancy, after each of the analysis records to be detected is added to the first byte offset table, it further includes: offsetting the analysis records to be detected in each of the five types of data The size is recorded in the first byte offset table.
以第三类型数据的解析记录为例,首先,为第三类型数据的解析记录建立字节偏移表;然后,检测每条解析记录的主域名、主机记录和记录类型是否与已检测过的解析记录冗余;如果冗余,需将主域名、主机记录的相对偏移大小记录到字节偏移表中;如果不冗余,需在字节偏移表中记录原索引值。Take the analysis record of the third type of data as an example. First, establish a byte offset table for the analysis record of the third type of data; then, check whether the main domain name, host record, and record type of each analysis record are the same as those that have been checked. The resolution record is redundant; if it is redundant, the relative offset size of the main domain name and host record must be recorded in the byte offset table; if it is not redundant, the original index value must be recorded in the byte offset table.
可以看出,本实施例中域名服务器建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录,便于提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in this embodiment establishes a first byte offset table corresponding to the five types of data, and the first byte offset table is used to locally compress the five types of data; Whether each analytical record to be detected in each of the five types of data is redundant with the analytical record that has been detected in the first byte offset table; if so, the five types of data The offset size of each analysis record to be detected in each type of data in the type data is recorded in the first byte offset table; if not, it is added to the first byte offset table Each of the analysis records to be detected is convenient to increase the rate at which the domain name server processes a large number of domain names, and improves the utilization rate of system resources.
在一个可能的示例中,所述建立所述五种类型数据对应的第一字节偏移表,包括:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。In a possible example, the establishment of the first byte offset table corresponding to the five types of data includes: performing local compression of the same type of analysis records for each type of the five types of data. Afterwards, determine the first position of the analysis record of each type of the five types of data, where the first position is the reference position in each type of data of the five types of data; set according to the first position A first offset size corresponding to each of the five types of data; the first offset size and the first position are used to determine the first byte offset table.
其中,第一位置为所述五种类型数据的每种类型数据中的基准位置,即第一位置为0。The first position is the reference position in each of the five types of data, that is, the first position is 0.
具体实现中,域名服务器建立所述五种类型数据对应的第一字节偏移表,包括:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,域名服务器确定所述五种类型数据的每种类型的解析记录的第一位置,第一位置为所述五种类型数据的每种类型数据中的基准位置;域名服务器根据所述第一位置计算五种类型数据的每种类型数据对应的第一偏移大小;域名服务器将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。如表1所示,表1为五种类型数据的解析记录对应的第一字节偏移表。In a specific implementation, the domain name server establishes the first byte offset table corresponding to the five types of data, including: after the analysis records of each type of the five types of data are locally compressed within the same type, the domain name The server determines the first position of the parsing record of each of the five types of data, where the first position is the reference position in each type of data of the five types of data; the domain name server calculates five types of data according to the first position. A first offset size corresponding to each type of data of each type of data; the domain name server determines the first byte offset table based on the first offset size and the first position. As shown in Table 1, Table 1 is the first byte offset table corresponding to the analysis records of the five types of data.
表1。Table 1.
可以看出,本实施例中域名服务器在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表,便于提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that, in this embodiment, the domain name server determines the first analysis record of each of the five types of data after locally compressing the analysis records of each type of the five types of data. A position, where the first position is a reference position in each type of data of the five types of data; the first offset size corresponding to each type of data of the five types of data is set according to the first position ; The first offset size and the first location, determine the first byte offset table, it is convenient to improve the domain name server processing a large number of domain names, and improve the utilization of system resources.
在一个可能的示例中,所述对第二数据进行关联压缩,得到目标数据,包括:将所述第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩。In a possible example, the performing associative compression on the second data to obtain the target data includes: dividing the second data into three types of regional data; performing associative compression on the analysis records in the three types of regional data .
具体实现中,将第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩,包括但不限于:根据五种类型数据将第二数据分成三类区域数据,对所述三类区域数据中的解析记录进行关联压缩。In specific implementation, the second data is divided into three types of regional data; the analysis records in the three types of regional data are associated and compressed, including but not limited to: dividing the second data into three types of regional data according to five types of data, Perform associative compression on the analysis records in the three types of regional data.
可以看出,本实施例中域名服务器将所述第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩,便于提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that in this embodiment, the domain name server divides the second data into three types of regional data; the analysis records in the three types of regional data are associated and compressed, which is convenient to increase the speed of the domain name server to process a large number of domain names. Utilization of system resources.
在一个可能的示例中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同;所述对所述三类区域数据中的解析记录进行关联压缩,包括:根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。In a possible example, the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; said performing associative compression on the analysis records in the three types of area data includes: jointly compressing the first area data and the second area data respectively according to a second byte offset table, Obtain third data; and jointly compress the third data and the third area data according to the second byte offset table.
具体实现中,将所述第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩,包括但不限于:根据第二数据中的解析记录的主域名和主机记录,完成动态数据字典的建立,并存储已新增的解析记录信息;将第一类型数据对应的第二数据与第二类型数据对应的第二数据划分为一个区域,记作三类区域数据中的第一区域数据,即Ⅰ域;将第三类型数据对应的第二数据与第四类型数据对应的第二数据划分为一个区域,记作三类区域数据中的第二区域数据,即Ⅱ域;将第五类型数据对应的第二数据划分为一个区域,记作三类区域数据中的第三区域数据,即Ⅴ类;通过检索动态数据字典中的解析记录,分别对Ⅰ域、Ⅱ域各自进行跨类型的区域关联压缩;再将Ⅰ域、Ⅱ域与第三区域数据进行关联,记作Ⅲ
域,对Ⅲ 域进行跨类型的区域关联压缩。In specific implementation, the second data is divided into three types of regional data; the analysis records in the three types of regional data are associated and compressed, including but not limited to: according to the primary domain name and host of the analysis records in the second data Record, complete the establishment of the dynamic data dictionary, and store the newly added analysis record information; divide the second data corresponding to the first type of data and the second data corresponding to the second type of data into one area, which is recorded as three types of area data The first area data in the data is the I field; the second data corresponding to the third type data and the second data corresponding to the fourth type data are divided into one area, which is recorded as the second area data in the three types of area data, namely Domain II; divide the second data corresponding to the fifth type of data into one area, and record it as the third area data of the three types of area data, that is, type V; by searching the analysis records in the dynamic data dictionary, respectively The Ⅱ domains respectively carry out cross-type region association compression; then the Ⅰ domain, Ⅱ domain and the third region data are associated, which is marked as Ⅲ
Domain, cross-type region correlation compression is performed on the III domain.
需要进一步解释的是,分别对Ⅰ域、Ⅱ域各自进行跨类型的区域关联压缩,包括:参照第二字节偏移表,先分别对Ⅰ域和Ⅱ域解析记录的主域名和主机记录,执行压缩偏移大小修正操作。What needs further explanation is that the cross-type zone association compression is performed on domain I and domain II respectively, including: referring to the second byte offset table, first parse the main domain name and host record of the record for domain I and domain II respectively. Perform compression offset size correction operation.
需要进一步解释的是,对Ⅲ 域进行跨类型的区域关联压缩,包括:对Ⅲ 域解析记录的主域名和主机记录,进行压缩偏移量修正操作。What needs to be further explained is that the cross-type zone association compression of the III domain includes: the main domain name and host record of the resolution record of the III domain, and the compression offset correction operation.
其中,在将所述第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩之前,需要为每个区域建立字节偏移表,并将关联压缩的偏移大小记录到偏移表。关联压缩的偏移大小的确定步骤为:需要根据解析记录当前位置,动态计算关联压缩的偏移大小,其中,当前位置可以是每个区域的第一个域名解析记录的位置。如表2所示,表2为第二字节偏移表。Wherein, before dividing the second data into three types of area data; before performing associative compression on the analysis records in the three types of area data, a byte offset table needs to be established for each area, and the offset of the associated compression The shift size is recorded in the shift table. The step of determining the offset size of the associated compression is as follows: the offset size of the associated compression needs to be dynamically calculated according to the current position of the analysis record, where the current position may be the position of the first domain name resolution record in each zone. As shown in Table 2, Table 2 is the second byte offset table.
表2。Table 2.
可以看出,本实施例中域名服务器根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩,便于提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in this embodiment jointly compresses the first area data and the second area data according to the second byte offset table to obtain the third data; according to the second byte offset table The table shifting joint compresses the third data and the third area data, which is convenient to increase the rate at which the domain name server processes a large number of domain names, and improves the utilization of system resources.
下面通过一个具体的例子对本申请实施例进行详细介绍。The following describes the embodiments of the present application in detail through a specific example.
与上述图2A所示的实施例一致,请参阅图3,图3是本申请实施例提供的一种基于平台的危险预防方法的流程示意图,所述方法包括S301-S305。Consistent with the embodiment shown in FIG. 2A, please refer to FIG. 3. FIG. 3 is a schematic flowchart of a platform-based danger prevention method provided by an embodiment of the present application, and the method includes S301-S305.
S301、域名服务器获取第一数据,第一数据为域名系统协议DNS解析记录的数据。S301. The domain name server obtains first data, where the first data is data recorded by the DNS resolution of the domain name system protocol.
S302、域名服务器根据第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。S302. The domain name server divides the DNS resolution records of the first data into five types according to the data characteristics of the DNS resolution records in the first data to obtain five types of data.
S303、域名服务器根据第一字节偏移表对五种类型数据分别进行局部压缩,得到第二数据。S303. The domain name server performs partial compression on the five types of data respectively according to the first byte offset table to obtain second data.
S304、域名服务器根据对第二数据划分为三类区域数据。S304. The domain name server divides the second data into three types of regional data.
S305、域名服务器对所述三类区域数据中的解析记录进行关联压缩。S305. The domain name server associates and compresses the analysis records in the three types of area data.
可以看出,本申请实施例中域名服务器获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据;根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据;根据对第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩。提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in the embodiment of the application obtains the first data, and the first data is the data of the DNS resolution record of the domain name system protocol; according to the data characteristics of the DNS resolution record in the first data, the first data is Five types of DNS resolution records are divided into five types to obtain five types of data; the five types of data are respectively compressed locally according to the first byte offset table to obtain the second data; according to the second data Divided into three types of regional data; performing correlation compression on the analysis records in the three types of regional data. Increasing the rate at which the domain name server processes a large number of domain names and improving the utilization of system resources
请参阅图4,图4是本申请实施例提供的一种电子设备400的结构示意图,如图所示,所述电子设备400包括应用处理器410、存储器420、通信接口430以及一个或多个程序421,其中,所述一个或多个程序421被存储在上述存储器420中,并且被配置由上述应用处理器410执行,所述一个或多个程序421包括用于执行以下步骤:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据。Please refer to FIG. 4, which is a schematic structural diagram of an electronic device 400 provided by an embodiment of the present application. As shown in the figure, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more A program 421, wherein the one or more programs 421 are stored in the foregoing memory 420 and configured to be executed by the foregoing application processor 410, and the one or more programs 421 include steps for performing the following steps: Data, the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; the five types of data are respectively compressed locally to obtain the second data; Perform associative compression on the second data to obtain the target data.
在一个可能的示例中,在所述将所述第一数据进行分类,得到五种类型的数据方面,所述一个或多个程序421包括具体用于执行以下步骤:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。In a possible example, in terms of classifying the first data to obtain five types of data, the one or more programs 421 include the steps specifically for performing the following steps: According to the data characteristics of the DNS resolution record of the first data, the DNS resolution record of the first data is divided into five types, and five types of data are obtained.
在一个可能的示例中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据方面,所述一个或多个程序421包括具体用于执行以下步骤:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。In a possible example, in terms of performing partial compression on the five types of data to obtain the second data, the one or more programs 421 include specifically configured to perform the following steps: The section offset table performs partial compression on the five types of data respectively to obtain the second data.
在一个可能的示例中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据之前,所述一个或多个程序421还包括具体用于执行以下步骤:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。In a possible example, before the partial compression is performed on the five types of data to obtain the second data, the one or more programs 421 further include the steps specifically configured to perform the following steps: The first byte offset table corresponding to the type data, where the first byte offset table is used to locally compress the five types of data; and detect every type of data in the five types of data. Whether the parsing records to be detected and the parsing records that have been detected in the first byte offset table are redundant; if so, each of the five types of data to be detected is The offset size of the analysis record is recorded in the first byte offset table; if not, the each analysis record to be detected is added to the first byte offset table.
在一个可能的示例中,在所述建立所述五种类型数据对应的第一字节偏移表方面,所述一个或多个程序421包括具体用于执行以下步骤:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。In a possible example, in the aspect of establishing the first byte offset table corresponding to the five types of data, the one or more programs 421 include specifically configured to perform the following steps: After the analysis records of each type of data of each type are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is the position of the five types of data. The reference position in each type of data; the first offset size corresponding to each of the five types of data is set according to the first position; the first offset size and the first position are set, Determine the first byte offset table.
在一个可能的示例中,在所述对第二数据进行关联压缩,得到目标数据方面,所述一个或多个程序421包括具体用于执行以下步骤:根据对第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩。In a possible example, in terms of performing associative compression on the second data to obtain target data, the one or more programs 421 include specifically configured to perform the following steps: dividing the second data into three types of regional data ; Perform associative compression on the analysis records in the three types of regional data.
在一个可能的示例中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同;在所述对所述三类区域数据中的解析记录进行关联压缩方面,所述一个或多个程序421包括具体用于执行以下步骤:根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。In a possible example, the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; in the aspect of associating and compressing the parsed records in the three types of area data, the one or more programs 421 include specifically configured to perform the following steps: according to the second byte offset table The first area data and the second area data are respectively jointly compressed to obtain third data; the third data and the third area data are jointly compressed according to the second byte offset table.
可以看出,本申请实施例域名服务器获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solution of the embodiment of the present application from the perspective of the execution process on the method side. It can be understood that, in order to implement the above-mentioned functions, an electronic device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that in combination with the units and algorithm steps of the examples described in the embodiments provided herein, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
图5是本申请实施例中所涉及的域名压缩装置500的功能单元组成框图。该域名压缩装置500包括:获取单元501、分类单元502、局部压缩单元503、关联压缩单元504。FIG. 5 is a block diagram of the functional unit composition of the domain name compression device 500 involved in an embodiment of the present application. The domain name compression device 500 includes: an acquisition unit 501, a classification unit 502, a local compression unit 503, and an association compression unit 504.
获取单元501,用于获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据。The obtaining unit 501 is configured to obtain first data, where the first data is data of a DNS resolution record of a domain name system protocol.
分类单元502,用于将所述第一数据进行分类,得到五种类型的数据。The classification unit 502 is configured to classify the first data to obtain five types of data.
局部压缩单元503,用于对所述五种类型数据分别进行局部压缩,得到第二数据。The local compression unit 503 is configured to perform local compression on the five types of data respectively to obtain second data.
关联压缩单元504,用于对第二数据进行关联压缩,得到目标数据。The associative compression unit 504 is configured to perform associative compression on the second data to obtain target data.
其中,所述域名压缩装置500还可以包括存储单元505,用于存储电子设备的程序代码和数据。所述获取单元501可以是收发器,存储单元505可以是存储器。Wherein, the domain name compression apparatus 500 may further include a storage unit 505 for storing program codes and data of the electronic device. The acquiring unit 501 may be a transceiver, and the storage unit 505 may be a memory.
在一个可能的示例中,在所述将所述第一数据进行分类,得到五种类型的数据方面,分类单元502具体用于:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。In a possible example, in terms of classifying the first data to obtain five types of data, the classification unit 502 is specifically configured to: according to the data characteristics of the DNS resolution record in the first data, The DNS resolution records of the first data are divided into five types, and five types of data are obtained.
在一个可能的示例中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据方面,局部压缩单元503具体用于:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。In a possible example, in terms of performing local compression on the five types of data to obtain the second data, the local compression unit 503 is specifically configured to: compare the five types of data according to the first byte offset table. Each type of data is locally compressed to obtain the second data.
在一个可能的示例中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据之前,局部压缩单元503还具体用于:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。In a possible example, before the partial compression is performed on the five types of data to obtain the second data, the partial compression unit 503 is further specifically configured to: establish the first byte corresponding to the five types of data. Offset table, the first byte offset table is used to locally compress the five types of data; detect each of the five types of data to be detected and the analysis record and all Whether the detected analytical records in the first byte offset table are redundant; if so, the offset size of each analytical record to be detected in each of the five types of data is recorded in In the first byte offset table; if not, add each parsing record to be detected in the first byte offset table.
在一个可能的示例中,在所述建立所述五种类型数据对应的第一字节偏移表方面,局部压缩单元503具体用于:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。In a possible example, in the aspect of establishing the first byte offset table corresponding to the five types of data, the local compression unit 503 is specifically configured to: in the analysis of each type of the five types of data After the records are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is the reference position in each type of the five types of data Set the first offset size corresponding to each of the five types of data according to the first position; determine the first byte offset by combining the first offset size and the first position Move the table.
在一个可能的示例中,在所述对第二数据进行关联压缩,得到目标数据方面,关联压缩单元504具体用于:根据对第二数据划分为三类区域数据;对所述三类区域数据中的解析记录进行关联压缩。In a possible example, in terms of performing associative compression on the second data to obtain target data, the associative compression unit 504 is specifically configured to: divide the second data into three types of regional data; Analyze records in the associated compression.
在一个可能的示例中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同;在所述对所述三类区域数据中的解析记录进行关联压缩方面,关联压缩单元504具体用于:根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。In a possible example, the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the third area data Are different from each other; in terms of associating and compressing the analysis records in the three types of area data, the associating compression unit 504 is specifically configured to: compare the first area data with the first area data according to a second byte offset table The two area data are respectively jointly compressed to obtain the third data; the third data and the third area data are jointly compressed according to the second byte offset table.
可以看出,本申请实施例域名服务器获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;将所述第一数据进行分类,得到五种类型的数据;对所述五种类型数据分别进行局部压缩,得到第二数据;对第二数据进行关联压缩,得到目标数据,提高域名服务器处理大量域名的速率,提高了系统资源的利用率。It can be seen that the domain name server in the embodiment of the application obtains the first data, and the first data is the data recorded by the DNS resolution of the domain name system protocol; the first data is classified to obtain five types of data; Each type of data is locally compressed to obtain the second data; the second data is associated and compressed to obtain the target data, which improves the rate at which the domain name server processes a large number of domain names and improves the utilization rate of system resources.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括电子设备。所述计算机可读存储介质可以是非易失性,也可以是易失性。An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment , The above-mentioned computer includes electronic equipment. The computer-readable storage medium may be non-volatile or volatile.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括电子设备。The embodiments of the present application also provide a computer program product. The above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program. The above-mentioned computer program is operable to cause a computer to execute any of the methods described in the above-mentioned method embodiments. Part or all of the steps of the method. The computer program product may be a software installation package, and the above-mentioned computer includes electronic equipment.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in an embodiment, reference may be made to related descriptions of other embodiments.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only
Memory)、随机存取存储器(RAM,Random
Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random
Access Memory), mobile hard drives, magnetic disks, or CD-ROMs and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory ,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-Only Memory (English: Read-Only Memory, abbreviated as: ROM), Random Access Memory (English: Random Access Memory, abbreviated as: RAM), magnetic disk or CD, etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (20)
- 一种域名压缩方法,其中,所述方法包括:A domain name compression method, wherein the method includes:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;Acquiring first data, where the first data is data recorded by a DNS resolution of a domain name system protocol;将所述第一数据进行分类,得到五种类型的数据;Classify the first data to obtain five types of data;对所述五种类型数据分别进行局部压缩,得到第二数据;Perform partial compression on the five types of data respectively to obtain second data;对第二数据进行关联压缩,得到目标数据。The second data is associated and compressed to obtain the target data.
- 根据权利要求1所述的方法,其中,所述将所述第一数据进行分类,得到五种类型的数据,包括:The method according to claim 1, wherein said classifying said first data to obtain five types of data comprises:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。According to the data characteristics of the DNS resolution records in the first data, the DNS resolution records of the first data are divided into five types to obtain five types of data.
- 根据权利要求1所述的方法,其中,所述对所述五种类型数据分别进行局部压缩,得到第二数据,包括:The method according to claim 1, wherein said performing partial compression on said five types of data to obtain second data respectively comprises:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。The five types of data are respectively locally compressed according to the first byte offset table to obtain the second data.
- 根据权利要求1或3所述的方法,其中,在所述对所述五种类型数据分别进行局部压缩,得到第二数据之前,所述方法还包括:The method according to claim 1 or 3, wherein, before the partial compression is performed on the five types of data to obtain the second data, the method further comprises:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;Establishing a first byte offset table corresponding to the five types of data, where the first byte offset table is used to locally compress the five types of data;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;Detecting whether each analytical record to be detected in each of the five types of data and the analytical record that has been detected in the first byte offset table are redundant;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;If yes, record the offset size of each parsing record to be detected in each of the five types of data in the first byte offset table;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。If not, add each of the analytical records to be detected in the first byte offset table.
- 根据权利要求4所述的方法,其中,所述建立所述五种类型数据对应的第一字节偏移表,包括:The method according to claim 4, wherein said establishing a first byte offset table corresponding to said five types of data comprises:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;After the analysis records of each type of the five types of data are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is all Describe the reference position in each of the five types of data;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;Setting a first offset size corresponding to each of the five types of data according to the first position;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。Determine the first byte offset table by using the first offset size and the first position.
- 根据权利要求1所述的方法,其中,所述对第二数据进行关联压缩,得到目标数据,包括:The method according to claim 1, wherein said performing associative compression on the second data to obtain the target data comprises:根据对第二数据划分为三类区域数据;Divide the second data into three types of regional data;对所述三类区域数据中的解析记录进行关联压缩。Perform associative compression on the analysis records in the three types of regional data.
- 根据权利要求6所述的方法,其中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同;The method according to claim 6, wherein the three types of area data include: first area data, second area data, and third area data, the first area data, the second area data, and the The third area data is different from each other;所述对所述三类区域数据中的解析记录进行关联压缩,包括:The associative compression of the analysis records in the three types of regional data includes:根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;Performing joint compression on the first area data and the second area data respectively according to the second byte offset table to obtain third data;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。The third data and the third area data are jointly compressed according to the second byte offset table.
- 一种域名压缩装置,其中,所述域名压缩装置包括:A domain name compression device, wherein the domain name compression device includes:获取单元,用于获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;An obtaining unit, configured to obtain first data, where the first data is data recorded by a DNS resolution of a domain name system protocol;分类单元,用于将所述第一数据进行分类,得到五种类型的数据;The classification unit is used to classify the first data to obtain five types of data;局部压缩单元,用于对所述五种类型数据分别进行局部压缩,得到第二数据;The local compression unit is used to locally compress the five types of data to obtain second data;关联压缩单元,用于对第二数据进行关联压缩,得到目标数据。The correlation compression unit is used to correlate and compress the second data to obtain the target data.
- 一种电子设备,其中,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行以下步骤:An electronic device, including a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory, and the processor is configured to perform the following steps:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;Acquiring first data, where the first data is data recorded by a DNS resolution of a domain name system protocol;将所述第一数据进行分类,得到五种类型的数据;Classify the first data to obtain five types of data;对所述五种类型数据分别进行局部压缩,得到第二数据;Perform partial compression on the five types of data respectively to obtain second data;对第二数据进行关联压缩,得到目标数据。The second data is associated and compressed to obtain the target data.
- 根据权利要9所述的电子设备,其中,所述处理器用于:The electronic device according to claim 9, wherein the processor is configured to:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。According to the data characteristics of the DNS resolution records in the first data, the DNS resolution records of the first data are divided into five types to obtain five types of data.
- 根据权利要9所述的电子设备,其中,所述处理器用于:The electronic device according to claim 9, wherein the processor is configured to:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。The five types of data are respectively locally compressed according to the first byte offset table to obtain the second data.
- 根据权利要9或11所述的电子设备,其中,所述处理器还用于:The electronic device according to claim 9 or 11, wherein the processor is further configured to:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;Establishing a first byte offset table corresponding to the five types of data, where the first byte offset table is used to locally compress the five types of data;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;Detecting whether each analytical record to be detected in each of the five types of data and the analytical record that has been detected in the first byte offset table are redundant;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;If yes, record the offset size of each parsing record to be detected in each of the five types of data in the first byte offset table;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。If not, add each of the analytical records to be detected in the first byte offset table.
- 根据权利要12所述的电子设备,其中,所述处理器用于:The electronic device according to claim 12, wherein the processor is configured to:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;After the analysis records of each type of the five types of data are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is all Describe the reference position in each of the five types of data;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;Setting a first offset size corresponding to each of the five types of data according to the first position;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。Determine the first byte offset table by using the first offset size and the first position.
- 根据权利要9所述的电子设备,其中,所述处理器用于:The electronic device according to claim 9, wherein the processor is configured to:根据对第二数据划分为三类区域数据;Divide the second data into three types of regional data;对所述三类区域数据中的解析记录进行关联压缩。The analysis records in the three types of regional data are associated and compressed.
- 根据权利要14所述的电子设备,其中,所述三类区域数据包括:第一区域数据、第二区域数据和第三区域数据,所述第一区域数据、所述第二区域数据和所述第三区域数据互不相同;The electronic device according to claim 14, wherein the three types of area data include: first area data, second area data, and third area data, and the first area data, the second area data, and the The data in the third region are different from each other;所述处理器用于:The processor is used for:根据第二字节偏移表将所述第一区域数据和所述第二区域数据分别进行联合压缩,得到第三数据;Performing joint compression on the first area data and the second area data respectively according to the second byte offset table to obtain third data;根据所述第二字节偏移表将所述第三数据和所述第三区域数据进行联合压缩。The third data and the third area data are jointly compressed according to the second byte offset table.
- 一种计算机可读存储介质,其中,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行以下步骤:A computer-readable storage medium, wherein it stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the following steps:获取第一数据,所述第一数据为域名系统协议DNS解析记录的数据;Acquiring first data, where the first data is data recorded by a DNS resolution of a domain name system protocol;将所述第一数据进行分类,得到五种类型的数据;Classify the first data to obtain five types of data;对所述五种类型数据分别进行局部压缩,得到第二数据;Perform partial compression on the five types of data respectively to obtain second data;对第二数据进行关联压缩,得到目标数据。The second data is associated and compressed to obtain the target data.
- 根据权利要16所述的计算机可读存储介质,其中,所述计算机程序使得计算机还执行以下步骤:The computer-readable storage medium according to claim 16, wherein the computer program causes the computer to further perform the following steps:根据所述第一数据中的DNS解析记录的数据特征,将第一数据的DNS解析记录划分五种类型,得到五种类型的数据。According to the data characteristics of the DNS resolution records in the first data, the DNS resolution records of the first data are divided into five types to obtain five types of data.
- 根据权利要16所述的计算机可读存储介质,其中,所述计算机程序使得计算机还执行以下步骤:The computer-readable storage medium according to claim 16, wherein the computer program causes the computer to further perform the following steps:根据所述第一字节偏移表对所述五种类型数据分别进行局部压缩,得到所述第二数据。The five types of data are respectively locally compressed according to the first byte offset table to obtain the second data.
- 根据权利要16或18所述的计算机可读存储介质,其中,所述计算机程序使得计算机还执行以下步骤:The computer-readable storage medium according to claim 16 or 18, wherein the computer program causes the computer to further perform the following steps:建立所述五种类型数据对应的第一字节偏移表,所述第一字节偏移表用于对所述五种类型数据进行局部压缩;Establishing a first byte offset table corresponding to the five types of data, where the first byte offset table is used to locally compress the five types of data;检测所述五种类型数据中的每种类型数据中的每条待检测的解析记录与所述第一字节偏移表中已检测过的解析记录是否冗余;Detecting whether each analytical record to be detected in each of the five types of data and the analytical record that has been detected in the first byte offset table are redundant;若是,则将所述五种类型数据中的每种类型数据中的每条待检测的解析记录的偏移大小记录到所述第一字节偏移表中;If yes, record the offset size of each parsing record to be detected in each of the five types of data in the first byte offset table;若否,则在所述第一字节偏移表中增加所述每条待检测的解析记录。If not, add each of the analytical records to be detected in the first byte offset table.
- 根据权利要19所述的计算机可读存储介质,其中,所述计算机程序使得计算机还执行以下步骤:The computer-readable storage medium according to claim 19, wherein the computer program causes the computer to further perform the following steps:在对所述五种类型数据的每种类型的解析记录分别进行同类内部的局部压缩之后,确定所述五种类型数据的每种类型的解析记录的第一位置,所述第一位置为所述五种类型数据的每种类型数据中的基准位置;After the analysis records of each type of the five types of data are locally compressed within the same type, the first position of the analysis record of each type of the five types of data is determined, and the first position is all Describe the reference position in each of the five types of data;根据所述第一位置设置所述五种类型数据的每种类型数据对应的第一偏移大小;Setting a first offset size corresponding to each of the five types of data according to the first position;将所述第一偏移大小和所述第一位置,确定所述第一字节偏移表。Determine the first byte offset table by using the first offset size and the first position.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010742846.8 | 2020-07-28 | ||
CN202010742846.8A CN111917899B (en) | 2020-07-28 | 2020-07-28 | Domain name compression method and related product thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021139240A1 true WO2021139240A1 (en) | 2021-07-15 |
Family
ID=73286636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/118337 WO2021139240A1 (en) | 2020-07-28 | 2020-09-28 | Domain name compression method and product related thereto |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111917899B (en) |
WO (1) | WO2021139240A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114168945A (en) * | 2021-12-09 | 2022-03-11 | 绿盟科技集团股份有限公司 | Method and device for detecting potential risk of sub-domain name |
CN117749762A (en) * | 2023-10-19 | 2024-03-22 | 天翼安全科技有限公司 | DNS access request processing method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040093433A1 (en) * | 2002-11-13 | 2004-05-13 | Armbruster Peter J. | Method for group call address of record compression |
CN105530327A (en) * | 2014-10-27 | 2016-04-27 | 任子行网络技术股份有限公司 | DNS (domain name system) key information processing method and system |
CN106331213A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Domain name system DNS processing method and apparatus |
CN108989484A (en) * | 2018-08-07 | 2018-12-11 | 北京奇安信科技有限公司 | A kind of compression and storage method and device of domain name system DNS log |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7843911B2 (en) * | 2005-11-15 | 2010-11-30 | Nominum, Inc. | Data grouping approach to telephone number management in domain name systems |
US8972488B2 (en) * | 2010-09-28 | 2015-03-03 | Redis Labs Ltd. | System, methods, and media for providing in-memory non-relational databases |
CN102420843B (en) * | 2011-06-24 | 2015-12-02 | 北京奇虎科技有限公司 | A kind of compression and decompression method, Apparatus and system based on cloud compression link |
US8924446B2 (en) * | 2011-12-29 | 2014-12-30 | Verisign, Inc. | Compression of small strings |
CN103581130B (en) * | 2012-07-30 | 2017-01-25 | 优视科技有限公司 | data compression processing method, system and device |
CN105306606A (en) * | 2014-05-28 | 2016-02-03 | 无锡韩光电器有限公司 | Domain name analysis method and system |
-
2020
- 2020-07-28 CN CN202010742846.8A patent/CN111917899B/en active Active
- 2020-09-28 WO PCT/CN2020/118337 patent/WO2021139240A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040093433A1 (en) * | 2002-11-13 | 2004-05-13 | Armbruster Peter J. | Method for group call address of record compression |
CN105530327A (en) * | 2014-10-27 | 2016-04-27 | 任子行网络技术股份有限公司 | DNS (domain name system) key information processing method and system |
CN106331213A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Domain name system DNS processing method and apparatus |
CN108989484A (en) * | 2018-08-07 | 2018-12-11 | 北京奇安信科技有限公司 | A kind of compression and storage method and device of domain name system DNS log |
Non-Patent Citations (1)
Title |
---|
YAN XIA-LI;WANG QIAN;LYU WAN-BO;ZHANG HAI-KUO;YUE QIAO-LI;CAO SHUANG: "Fast Domain Name Compression Algorithm Based on Base Relocation", COMPUTER SYSTEMS & APPLICATIONS, vol. 29, no. 1, 15 January 2020 (2020-01-15), pages 151 - 157, XP055827887, ISSN: 1003-3254, DOI: 10.15888/j.cnki.csa.007245 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114168945A (en) * | 2021-12-09 | 2022-03-11 | 绿盟科技集团股份有限公司 | Method and device for detecting potential risk of sub-domain name |
CN117749762A (en) * | 2023-10-19 | 2024-03-22 | 天翼安全科技有限公司 | DNS access request processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111917899B (en) | 2022-05-17 |
CN111917899A (en) | 2020-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7849162B2 (en) | System and method for selecting a best-fit form or URL in an originating web page as a target URL for replaying a predefined path through the internet | |
WO2021139240A1 (en) | Domain name compression method and product related thereto | |
US20040083307A1 (en) | Apparatus and method for transparent selection of an internet server based on geographic location of a user | |
US7373348B2 (en) | Distributed directory deployment | |
KR101668272B1 (en) | Characterizing unregistered domain names | |
CN108040085A (en) | Method for network access, device and server | |
WO2020228038A1 (en) | Domain name processing method, apparatus, electronic device, and storage medium | |
WO2018024176A1 (en) | Device and method preventing repeated logins of same user | |
CN109194749B (en) | Method for monitoring network request and storage medium | |
CN105978748A (en) | Terminal equipment information counting method and terminal equipment information counting device based on Hash node | |
US8554999B2 (en) | Methods for providing a response and systems thereof | |
CN115333966A (en) | Nginx log analysis method, system and equipment based on topology | |
US20210014298A1 (en) | Message display method and device, and storage medium | |
US9843559B2 (en) | Method for determining validity of command and system thereof | |
WO2022237729A1 (en) | Domain name parsing method and system, electronic apparatus, device, and medium | |
CN114301872B (en) | Domain name based access method and device, electronic equipment and storage medium | |
US20070239688A1 (en) | System and method for altering search result sequence based on user preferences | |
US20090043884A1 (en) | Recording Method and Recording System of Log | |
CN113132219B (en) | Network quick access method for Internet of things terminal and Internet of things network device | |
CN111885220B (en) | Active acquisition and verification method for target unit IP assets | |
CN111970250B (en) | Method for identifying account sharing, electronic device and storage medium | |
CN115189901A (en) | Abnormal request identification method, device, server and storage medium | |
CN111865976A (en) | Access control method, device and gateway | |
JP2003178024A (en) | Illegal access tracking method, program therefor and recording medium the program recorded thereon | |
US11636100B2 (en) | Systems and methods for compression-based search engine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20912808 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20912808 Country of ref document: EP Kind code of ref document: A1 |