CN114020346A - Configuration file processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114020346A
CN114020346A CN202111154531.2A CN202111154531A CN114020346A CN 114020346 A CN114020346 A CN 114020346A CN 202111154531 A CN202111154531 A CN 202111154531A CN 114020346 A CN114020346 A CN 114020346A
Authority
CN
China
Prior art keywords
target
data
configuration
function
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111154531.2A
Other languages
Chinese (zh)
Other versions
CN114020346B (en
Inventor
李盈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111154531.2A priority Critical patent/CN114020346B/en
Publication of CN114020346A publication Critical patent/CN114020346A/en
Application granted granted Critical
Publication of CN114020346B publication Critical patent/CN114020346B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a method and a device for processing a configuration file, electronic equipment and a storage medium. Wherein, the method comprises the following steps: determining a target function to be configured at the client; acquiring a target configuration file corresponding to the target function from a preset function tree, wherein target configuration data and target verification data are stored in the target configuration file; reading the configuration data, and encrypting based on the configuration data to obtain encrypted data; and under the condition that the encrypted data is matched with the target verification data, performing function configuration on the client according to the target configuration data. According to the embodiment of the application, the function configuration of different equipment identifiers is stored in a mode of presetting the function tree, data verification is carried out before configuration, the accuracy of configuration data is guaranteed, detection and judgment on the client side are not needed according to the characteristics of the functions, and the function configuration efficiency is improved.

Description

Configuration file processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of file processing, and in particular, to a method and an apparatus for processing a configuration file, an electronic device, and a storage medium.
Background
With the development of technology and the demands of users, the situations of different series of products of the same type are increased, and the situations of different series of products of the same type can not be avoided in order to meet the demands of different users, so that the specifications or requirements of the products of the same type of different types for the functions of the same type of demands are more and more different, for example, the high-end products have a higher support strength for a certain characteristic than the low-end products, or the middle-end products have a specific function, but the high-end products or the low-end products do not have the specific function. Such too large differentiation may lead to a complex execution program, and in the process of configuring the function, the execution program needs to detect and judge the client according to the characteristics of the function, the judgment process is too redundant, even when such a situation is too much, the judgment takes a long time, and the cost of the subsequent maintenance execution program is high.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a method and an apparatus for processing a configuration file, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a method for processing a configuration file, including:
determining a target function to be configured at the client;
acquiring a target configuration file corresponding to the target function from a preset function tree, wherein target configuration data and target verification data are stored in the target configuration file;
reading the target configuration data, and encrypting based on the target configuration data to obtain encrypted data;
and under the condition that the encrypted data is matched with the target verification data, performing function configuration on the client according to the target configuration data.
Further, before obtaining the target configuration file corresponding to the target function from a preset function tree, the method further includes:
acquiring a target device identifier to which the client belongs and a plurality of device models associated with the target device identifier;
acquiring functions supported by the equipment model and initial configuration data corresponding to the functions;
encrypting the initial configuration data to obtain verification data;
generating configuration files corresponding to all functions according to the initial configuration data and the verification data;
and generating the preset function tree according to the target equipment identification, the equipment model and the configuration file.
Further, the obtaining the target configuration file corresponding to the target function from the preset function tree includes:
determining a target device model corresponding to the client;
under the condition that the preset function tree has the equipment model matched with the target equipment model, acquiring at least one configuration file associated with the target equipment model from the preset function tree;
and determining the configuration file meeting the target function as the target configuration file.
Further, in a case that there is no device model matching the target device model in the preset function tree, the method further includes:
generating a queue message according to the target function and the model of the target equipment, and pushing the queue message to a target queue;
acquiring the survival time corresponding to the queue message;
and deleting the queue message from the target queue under the condition that the preset function tree is not detected to be updated in the lifetime.
Further, the method further comprises:
acquiring a configuration update file, wherein the configuration update file comprises function update data and signature information;
under the condition that the signature information passes the authentication, determining a function to be updated corresponding to the function updating data from the preset function tree;
and updating the function to be updated by using the function updating data.
Further, the method further comprises:
under the condition that the encrypted data is not matched with the target verification data, determining that the target configuration data is tampered, and acquiring standby configuration data;
and performing function configuration on the client by using the standby configuration data.
Further, after determining that the target configuration data is tampered with, the method further includes:
acquiring initial configuration data and an initial encryption key corresponding to the target verification data;
determining a client identifier corresponding to the client;
splicing the client identification and the initial encryption key to obtain a target key;
and encrypting initial configuration data corresponding to the target verification data by using the target key to obtain updated verification data, and adding the updated verification data to the target configuration file.
According to another aspect of the embodiments of the present application, there is also provided a device for processing a configuration file, including:
the determining module is used for determining the current target function to be configured of the client;
the acquisition module is used for acquiring a target configuration file corresponding to the target function from a preset function tree, wherein target configuration data and target verification data are stored in the target configuration file;
the reading module is used for reading the target configuration data and encrypting the target configuration data to obtain encrypted data;
and the processing module is used for carrying out function configuration on the client according to the target configuration data under the condition that the encrypted data is matched with the target verification data.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the embodiment of the application, the function configuration of different equipment identifiers is stored in a mode of presetting the function tree, data verification is carried out before configuration, the accuracy of configuration data is guaranteed, detection and judgment on the client side are not needed according to the characteristics of the functions, and the function configuration efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a method for processing a configuration file according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for processing a configuration file according to another embodiment of the present application;
fig. 3 is a flowchart of a method for processing a configuration file according to another embodiment of the present application;
fig. 4 is a block diagram of a device for processing a configuration file according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method and a device for processing a configuration file, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any required electronic equipment, for example, the electronic equipment can be electronic equipment such as a server and a terminal, and the method is not particularly limited herein, and is hereinafter simply referred to as electronic equipment for convenience in description.
According to an aspect of an embodiment of the present application, a method embodiment of a method for processing a configuration file is provided. Fig. 1 is a flowchart of a method for processing a configuration file according to an embodiment of the present application, and as shown in fig. 1, the method includes:
and step S11, determining the target function to be configured currently by the client.
In the embodiment of the present application, since the client has different device models when shipped from the factory, the client has different functions configured when shipped from the factory. Therefore, when a user requests to update/upgrade a currently supported function of the client, or needs to add a new function to the client, the user may directly input an equipment model of the client, trigger a function configuration request, and at this time, the background may determine a configured function of the client when leaving a factory and a function set supported by the client according to a target equipment model carried in the function configuration request, and then feed back the function set to the user. And after detecting the function selected by the user, determining the function selected by the user as a target function to be configured at the client currently.
Step S12, obtaining a target configuration file corresponding to the target function from the preset function tree, where the target configuration file stores target configuration data and target verification data.
In the embodiment of the present application, obtaining a target configuration file corresponding to a target function from a preset function tree includes the following steps a 1-A3:
and step A1, determining the model of the target device corresponding to the client.
In the embodiment of the present application, the target device model corresponding to the client is: r7000, r7000p in a series a computer of a certain brand, and the like.
And A2, acquiring at least one configuration file associated with the target equipment model from the preset function tree under the condition that the equipment model matched with the target equipment model exists in the preset function tree.
In the embodiment of the present application, the preset function tree includes a plurality of vertices, and the vertices are used to represent device identifiers, where the device identifiers may be "association", "hewlett packard", "dell", and the like. Each vertex is associated with a plurality of primary nodes, each primary node is used for representing the type of equipment, each primary node is associated with a plurality of secondary nodes, each secondary node is used for representing the type of the equipment, each type of the equipment is associated with a plurality of tertiary nodes, and each tertiary node is used for representing a configuration file for performing function configuration.
Step a3, determine the configuration file satisfying the target function as the target configuration file.
In the embodiment of the application, a branch structure where a target device model is located is queried from a preset function tree, configuration files of all functions corresponding to the target device model are determined from the branch structure, then a target configuration file matched with the target function is obtained from the configuration files of all the functions, and target configuration data and target verification data are stored in the target configuration file. It should be noted that, the target configuration file is a configuration file in an XML format, and the target configuration data may be: configuration installation parameters of the target function, installation certificate data, and the like.
And step S13, reading the target configuration data, and encrypting the target configuration data to obtain encrypted data.
In the embodiment of the application, after the target configuration data is obtained, MD5 encryption calculation is performed on the read target configuration data by using a preset MD5 encryption algorithm to obtain encrypted data.
As an example, the MD5 encryption process is: firstly, data filling is carried out on target configuration data, the length of the target configuration data is modulo 512 to obtain X, and the data length is Y, namely Y mod 512 is satisfied to be X. And obtaining the data length needing to be filled according to the formula. The filling method comprises the following steps: the target configuration data is followed by padding, for example: the first bit of padding is 1, and the rest is 0.
The length of the original data is filled after the result of the first step, and the storage length which can be used for carrying out is 64 bits. If the data length is greater than 264, only the value of its 64 th bit is used, i.e. (data length modulo 264). After this step is completed, the final data length is an integer multiple of 512.
The 4 constants used for encryption were determined again: 0x67452301, 0x0EFCDAB89, 0x98BADCFE, 0x10325476, and 4 functions: f (X, Y, Z) ═ X & Y) | ((-X) & Z); g (X, Y, Z) ═ X & Z | (Y & (∼ Z)); h (X, Y, Z) ═ X ^ Y ^ Z; i (X, Y, Z) ═ Y ^ (X | (-Z)).
The data is divided into 512 bits to be processed into groups, each group is transformed for 4 times, the 4 constants are used as initial variables to calculate, 4 variables are output again, the 4 variables are used for the operation of the next group, and if the last group exists, the 4 variables are the final result, namely the encrypted data.
And step S14, under the condition that the encrypted data is matched with the target verification data, performing function configuration on the client according to the target configuration data.
In the embodiment of the application, if the encrypted data is matched with the pre-stored target verification data, it is determined that the target configuration data is not tampered, and at this time, the target configuration data can be extracted to perform function configuration on the client, so that the configured client has a target function.
According to the embodiment of the application, the function configuration of different equipment identifiers is stored in a mode of presetting the function tree, data verification is carried out before configuration, the accuracy of configuration data is guaranteed, detection and judgment on the client side are not needed according to the characteristics of the functions, and the function configuration efficiency is improved.
In the embodiment of the present application, if there is no device model matching the target device model in the preset function tree, the method further includes the following steps B1-B3:
and step B1, generating a queue message according to the target function and the model of the target device, and pushing the queue message to the target queue.
And step B2, acquiring the survival time corresponding to the queue message.
And step B3, deleting the queue message from the target queue under the condition that the updating of the preset function tree is not detected in the survival time.
In the embodiment of the application, if the device model matched with the target device model does not exist in the preset function tree, it is determined that the related function of the target device model and the configuration file corresponding to the related function do not exist in the preset function tree. At the moment, queue information is generated according to the target function and the model of the target equipment, the survival time is set, and the queue information is stored in the target queue. The time-to-live is used for representing the storage duration of the message queue.
In the embodiment of the application, the target function and the target equipment model are stored in the target queue in the form of queue messages so as to wait for the updating of the preset function tree. And if the preset function tree is updated in the lifetime, inquiring updating information from the preset function tree, and if the updating information comprises the model of the target equipment and a configuration file of the target function corresponding to the model of the target equipment, performing function configuration according to the configuration file. And if the preset function tree is not updated in the survival time or the updated preset function tree does not comprise the configuration file of the target function in the updated information, deleting the queue message after the survival time is reached.
In the embodiment of the present application, before a target configuration file corresponding to a target function is obtained from a preset function tree, a survival method of the preset function tree is further provided, where the method includes the following steps C1-C5:
step C1, obtain the target device identifier to which the client belongs, and multiple device models associated with the target device identifier.
And step C2, acquiring the functions supported by the equipment model and the initial configuration data corresponding to the functions.
And step C3, encrypting the initial configuration data to obtain verification data.
And step C4, generating configuration files corresponding to each function according to the initial configuration data and the verification data.
And step C5, generating a preset function tree according to the target equipment identification, the equipment model and the configuration file.
According to the embodiment of the application, the preset function tree is constructed, the main program framework system can be guaranteed not to change, no matter a new device identification or a new function is added, or a function is deleted, the device identification is deleted, other device identifications cannot be influenced, in addition, subdivision can be continued in each device identification, for example, the number of CPU cores exists in each device, the memory size is different, filling can be continued according to the tree structure, the development is greatly simplified, and the development and test cost is reduced.
In the embodiment of the application, the configuration data of each model function is acquired, the configuration data is written into an XML file, MD5 encryption is performed on the configuration data to obtain the XML file, and finally the configuration file is generated. The format of the configuration file is as follows:
Figure BDA0003288250470000111
Figure BDA0003288250470000121
fig. 2 is a flowchart of a method for processing a configuration file according to an embodiment of the present application, and as shown in fig. 2, the method further includes:
step S21, obtaining a configuration update file, where the configuration update file includes function update data and signature information.
And step S22, determining the function to be updated corresponding to the function updating data from the preset function tree under the condition that the signature information passes the authentication.
In step S23, the function to be updated is updated using the function update data.
In this embodiment of the present application, the function update data included in the configuration update file may be: the model of the newly added device, the configuration file of the model of the newly added device and signature information. The signature information may be sent by an authentication server corresponding to the model of the newly added device, where the authentication server is configured to collect the model and the configuration file associated with a certain device identifier. And after receiving the signature information, comparing the signature information with the preset signature information, if the signature information is consistent with the preset signature information, determining that the signature authentication is passed, and adding the model of the newly added equipment and the configuration file of the model of the newly added equipment into a preset function tree.
The embodiment of the application adopts the configuration file in the XML format to encrypt the configuration data of the corresponding function of different equipment models and the verification data generated by the configuration data. The method and the device can ensure that the configuration data is effectively checked for accuracy before the configuration function. In the process of maintaining/updating the configuration files of different equipment models and different equipment identifications in the preset function tree, management is not required through a monitoring program, and only the configuration files in the preset function tree are required to be maintained. In the later function configuration, only the configuration data needs to be extracted from the preset function tree. Compared with the prior art, the method has the advantages that the maintenance degree is reduced, the function configuration process is simplified, and meanwhile, when the configuration update file is received, the preset function tree can be rapidly updated.
Fig. 3 is a flowchart of a method for processing a configuration file according to an embodiment of the present application, and as shown in fig. 3, the method further includes:
in step S31, in the case where the encrypted data does not match the target verification data, it is determined that the target configuration data has been tampered with, and the spare configuration data is acquired.
And step S32, performing function configuration on the client by using the standby configuration data.
In the embodiment of the application, when the encrypted data and the target verification data are not configured, after the target data are determined to be tampered, the standby configuration data of the target function are queried, wherein the standby configuration data are configuration data of the target function stored in the server. For changing to the preset function tree in case of change of the preset function tree
In the embodiment of the present application, after determining that the target configuration data is tampered with, the method further includes the following steps D1-D4:
and D1, acquiring initial configuration data and an initial encryption key corresponding to the target verification data.
And D2, determining the client identification corresponding to the client.
And D3, splicing the client identification and the initial encryption key to obtain a target key.
And D4, encrypting the initial configuration data corresponding to the target verification data by using the target key to obtain updated verification data, and adding the updated verification data to the target configuration file.
In this embodiment of the present application, if the target configuration data is tampered with, it is determined that the target verification data needs to be modified, and the modification method is as follows: and splicing the client identification and the initial encryption key to obtain a target key, simultaneously re-acquiring configuration data of a target function, encrypting the initial configuration data corresponding to the target verification data by using the target key to obtain updated verification data, and re-adding the updated verification data and the initial configuration data to the target configuration file.
In the embodiment of the application, after the target verification data is determined to be tampered, the target verification data and the configuration data of the target function are reset, the preset function tree can be repaired in time, and the target can be ensured to be normally configured subsequently.
Fig. 4 is a block diagram of a device for processing a configuration file according to an embodiment of the present application, where the device may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 4, the apparatus includes:
and the determining module 41 is configured to determine a target function to be currently configured by the client.
The obtaining module 42 is configured to obtain a target configuration file corresponding to a target function from a preset function tree, where the target configuration file stores target configuration data and target verification data.
And the reading module 43 is configured to read the configuration data and encrypt the configuration data to obtain encrypted data.
And the processing module 44 is configured to perform function configuration on the client according to the target configuration data when the encrypted data matches the target verification data.
In an embodiment of the present application, the apparatus for processing a configuration file further includes: the acquisition module is used for acquiring a target equipment identifier to which the client belongs and a plurality of equipment models associated with the target equipment identifier; acquiring functions supported by the equipment model and initial configuration data corresponding to the functions; encrypting the initial configuration data to obtain verification data; generating configuration files corresponding to all functions according to the initial configuration data and the verification data; and generating a preset function tree according to the target equipment identification, the equipment model and the configuration file.
In the embodiment of the application, the obtaining module is used for determining the model of the target device corresponding to the client; under the condition that the preset function tree has the equipment model matched with the target equipment model, acquiring at least one configuration file associated with the target equipment model from the preset function tree; and determining the configuration file meeting the target function as a target configuration file.
In an embodiment of the present application, the apparatus for processing a configuration file further includes: the configuration module is used for generating a queue message according to the target function and the model of the target equipment and pushing the queue message to a target queue; acquiring the survival time corresponding to the queue message; and deleting the queue message from the target queue under the condition that the updating of the preset function tree is not detected within the survival time.
In an embodiment of the present application, the apparatus for processing a configuration file further includes: the authentication module is used for acquiring a configuration update file, wherein the configuration update file comprises function update data and signature information; under the condition that the signature information passes the authentication, determining a function to be updated corresponding to the function updating data from a preset function tree; and updating the function to be updated by using the function updating data.
In an embodiment of the present application, the apparatus for processing a configuration file further includes: the detection module is used for determining that the target configuration data is tampered under the condition that the encrypted data is not matched with the target verification data, and acquiring standby configuration data; and performing function configuration on the client by using the standby configuration data.
In an embodiment of the present application, the apparatus for processing a configuration file further includes: the updating module is used for acquiring initial configuration data and an initial encryption key corresponding to the target verification data; determining a client identifier corresponding to a client; splicing by using the client identifier and the initial encryption key to obtain a target key; and encrypting the initial configuration data corresponding to the target verification data by using the target key to obtain updated verification data, and adding the updated verification data to the target configuration file.
An embodiment of the present application further provides an electronic device, as shown in fig. 5, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for processing the configuration file in any one of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for processing a configuration file as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for processing a configuration file, comprising:
determining a target function to be configured at the client;
acquiring a target configuration file corresponding to the target function from a preset function tree, wherein target configuration data and target verification data are stored in the target configuration file;
reading the target configuration data, and encrypting based on the target configuration data to obtain encrypted data;
and under the condition that the encrypted data is matched with the target verification data, performing function configuration on the client according to the target configuration data.
2. The method according to claim 1, wherein before obtaining the target configuration file corresponding to the target function from a preset function tree, the method further comprises:
acquiring a target device identifier to which the client belongs and a plurality of device models associated with the target device identifier;
acquiring functions supported by the equipment model and initial configuration data corresponding to the functions;
encrypting the initial configuration data to obtain verification data;
generating configuration files corresponding to all functions according to the initial configuration data and the verification data;
and generating the preset function tree according to the target equipment identification, the equipment model and the configuration file.
3. The method according to claim 2, wherein the obtaining the target configuration file corresponding to the target function from a preset function tree comprises:
determining a target device model corresponding to the client;
under the condition that the preset function tree has the equipment model matched with the target equipment model, acquiring at least one configuration file associated with the target equipment model from the preset function tree;
and determining the configuration file meeting the target function as the target configuration file.
4. The method of claim 3, wherein in the absence of a device model in the preset function tree that matches the target device model, the method further comprises:
generating a queue message according to the target function and the model of the target equipment, and pushing the queue message to a target queue;
acquiring the survival time corresponding to the queue message;
and deleting the queue message from the target queue under the condition that the preset function tree is not detected to be updated in the lifetime.
5. The method of claim 2, further comprising:
acquiring a configuration update file, wherein the configuration update file comprises function update data and signature information;
under the condition that the signature information passes the authentication, determining a function to be updated corresponding to the function updating data from the preset function tree;
and updating the function to be updated by using the function updating data.
6. The method of claim 1, further comprising:
under the condition that the encrypted data is not matched with the target verification data, determining that the target configuration data is tampered, and acquiring standby configuration data;
and performing function configuration on the client by using the standby configuration data.
7. The method of claim 6, wherein after determining that the target configuration data has been tampered with, the method further comprises:
acquiring initial configuration data and an initial encryption key corresponding to the target verification data;
determining a client identifier corresponding to the client;
splicing the client identification and the initial encryption key to obtain a target key;
and encrypting initial configuration data corresponding to the target verification data by using the target key to obtain updated verification data, and adding the updated verification data to the target configuration file.
8. An apparatus for processing a configuration file, comprising:
the determining module is used for determining the current target function to be configured of the client;
the acquisition module is used for acquiring a target configuration file corresponding to the target function from a preset function tree, wherein target configuration data and target verification data are stored in the target configuration file;
the reading module is used for reading the target configuration data and encrypting the target configuration data to obtain encrypted data;
and the processing module is used for carrying out function configuration on the client according to the target configuration data under the condition that the encrypted data is matched with the target verification data.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-7 by executing a program stored on a memory.
CN202111154531.2A 2021-09-29 2021-09-29 Configuration file processing method and device, electronic equipment and storage medium Active CN114020346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111154531.2A CN114020346B (en) 2021-09-29 2021-09-29 Configuration file processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111154531.2A CN114020346B (en) 2021-09-29 2021-09-29 Configuration file processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114020346A true CN114020346A (en) 2022-02-08
CN114020346B CN114020346B (en) 2023-07-18

Family

ID=80055306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111154531.2A Active CN114020346B (en) 2021-09-29 2021-09-29 Configuration file processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114020346B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622440A (en) * 2012-03-09 2012-08-01 北京神州数码思特奇信息技术股份有限公司 Method and device for establishing business function tree
US20130176255A1 (en) * 2012-01-06 2013-07-11 Samsung Electronics Co., Ltd. Method and apparatus for implementing multi-vision system by using multiple portable terminals
CN103955646A (en) * 2014-04-28 2014-07-30 京信通信系统(中国)有限公司 Method and system for controlling software functions of various devices
CN111737018A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 ZooKeeper configuration file storage processing method, device, equipment and medium thereof
WO2020259608A1 (en) * 2019-06-28 2020-12-30 北京金山云网络技术有限公司 Cdn functional module running method and running apparatus, and electronic device and storage medium
WO2021012552A1 (en) * 2019-07-25 2021-01-28 深圳壹账通智能科技有限公司 Login processing method and related device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130176255A1 (en) * 2012-01-06 2013-07-11 Samsung Electronics Co., Ltd. Method and apparatus for implementing multi-vision system by using multiple portable terminals
CN102622440A (en) * 2012-03-09 2012-08-01 北京神州数码思特奇信息技术股份有限公司 Method and device for establishing business function tree
CN103955646A (en) * 2014-04-28 2014-07-30 京信通信系统(中国)有限公司 Method and system for controlling software functions of various devices
WO2020259608A1 (en) * 2019-06-28 2020-12-30 北京金山云网络技术有限公司 Cdn functional module running method and running apparatus, and electronic device and storage medium
WO2021012552A1 (en) * 2019-07-25 2021-01-28 深圳壹账通智能科技有限公司 Login processing method and related device
CN111737018A (en) * 2020-08-26 2020-10-02 腾讯科技(深圳)有限公司 ZooKeeper configuration file storage processing method, device, equipment and medium thereof

Also Published As

Publication number Publication date
CN114020346B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN110263579B (en) Data processing method, system and related equipment
CN110599346A (en) Block chain information acquisition method and related equipment
CN110601896B (en) Data processing method and equipment based on block chain nodes
CN110705893B (en) Service node management method, device, equipment and storage medium
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
CN112970020A (en) Monitoring device components using distributed ledger
CN110989922B (en) Distributed data storage method and system
CN110943852B (en) Device and method for configuring DNS (Domain name Server), DNS and method for updating configuration of DNS
CN111382164A (en) Service processing method based on block chain network
US20170177316A1 (en) Mobile application deployment for distributed computing environments
CN111367923A (en) Data processing method, data processing device, node equipment and storage medium
CN112202633B (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN112000853B (en) Method for generating/feeding back unique identifier of equipment, medium, client and server
CN112671881A (en) Node organization management method and device, electronic equipment and readable storage medium
CN114328029A (en) Backup method and device of application resources, electronic equipment and storage medium
CN110232570B (en) Information supervision method and device
CN114020346A (en) Configuration file processing method and device, electronic equipment and storage medium
CN110888892A (en) Block synchronization method, device and storage medium
JP6992309B2 (en) Transmitter, receiver, and communication method
JP7392852B2 (en) Rule generation device, rule generation method and program
CN113867778A (en) Method and device for generating mirror image file, electronic equipment and storage medium
CN112559546A (en) Database synchronization method and device, computer equipment and readable storage medium
CN111400327A (en) Data synchronization method and device, electronic equipment and storage medium
CN112860708B (en) Data consistency restoration method, system, device and 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
GR01 Patent grant
GR01 Patent grant