CN116436784A - Configuration file verification method and device, storage medium and electronic equipment - Google Patents

Configuration file verification method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116436784A
CN116436784A CN202210002061.6A CN202210002061A CN116436784A CN 116436784 A CN116436784 A CN 116436784A CN 202210002061 A CN202210002061 A CN 202210002061A CN 116436784 A CN116436784 A CN 116436784A
Authority
CN
China
Prior art keywords
configuration file
target
node
version
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210002061.6A
Other languages
Chinese (zh)
Inventor
陆思远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210002061.6A priority Critical patent/CN116436784A/en
Publication of CN116436784A publication Critical patent/CN116436784A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a configuration file verification method, a configuration file verification device, a storage medium and electronic equipment. The method comprises the following steps: determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified; sending an acquisition instruction to a target node to acquire a first version configuration file and a second version configuration file of a target configuration file in the target node; comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file; and displaying the comparison result. The invention solves the technical problem of low verification efficiency of the configuration file of the edge node in the content distribution network.

Description

Configuration file verification method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for verifying a configuration file, a storage medium, and an electronic device.
Background
In a content delivery network (Content Delivery Network, CDN), a central console system may manage node devices of an edge. In the prior art, management of the node equipment at the edge needs to go to all nodes to verify whether the configuration file is generated correctly after the central control console system makes relevant configuration operation each time by generating the configuration file and then issuing the configuration file to the node equipment.
Disclosure of Invention
The embodiment of the invention provides a configuration file verification method, a device, a storage medium and electronic equipment, which are used for at least solving the technical problem of low configuration file verification efficiency of an edge node in a content distribution network.
According to an aspect of the embodiment of the present invention, there is provided a method for checking a configuration file, including: determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified; sending an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version; comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file; and displaying the comparison result.
According to another aspect of the embodiment of the present invention, there is provided a verification apparatus for a configuration file, including: the determining module is used for determining a target node from a plurality of nodes of the content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified; the sending module is used for sending an acquisition instruction to the target node so as to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version; the comparison module is used for comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file; and the display module is used for displaying the comparison result.
As an optional example, the determining module includes: the first acquisition unit is used for acquiring node information and configuration file information, wherein the node information is used for indicating a node to be checked, and the configuration file information is used for indicating a file to be checked in the target node; a first determining unit configured to determine the target node from the plurality of nodes based on the node information; and the second determining unit is used for determining the target configuration file from the plurality of files of the target node according to the configuration file information.
As an optional example, the first determining unit includes: the first processing subunit is used for acquiring the node unique mark in the node information; comparing the node unique mark with the node mark of each of the plurality of nodes; when a first node whose node flag matches the node unique flag exists among the plurality of nodes, determining the first node as the target node; the second determination unit includes: the second processing subunit is used for acquiring the file type mark in the configuration file information; comparing the file type mark with the file mark of each configuration file in the target node; and determining the first configuration file as the target configuration file when the first configuration file with the file mark consistent with the file type mark exists in the plurality of configuration files of the target node.
As an optional example, the above-mentioned transmitting module includes: the sending unit is used for carrying a file type mark of the target configuration file in the acquisition instruction; the second obtaining unit is configured to obtain, according to the file type flag, the first version configuration file and the second version configuration file of the target configuration file.
As an alternative example, the above-mentioned comparison module includes: a third determining unit, configured to determine a first keyword according to a file type of the target configuration file; a fourth determining unit, configured to determine, from the first version configuration file, a first content in which the first keyword is located, and determine, from the second version configuration file, a second content in which the first keyword is located; and the comparison unit is used for comparing the first content with the second content to obtain the comparison result.
As an alternative example, the above-mentioned comparison unit includes: a first determining subunit, configured to determine that, when the second content is more than the first content, the comparison result is that the target configuration file has newly added content; a second determining subunit, configured to determine that, when the second content is less than the first content, the comparison result is that the target configuration file deletes the content; and a third determining subunit, configured to determine that the comparison result is that the target configuration file modifies the content when the partial content in the first content is the same as the second content after the partial content is changed.
As an optional example, the third determining unit includes: and the inquiring subunit is used for inquiring the corresponding relation between the file types and the keywords and determining the first keywords of the target configuration file, wherein different keywords are preset in different file types.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the above-described configuration file verification method.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory, and a processor, where the memory stores a computer program, and the processor is configured to execute the method for verifying a configuration file according to the above-described computer program.
In the embodiment of the invention, a target node is determined from a plurality of nodes of a content distribution network, and a target configuration file is determined from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified; sending an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version; comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file; according to the method for displaying the comparison result, the target node to be checked and the target configuration file to be checked can be determined from the edge nodes, and then the file is acquired from the edge nodes for checking, so that the purpose of improving the checking efficiency of the configuration file of the edge nodes is achieved, and the technical problem of low checking efficiency of the configuration file of the edge nodes in a content distribution network is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an alternative configuration file verification method according to an embodiment of the invention;
FIG. 2 is a system diagram of an alternative configuration file verification method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an operation interface of an alternative configuration file verification method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative configuration file verification device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of an embodiment of the present invention, a method for checking a configuration file is provided, optionally, as shown in fig. 1, the method includes:
s102, determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified;
s104, sending an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version;
s106, comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file;
s108, displaying the comparison result.
Optionally, the embodiment may be applied in a process of verifying a configuration file of an edge node in a content delivery network (Content Delivery Network, CDN). The configuration files in the edge nodes may be of various types. The target node to be checked and the target configuration file to be checked in the target node can be determined through the central control console, then, an instruction is sent to the edge node, the configuration file of the edge node is obtained, the verification is carried out, a comparison result is obtained, and the comparison result is displayed, so that the purpose of flexibly and automatically checking the configuration file on the edge node is achieved.
Optionally, in this embodiment, the node is an edge node in the content distribution network. Multiple profiles may be included in each node, which may be of different types. The target node can be determined from a plurality of nodes according to the instruction of the user, and then the target configuration file to be verified is determined from all configuration files of the target node according to the instruction of the user. After the target configuration file is determined, a first version configuration file, namely any version configuration file before the latest version, of the target configuration file and a second version configuration file, namely the latest version configuration file, can be obtained, so that the first version configuration file and the second version configuration file are compared, a comparison result is obtained, and the comparison result is displayed to a user. In this embodiment, the last version of the latest version may be determined as the first version, and then the target configuration files of the first version and the second version may be compared. The original version can be determined as the first version, the target configuration files of the first version and the second version are compared, and any version between the latest version and the original version can be used as the first version, and the target configuration files of the first version and the second version are compared.
The embodiment realizes that the target node to be checked and the target configuration file in the node can be selected according to the instruction of the user, then the check is automatically performed by one key, and the effect of the comparison result is displayed.
As an optional example, determining the target node from the plurality of nodes of the content distribution network and determining the target configuration file from the plurality of files of the target node includes:
acquiring node information and configuration file information, wherein the node information is used for indicating a node to be checked, and the configuration file information is used for indicating a file to be checked in a target node;
determining a target node from a plurality of nodes according to the node information;
and determining the target configuration file from a plurality of files of the target node according to the configuration file information.
Optionally, in this embodiment, node information and configuration file information set by a user may be obtained. The node information may be a node unique flag of the node, the profile information may be a profile type flag of the profile, or a type flag of the profile. After the user configures the node information and the configuration file information, the central controller acquires the node information and the configuration file information, and determines a target node and a target configuration file to be checked in a plurality of configuration files of the target node according to the node information and the configuration file information.
As an optional example, the determining the target node from the plurality of nodes according to the node information includes: acquiring a node unique mark in the node information; comparing the node unique mark with the node mark of each of the plurality of nodes; determining a first node as a target node in the case that the first node whose node flag is identical to the node unique flag exists among the plurality of nodes; according to the configuration file information, determining the target configuration file from a plurality of files of the target node comprises: acquiring a file type mark in configuration file information; comparing the file type mark with the file mark of each configuration file in the target node; in the case that a first configuration file with a file mark consistent with a file type mark exists in a plurality of configuration files of the target node, the first configuration file is determined as the target configuration file.
Optionally, in this embodiment, after the node unique identifier and the file type identifier are obtained, the node unique identifier may be compared with the node identifier of each node, so as to determine the target node from the multiple nodes. If the target node does not exist in the plurality of nodes, prompting that the node information input by the user is wrong. When the target configuration file is determined through the file type mark, all files with the same file type mark in the configuration files of the target node can be determined as the target configuration file. There may be a plurality of the number of target profiles.
As an optional example, the sending the acquisition instruction to the target node includes:
carrying a file type mark of the target configuration file in the acquisition instruction;
the target node is further configured to obtain a first version configuration file and a second version configuration file of the target configuration file according to the file type flag.
Optionally, in this embodiment, after determining the target node and the target configuration file, the central controller may obtain the first version configuration file and the second version configuration file of the target configuration file from the target node. Since the target profile is known, the first version profile and the second version profile of the target profile may be obtained by the target node and then sent to the central controller.
As an optional example, the comparing the first version configuration file with the second version configuration file to obtain the comparison result of the target configuration file includes:
determining a first keyword according to the file type of the target configuration file;
determining first content where a first keyword is located from a first version configuration file, and determining second content where the first keyword is located from a second version configuration file;
and comparing the first content with the second content to obtain a comparison result.
Optionally, in this embodiment, when the target configuration file is determined, the first version configuration file and the second version configuration file of the target configuration file may be compared when the target configuration file is checked. Whether the first version of the target profile is consistent with the content in the second version of the profile. A first keyword of the target profile may be determined, which may be the only keyword in the target profile. Searching the first keyword, determining first content where the first keyword is located, such as a line, a paragraph and the like where the first keyword is located, from the first version configuration file, and determining second content where the first keyword is located, such as a line, a paragraph and the like where the second keyword is located, from the second version configuration file. Then, the first content and the second content are compared.
As an optional example, the comparing the first content with the second content includes:
under the condition that the second content is more than the first content, determining that the comparison result is that the content is newly added to the target configuration file;
determining that the comparison result is that the target configuration file deletes the content under the condition that the second content is less than the first content;
and under the condition that part of the contents in the first contents are the same as the second contents after being changed, determining that the comparison result is that the target configuration file modifies the contents.
Alternatively, in this embodiment, when comparing the first content with the second content, it may be checked whether the second content has an update of the content, whether the content is newly added, or whether the content is deleted, compared to the first content. Comparing the second content with the first content, recording the change, and prompting the change to the user.
As an optional example, determining the first keyword according to the file type of the target configuration file includes:
and inquiring the corresponding relation between the file types and the keywords, and determining the first keywords of the target configuration file, wherein different keywords are preset for different file types.
Alternatively, in this embodiment, the relationship between the file type and the keyword may be established in advance. Different file types may be configured with different keywords. Then, if the target configuration file is of which file type, a keyword corresponding to the file type can be obtained as a first keyword to search for the first content and the second content.
In this embodiment, for the configuration files, the configuration files may be classified according to the content format of the configuration files, to obtain different types. If the configuration file has a plurality of rows, each row has a plurality of fields at intervals, the configuration file may be assigned to one type, and some configuration files, for example, include a plurality of object profiles (JavaScript Object Notation, json), may be assigned to one type, and so on. Fig. 2 is a system schematic diagram of the present embodiment. In fig. 2, the central controller issues tasks to node 1 and node 2, node 1 and node 2 each contain n devices, n being a positive integer, and the data of node 1 and node 2 are stored in the mysql database DB. The data is called and sent to the central controller, and the central controller completes data comparison and displays the comparison result.
In this embodiment, the file contents on the devices of all the nodes can be returned to the platform in a unified manner by using a Secure Shell (SSH) technology, so that the repeated work of manually logging in to one node is solved. Aiming at different types of configuration files, special comparison development is carried out according to the characteristics of the configuration files, and the comparison test of mass data is manually converted into an automatic test, so that the automatic test is more accurate, and errors are reduced.
Fig. 3 is an alternative foreground interaction schematic of the present embodiment. In fig. 3, the test classmates may select the profile category (support multiple options), may input, or may select via a drop down box. The node machine can be selected, the comparison starting button is clicked, the comparison task can be issued to each node, and the comparison test is completed through different check logic one keys on the configuration files of the front version and the back version. The detailed information may be viewed through a view details option.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiments of the present application, there is further provided a device for verifying a configuration file, as shown in fig. 4, including:
a determining module 402, configured to determine a target node from a plurality of nodes in the content distribution network and determine a target configuration file from a plurality of files in the target node, where the target node is a node to be verified, and the target configuration file is a file to be verified;
a sending module 404, configured to send an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, where the first version is any version before the latest version, and the second version is the latest version;
a comparison module 406, configured to compare the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file;
and a display module 408, configured to display the comparison result.
Optionally, the embodiment may be applied in a process of verifying a configuration file of an edge node in a content delivery network (Content Delivery Network, CDN). The configuration files in the edge nodes may be of various types. The target node to be checked and the target configuration file to be checked in the target node can be determined through the central control console, then, an instruction is sent to the edge node, the configuration file of the edge node is obtained, the verification is carried out, a comparison result is obtained, and the comparison result is displayed, so that the purpose of flexibly and automatically checking the configuration file on the edge node is achieved.
Optionally, in this embodiment, the node is an edge node in the content distribution network. Multiple profiles may be included in each node, which may be of different types. The target node can be determined from a plurality of nodes according to the instruction of the user, and then the target configuration file to be verified is determined from all configuration files of the target node according to the instruction of the user. After the target configuration file is determined, a first version configuration file, namely any version configuration file before the latest version, of the target configuration file and a second version configuration file, namely the latest version configuration file, can be obtained, so that the first version configuration file and the second version configuration file are compared, a comparison result is obtained, and the comparison result is displayed to a user.
The embodiment realizes that the target node to be checked and the target configuration file in the node can be selected according to the instruction of the user, then the check is automatically performed by one key, and the effect of the comparison result is displayed.
As an optional example, the determining module includes:
the first acquisition unit is used for acquiring node information and configuration file information, wherein the node information is used for indicating a node to be checked, and the configuration file information is used for indicating a file to be checked in a target node;
the first determining unit is used for determining a target node from a plurality of nodes according to the node information;
and the second determining unit is used for determining the target configuration file from the plurality of files of the target node according to the configuration file information.
Optionally, in this embodiment, node information and configuration file information set by a user may be obtained. The node information may be a node unique flag of the node, the profile information may be a profile type flag of the profile, or a type flag of the profile. After the user configures the node information and the configuration file information, the central controller acquires the node information and the configuration file information, and determines a target node and a target configuration file to be checked in a plurality of configuration files of the target node according to the node information and the configuration file information.
As an optional example, the first determining unit includes: the first processing subunit is used for acquiring the node unique mark in the node information; comparing the node unique mark with the node mark of each of the plurality of nodes; determining a first node as a target node in the case that the first node whose node flag is identical to the node unique flag exists among the plurality of nodes; the second determination unit includes: the second processing subunit is used for acquiring the file type mark in the configuration file information; comparing the file type mark with the file mark of each configuration file in the target node; in the case that a first configuration file with a file mark consistent with a file type mark exists in a plurality of configuration files of the target node, the first configuration file is determined as the target configuration file.
Optionally, in this embodiment, after the node unique identifier and the file type identifier are obtained, the node unique identifier may be compared with the node identifier of each node, so as to determine the target node from the multiple nodes. If the target node does not exist in the plurality of nodes, prompting that the node information input by the user is wrong. When the target configuration file is determined through the file type mark, all files with the same file type mark in the configuration files of the target node can be determined as the target configuration file. There may be a plurality of the number of target profiles.
As an optional example, the above-mentioned transmitting module includes:
the sending unit is used for carrying a file type mark of the target configuration file in the acquisition instruction;
the second obtaining unit is used for obtaining the first version configuration file and the second version configuration file of the target configuration file according to the file type mark.
Optionally, in this embodiment, after determining the target node and the target configuration file, the central controller may obtain the first version configuration file and the second version configuration file of the target configuration file from the target node. Since the target profile is known, the first version profile and the second version profile of the target profile may be obtained by the target node and then sent to the central controller.
As an alternative example, the above-mentioned comparison module includes:
a third determining unit, configured to determine a first keyword according to a file type of the target configuration file;
a fourth determining unit, configured to determine, from the first version configuration file, a first content in which the first keyword is located, and determine, from the second version configuration file, a second content in which the first keyword is located;
and the comparison unit is used for comparing the first content with the second content to obtain a comparison result.
Optionally, in this embodiment, when the target configuration file is determined, the first version configuration file and the second version configuration file of the target configuration file may be compared when the target configuration file is checked. Whether the first version of the target profile is consistent with the content in the second version of the profile. A first keyword of the target profile may be determined, which may be the only keyword in the target profile. Searching the first keyword, determining first content where the first keyword is located, such as a line, a paragraph and the like where the first keyword is located, from the first version configuration file, and determining second content where the first keyword is located, such as a line, a paragraph and the like where the second keyword is located, from the second version configuration file. Then, the first content and the second content are compared.
As an alternative example, the above-mentioned comparison unit includes:
a first determining subunit, configured to determine that the comparison result is that the target configuration file has newly added content when the second content is more than the first content;
a second determining subunit, configured to determine that the comparison result is that the target configuration file deletes the content when the second content is less than the first content;
and the third determining subunit is used for determining that the comparison result is that the target configuration file modifies the content under the condition that part of the content in the first content is the same as the second content after being changed.
Alternatively, in this embodiment, when comparing the first content with the second content, it may be checked whether the second content has an update of the content, whether the content is newly added, or whether the content is deleted, compared to the first content. Comparing the second content with the first content, recording the change, and prompting the change to the user.
As an optional example, the third determining unit includes:
and the inquiring subunit is used for inquiring the corresponding relation between the file types and the keywords and determining the first keywords of the target configuration file, wherein different keywords are preset in different file types.
Alternatively, in this embodiment, the relationship between the file type and the keyword may be established in advance. Different file types may be configured with different keywords. Then, if the target configuration file is of which file type, a keyword corresponding to the file type can be obtained as a first keyword to search for the first content and the second content.
For other examples of this embodiment, please refer to the above examples, and are not described herein.
Fig. 5 is a block diagram of an alternative electronic device, according to an embodiment of the present application, including a processor 502, a communication interface 504, a memory 506, and a communication bus 508, as shown in fig. 5, wherein the processor 502, the communication interface 504, and the memory 506 communicate with each other via the communication bus 508, wherein,
a memory 506 for storing a computer program;
the processor 502 is configured to execute the computer program stored in the memory 506, and implement the following steps:
determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified;
sending an acquisition instruction to a target node to acquire a first version configuration file and a second version configuration file of a target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version;
comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file;
and displaying the comparison result.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 506 may include, but is not limited to, a determination module 402, a transmission module 404, a comparison module 406, and a display module 408 in the processing device that includes the request. In addition, other module units in the processing apparatus of the above request may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be understood by those skilled in the art that the structure shown in fig. 5 is only schematic, and the device implementing the above-mentioned request processing method may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 5 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the steps in the above-described configuration file verification method.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A method for verifying a configuration file, comprising:
determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified;
sending an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version;
comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file;
and displaying the comparison result.
2. The method of claim 1, wherein the determining a target node from among a plurality of nodes of a content distribution network and determining a target profile from among a plurality of files of the target node comprises:
acquiring node information and configuration file information, wherein the node information is used for indicating a node to be checked, and the configuration file information is used for indicating a file to be checked in the target node;
determining the target node from the plurality of nodes according to the node information;
and determining the target configuration file from a plurality of files of the target node according to the configuration file information.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the determining the target node from the plurality of nodes according to the node information comprises: acquiring a node unique mark in the node information; comparing the node unique mark with the node mark of each node in the plurality of nodes; determining a first node as the target node in the case that there is a first node whose node flag is identical to the node unique flag among the plurality of nodes;
and determining the target configuration file from a plurality of files of the target node according to the configuration file information comprises the following steps: acquiring a file type mark in the configuration file information; comparing the file type mark with the file mark of each configuration file in the target node; and determining the first configuration file as the target configuration file when the first configuration file with the file mark consistent with the file type mark exists in the plurality of configuration files of the target node.
4. The method of claim 1, wherein the sending the get instruction to the target node comprises:
carrying a file type mark of the target configuration file in the acquisition instruction;
the target node is further configured to obtain the first version configuration file and the second version configuration file of the target configuration file according to the file type flag.
5. The method according to any one of claims 1 to 4, wherein the comparing the first version profile with the second version profile to obtain the comparison result of the target profile includes:
determining a first keyword according to the file type of the target configuration file;
determining a first content where the first keyword is located from the first version configuration file and determining a second content where the first keyword is located from the second version configuration file;
and comparing the first content with the second content to obtain the comparison result.
6. The method of claim 5, wherein the comparing the first content with the second content to obtain the comparison result comprises:
determining that the comparison result is that the target configuration file is newly added with content under the condition that the second content is more than the first content;
determining that the comparison result is that the target configuration file deletes content under the condition that the second content is less than the first content;
and under the condition that part of the contents in the first contents are the same as the second contents after being changed, determining that the comparison result is that the target configuration file modifies the contents.
7. The method of claim 5, wherein the determining the first keyword based on the file type of the target profile comprises:
and inquiring the corresponding relation between the file types and the keywords, and determining the first keywords of the target configuration file, wherein different keywords are preset in different file types.
8. A device for verifying a configuration file, comprising:
the system comprises a determining module, a verification module and a verification module, wherein the determining module is used for determining a target node from a plurality of nodes of a content distribution network and determining a target configuration file from a plurality of files of the target node, wherein the target node is a node to be verified, and the target configuration file is a file to be verified;
the sending module is used for sending an acquisition instruction to the target node to acquire a first version configuration file and a second version configuration file of the target configuration file in the target node, wherein the first version is any version before the latest version, and the second version is the latest version;
the comparison module is used for comparing the first version configuration file with the second version configuration file to obtain a comparison result of the target configuration file;
and the display module is used for displaying the comparison result.
9. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when executed by a processor, performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN202210002061.6A 2022-01-04 2022-01-04 Configuration file verification method and device, storage medium and electronic equipment Pending CN116436784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210002061.6A CN116436784A (en) 2022-01-04 2022-01-04 Configuration file verification method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210002061.6A CN116436784A (en) 2022-01-04 2022-01-04 Configuration file verification method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116436784A true CN116436784A (en) 2023-07-14

Family

ID=87084208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210002061.6A Pending CN116436784A (en) 2022-01-04 2022-01-04 Configuration file verification method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116436784A (en)

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
CN107896244B (en) Version file distribution method, client and server
CN109446072A (en) The generation method and device of test script
CN109995866B (en) Distributed file verification method and device, computer device and storage medium
CN110851308A (en) Test method, test device, electronic equipment and storage medium
CN107872534B (en) Information pushing method and device, server and readable storage medium
CN112217656B (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
CN111177003A (en) Test method, device, system, electronic equipment and storage medium
CN107741904A (en) Test machine method of automatic configuration, device, equipment and storage medium
CN109815112B (en) Data debugging method and device based on functional test and terminal equipment
CN110221948A (en) Test script generation method, device, computer installation and storage medium
CN107078806A (en) Optical transceiver apparatus and method
CN112817867A (en) Interface test script generation method and device, computer equipment and medium
CN109213782B (en) Search interface configuration and display method and device and communication equipment
CN116827774A (en) Service analysis method, device, equipment and storage medium
CN108280024B (en) Flow distribution strategy testing method and device and electronic equipment
CN109726117A (en) A kind of Mock test method, device, server and electronic equipment
CN111176985B (en) Software interface performance testing method and device, computer equipment and storage medium
CN111538672A (en) Test case layered test method, computer device and computer-readable storage medium
CN110020166B (en) Data analysis method and related equipment
CN116436784A (en) Configuration file verification method and device, storage medium and electronic equipment
CN110209571A (en) Test method and device, storage medium, the computer equipment of more new interface
CN115617555A (en) Information processing system and method
CN109976868A (en) DApp method for customizing, device and electronic equipment
CN116974795A (en) Service path generation and service data verification method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination