Address base data processing method, device and equipment applied to CDN (Content Delivery Network) and medium
By dividing the to-process data into data groups to be merged and generating corresponding storage areas, the storage and security problems of CDN service providers when processing data in multiple formats are solved, and the effects of unified format storage and data security are achieved.
Patent Information
- Application Number
- CN202411845765.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-11
AI Technical Summary
When dealing with a wide variety of data files of different formats, CDN service providers face difficulties in maintaining codes and the risk of IP database data leakage, and lack a method that can store IP database data in a unified manner.
By dividing the to-processed data into a plurality of data groups to be merged, and storing it in the first storage area in a predetermined manner, and storing the character string data in the to-processed data attribute information in the first storage area, a second storage area is generated based on the first storage area, and the data information stored in the first storage area is recorded through the second storage area to realize storage in a unified format.
It realizes the storage of a wide variety of data files of different formats in a unified format, which is easy to manage, and ensures data security through encryption and compression technologies and reduces storage consumption.
Smart Images

Figure CN119807274A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network communication technology, and in particular to an address library data processing method, device, equipment and medium applied to CDN. Background Art
[0002] Content Delivery Network (CDN) can cache and dispatch content based on the user's geographic location, network status and other factors, allowing users to obtain the required content from nodes closer to them. CDN service providers usually build their own IP libraries and purchase commercial IP libraries to complete the positioning and dispatch of user data, but different IP libraries have different scales, accuracy, data formats, and attribute fields due to different usage scenarios.
[0003] When dealing with a wide variety of data files in different formats, CDN service providers usually introduce multiple IP library SDKs (a software development kit for querying IP). However, IP library SDKs have difficulties in code maintenance and the risk of IP library data leakage. In view of this, a method for building an address library that can be applied to CDN is needed to store IP library data in a unified file format. Summary of the invention
[0004] The present disclosure provides an address library data processing method, device, equipment and medium applied to CDN. The data to be processed is stored in a first storage area in a predetermined manner. A second storage is generated based on the first storage area. The data information stored in the first storage area is recorded in the second storage area. Thus, a wide variety of data files in different formats can be stored in a unified format for easy management.
[0005] In one aspect, the present embodiment provides an address library data processing method applied to a CDN, comprising: storing the data to be processed in a first storage area in a predetermined storage manner; and generating a second storage area based on the first storage area, the second storage area being configured to identify information of the data to be processed stored in the first storage area; wherein the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, a list of attribute information of each data group to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
[0006] On the other hand, an embodiment of the present disclosure provides an address library data processing method applied to CDN, including: parsing a header identifier, the header identifier is used to identify a data file to be processed; and based on the header identifier, determining a first storage area and a second storage area in the data file to be processed; wherein the first storage area is configured to store the data to be processed in a predetermined storage manner, and the second storage area is configured to identify information of the data to be processed stored in the first storage area, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, a list of attribute information of each data group to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
[0007] On the other hand, an embodiment of the present disclosure provides an address library data processing device applied to CDN, including: an information storage module, the storage module is configured to store the data to be processed in a first storage area in a predetermined storage method; and an information generation module, the information generation module is configured to generate a second storage area based on the first storage area, the second storage area is configured to be used to identify the information of the data to be processed stored in the first storage area; wherein the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
[0008] On the other hand, an embodiment of the present disclosure provides an address library data processing device applied to CDN, including: an information parsing module, the information parsing module is configured to parse a header identifier, the header identifier is used to identify a data file to be processed; and an information determination module, the information determination module is configured to determine a first storage area and a second storage area in the data file to be processed based on the header identifier; wherein the first storage area is configured to store the data to be processed in a predetermined storage manner, the second storage area is configured to identify information that the first storage area stores the data to be processed, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, a list of attribute information of each data group to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data.
[0009] On the other hand, an embodiment of the present disclosure provides a network device, comprising: a communication interface configured to perform wireless communication with a terminal device; a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the network device executes a method.
[0010] On the other hand, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium for storing computer-readable instructions, which, when executed by a processor, causes the processor to execute a method.
[0011] The present disclosure provides an address library data processing method, device, equipment and medium for CDN, which divides the data to be processed into multiple data groups to be merged, and stores the data groups to be merged in a first storage area in a predetermined manner. At the same time, the string data in the attribute information of the data to be processed is stored in the first storage area. Based on the first storage area, a second storage is generated. The data information stored in the first storage area is stored in the second storage area. In this way, a wide variety of data files with different formats can be stored in a unified format for easy management. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0013] Figure 1 The following schematic diagram shows an environmental application diagram according to an embodiment of the present disclosure.
[0014] Figure 2 The flowchart schematically shows a method for processing address library data applied to a CDN according to an embodiment of the present disclosure.
[0015] Figure 3 The flowchart of storing the to-be-processed data in the first storage area in a predetermined storage manner according to an embodiment of the present disclosure is schematically shown.
[0016] Figure 4 Another flowchart of storing to-be-processed data in a first storage area in a predetermined storage manner according to an embodiment of the present disclosure is schematically shown.
[0017] Figure 5 A schematic diagram of a data file to be processed according to an embodiment of the present disclosure is schematically shown.
[0018] Figure 6 The following is a schematic diagram of an address library data processing method applied to a CDN according to an embodiment of the present disclosure.
[0019] Figure 7 A flowchart of another method for processing address library data applied to a CDN according to an embodiment of the present disclosure is schematically shown.
[0020] Figure 8 The flowchart schematically shows a method for querying address database data applied to a CDN according to an embodiment of the present disclosure.
[0021] Fig. 9 The following is a schematic diagram schematically showing the attribute information of the target data group to be merged according to an embodiment of the present disclosure.
[0022] Fig.10 A block diagram schematically shows an address library data processing device applied to a CDN according to an embodiment of the present disclosure.
[0023] Fig.11 A block diagram schematically shows another address library data processing device applied to a CDN according to an embodiment of the present disclosure.
[0024] Fig.12 A block diagram of a network device according to an embodiment of the present disclosure is schematically shown.
[0025] Fig.13 A block diagram of a non-transitory computer-readable storage medium according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0027] Figure 1 The following schematic diagram shows an environmental application diagram according to an embodiment of the present disclosure.
[0028] like Figure 1 As shown, the network center 100 may include a network device 101 and a destination device 102. The network device 101 and the destination device 102 may perform real-time data transmission through the network center 100.
[0029] In the embodiment of the present disclosure, the network center 100 can be used to represent a network center based on a CDN system. That is, the network center 100 can include multiple network devices 101, and the network devices 101 can be servers, routers, switches, etc. The multiple network devices 101 constitute a CDN system. The destination device 102 obtains data information in real time through the CDN system.
[0030] In the embodiment of the present disclosure, the network device 101 in the CDN system can process the IP data using the method of the embodiment of the present disclosure. The network device 101 in the CDN system can also store the processing results of the IP data and generate an IP database file. In addition, the network device 101 in the CDN system can also receive the data sent by the destination device 102, match it in the IP database file according to the data, and then send the matching result to the destination device 102.
[0031] For example, the network device 101 in the CDN system can determine the location information of the destination device 102 according to the IP address of the destination device 102, and then send data to the destination device 102 through the server node closest to the destination device 102 to provide more accurate data information, such as providing a more accurate language interface for the destination device 102. Or the network device 101 can determine the network operator of the destination device 102 according to the IP address of the destination device 102 to provide high-quality coverage nodes and network security vendors. Determine whether the request source has been proxied or whether it matches a high-risk profile based on the IP address, etc.
[0032] The destination device 102 can access data from the network device 101, and can also receive data transmitted by the network device 101. The destination device 102 can include any type of electronic device, such as a mobile device, a tablet device, a laptop computer, a workstation, a virtual reality device, a gaming device, a set-top box, a digital streaming device, a vehicle terminal, a smart TV, a set-top box, etc.
[0033] Figure 2 The flowchart schematically shows a method for processing address library data applied to a CDN according to an embodiment of the present disclosure.
[0034] like Figure 2 As shown, the method of the embodiment of the present disclosure includes steps S201 and S202:
[0035] S201, storing the data to be processed in a first storage area in a predetermined storage manner.
[0036] In the disclosed embodiment, the data to be processed may be IP data. In some embodiments, the IP data may be read from other IP libraries or obtained by any manual arrangement. The IP data is stored in the first storage area in a unified predetermined storage manner.
[0037] S202. Based on the first storage area, generate a second storage area, where the second storage area is configured to identify information about the data to be processed stored in the first storage area, wherein the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, a list of attribute information of each data group to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data.
[0038] In the embodiment of the present disclosure, the second storage area may store information about the data to be processed stored in the first storage area. For example, the second storage area may store the amount of data to be processed stored in the first storage area, the generation time of the data to be processed, the source address, etc., which are not limited here.
[0039] In the embodiment of the present disclosure, the data to be processed can also be divided into one or more data groups to be merged. Furthermore, one or more data groups to be merged can be stored in the first storage area, and relevant information about one or more data groups to be merged can be stored in the second storage area. For example, the number of data groups to be merged, the attribute information list of the data groups to be merged, the data length of each data group to be merged, etc. are stored. Among them, the data to be processed can be divided into one or more data groups to be merged according to the attribute information of the data to be processed. The data to be processed can also be divided into one or more data groups to be merged according to the source address information of the data to be processed, and so on.
[0040] In the disclosed embodiment, the data to be processed may carry string information. For example, the IP data carries a string identifying geographic location information. Therefore, the first storage area may store string data in the data to be processed, and the second storage area may store relevant information about the string data. For example, the original data length of the string data, the number of strings in the string data, the length of a single string, and so on.
[0041] According to the embodiment of the present disclosure, the data to be processed is stored in the first storage area in a unified predetermined storage manner. At the same time, the information about the data to be processed stored in the first storage area is stored in the second storage area. Thus, the data to be processed can be stored uniformly for easy management.
[0042] Figure 3 The flowchart of storing the to-be-processed data in the first storage area in a predetermined storage manner according to an embodiment of the present disclosure is schematically shown.
[0043] like Figure 3 As shown, it includes steps S301, S302 and S303:
[0044] S301 . Divide the data to be processed into one or more data groups to be merged based on attribute information of the data to be processed and physical identifiers of the data to be processed.
[0045] In the disclosed embodiment, the attribute information and physical identification of the data to be processed can be obtained. For example, if the data to be processed is IP data, the version number, destination address, source address, etc. in the IP data can be obtained. In addition, the IP address of the IP data can also be obtained.
[0046] In the embodiments of the present disclosure, the network device may group multiple data to be processed according to the attribute information and physical identification of the data to be processed. In some embodiments, multiple data to be processed with the same physical identification may be grouped together. In other embodiments, multiple data to be processed with the same attribute information may be grouped together.
[0047] Preferably, the data to be processed with the same attribute information and continuous physical identification can be grouped into one group. For example, multiple IP data with the same attribute information and continuous IP addresses are determined as one data group to be merged.
[0048] It can be understood that a data group to be merged may include one data to be processed or multiple data to be processed.
[0049] S302: Store one or more data groups to be merged in a first storage area in a predetermined storage manner.
[0050] In the embodiment of the present disclosure, each data group to be merged is stored in the first storage area in a unified predetermined storage manner.
[0051] In the embodiment of the present disclosure, the predetermined storage method may be to store predetermined information, for example, the attribute information and physical identification of each data group to be merged may be stored, or the group identification of each data group to be merged may be stored, and so on.
[0052] According to the embodiment of the present disclosure, by dividing the data to be processed into multiple data groups to be merged and storing each data group to be merged in a predetermined manner, on the basis of ensuring that the data to be processed is stored in a unified manner, the data to be processed can be further compressed to reduce storage consumption.
[0053] S303: Store in a first storage area one or more items of a starting physical identifier, an ending physical identifier, and attribute information of the data to be processed included in each of the one or more data groups to be merged.
[0054] In the embodiment of the present disclosure, a plurality of to-be-processed data with continuous physical identifications and the same attribute information may be grouped into one to-be-merged data group.
[0055] In the embodiment of the present disclosure, the network device can obtain the physical identification of each data to be processed in each data group to be merged and the attribute information of each data to be processed. Further, the starting physical identification and the ending physical identification of the multiple physical identifications included in each data group to be merged are determined.
[0056] It is understandable that when multiple to-be-processed data with continuous physical identifications and the same attribute information are grouped into one to-be-merged data group, the attribute information of the to-be-processed data included in each to-be-merged data group is the same. Therefore, the to-be-merged data group has the same attribute information of the to-be-processed data included in it.
[0057] For example, a data group to be merged includes multiple IP data with continuous IP addresses and the same attribute information. According to the IP address of each IP data, the starting IP address and the ending IP address are determined. At the same time, the attribute information of the data group to be merged is the same as the attribute information of the IP data included therein. Therefore, according to the embodiment of the present disclosure, the starting IP address, the ending IP address, and the attribute information of the IP data of the data group to be merged can be stored in the first storage area to identify the data group to be merged.
[0058] It is understandable that each data group to be merged may obtain a corresponding starting physical identifier, ending physical identifier and attribute information, and then the corresponding starting physical identifier, ending physical identifier and attribute information of each data group to be merged may be stored in the first storage area.
[0059] In the disclosed embodiment, the data groups to be merged may be sorted according to the starting physical identifiers corresponding to the data groups to be merged. For example, the data groups to be merged are sorted in ascending order according to the starting physical identifiers of each data group to be merged. The sorted data groups to be merged are stored in the first storage area in a predetermined storage manner.
[0060] In the disclosed embodiments, the data group to be merged may also include the version of the data group to be merged. For example, the IP version of the current data group to be merged is recorded by the first byte. For example, 0 is used to represent IPv4 and 1 is used to represent IPv6. In some embodiments, when the starting physical identifier is the starting IP and the ending physical identifier is the ending IP, the starting IP may occupy 4 bytes under the IPv4 version and 16 bytes under the IPv6 version. The ending IP may occupy 4 bytes under the IPv4 version and 16 bytes under the IPv6 version.
[0061] According to the embodiment of the present disclosure, the data groups to be merged are stored by using the starting physical identifier, the ending physical identifier and the attribute information corresponding to each data group to be merged, so that the data to be processed can be further compressed to reduce storage consumption.
[0062] Figure 4Another flowchart of storing to-be-processed data in a first storage area in a predetermined storage manner according to an embodiment of the present disclosure is schematically shown.
[0063] like Figure 4 As shown, steps S401 to S404 are included:
[0064] S401. Determine character string data based on attribute information of data to be processed.
[0065] In the embodiment of the present disclosure, the string information in the attribute information of the data to be processed can be obtained. In some embodiments, the attribute information of the data to be processed can be traversed, and the string information in the attribute information can be obtained to form the string data.
[0066] For example, data to be processed 1, data to be processed 2, and data to be processed 3. The character string included in the attribute information of data to be processed 1 is region 1; the character string included in the attribute information of data to be processed 2 is region 2; the character string included in the attribute information of data to be processed 3 is region 3. Then the character string data can be formed: region 1 region 2 region 3.
[0067] S402: Store the character string data in a first storage area in a predetermined storage manner.
[0068] In the embodiment of the present disclosure, the string data may be stored in a predetermined storage manner. For example, the code, identification, etc. of each string in the string data may be stored. Alternatively, the string data may be stored in a classified manner.
[0069] S403: Based on the character string data, deduplicate the character string data.
[0070] In the disclosed embodiment, the acquired character string data may be deduplicated, thereby further compressing the data to be processed.
[0071] For example, there are 10,000 IP data with associated cities of "City 1" and "City 2". Then, the 10,000 IP data are traversed to obtain string data, such as: City 1 City 1... City 2... City 2. Then, the obtained string data can be deduplicated, and the deduplicated string data is: City 1 City 2, two strings.
[0072] In the disclosed embodiment, multiple character strings may be concatenated to accurately obtain the character string. For example, all the deduplicated character strings are concatenated together with ASCII code / 0. For example, if "city 1" and "city 2" are concatenated together, the character string data is: city 1 / 0 city 2. It is understandable that the character strings may also be concatenated in other ways, for example, concatenated together with ASCII code\*, etc., which are not limited here.
[0073] In the disclosed embodiment, the string data after deduplication and splicing can also be compressed. For example, the zip algorithm is used for compression. In addition, the string data can also be compressed by other compression methods, which are not limited here.
[0074] S404: Encrypt the deduplicated string data, and store the encrypted string data in a first storage area.
[0075] In the disclosed embodiment, the compressed string data may be encrypted, for example, using AES symmetric encryption. In addition, the compressed string data may also be encrypted using other encryption methods, which are not limited here.
[0076] Through the disclosed embodiments, the string information of the data to be processed is obtained and the string data is generated. At the same time, the string data is deduplicated. This can further compress the storage volume of the data to be processed. In addition, multiple strings are concatenated to better distinguish each string, so that the string information corresponding to the data to be processed can be accurately obtained later. Furthermore, the deduplicated string data is compressed and then encrypted, so that the security of the storage of the data to be processed can be guaranteed, and even if the attribute information of the data to be processed stored in the first storage area is lost or leaked, it cannot be directly used by a third party.
[0077] In an embodiment of the present disclosure, one or more items of a starting physical identifier, an ending physical identifier, and attribute information of the data to be processed included in each of the one or more data groups to be merged are stored in a first storage area, including: determining an attribute identifier of the data to be processed in the data group to be merged based on the attribute information and character string data of the data to be processed, the attribute identifier being used to indicate a position of a character string corresponding to the attribute information of the data to be processed in the character string data; and storing the attribute identifier of each of the one or more data groups to be merged in the first storage area.
[0078] In the embodiment of the present disclosure, based on the deduplicated string data, the position of the string in the attribute information of each data to be processed in the string data is identified by an attribute identifier.
[0079] For example, the string data after deduplication is: city 1 / 0 city 2. The string included in the attribute information of the data to be processed 1 is city 2; the string included in the attribute information of the data to be processed 2 is city 1; the string included in the attribute information of the data to be processed 3 is city 1. Then, the attribute information of the data to be processed is identified according to the position where the string appears in the string data, and it can be determined that: the attribute identification of the data to be processed 1 is 2; the attribute identification of the data to be processed 2 is 1; the attribute identification of the data to be processed 3 is 1.
[0080] In the embodiment of the present disclosure, the attribute identification of the data to be merged is stored in the first storage area. For example, the first data to be merged includes data to be processed 1 and data to be processed 2. The attribute identification of data to be processed 1 and data to be processed 2 is 1, and the attribute identification of the first data to be merged is 1. The second data to be merged includes data to be processed 3. The attribute identification of data to be processed 3 is 2, and the attribute identification of the first data to be merged is 2.
[0081] It is understandable that the data to be processed may include multiple attribute information, and correspondingly may include multiple attribute identifiers. For example, in some embodiments, the string data is: city 1 / 0 city 2 / 0 city 3 / 0 region 1 / 0 region 2. The attribute identifiers of the data to be merged 1 may be 1, 5, and the attribute identifiers of the data to be merged 2 may be 3, 4.
[0082] In the embodiment of the present disclosure, when the attribute information of the data group to be merged is of string type, the attribute identifier can be used to identify the starting offset of the string corresponding to the attribute information in the string data. In some embodiments, when the attribute information of the data group to be merged is of integer or floating point type, the attribute identifier stores the value itself.
[0083] According to the embodiment of the present disclosure, the character string in the attribute information of the data group to be merged is indexed by the attribute identifier through the character string data. Only a 4-byte attribute identifier is retained in the first storage area. Thus, the storage volume of the data to be processed can be greatly compressed.
[0084] In an embodiment of the present disclosure, a second storage area is generated based on a first storage area, and the second storage area is configured to identify information of the data to be processed stored in the first storage area, including: determining the second storage area based on one or more of the number of data groups to be merged, the data length of each data group to be merged in one or more data groups to be merged, an attribute information list of each data group to be merged in one or more data groups to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data; wherein the attribute information list includes one or more of the serial number, length, type, and name of the attribute information of the data to be processed.
[0085] In the embodiment of the present disclosure, a json object of the second storage area can be constructed in the memory, and filled with relevant information in the first storage area according to the construction structure of the second storage area. For example, the construction structure of the second storage area includes: the number of data groups to be merged: __; the number of strings in the string data: __. Then, the number of data groups to be merged and the number of strings in the string data can be filled with information according to the relevant information stored in the first storage area.
[0086] In the disclosed embodiment, the second storage area can store the original length of the string data, the length of the string data after de-duplication compression and encryption, and the number of strings included in the string data. In addition, the second storage area can also store the number of data groups to be merged, the data length of each data group to be merged, and the attribute information list of each data group to be merged.
[0087] In the embodiment of the present disclosure, the attribute information list of the data group to be merged can be used to indicate the attribute information of the data to be merged. The sequence number in the attribute information list can be used to indicate the order of the attribute information in the data group to be merged. For example, if the sequence number in the attribute information list corresponding to the data group to be merged 1 is 1, it can indicate the first attribute information of the data to be merged. If the sequence number is 2, it can indicate the second attribute information of the data to be merged.
[0088] The type in the attribute information list can be used to indicate the type of attribute information in the data group to be merged, including integer, floating point, and string types. The name in the attribute information list is used to indicate the name of the attribute information in the data group to be merged, for example, country, city, etc.
[0089] The length in the attribute information list can be used to indicate the length of the attribute information name in the data group to be merged. For example, if the length in the attribute information list corresponding to the data group to be merged 1 is 4, it can indicate that the length of the name in the attribute information of the data to be merged 1 is 4 bytes. It is understandable that the unit of length can also be other length units, which are not limited here.
[0090] For example, a property information list corresponding to the data group to be merged 2 is serial number: 2, length: 4, type: string, name: country. According to the property information list, it can be determined that the name of the second property information of the data group to be merged 2 is country, and the type is string type. Further, according to the property identifier of the data group to be merged 2, the corresponding string can be found in the string data, for example, the corresponding string is A. Then, it can be determined that the second property information of the data group to be merged 2 is country, and the corresponding value is A. It can be understood that A can be the name of a specific country.
[0091] For another example, a list of attribute information corresponding to the data group 3 to be merged is serial number: 2, length: 8, type: integer, name: cell number. Then, according to the attribute information list, it can be determined that the name of the second attribute information of the data group 3 to be merged is the cell number, the name length is 8 bytes, and the type is an integer type. Furthermore, according to the attribute identifier of the data group 3 to be merged, when the type is an integer type, the value of the attribute information is the value of the attribute information. For example, the attribute identifiers of the data group 3 to be merged are 1, 2, and 10. Then, according to the attribute information, it can be determined that the name of the second attribute information of the data group 3 to be merged is the cell number, and its cell number is 2.
[0092] In the disclosed embodiment, the data length of a data group to be merged can be obtained by accumulating the length value of each column in the data group to be merged, for example, the bytes occupied by the version + the bytes of the starting physical identifier + the bytes of the ending physical identifier + the bytes of the row identifier.
[0093] According to an embodiment of the present disclosure, relevant information of the data group to be merged is stored in the second storage area. The second storage area can dynamically adjust the stored information according to the storage situation of the first storage area. In addition, more attribute information can be stored in the second storage area as needed without overwriting the stored information, while still not affecting the basic IP format library functions.
[0094] In the embodiment of the present disclosure, it also includes: encrypting the second storage area.
[0095] In the disclosed embodiment, the second storage area may be encrypted using an AES symmetric encryption algorithm, wherein the encryption key is the same as the key used in the string data encryption process. In addition, the second storage area may also be encrypted using other encryption methods, which are not limited here.
[0096] According to the disclosed embodiment, the second storage area is encrypted, and when the IP database is used, the same key used to encrypt the first storage area is required to decrypt it, thereby ensuring the security of the IP database.
[0097] In the embodiment of the present disclosure, it also includes: a header identifier, the header identifier includes one or more of the following: a file identifier, a file length, a header identifier length, and a check code; wherein the file identifier is used to identify the data to be processed; the file length is used to identify the data length of the first storage area, the data length of the second storage area, and the header identifier length.
[0098] In the disclosed embodiment, the first storage area, the second storage area and the header identifier are concatenated to generate a data file to be processed, for example, to generate an IP database file.
[0099] In the disclosed embodiment, the file identifier can be used to identify the version of the data to be processed. The file identifier can be a fixed length of 8 bytes. Among them, the first 6 characters are fixed to "IPFile", and the last two bytes are the number "01" representing the version number, which defaults to "01". For example, the file identifier: identifier IPFile01 is used to identify the version of IP data, such as IPv4.
[0100] In the embodiments of the present disclosure, the file length can be used to represent the length of the data file to be processed. In some embodiments, the file length occupies a fixed 8 bytes, int type, representing the length of the entire binary file.
[0101] In the embodiment of the present disclosure, the bytes occupied by the header identifier length are fixed at 8 bytes, of int type, representing the header identifier length of the data file to be processed.
[0102] In the embodiment of the present disclosure, the check code has an initial value, for example, the initial value is 0.
[0103] In the disclosed embodiment, the check code can also be updated. A CRC summary can be made for the data file to be processed. The value is updated and written into the "check code" area of the header mark, and a 32-bit CRC check code is stored to check whether the entire file is damaged.
[0104] According to the embodiment of the present disclosure, the information of the data file to be processed can be determined based on the header identifier, so that when the data file to be processed is used, it can be preliminarily determined whether it is an accurate file.
[0105] Figure 5 A schematic diagram of a data file to be processed according to an embodiment of the present disclosure is schematically shown.
[0106] like Figure 5 As shown, the data file to be processed may include a header identifier, a first storage area, and a second storage area. The first storage area stores string data and data groups to be merged. The second storage area may store the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, the original length of the string data, the length of the string data after de-duplication, compression, and encryption, and the number of strings of the string data.
[0107] like Figure 5 As shown, string data is stored in a concatenated form, such as Figure 5 The data group to be merged is stored in a predetermined storage mode, such as Figure 5As shown, each data group to be merged stores version, start IP, end IP, attribute 1, attribute 2, attribute 3, etc. It is understandable that each data group to be merged may include different numbers of attributes. For example, each data group to be merged includes 3 attributes in the first example, and each data group to be merged includes 4 attributes in the second example.
[0108] like Figure 5 As shown, the attribute identifiers of the data groups to be merged are stored in the first storage area.
[0109] For example, the second storage area stores information about Figure 5 The attribute information lists of the two data groups to be merged in the table are as follows. Attribute information list 1 is: sequence number: 1, length: 4, type: string, name: country; attribute information list 2 is: sequence number: 2, length: 4, type: string, name: city; attribute information list 3 is: sequence number: 3, length: 8, type: integer, name: city code. According to the attribute information list, attribute 1 is determined to be the country, attribute 2 is the city, and attribute 3 is the city code. For example, the string data can be: country A / 0 city A / 0 city B / 0 country B / 0 city C / 0 city D / 0...
[0110] Then, for Figure 5 For the first data group to be merged, it can be determined that the country of the first data group to be merged is country A, the city is city A, and the city code is 3. For the second data group to be merged, it can be determined that the country of the second data group to be merged is country B, the city is city D, and the city code is 7.
[0111] As described above, according to the data processing method of the embodiment of the present disclosure, the data to be processed is divided into a plurality of data groups to be merged. The data groups to be merged are stored in the form of a starting physical identifier, an ending physical identifier, and an attribute identifier, thereby compressing the data to be processed. At the same time, the security of the data to be processed can be guaranteed by the attribute identifier. In addition, the string data is deduplicated, compressed and encrypted to reduce the storage volume. Furthermore, by storing the relevant information of the first storage area in the second storage area, the data to be processed can be dynamically described without changing the storage of the data to be processed. This ensures the encryptability, compressibility, and attribute scalability of the data file to be processed.
[0112] In the embodiment of the present disclosure, the network device included in the CDN system can store IP data of different formats in a unified format in the memory based on the method of the embodiment of the present disclosure. When the uniformly stored IP data needs to be used again, the network device included in the CDN system, such as a server, can parse the file formed by the uniformly stored IP data to obtain IP data information. For example, the data file to be processed can be parsed by the following method.
[0113] Figure 6 The flowchart schematically shows a method for processing address library data applied to a CDN according to an embodiment of the present disclosure.
[0114] Figure 6 As shown, the method for processing the data file to be processed includes steps S601 and S602:
[0115] S601: parse a header identifier, where the header identifier is used to identify a data file to be processed.
[0116] In the disclosed embodiment, the header identifier includes a file identifier, a file length, a header identifier length, and a check code.
[0117] In the disclosed embodiment, the data file to be processed can be parsed, for example, the IP database file can be parsed. Further, the header identification length of the data file to be processed is obtained. In some embodiments, the header identification length of the data file to be processed is a fixed length of 28 bytes. Further, it is determined that the header identification length of the data file to be processed is equal to 28 bytes, and if it is equal to 28 bytes, the parsing continues. If it is less than 28 bytes, the file format is abnormal and the parsing is terminated.
[0118] In the disclosed embodiments, the file identifier can be parsed. In some embodiments, the first 28 bytes of the data file to be processed can be obtained, and it is determined whether the first 6 bytes are "IPFile". If they match, the parsing continues. If they do not match, the parsing is terminated. In some embodiments, the first 28 bytes of the data file to be processed can be obtained, and it is determined whether the 7th and 8th bytes are "01". If not, it means that the version of the data file to be processed is incorrect, and the parsing is terminated.
[0119] In the disclosed embodiment, the file length can be parsed. In some embodiments, the file length of the data file to be processed can be obtained, and it is determined whether the obtained file length of the data file to be processed is equal to the file length recorded in the header identifier, and if it does not match, the parsing is terminated.
[0120] In the disclosed embodiment, the check code can be parsed. In some embodiments, the check code in the header identifier can be obtained, and the data file to be processed can be checked to determine whether it is damaged. If it is determined that the data file to be processed is damaged, the parsing is terminated.
[0121] S602. Based on the header identifier, determine the first storage area and the second storage area in the data file to be processed; wherein the first storage area is configured to store the data to be processed in a predetermined storage manner, and the second storage area is configured to be used to identify the information of the data to be processed stored in the first storage area, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data.
[0122] In the embodiment of the present disclosure, the remaining part after the header identifier in the data file to be processed is obtained, and then the first storage area and the second storage area are obtained.
[0123] In the disclosed embodiment, the relevant information of the IP data can be parsed using the acquired first storage area and the second storage area. For example, the first storage area can store IP data converted into a predetermined format, for example, the first storage area can store IP data converted into one or more data groups to be merged. The second storage area stores relevant information about the IP data in the first storage area, for example, the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, and so on. Based on the information in the second storage area, the IP data in the first storage area can be divided. For example, according to the number of data groups to be merged and the data length of each data group to be merged, the data stored in the first storage area is divided into multiple data groups to be merged.
[0124] According to the embodiment of the present disclosure, by parsing the header identifier, it is determined whether the data file to be processed is correct. Further, the first storage area and the second storage area in the data file to be processed are parsed according to the parsing result. Thus, the data file to be processed can be parsed correctly.
[0125] Figure 7 A flowchart of another method for processing address library data applied to a CDN according to an embodiment of the present disclosure is schematically shown.
[0126] Figure 7 The data processing method shown includes steps S701, S702, S703a and S703b:
[0127] S701. Decrypt the second storage area to obtain information stored in the second storage area for identifying the data to be processed stored in the first storage area.
[0128] In the disclosed embodiment, the remaining part after the header file in the data file to be processed is obtained, and then the encrypted second storage area in the remaining part is obtained, and the key used to generate the data file to be processed is used for decryption. If the decryption fails, the parsing is terminated.
[0129] In some embodiments, when creating the data file to be processed, the string data in the first storage area is encrypted by AES, and then the AES key generated in the process can be used to partially decrypt the second storage area.
[0130] In some embodiments, it is determined whether the data format of the decrypted second storage area is a JSON object, and if not, parsing is terminated.
[0131] S702: Analyze the first storage area based on the second storage area.
[0132] In the embodiment of the present disclosure, information about the data to be processed stored in the first storage area is obtained from the decrypted second storage area.
[0133] S703a: Determine the string data stored in the first storage area based on one or more of the original data length of the string data stored in the second storage area, the encrypted data length of the string data, and the number of strings in the string data.
[0134] In the disclosed embodiment, the encrypted part after the second storage area of the data file to be processed is read. In some embodiments, the key used when the data file to be processed is used for decryption, and if the decryption fails, the parsing is terminated. For example, when the data file to be processed is created, the string data in the first storage area is encrypted by AES, and the AES key generated in the process can be used for decryption. If the decryption fails, the parsing is terminated.
[0135] In the disclosed embodiment, the decrypted data is decompressed, for example, using a zip algorithm to decompress the data.
[0136] In the disclosed embodiment, the decompressed data is segmented to obtain multiple character strings, for example, using ASCII / 0 for segmentation.
[0137] In the disclosed embodiment, the number of character strings can be obtained from the decrypted second storage area. Further, the number of character strings obtained from the second storage area is compared with the number of character strings obtained after segmentation. If they do not match, the parsing is terminated.
[0138] In the embodiment of the present disclosure, the parsed and segmented character strings may be stored in a memory for later use.
[0139] S703b. Determine one or more data groups to be merged stored in the first storage area based on the number of data groups to be merged stored in the second storage area, the data length of each of the one or more data groups to be merged, and one or more items in the attribute information list of each of the one or more data groups to be merged; wherein the attribute information list includes one or more items of the sequence number, length, type, and name of the attribute information of the data groups to be merged.
[0140] In the disclosed embodiment, the number of the data groups to be merged can be obtained from the decrypted second storage area. If the number of the data groups to be merged is less than or equal to 0, the parsing is terminated.
[0141] In the disclosed embodiment, the data length of each to-be-merged data group can be obtained from the decrypted second storage area. If there is a to-be-merged data group whose length is less than or equal to 0, the parsing is terminated.
[0142] In the disclosed embodiment, the attribute information list of each to-be-merged data group can be obtained from the decrypted second storage area. If the number of attribute information lists is less than or equal to 0, the parsing is terminated.
[0143] In the disclosed embodiment, the encrypted portion after the second storage area of the data file to be processed can be read to the end of the file. It can be checked whether the read data length is the sum of the data lengths of each data group to be merged. If it does not match, it means that the data is wrong, and the parsing is terminated. In some embodiments, the data length of each data group to be merged is consistent, and it can be judged based on whether the read data length is the number of data groups to be merged * the data length of a single data group to be merged.
[0144] It can be understood that the location of the character string data in the data file to be processed may be before the location of the data group to be merged, or may be after the location of the data group to be merged.
[0145] In the embodiment of the present disclosure, the data groups to be merged are determined according to the number of data groups to be merged and the data length of each data group to be merged. It is understandable that the part of the data groups to be merged in the first storage area in the data file to be processed can be obtained. And the part of the data groups to be merged is divided into one or more data groups to be merged according to the number of data groups to be merged and the data length.
[0146] In the embodiment of the present disclosure, one or more data groups to be merged after segmentation may be stored in a memory for standby use.
[0147] According to an embodiment of the present disclosure, the data to be processed is divided into a plurality of data groups to be merged, and the data groups to be merged are stored in a first storage area in a predetermined manner. At the same time, the character string data in the attribute information of the data groups to be merged is stored in the first storage area in a predetermined manner. Then, based on the first storage area, a second storage area is generated and encrypted. The second storage area and the first storage area are spliced using a header identifier to obtain a data file to be processed.
[0148] In addition, the data file to be processed can be parsed to obtain the second storage area. Based on the second storage area, the string data and the data group to be merged in the first storage area are obtained. The obtained string data and the data group to be merged are stored in the memory for backup. When using the data file to be processed, it only needs to be parsed once, and the parsed data can be stored in the memory for backup.
[0149] According to the disclosed embodiment, in the case of a leak of the data file to be processed, in the absence of a key, only the data group to be merged in the first storage area with the largest data volume is stored in plain text. However, since the first storage area stores binary values and has no obvious start character feature, it cannot be correctly segmented. At the same time, without the information stored in the second storage area, the meaning of the binary data cannot be known. Therefore, the security of the data can be guaranteed.
[0150] In the embodiment of the present disclosure, the network device included in the CDN system, such as a server, can receive an IP data query request sent by a target device. Alternatively, the network device included in the CDN system can receive other communication requests sent by the target device, and the network device in the CDN system can obtain relevant information of the target device based on the IP address of the target device.
[0151] For example, the network device in the CDN system can obtain the IP data of the target device, convert the IP data into a predetermined format, and compare the IP data converted into the predetermined format with the parsed data file to be processed stored in the server. If the IP data is queried in the parsed data file to be processed, the relevant information of the IP data can be read from the parsed data file to be processed. For example, the location and attribute information of the target device can be obtained, and then the nearest server can be selected to provide the target device with its attribute-related information. It can be understood that the network device in the CDN system can also store the IP data of the target device in the network device according to the address library data processing method applied to CDN in the embodiment of the present disclosure, so as to facilitate subsequent information transmission.
[0152] Figure 8 The flowchart schematically shows a method for querying address database data applied to a CDN according to an embodiment of the present disclosure.
[0153] Figure 8 As shown, the data query method includes steps S801 to S806:
[0154] S801. Obtain data to be queried in a predetermined format.
[0155] In the disclosed embodiment, the data to be queried may be IP data to be queried. The data to be queried may be converted into a predetermined format. For example, the format may be converted into a format consistent with the starting physical identifier in the data group to be merged, so as to query the data to be queried in the data group to be merged.
[0156] In one embodiment, the data to be queried may be IP data, and it can be assumed that the IP number to be queried is 223.255.255.2.
[0157] Furthermore, the IP data can be converted into a predetermined format. For example, 223.255.255.2 is converted into an integer value 3758096130. Here, taking the IPv4 algorithm as an example: the IP address is split by ".". For example, 3758096130 = 223*256*256*256+255*256*256+255*256+2.
[0158] S802: Determine a target data group to be merged based on the to-be-queried data converted into a predetermined format, and a start physical identifier and an end physical identifier included in each of the one or more data groups to be merged.
[0159] In the embodiment of the present disclosure, the starting physical identifier and the ending physical identifier interval may be determined according to the data to be queried, and then the target data group to be merged may be determined.
[0160] For example, in the above embodiment, a binary search method is used to locate a target data group to be merged that meets the condition of "starting IP <= 3758096130 < ending IP" among multiple data groups to be merged. At the same time, it is determined whether the IP address version represented by the first byte of the target data group to be merged matches the version of the current IP data to be queried. If they do not match, it means that the data file to be processed does not contain the IP data information to be queried, and the query ends.
[0161] S803: Obtain the attribute identifier of the target data group to be merged.
[0162] S804: Determine the attributes of the target data group to be merged based on the attribute identifier of the target data group to be merged, the attribute information list of the target data group to be merged, and the character string data.
[0163] In the above embodiment, when the target data group to be merged is located, the first byte and the subsequent start IP and end IP bytes are skipped, and the subsequent data is the attribute identifier.
[0164] S805: Determine an attribute directory of the target data group to be merged based on the attribute information list of the target data group to be merged.
[0165] In the embodiment of the present disclosure, the attribute directory is obtained according to the attribute information list. For example, the attribute information list of the target data group to be merged is sequence number: 1, length: 4, type: string, name: country. Then it can be determined that the first attribute name of the target data group to be merged is country, and the type is string type.
[0166] S806, and when the attribute directory of the target data group to be merged is of a string type, determine the attribute of the target data group to be merged based on the string data and the attribute identifier of the target data group to be merged; wherein, when the attribute directory of the target data group to be merged is of a string type, the attribute identifier of the target data group to be merged is configured as a position identifier of the string corresponding to the attribute of the target data group to be merged in the string data.
[0167] In the disclosed embodiment, the attribute is read according to the attribute directory and the attribute identifier. In the case where the attribute directory is a string type, the current attribute identifier is a string identifier, and the string at the corresponding position needs to be read again from the string data. If it is an integer or a floating point number, the binary data of the attribute identifier is directly used.
[0168] Fig. 9 The following is a schematic diagram schematically showing the attribute information of the target data group to be merged according to an embodiment of the present disclosure.
[0169] like Fig. 9 As shown, according to the IP data query method of the embodiment of the present disclosure, the IP data to be queried is queried. Thus, the information of the IP data can be obtained. For example, in the above embodiment, the IP data 223.255.255.2 is queried. Through the IP data query method of the embodiment of the present disclosure, it is found that the country of the IP data is country A, the city is city 1, and the operator is operator 1.
[0170] Fig.10 The following schematically illustrates a block diagram of an address library data processing device applied to a CDN according to an embodiment of the present disclosure.
[0171] like Fig.10 As shown, an address library data processing device 1000 applied to a CDN according to an embodiment of the present disclosure includes an information storage module 1001 and an information generation module 1002 .
[0172] The information storage module 1001 is configured to store the data to be processed in a first storage area in a predetermined storage manner.
[0173] The information generation module 1002 is configured to generate a second storage area based on the first storage area, and the second storage area is configured to be used to identify the information of the data to be processed stored in the first storage area; wherein the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
[0174] Fig.11 A block diagram of another address library data processing device applied to a CDN according to an embodiment of the present disclosure is schematically illustrated.
[0175] like Fig.11 As shown, another address library data processing device 1100 applied to CDN according to an embodiment of the present disclosure includes an information parsing module 1101 and an information determining module 1102 .
[0176] The information parsing module 1101 is configured to parse a header identifier, where the header identifier is used to identify a data file to be processed.
[0177] The information determination module 1102 is configured to determine the first storage area and the second storage area in the data file to be processed based on the header identifier; wherein the first storage area is configured to store the data to be processed in a predetermined storage manner, and the second storage area is configured to be used to identify the information of the data to be processed stored in the first storage area, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each data group to be merged, the attribute information list of each data group to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data. Fig.12 A block diagram of a network device according to an embodiment of the present disclosure is schematically shown.
[0178] like Fig.12 As shown, the network device 1200 of the embodiment of the present disclosure includes a communication interface 1201 , a memory 1202 and a processor 1203 .
[0179] The communication interface 1201 is configured to perform wireless communication with the terminal device. The memory 1202 is used to store computer-readable instructions. The processor 1203 is used to execute the computer-readable instructions so that the network device executes the data processing method.
[0180] Fig.13 A block diagram of a non-transitory computer-readable storage medium according to an embodiment of the present disclosure is schematically shown.
[0181] like Fig.13As shown, a non-transitory computer-readable storage medium 1300 of an embodiment of the present disclosure is used to store computer-readable instructions 1301. When the computer-readable instructions 1301 are executed by a processor, the processor executes a data processing method as shown.
[0182] In the above, with reference to the accompanying drawings, a method, device, equipment and medium for processing address library data applied to CDN according to an embodiment of the present disclosure is described. By dividing the data to be processed into multiple data groups to be merged, the data groups to be merged are stored in a first storage area in a predetermined manner. At the same time, the string data in the attribute information of the data to be processed is stored in the first storage area. And based on the first storage area, a second storage is generated. The data information stored in the first storage area is recorded by the second storage area. Thus, a wide variety of data files with different formats can be stored in a unified format for easy management. In addition, by encrypting the string data and the second storage area, the security of the data can be guaranteed. By merging multiple data to be processed into one data group to be merged, storing the string in the attribute information as the string data, and using the attribute identifier to identify the attribute information, the data to be processed can be compressed to a great extent and memory consumption can be reduced. By dynamically describing the information of the data to be processed through the second storage area, the description information can be dynamically expanded without changing the storage method of the data to be processed. Therefore, through the above method, a safe, efficient and scalable method for storing IP library data can be provided.
[0183] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0184] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0185] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0186] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0187] Various changes, substitutions, and modifications of the techniques described herein above may be made without departing from the techniques of the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein above may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0188] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0189] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for processing address library data applied to CDN, characterized in that: The method comprises: storing the data to be processed in a first storage area in a predetermined storage manner; and Based on the first storage area, generating a second storage area, wherein the second storage area is configured to identify information that the first storage area stores data to be processed; Among them, the information stored in the second storage area at least includes the number of data groups to be merged, the data length of each of the data groups to be merged, the attribute information list of each of the data groups to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
2. The method according to claim 1, characterized in that Storing the data to be processed in a first storage area in a predetermined storage manner includes: Based on the attribute information of the data to be processed and the physical identification of the data to be processed, the data to be processed is divided into one or more data groups to be merged; and The one or more data groups to be merged are stored in the first storage area in a predetermined storage manner.
3. The method according to claim 2, characterized in that The step of storing the one or more to-be-merged data groups in the first storage area in a predetermined storage manner comprises: One or more items of a starting physical identifier, an ending physical identifier and attribute information of the data to be processed included in each of the one or more data groups to be merged are stored in the first storage area.
4. The method according to claim 3, characterized in that The step of storing the to-be-processed data in the first storage area in a predetermined storage manner comprises: Determining the character string data based on the attribute information of the data to be processed; and The character string data is stored in the first storage area in a predetermined storage manner.
5. The method according to claim 4, characterized in that The storing the character string data in the first storage area in a predetermined storage manner comprises: Based on the string data, deduplicate the string data; and The deduplicated string data is encrypted, and the encrypted string data is stored in the first storage area.
6. The method according to claim 5, characterized in that The storing in the first storage area one or more of the starting physical identifier, the ending physical identifier and the attribute information of the data to be processed included in each of the one or more data groups to be merged, comprises: Based on the attribute information of the data to be processed and the string data, determining an attribute identifier of the data to be processed in the data group to be merged, wherein the attribute identifier is used to indicate a position of a string corresponding to the attribute information of the data to be processed in the string data; and The attribute identifier of each of the one or more data groups to be merged is stored in the first storage area.
7. The method according to any one of claims 4 to 6, characterized in that: The generating a second storage area based on the first storage area, wherein the second storage area is configured to identify information for storing the data to be processed in the first storage area, includes: determining the second storage area based on one or more of the number of the data groups to be merged, the data length of each of the one or more data groups to be merged, the attribute information list of each of the one or more data groups to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data; The attribute information list includes one or more of the serial number, length, type, and name of the attribute information of the data to be processed.
8. The method according to any one of claims 1 to 7, characterized in that: Also includes: The second storage area is encrypted.
9. The method according to any one of claims 1 to 8, characterized in that: Also includes: A header identifier, wherein the header identifier includes one or more of the following: File identification, file length, header identification length, checksum; The file identifier is used to identify the data to be processed; the file length is used to identify the data length of the first storage area, the data length of the second storage area, and the header identifier length.
10. A method for processing address library data applied to CDN, characterized in that: The method comprises: parsing a header identifier, where the header identifier is used to identify a data file to be processed; and Based on the header identifier, determining a first storage area and a second storage area in the data file to be processed; Among them, the first storage area is configured to store the data to be processed in a predetermined storage method, the second storage area is configured to be used to identify the information of the data to be processed stored in the first storage area, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each of the data groups to be merged, the attribute information list of each of the data groups to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
11. The method according to claim 10, characterized in that The determining, based on the header identifier, a first storage area and a second storage area in the data file to be processed comprises: decrypting the second storage area to obtain information stored in the second storage area for identifying that the first storage area stores the data to be processed; and Based on the second storage area, the first storage area is parsed.
12. The method according to claim 11, characterized in that The parsing the first storage area based on the second storage area includes: Determine the one or more data groups to be merged stored in the first storage area based on the number of the data groups to be merged stored in the second storage area, the data length of each of the one or more data groups to be merged, and one or more items of the attribute information list of each of the one or more data groups to be merged; The attribute information list includes one or more of the sequence number, length, type, and name of the attribute information of the data group to be merged.
13. The method according to claim 11, characterized in that The parsing the first storage area based on the second storage area includes: The string data stored in the first storage area is determined based on one or more of the original data length of the string data stored in the second storage area, the encrypted data length of the string data, and the number of strings in the string data.
14. The method according to any one of claims 10 to 13, characterized in that include: Obtain the data to be queried in a predetermined format; A target data group to be merged is determined based on the data to be queried converted into a predetermined format, a starting physical identifier and an ending physical identifier included in each of the one or more data groups to be merged.
15. The method according to claim 14, characterized in that include: Obtaining an attribute identifier of the target data group to be merged; Based on the attribute identifier of the target data group to be merged, the attribute information list of the target data group to be merged, and the character string data, the attribute of the target data group to be merged is determined.
16. The method according to claim 15, characterized in that The determining the attribute of the target data group to be merged based on the attribute identifier of the target data group to be merged, the attribute information list of the target data group to be merged, and the character string data includes: Determining an attribute directory of the target data group to be merged based on the attribute information list of the target data group to be merged; and In a case where the attribute directory of the target data group to be merged is of a character string type, determining the attribute of the target data group to be merged based on the character string data and the attribute identifier of the target data group to be merged; Wherein, when the attribute directory of the target data group to be merged is of character string type, the attribute identifier of the target data group to be merged is configured as the position identifier of the character string corresponding to the attribute of the target data group to be merged in the character string data.
17. An address library data processing device applied to CDN, characterized in that: include: An information storage module, wherein the storage module is configured to store the data to be processed in a first storage area in a predetermined storage manner; as well as An information generation module, wherein the information generation module is configured to generate a second storage area based on the first storage area, wherein the second storage area is configured to be used to identify information of the data to be processed stored in the first storage area; wherein the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each of the data groups to be merged, a list of attribute information of each of the data groups to be merged, the original data length of the string data, the data length of the encrypted string data, and the number of strings in the string data.
18. An address library data processing device applied to CDN, characterized in that: include: An information parsing module, wherein the information parsing module is configured to parse a header identifier, wherein the header identifier is used to identify a data file to be processed; as well as An information determination module, wherein the information determination module is configured to determine a first storage area and a second storage area in the data file to be processed based on the header identifier; wherein the first storage area is configured to store the data to be processed in a predetermined storage manner, and the second storage area is configured to be used to identify information of the data to be processed stored in the first storage area, and the information stored in the second storage area includes at least the number of data groups to be merged, the data length of each of the data groups to be merged, a list of attribute information of each of the data groups to be merged, the original data length of the string data, the encrypted data length of the string data, and the number of strings in the string data.
19. A network device, characterized in that: include: A communication interface configured to perform wireless communication with a terminal device; a memory for storing computer readable instructions; as well as A processor is configured to execute the computer-readable instructions so that the network device performs the method according to any one of claims 1 to 16.
20. A non-transitory computer-readable storage medium for storing computer-readable instructions, characterized in that: When the computer readable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 16.