WO2021238350A1 - 更新配置文件的方法、设备及存储介质 - Google Patents

更新配置文件的方法、设备及存储介质 Download PDF

Info

Publication number
WO2021238350A1
WO2021238350A1 PCT/CN2021/081245 CN2021081245W WO2021238350A1 WO 2021238350 A1 WO2021238350 A1 WO 2021238350A1 CN 2021081245 W CN2021081245 W CN 2021081245W WO 2021238350 A1 WO2021238350 A1 WO 2021238350A1
Authority
WO
WIPO (PCT)
Prior art keywords
collection
collection tool
verification information
configuration file
task
Prior art date
Application number
PCT/CN2021/081245
Other languages
English (en)
French (fr)
Inventor
郭孜
Original Assignee
北京金山云网络技术有限公司
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 北京金山云网络技术有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2021238350A1 publication Critical patent/WO2021238350A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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

Definitions

  • the present disclosure relates to the field of communication technology, and more specifically, to a method, device, and storage medium for updating configuration files.
  • a collection task corresponds to a configuration file
  • an agent client that executes the collection task is usually set in the device, that is, the collection agent, through which the collection agent collects the specified file according to the configuration file.
  • the configuration file that needs to be updated can be copied to the corresponding collection agent by writing a script.
  • the script needs to be modified.
  • One purpose of the embodiments of the present disclosure is to provide a new technical solution for updating configuration files.
  • a server for updating a configuration file.
  • the method is applied to a server and includes:
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is stored locally in the collection tool The verification information of the configuration file of the collection task;
  • the second verification information is the verification information of the latest configuration file of the collection task
  • the state of the collection tool is the first state and the first verification information is different from the second verification information
  • the state of the collection tool is modified to the second state, and the The collection tool sends the latest configuration file of the collection task.
  • the method further includes:
  • the state of the collection tool is the second state
  • the first verification information is the same as the second verification information
  • the state of the collection tool is modified to the first state.
  • the sending the latest configuration file of the collection task to the collection tool includes:
  • the sending the latest configuration file of the collection task to the collection tool includes:
  • the parameter value of the collection task input by the user is also obtained
  • the latest configuration file of the collection task is generated.
  • a server for updating a configuration file.
  • the method is applied to a server and includes:
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is stored locally in the collection tool The verification information of the configuration file of the collection task;
  • the second verification information is the verification information of the latest configuration file of the collection task
  • the state of the collection tool is the first state and the first verification information is different from the second verification information, modifying the state of the collection tool to the third state;
  • the state of the target collection tool is modified to the second state, the target collection tool is removed from the list to be upgraded, and the latest configuration file of the collection task corresponding to the target collection tool is sent to the target collection tool.
  • it further includes:
  • the state of the collection tool is the second state
  • the first verification information is the same as the second verification information
  • the state of the collection tool is changed to the first state.
  • the sending the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool includes:
  • the latest configuration file of the collection task corresponding to the target collection tool is sent to the target collection tool.
  • the sending the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool includes:
  • the latest configuration file of the collection task corresponding to the target collection tool is sent to the target collection tool.
  • it further includes:
  • the latest configuration file of the collection task is generated.
  • a method for updating a configuration file is applied to a collection tool and includes:
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and first verification information;
  • the first verification information is the configuration file of the collection task stored locally The verification information;
  • an electronic device including:
  • the heartbeat information receiving module is configured to receive the heartbeat information sent by the collection tool; the heartbeat information includes the task identifier of the collection task corresponding to the collection tool and the first verification information; the first verification information is stored in the Verification information of the configuration file of the collection task local to the collection tool;
  • a verification information acquisition module configured to acquire second verification information according to the task identifier, where the second verification information is the verification information of the latest configuration file of the collection task;
  • the update management module is set to modify the state of the collection tool to the second state when the state of the collection tool is the first state and the first verification information is different from the second verification information. Status, and send the latest configuration file of the collection task to the collection tool.
  • an electronic device including:
  • the heartbeat information receiving module is configured to receive the heartbeat information sent by the collection tool; the heartbeat information includes the task identifier of the collection task corresponding to the collection tool and the first verification information; the first verification information is stored in the Verification information of the configuration file of the collection task local to the collection tool;
  • a verification information acquisition module configured to acquire second verification information according to the task identifier, where the second verification information is the verification information of the latest configuration file of the collection task;
  • the first update management module is configured to modify the status of the collection tool to when the status of the collection tool is the first status and the first verification information is different from the second verification information Third state
  • the list management module to be upgraded is configured to add the collection tool in the third state to the list to be upgraded, so that the user can select the target collection tool from the list to be upgraded;
  • the second update management module is configured to modify the status of the target collection tool to the second state, remove the target collection tool from the list to be upgraded, and send the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool .
  • an electronic device including:
  • the heartbeat information sending module sends heartbeat information to the server;
  • the heartbeat information includes the task identifier of the collection task corresponding to the collection tool and the first verification information;
  • the first verification information is stored locally in the The verification information of the configuration file of the collection task;
  • the configuration file update module is configured to receive the latest configuration file of the collection task sent by the server, and update the latest configuration file of the collection task to the local.
  • an electronic device which is characterized by comprising a memory and a processor, the memory is used to store computer instructions, and the processor is used to call the computer from the memory Instructions to perform any of the methods described above.
  • a computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the method described in any one of the above methods.
  • the server pre-stores the latest configuration file of the collection task.
  • the server determines that the status of the collection tool is the first state, and the first verification information in the heartbeat information sent by the collection tool is different from the second verification information corresponding to the task ID in the heartbeat information sent by the collection tool, the collection is determined
  • the local configuration file of the tool needs to be updated.
  • the server sends the latest configuration file to the collection tool. In this way, the collection tool can be updated with the latest configuration file received.
  • the configuration file corresponding to the collection task needs to be updated, there is no need to update the configuration file for each collection tool, only the configuration file needs to be updated once on the server side, and the collection tool sends the heartbeat information to the server side. Can. In this way, the update cost can be greatly reduced, and the update efficiency can be greatly improved at the same time. At the same time, it avoids the use of scripts for updating, that is, avoiding the use of scripts for updating and the problem of frequent modification of scripts.
  • FIG. 1 is a block diagram of the hardware configuration of an electronic device that implements a configuration file update provided by an embodiment of the present disclosure
  • FIG. 2 is a first flowchart of a method for updating a configuration file provided by an embodiment of the present disclosure
  • FIG. 3 is a second flowchart of a method for updating a configuration file provided by an embodiment of the present disclosure
  • FIG. 4 is a third flowchart of a method for updating configuration files provided by an embodiment of the present disclosure
  • FIG. 5 is a first structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 6 is a second structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 7 is a third structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 8 is a fourth structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • Fig. 1 is a block diagram of the hardware configuration of an electronic device for updating a configuration file according to an embodiment of the present disclosure.
  • the electronic device 1000 may be a collection tool or a server. Further, the collection tool is a computer program that can be loaded on a portable computer, tablet computer, palmtop computer, intelligent control platform, etc.
  • the server can be a virtual machine or a physical machine.
  • the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and so on.
  • the processor 1100 may be a central processing unit (CPU), a microprocessor MCU, or the like.
  • the memory 1200 includes, for example, ROM (Read Only Memory), RAM (Random Access Memory), nonvolatile memory such as a hard disk, and the like.
  • the interface device 1300 includes, for example, a USB interface, a headphone interface, and the like.
  • the communication device 1400 can perform wired or wireless communication, for example.
  • the display device 1500 is, for example, a liquid crystal display, a touch display, or the like.
  • the input device 1600 may include, for example, a touch screen, a keyboard, and the like. The user can input/output voice information through the speaker 2700 and the microphone 2800.
  • the present disclosure may only involve some of the devices.
  • the electronic device 1000 only involves the memory 1200 and the processor 1100.
  • the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to execute the method for updating configuration files provided by the embodiments of the present disclosure.
  • the embodiment of the present disclosure provides a method for updating a configuration file, and the method is applied to the server.
  • the configuration file is the configuration file of the collection task.
  • the configuration file of the collection task is used to describe the collection rules used by the collection tool when performing the collection task.
  • the configuration file includes the path where the file collected by the collection tool is located, the frequency of the collected file, the name of the collected file, and so on.
  • the server may be the aforementioned electronic device 1000 as shown in FIG. 1.
  • the collection tool is usually called a collection agent, which is essentially a computer program.
  • the method for updating a configuration file includes the following S2100-S2300:
  • S2100 Receive the heartbeat information sent by the collection tool.
  • the heartbeat information includes the task identifier of the collection task corresponding to the collection tool, and the first verification information.
  • the first verification information is the verification information of the configuration file of the collection task stored locally in the collection tool.
  • the heartbeat information may also include other information, which is not limited in the embodiment of the present disclosure.
  • the task identification may be the ID of the collection task.
  • the aforementioned first verification information may be the configuration file itself of the collection task stored locally in the collection tool.
  • the aforementioned first verification information may also be a hash value of a configuration file of a collection task stored locally in the collection tool. It is understandable that when the configuration files of the collection tasks stored locally in the collection tool are different, the corresponding hash values are also different. That is, the hash value can uniquely represent the configuration file of the collection task stored locally in the collection tool.
  • the collection tool usually sends heartbeat information to the server periodically.
  • the server usually receives the heartbeat information sent by the collection tool periodically.
  • S2200 Acquire second verification information according to the task identifier.
  • the second verification information is verification information of the latest configuration file of the collection task.
  • the server stores multiple sets of mapping relationships, and each set of mapping relationships includes the latest configuration file and the task identifier of the corresponding collection task. It should be noted that the latest configuration file stored on the server is the latest version of the configuration file corresponding to the collection task.
  • the method for updating a configuration file further includes the following steps S2210 and S2211:
  • the server provides a page in which input interfaces for parameter values corresponding to different parameters of the collection task are set.
  • the input interface allows users to input parameter values that meet their own needs. Based on this, the server obtains the parameter value of the collection task input by the user through the input interface.
  • the parameter value may be the storage path, the acquisition frequency, and so on.
  • the server generates the latest configuration file according to the parameters corresponding to the input interface and the parameter values input by the corresponding input interface. Further, the generated latest configuration file can be stored in its own database.
  • the latest configuration file is generated in a graphical manner, and the operation is simple.
  • the second verification information is the latest configuration file itself stored on the server side.
  • the second verification information is the hash value of the latest configuration file stored on the server side.
  • the method for updating the configuration file provided by the embodiment of the present disclosure before the above S2200, further includes the steps of generating the hash value of the latest configuration file and using the hash value of the latest configuration file as the second verification information.
  • the server records the status of the collection tool.
  • the first state is a state where the characterization collection tool is in an updated state.
  • the second state represents the state in which the collection tool is being updated.
  • the server modifies the state of the collection tool to the second state, and sends the latest configuration file of the collection task to the collection tool.
  • the acquisition tool uses the obtained latest configuration file to update the local configuration file.
  • the collection tool update is complete.
  • the next time the collection tool sends heartbeat information to the server when the server executes the above S2100 and S2200, the status of the collection tool recorded by the server is the second state, and the first verification information and the second verification are determined.
  • the experience information is the same.
  • the server modifies the status of the collection tool from the second state to the first state at this time.
  • the method for updating a configuration file further includes the following S2400:
  • S2400 When the state of the collection tool is the second state, and the first verification information is the same as the second verification information, modify the state of the collection tool to the first state.
  • the server pre-stores the latest configuration file of the collection task.
  • the server determines that the status of the collection tool is the first state, and the first verification information in the heartbeat information sent by the collection tool is different from the second verification information corresponding to the task ID in the heartbeat information sent by the collection tool, the collection is determined
  • the local configuration file of the tool needs to be updated.
  • the server sends the latest configuration file to the collection tool. In this way, the collection tool can be updated with the latest configuration file received.
  • the configuration file corresponding to the collection task needs to be updated, there is no need to update the configuration file for each collection tool, only the configuration file needs to be updated once on the server side, and the collection tool sends the heartbeat information to the server side. Can. In this way, the update cost can be greatly reduced, and the update efficiency can be greatly improved at the same time. At the same time, it avoids the use of scripts for updating, that is, avoiding the use of scripts for updating and the problem of frequent modification of scripts.
  • sending the latest configuration file of the collection task to the collection tool in the above S2300 can be implemented through the following S2310:
  • the server when the heartbeat information sent by the collection tool is received again, it indicates that the collection tool and the network are in a normal and trouble-free state. At this time, the server sends the latest configuration file to the collection tool to ensure that the collection tool Able to receive the latest configuration file normally.
  • sending the latest configuration file of the collection task to the collection tool in the above S2300 can be implemented through the following S2320 and S2321:
  • S2320 In the case of receiving the heartbeat information sent by the collection tool again, add an upgrade notification to the heartbeat response information returned to the collection tool to prompt the collection tool to send an upgrade request.
  • the server upon receiving the heartbeat information sent by the collection tool, the server will send a heartbeat response message to the collection tool to inform the collection tool that the corresponding heartbeat information has been received.
  • an upgrade notification may be added to it to prompt the collection tool to send an upgrade request.
  • the acquisition tool determines that the local configuration file needs to be updated.
  • the collection tool may automatically send an upgrade request to the server when receiving the upgrade notification.
  • the server sends the latest configuration file of the collection task to the collection tool.
  • the collection tool when the collection tool receives an upgrade notification, it can notify the user that the collection tool needs to be upgraded through a pop-up window. The user can instruct the collection tool to upgrade.
  • the collection tool receives the user's upgrade instruction, it sends an upgrade request to the server. In this case, the server sends the latest configuration file of the collection task to the collection tool.
  • the server by adding an upgrade notification to the heartbeat response information, multiplexing of the heartbeat response information can be realized, which can reduce the computing overhead of the server.
  • the server, the collection tool, and the network are in a normal and trouble-free state, thereby further ensuring that the collection tool can receive the latest configuration file normally.
  • the embodiment of the present disclosure provides a method for updating a configuration file, and the method is applied to the server.
  • the method for updating configuration files provided by the embodiment of the present disclosure includes the following S3100-S3500:
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is the verification of the configuration file of the collection task stored locally in the collection tool information.
  • the specific implementation of S3100 is the same as the specific implementation of S2100 in the foregoing method embodiment
  • the specific implementation of S3200 is the same as the specific implementation of S2200 in the foregoing method embodiment.
  • the method for updating a configuration file further includes the following steps S3210 and S3211:
  • the specific implementation of the foregoing S3210 is the same as that of the foregoing S2210, and the specific implementation of the foregoing S3211 is the same as the foregoing S2211, which will not be repeated here.
  • S3300 When the state of the collection tool is the first state and the first verification information is different from the second verification information, modify the state of the collection tool to the third state.
  • the server records the status of the collection tool.
  • the first state is a state where the characterization collection tool is in an updated state.
  • the third state represents that the collection tool is in a state to be updated.
  • the server modifies the state of the collection tool to the third state.
  • the target collection tool is the collection tool that the user needs to upgrade.
  • the server adds the collection tool in the third state to the list to be upgraded, and displays the list to be upgraded to the user through a page, and the user selects the target collection tool from the list to be upgraded.
  • the user can select the collection tool that needs to be upgraded from the list to be upgraded.
  • the server uses the collection tool selected by the user as the target collection tool.
  • S3500 Modify the state of the target collection tool to the second state, remove the target collection tool from the list to be upgraded, and send the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool.
  • the server modifies the state of the target collection tool to the second state, and removes the target collection tool from the list to be upgraded. At the same time, the latest configuration file of the collection task corresponding to the target collection tool is sent to the target collection tool.
  • the target collection tool uses the obtained latest configuration file to update the local configuration file. At this point, the target collection tool has been updated.
  • the next time the target collection tool sends heartbeat information to the server when the server executes the above S3100 and S3200, the status of the collection tool recorded by the server is the second state, and the first verification information and the second The verification information is the same.
  • the server changes the status of the collection tool from the second state to the first state at this time.
  • the method for updating a configuration file provided by the embodiment of the present disclosure further includes the following S3600:
  • S3600 When the state of the collection tool is the second state and the first verification information is the same as the second verification information, modify the state of the collection tool to the first state.
  • the server pre-stores the latest configuration file of the collection task, the server determines that the status of the collection tool is the first state, and the first verification information in the heartbeat information sent by the collection tool is the same as that of the collection tool.
  • the server first modifies the state of the collection tool to the third state, and adds the collection tool in the third state to the list to be upgraded, so that the user can select the target collection tool from the list to be upgraded.
  • the server changes the status of the target collection tool to the second state, removes the target collection tool from the list to be upgraded, and sends the latest configuration of the collection task corresponding to the target collection tool to the target collection tool document.
  • the collection tool can be updated with the latest configuration file received.
  • the configuration file corresponding to the collection task needs to be updated, there is no need to update the configuration file for each collection tool, only the configuration file needs to be updated once on the server side, and the collection tool sends the heartbeat information to the server side. Can. In this way, the update cost can be greatly reduced, and the update efficiency can be greatly improved at the same time.
  • the collection tool can be updated under the instruction of the user, which can meet the personalized needs of the user.
  • the sending of the latest configuration file of the collection task to the collection tool in the above S3500 can be implemented by the following S3510:
  • the sending of the latest configuration file of the collection task to the collection tool in the above S3500 can be implemented through the following S3520 and S3521:
  • S3521 upon receiving the upgrade request sent by the target collection tool, send the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool.
  • the embodiment of the present disclosure provides a method for updating a configuration file, and the method is applied to a collection tool.
  • the method for updating a configuration file includes the following S4100 and S4200:
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is the verification information of the configuration file of the collection task stored locally.
  • the heartbeat information may also include other information, which is not limited in the embodiment of the present disclosure.
  • the task identification may be the ID of the collection task.
  • the aforementioned first verification information may be the configuration file itself of the collection task stored locally in the collection tool.
  • the aforementioned first verification information may also be a hash value of a configuration file of a collection task stored locally in the collection tool. It is understandable that when the configuration files of the collection tasks stored locally in the collection tool are different, the corresponding hash values are also different. That is, the hash value can uniquely represent the configuration file of the collection task stored locally in the collection tool.
  • the specific implementation of the above S4110 may be: hash processing the local configuration file of the collection tool to obtain the hash value of the local configuration file of the collection tool.
  • the hash value of the local configuration file of the collection tool is used as the first verification information, which can reduce the data volume of the heartbeat information, thereby facilitating the transmission of the heartbeat information.
  • the collection tool usually sends heartbeat information to the server periodically.
  • S4200 Receive the latest configuration file of the collection task sent by the server, and update the latest configuration file of the collection task to the local.
  • the collection tool after obtaining the latest configuration file, the collection tool replaces the local configuration file with the latest configuration file, so as to update the local configuration file. Based on this, when multiple collection tools that contain the same collection task need to be updated, there is no need to update the configuration file of each collection tool. You only need to update the configuration file once on the server side, and the collection tool sends heartbeat information to the server side. Can. In this way, the update cost can be greatly reduced, and the update efficiency can be greatly improved at the same time. At the same time, it avoids the use of scripts for updating, that is, avoiding the use of scripts for updating and the problem of frequent modification of scripts.
  • the method provided by the embodiment of the present disclosure before the foregoing S4200 further includes the following S4210 and S4211:
  • S4210 Send an upgrade request to the server when the heartbeat response information returned by the server includes an upgrade notification.
  • the collection tool after the collection tool sends the heartbeat information to the server, it will receive a heartbeat response message returned by the server to determine that the heartbeat information sent by itself is received by the server.
  • the collection tool after receiving the heartbeat response information returned by the server, the collection tool detects the heartbeat response information to determine whether there is an upgrade notification therein. In the case of an upgrade notification, the collection tool can send an upgrade request to the server.
  • the server, the collection tool, and the network are in a normal and trouble-free state, thereby further ensuring that the collection tool can receive the latest configuration file sent by the server normally.
  • An embodiment of the present disclosure provides an electronic device 50.
  • the electronic device 50 includes a heartbeat information receiving module 51, a verification information acquiring module 52, and an update management module 53. in:
  • the heartbeat information receiving module 51 is configured to receive the heartbeat information sent by the collection tool; the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is the collection task stored locally in the collection tool The verification information of the configuration file;
  • the verification information obtaining module 52 is configured to obtain the second verification information according to the task identifier, the second verification information being the verification information of the latest configuration file of the collection task;
  • the update management module 53 is set to modify the status of the collection tool to the second state when the status of the collection tool is the first status and the first verification information is different from the second verification information, and send it to the collection tool The latest configuration file of the collection task.
  • the electronic device 50 further includes a status modification module, which is configured to: when the status of the collection tool is the second status, and the first verification information is the same as the second verification information, the status of the collection tool is Modified to the first state.
  • the update management module 53 is specifically configured to send the latest configuration file of the collection task to the collection tool when the heartbeat information sent by the collection tool is received again.
  • the update management module 53 is specifically configured to add an upgrade notification to the heartbeat response information returned to the collection tool to prompt the collection tool to send an upgrade request when the heartbeat information sent by the collection tool is received again;
  • the latest configuration file of the collection task is sent to the collection tool.
  • the electronic device 50 further includes a parameter value acquisition module and a configuration file generation module. in:
  • the parameter value obtaining module is set to obtain the parameter value of the collection task input by the user;
  • the configuration file generation module is set to generate the latest configuration file of the collection task according to the parameter value of the collection task.
  • the electronic device 50 provided in the embodiment of the present disclosure can implement each process implemented by the electronic device in the method embodiment shown in FIG.
  • An embodiment of the present disclosure provides an electronic device 60.
  • the electronic device 60 includes a heartbeat information receiving module 61, a verification information acquiring module 62, a first update management module 63, a pending upgrade list management module 64, The second update management module 65. in:
  • the heartbeat information receiving module 61 is configured to receive the heartbeat information sent by the collection tool; the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information; the first verification information is the collection task stored locally in the collection tool The verification information of the configuration file;
  • the verification information obtaining module 62 is configured to obtain the second verification information according to the task identifier, the second verification information being the verification information of the latest configuration file of the collection task;
  • the first update management module 63 is configured to modify the state of the collection tool to the third state when the state of the collection tool is the first state and the first verification information is different from the second verification information;
  • the list management module 64 to be upgraded is configured to add the collection tool in the third state to the list to be upgraded, so that the user can select the target collection tool from the list to be upgraded;
  • the second update management module 65 is configured to modify the state of the target collection tool to the second state, remove the target collection tool from the list to be upgraded, and send the latest configuration file of the collection task corresponding to the target collection tool to the target collection tool.
  • the electronic device 60 further includes a state modification module configured to: when the state of the collection tool is the second state, and the first verification information is the same as the second verification information, the state of the collection tool is Modified to the first state.
  • the second update management module 65 is specifically configured to send the latest configuration file of the collection task to the collection tool when the heartbeat information sent by the collection tool is received again.
  • the second update management module 65 is specifically configured to add an upgrade notification to the heartbeat response information returned to the collection tool to prompt the collection tool to send the upgrade when the heartbeat information sent by the collection tool is received again. ask;
  • the latest configuration file of the collection task is sent to the collection tool.
  • the electronic device 60 further includes a parameter value acquisition module and a configuration file generation module. in:
  • the parameter value obtaining module is set to obtain the parameter value of the collection task input by the user;
  • the configuration file generation module is set to generate the latest configuration file of the collection task according to the parameter value of the collection task.
  • the electronic device 60 provided by the embodiment of the present disclosure can implement each process implemented by the electronic device in the method embodiment shown in FIG.
  • An embodiment of the present disclosure provides an electronic device 70.
  • the electronic device 70 includes a heartbeat information sending module 71 and a configuration file updating module 72. in:
  • the heartbeat information sending module 71 sends heartbeat information to the server;
  • the heartbeat information includes the task identification of the collection task corresponding to the collection tool and the first verification information;
  • the first verification information is the calibration of the configuration file of the collection task stored locally Verification information;
  • the configuration file update module 72 is configured to receive the latest configuration file of the collection task sent by the server, and update the latest configuration file of the collection task to the local.
  • the electronic device 70 provided in the embodiment of the present disclosure can implement each process implemented by the electronic device in the method embodiment shown in FIG.
  • An embodiment of the present disclosure provides an electronic device 80, as shown in FIG. 8, including a memory 81 and a processor 82, where the memory 81 is used to store computer instructions, and the processor 82 is used to call the computer instructions from the memory 81 to execute The method of any one of the foregoing method embodiment one, method embodiment two, and method embodiment three.
  • the embodiment of the present disclosure provides a system for updating configuration files, which includes the electronic device shown in FIG. 4 and at least one electronic device shown in FIG. 6. Or, the electronic device as shown in FIG. 5 and at least one electronic device as shown in FIG. 6 are included.
  • the embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method according to any one of method embodiment 1, method embodiment 2, and method embodiment 3. method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages.
  • Source code or object code written in any combination, programming languages include object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user’s computer) connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be personalized by using the status information of the computer-readable program instructions.
  • FPGA field programmable gate array
  • PDA programmable logic array
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram can represent a module, program segment, or part of an instruction, and a module, program segment, or part of an instruction contains one or more executables for realizing the specified logic function. instruction.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation through hardware, implementation through software, and implementation through a combination of software and hardware are all equivalent.
  • the method, device, and storage medium for updating configuration files store the latest configuration file of the collection task in advance on the server side, and the status of the collection tool is determined as the first state on the server side. , And when the first verification information in the heartbeat information sent by the collection tool is different from the second verification information corresponding to the task identifier in the heartbeat information sent by the collection tool, it is determined that the local configuration file of the collection tool needs to be updated. At this time, the server sends the latest configuration file to the collection tool. The collection tool can be updated with the latest configuration file received.
  • the configuration file corresponding to the collection task needs to be updated, there is no need to update the configuration file for each collection tool, only the configuration file needs to be updated once on the server side, and the collection tool sends the heartbeat information to the server side.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

一种更新配置文件的方法、设备及存储介质,涉及云计算领域。其中,方法包括:接收采集工具发送的心跳信息(S2100);心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在采集工具本地的采集任务的配置文件的校验信息;根据任务标识获取第二校验信息(S2200),第二校验信息是采集任务的最新配置文件的校验信息;在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,将采集工具的状态修改为第二状态,并向采集工具发送采集任务的最新配置文件(S2300)。该方法可降低更新成本,提高更新效率,以及避免了使用脚本进行更新需要频繁修改脚本的问题。

Description

更新配置文件的方法、设备及存储介质
本公开要求于2020年05月26日提交中国专利局、申请号为202010457645.3、发明名称为“更新配置文件的方法、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及通信技术领域,更具体地,涉及一种更新配置文件的方法、设备及存储介质。
背景技术
目前,包含多台设备的分布式存储系统被越来越广泛的使用。而对于一个分布式存储系统来说,系统中的多台设备可以分别设有用于采集对应设备中指定文件的采集任务。其中,一个采集任务对应一个配置文件,以及通常在设备中设置有执行采集任务的代理客户端,即采集agent,通过采集agent按照配置文件来采集指定文件。
当需要对上述的配置文件进行更新时,在一种方式中,通过手动的对每一台设备上采集agent的配置文件分别进行修改以实现更新。但是,在设备数量较多时,即采集agent数量较多时,这种更新的方式存在成本高以及效率低的问题。
在另一种方式中,可通过编写脚本的方式,将需更新的配置文件复制到对应采集agent上。但是,当分布式存储系统中有新增加的设备,或者分布存储系统中部分采集agent的安装路径发生变化,就需要对脚本进行修改。
发明内容
本公开实施例的一个目的是提供一种用于更新配置文件的新技术方案。
根据本公开实施例的第一方面,提供了一种更新配置文件的方法,所述方法应用于服务端,包括:
接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第二状态,并向所述采集工具发送所述采集任务的最新配置文件。
在一实施例中,所述方法还包括:
在所述采集工具的状态为第二状态,且所述第一校验信息与所述第二校验信息相同的情况下,将所述采集工具的状态修改为第一状态。
在一实施例中,所述向所述采集工具发送所述采集任务的最新配置文件,包括:
在再次接收到所述采集工具发送的心跳信息的情况下,向所述采集工具发送所述采集任务的最新配置文件。
在一实施例中,所述向所述采集工具发送所述采集任务的最新配置文件,包括:
在再次接收到所述采集工具发送的心跳信息的情况下,在向所述采集工具返回的心跳响应信息中添加升级通知,以提示所述采集工具发送升级请求;
在接收到所述采集工具发送的升级请求的情况下,向所述采集工具发送所述采集任务的最新配置文件。
在一实施例中,还获取用户输入的采集任务的参数值;
根据采集任务的参数值,生成采集任务的最新配置文件。
根据本公开实施例的第二方面,提供了一种更新配置文件的方法,所述方法应用于服务端,包括:
接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第三状态;
将处于第三状态的采集工具加入到待升级列表中,以供用户从所述待升级列表中选取出目标采集工具;
将目标采集工具的状态修改为第二状态,从所述待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
在一实施例中,还包括:
在所述采集工具的状态为第二状态,且所述第一校验信息与所述第二校验信息相同的情况下,将所述采集工具的状态改为第一状态。
在一实施例中,所述向目标采集工具发送目标采集工具对应的采集任务的最新配置文件,包括:
在再次接收到目标采集工具发送的心跳信息的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
在一实施例中,所述向目标采集工具发送目标采集工具对应的采集任务的最新配置文件,包括:
在再次接收到目标采集工具发送的心跳信息的情况下,在向目标采集工具返回的心跳响应信息中添加升级通知,以提示目标采集工具发送升级请求;
在接收到目标采集工具发送的升级请求的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
在一实施例中,还包括:
获取用户输入的采集任务的参数值;
根据采集任务的参数值,生成采集任务的最新配置文件。
根据本公开实施例的第三方面,提供了一种更新配置文件的方法,所述方法应用于采集工具,包括:
向服务端发送心跳信息;所述心跳信息中包括所述采集工具对应的采集任 务的任务标识以及第一校验信息;所述第一校验信息是存储在本地的所述采集任务的配置文件的校验信息;
接收服务端发送的所述采集任务的最新配置文件,将所述采集任务的最新配置文件更新到本地。
根据本公开实施例的第四方面,提供了一种电子设备,包括:
心跳信息接收模块,设置为接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
校验信息获取模块,设置为根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
更新管理模块,设置为在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第二状态,并向所述采集工具发送所述采集任务的最新配置文件。
根据本公开实施例的第五方面,提供了一种电子设备,包括:
心跳信息接收模块,设置为接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
校验信息获取模块,设置为根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
第一更新管理模块,设置为在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第三状态;
待升级列表管理模块,设置为将处于第三状态的采集工具加入到待升级列表中,以供用户从所述待升级列表中选取出目标采集工具;
第二更新管理模块,设置为将目标采集工具的状态修改为第二状态,从所述待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
根据本公开实施例的第六方面,提供了一种电子设备,包括:
心跳信息发送模块,向服务端发送心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在本地的所述采集任务的配置文件的校验信息;
配置文件更新模块,设置为接收服务端发送的所述采集任务的最新配置文件,以及将所述采集任务的最新配置文件更新到本地。
根据本公开实施例的第七方面,提供了一种电子设备,其特征在于,包括存储器和处理器,所述存储器用于存储计算机指令,所述处理器用于从所述存储器中调用所述计算机指令,以执行上述方法中任一项所述的方法。
根据本公开实施例的第八方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现上述方法中任一项所述的方法。
在本公开实施例中,服务端预先存储有采集任务的最新配置文件。在服务端确定采集工具的状态为第一状态,且采集工具发送的心跳信息中的第一校验信息,与采集工具发送的心跳信息中任务标识对应的第二校验信息不同时,确定采集工具本地的配置文件需要更新。此时,服务端向采集工具发送最新配置文件。这样,采集工具可利用接收到的最新配置文件进行更新。在本公开实施例中,当采集任务对应的配置文件需要更新时,无需对每一采集工具进行配置文件的更新,仅需在服务端更新一次配置文件,由采集工具向服务端发送心跳信息即可。这样,可大大的降低更新成本,同时大大的提高更新效率。同时,避免了采用脚本的方式进行更新,即避免了使用脚本进行更新,需要频繁修改脚本的问题。
通过以下参照附图对本公开实施例的示例性实施例的详细描述,本公开实施例的其它特征及其优点将会变得清楚。
附图说明
为了更清楚的说明本公开实施例或相关技术的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出 创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是实现本公开实施例提供的一种更新配置文件的电子设备的硬件配置的框图;
图2是本公开实施例提供的一种更新配置文件的方法的流程图一;
图3是本公开实施例提供的一种更新配置文件的方法的流程图二;
图4是本公开实施例提供的一种更新配置文件的方法的流程图三;
图5是本公开实施例提供的一种电子设备的结构示意图一;
图6是本公开实施例提供的一种电子设备的结构示意图二;
图7是本公开实施例提供的一种电子设备的结构示意图三;
图8是本公开实施例提供的一种电子设备的结构示意图四。
具体实施方式
现在将参照附图来详细描述本公开的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
<硬件配置实施例>
图1是根据本公开实施例提供的一种更新配置文件的电子设备的硬件配置的框图。
电子设备1000可以是采集工具,也可以是服务端。进一步的,采集工具为 一段计算机程序,可负载在便携式电脑、平板电脑、掌上电脑、智能控制平台等上。服务端可以为虚拟机,也可以为物理机。
电子设备1000可以包括处理器1100、存储器1200、接口装置1300、通信装置1400、显示装置1500、输入装置1600、扬声器1700、麦克风1800,等等。其中,处理器1100可以是中央处理器CPU、微处理器MCU等。存储器1200例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置1300例如包括USB接口、耳机接口等。通信装置1400例如能够进行有线或无线通信。显示装置1500例如是液晶显示屏、触摸显示屏等。输入装置1600例如可以包括触摸屏、键盘等。用户可以通过扬声器2700和麦克风2800输入/输出语音信息。
尽管在图1中对电子设备1000均示出了多个装置,但是,本公开可以仅涉及其中的部分装置,例如,电子设备1000只涉及存储器1200和处理器1100。
应用于本公开的实施例中,电子设备1000的存储器1200用于存储指令,该指令用于控制处理器1100执行本公开实施例提供的更新配置文件的方法。
在上述描述中,技术人员可以根据本公开所公开方案设计指令。指令如何控制处理器进行操作,这是本领域公知,故在此不再详细描述。
<方法实施例一>
本公开实施例提供了一种更新配置文件的方法,该方法应用于服务端。
其中,配置文件为采集任务的配置文件。采集任务的配置文件用于描述采集工具在执行采集任务时所使用的采集规则。在一个示例中,配置文件中包括采集工具采集的文件所在的路径、采集文件的频率、采集的文件的名称等。服务端可以为上述如图1的电子设备1000。
其中,采集工具通常称之为采集agent,实质上为一段计算机程序。如图2所示,本公开实施例提供的更新配置文件的方法包括如下S2100-S2300:
S2100、接收采集工具发送的心跳信息。
其中,心跳信息包括采集工具对应的采集任务的任务标识,以及第一校验信息。第一校验信息是存储在采集工具本地的采集任务的配置文件的校验信 息。
可以理解的是,心跳信息中还可以包括其他信息,对此本公开实施例不做限定。另外,任务标识可以为采集任务的ID。
在一个实施例中,上述的第一校验信息可以为存储在采集工具本地的采集任务的配置文件本身。
在另一个实施例中,上述的第一校验信息还可以为存储在采集工具本地的采集任务的配置文件的哈希值。可以理解的是,当存储在采集工具本地的采集任务的配置文件不同时,对应的哈希值也是不同的。即,哈希值可唯一的代表存储在采集工具本地的采集任务的配置文件。
在本公开实施例中,采集工具通常周期性的向服务端发送心跳信息。对应的,服务端通常也是周期性的接收采集工具发送的心跳信息。
S2200、根据任务标识获取第二校验信息。
其中,第二校验信息是采集任务的最新配置文件的校验信息。
在本公开实施例中,服务端存储有多组映射关系,每一组映射关系中包括最新配置文件、对应的采集任务的任务标识。需要说明的是,服务端存储的最新配置文件为对应采集任务的最新版本的配置文件。
在上述基础上,本公开实施例提供的更新配置文件的方法还包括如下步骤S2210和S2211:
S2210、获取用户输入的采集任务的参数值。
S2211、根据采集任务的参数值,生成采集任务的最新配置文件。
在本公开实施例中,服务端提供一个页面,该页面中设置采集任务的不同参数对应的参数值的输入接口。该输入接口供用户输入满足自身需求的参数值。基于此,服务端通过输入接口获取用户输入的采集任务的参数值。
在一个示例中,参数值可以为存储路径,以及采集频率等。
在本公开实施例中,服务端根据输入接口对应的参数,以及由对应输入接口输入的参数值,生成最新配置文件。进一步的,可将该生成的最新配置文件存储在自身的数据库中。
在本公开实施例中,通过图形化的方式生成最新配置文件,操作简单。
在本公开实施例中,在第一校验信息为存储在采集工具本地的采集任务的配置文件本身的情况下,第二校验信息为服务端存储的最新配置文件本身。
在第一校验信息为存储在采集工具本地的采集任务的配置文件的哈希值的情况下,第二校验信息为服务端存储的最新配置文件的哈希值。基于此,本公开实施例提供的更新配置文件的方法在上述S2200之前,还包括生成最新配置文件的哈希值,以及将最新配置文件的哈希值作为第二校验信息的步骤。
S2300、在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,将采集工具的状态修改为第二状态,并向采集工具发送采集任务的最新配置文件。
在本公开实施例中,服务端记录有采集工具的状态。第一状态为表征采集工具处于已更新的状态。第二状态表征采集工具处于更新中的状态。
在本公开实施例中,在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,说明采集工具本地的配置文件需要更新。基于此,服务端将采集工具的状态修改为第二状态,并向采集工具发送采集任务的最新配置文件。
基于上述内容,采集工具在获取到最新配置文件的情况下,利用获取到最新配置文件更新本地的配置文件。此时,采集工具更新完成。在此基础上,在采集工具下一次向服务端发送心跳信息,服务端执行上述S2100以及S2200时,服务端记录的采集工具的状态为第二状态,且确定第一校验信息与第二校验信息相同。为了正确的记录采集工具的状态,此时服务端将采集工具的状态由第二状态修改为第一状态。
基于上述内容,本公开实施例提供的更新配置文件的方法,还包括如下S2400:
S2400、在采集工具的状态为第二状态,且第一校验信息与第二校验信息相同的情况下,将采集工具的状态修改为第一状态。
在本公开实施例中,服务端预先存储有采集任务的最新配置文件。在服务 端确定采集工具的状态为第一状态,且采集工具发送的心跳信息中的第一校验信息,与采集工具发送的心跳信息中任务标识对应的第二校验信息不同时,确定采集工具本地的配置文件需要更新。此时,服务端向采集工具发送最新配置文件。这样,采集工具可利用接收到的最新配置文件进行更新。在本公开实施例中,当采集任务对应的配置文件需要更新时,无需对每一采集工具进行配置文件的更新,仅需在服务端更新一次配置文件,由采集工具向服务端发送心跳信息即可。这样,可大大的降低更新成本,同时大大的提高更新效率。同时,避免了采用脚本的方式进行更新,即避免了使用脚本进行更新,需要频繁修改脚本的问题。
在本公开的一个实施例中,上述S2300中的向采集工具发送采集任务的最新配置文件,可通过如下S2310来实现:
S2310、在再次接收到采集工具发送的心跳信息的情况下,向采集工具发送采集任务的最新配置文件。
在本公开实施例中,在再次接收到采集工具发送的心跳信息的情况下,说明采集工具以及网络均处于正常无故障状态,此时,服务端向采集工具发送最新配置文件,可确保采集工具能够接收正常接收到该最新配置文件。
在本公开的另一个实施例中,上述S2300中的向采集工具发送采集任务的最新配置文件,可通过如下S2320和S2321来实现:
S2320、在再次接收到采集工具发送的心跳信息的情况下,在向采集工具返回的心跳响应信息中添加升级通知,以提示采集工具发送升级请求。
S2321、在接收到采集工具发送的升级请求的情况下,向采集工具发送采集任务的最新配置文件。
在本公开实施例中,服务端在接收到采集工具发送的心跳信息的情况下,会向采集工具发送一个心跳响应信息,以告知采集工具已接收到对应的心跳信息。
在本公开实施例中,服务端在向采集工具返回心跳响应信息时,可在其中添加一个升级通知,以提示采集工具发送升级请求。采集工具在接收到该升级 请求的情况下,确定本地的配置文件需要更新。
在一个示例中,采集工具在接收到升级通知的情况下,可自动向服务端发送升级请求。在该情况下,服务端向采集工具发送采集任务的最新配置文件。
在另一个示例中,采集工具在接收到升级通知的情况下,可通过一个弹窗的方式,告知用户采集工具需要升级。用户可指示采集工具进行升级。采集工具接收到用户的升级指示时,向服务端发送升级请求。在该情况下,服务端向采集工具发送采集任务的最新配置文件。
在本公开实施例中,一方面,通过向心跳响应信息中添加升级通知,可实现心跳响应信息的复用,这样可以降低服务端的计算开销。另一方面,通过交互的方式,可确保服务端、采集工具以及网络均处于正常无故障状态,从而进一步确保采集工具能够接收正常接收到最新配置文件。
<方法实施例二>
本公开实施例提供了一种更新配置文件的方法,该方法应用于服务端。
如图3所示,本公开实施例提供的更新配置文件的方法包括如下S3100-S3500:
S3100、接收采集工具发送的心跳信息;心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在采集工具本地的采集任务的配置文件的校验信息。
S3200、根据任务标识获取第二校验信息,第二校验信息是采集任务的最新配置文件的校验信息。
在本公开实施例中,上述S3100与上述方法实施例一种的S2100的具体实现相同,上述S3200与上述方法实施例一种的S2200的具体实现相同。
在本公开实施例中,本公开实施例提供的更新配置文件的方法还包括如下步骤S3210和S3211:
S3210、获取用户输入的采集任务的参数值。
S3211、根据采集任务的参数值,生成采集任务的最新配置文件。
在本公开实施例中,上述S3210与上述S2210的具体实现相同,以及上述 S3211与上述S2211的具体实现相同,这里不再赘述。
S3300、在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,将采集工具的状态修改为第三状态。
在本公开实施例中,服务端记录有采集工具的状态。第一状态为表征采集工具处于已更新的状态。第三状态表征采集工具处于待更新的状态。
在本公开实施例中,在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,说明采集工具本地的配置文件需要更新。基于此,服务端将采集工具的状态修改为第三状态。
S3400、将处于第三状态的采集工具加入到待升级列表中,以供用户从待升级列表中选取出目标采集工具。
在本公开实施例中,目标采集工具为用户需要升级的采集工具。以及,服务端将处于第三状态的采集工具添加到待升级列表中,并将该待升级列表通过一个页面显示给用户,由用户从待升级列表中选取出目标采集工具。
在本公开实施例中,用户可从待升级列表中选中需要升级的采集工具。服务端将用户选中的采集工具作为目标采集工具。
S3500、将目标采集工具的状态修改为第二状态,从待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
在本公开实施例中,服务端将目标采集工具的状态修改为第二状态,并从待升级列表中移除目标采集工具。同时,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
基于上述内容,目标采集工具在获取到最新配置文件的情况下,利用获取到最新配置文件更新本地的配置文件。此时,目标采集工具更新完成。在此基础上,在目标采集工具下一次向服务端发送心跳信息,服务端执行上述S3100以及S3200时,服务端记录的采集工具的状态为第二状态,且确定第一校验信息与第二校验信息相同。为了正确的记录采集工具的状态,此时服务端将采集 工具的状态由第二状态修改为第一状态。
基于上述内容,本公开实施例提供的更新配置文件的方法,还包括如下S3600:
S3600、在采集工具的状态为第二状态,且第一校验信息与第二校验信息相同的情况下,将采集工具的状态修改为第一状态。
在本公开实施例中,服务端预先存储有采集任务的最新配置文件,在服务端确定采集工具的状态为第一状态,且采集工具发送的心跳信息中的第一校验信息,与采集工具发送的心跳信息中任务标识对应的第二校验信息不同时,确定采集工具本地的配置文件需要更新。此时,服务端将采集工具的状态先修改为第三状态,并将处于第三状态的采集工具加入到待升级列表中,以供用户从待升级列表中选取出目标采集工具。在用户选中目标采集工具后,服务端将目标采集工具的状态修改为第二状态,并从待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。这样,采集工具可利用接收到的最新配置文件进行更新。在本公开实施例中,当采集任务对应的配置文件需要更新时,无需对每一采集工具进行配置文件的更新,仅需在服务端更新一次配置文件,由采集工具向服务端发送心跳信息即可。这样,可大大的降低更新成本,同时大大的提高更新效率。同时,避免了采用脚本的方式进行更新,即避免了使用脚本进行更新,需要频繁修改脚本的问题。另外,在本公开实施例中,可在用户的指示下,对采集工具进行更新,这样可满足用户的个性化需求。
在本公开的一个实施例中,上述S3500中的向采集工具发送采集任务的最新配置文件,可通过如下S3510来实现:
S3510、在再次接收到目标采集工具发送的心跳信息的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
需要说明的是,上述S3510与上述S2310的具体实现相同,这里不再赘述。
在本公开的另一个实施例中,上述S3500中的向采集工具发送采集任务的 最新配置文件,可通过如下S3520和S3521来实现:
S3520、在再次接收到目标采集工具发送的心跳信息的情况下,在向目标采集工具返回的心跳响应信息中添加升级通知,以提示目标采集工具发送升级请求。
S3521、在接收到目标采集工具发送的升级请求的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
需要说明的是,上述S3520与上述S2320的具体实现相同,上述S3521与上述S2321的具体实现相同,这里不再赘述。
<方法实施例三>
本公开实施例提供了一种更新配置文件的方法,该方法应用于采集工具。
如图4所示,本公开实施例提供的更新配置文件的方法包括如下S4100和S4200:
S4100、向服务端发送心跳信息;心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在本地的采集任务的配置文件的校验信息。
可以理解的是,心跳信息中还可以包括其他信息,对此本公开实施例不做限定。另外,任务标识可以为采集任务的ID。
在一个实施例中,上述的第一校验信息可以为存储在采集工具本地的采集任务的配置文件本身。
在另一个实施例中,上述的第一校验信息还可以为存储在采集工具本地的采集任务的配置文件的哈希值。可以理解的是,当存储在采集工具本地的采集任务的配置文件不同时,对应的哈希值也是不同的。即,哈希值可唯一的代表存储在采集工具本地的采集任务的配置文件。
在上述实施例的基础上,本公开实施例提供的方法在上述S4100之前,还包括如下述的S4110-S4112:
S4110、根据采集工具本地的配置文件,生成采集工具本地的配置文件的哈希值。
在本公开实施例中,上述S4110的具体实现可以为:对集工具本地的配置文件进行哈希处理,以得到采集工具本地的配置文件的哈希值。
S4111、将集工具本地的哈希值,作为第一校验信息。
S4112、根据任务标识以及第一校验信息生成心跳信息。
在本公开实施例中,利用采集工具本地的配置文件的哈希值作为第一校验信息,这样可降低心跳信息的数据量,从而便于心跳信息的传输。
另外,在本公开实施例中,采集工具通常周期性的向服务端发送心跳信息。
S4200、接收服务端发送的采集任务的最新配置文件,将采集任务的最新配置文件更新到本地。
在一个实施例中,采集工具在获取到最新配置文件后,将本地的配置文件替换为最新配置文件,以实现对本地配置文件的更新。基于此,当有包含同一采集任务的多个采集工具需要更新时,无需对每一采集工具进行配置文件的更新,仅需在服务端更新一次配置文件,由采集工具向服务端发送心跳信息即可。这样,可大大的降低更新成本,同时大大的提高更新效率。同时,避免了采用脚本的方式进行更新,即避免了使用脚本进行更新,需要频繁修改脚本的问题。
在上述任一实施例的基础上,本公开实施例提供的方法在上述S4200之前,还包括如下S4210和S4211:
S4210、在接收到服务端返回的心跳响应信息中包括升级通知的情况下,向服务端发送升级请求。
在本公开实施例中,采集工具向服务端发送心跳信息后,会接收到服务端返回的一个心跳响应信息,以确定自身发送的心跳信息被服务端接收。
在本公开实施例中,采集工具在接收到服务端返回的心跳响应信息后,对该心跳响应信息进行检测,以确定其中是否存在升级通知。在存在升级通知的情况下,采集工具可向服务端发送升级请求。
在本公开实施例中,通过交互的方式,可确保服务端、采集工具以及网络均处于正常无故障状态,从而进一步确保采集工具能够接收正常接收到服务端 发送的最新配置文件。
<装置实施例一>
本公开实施例提供了一种电子设备50,如图5所示,该电子设备50包括心跳信息接收模块51、校验信息获取模块52、更新管理模块53。其中:
心跳信息接收模块51,设置为接收采集工具发送的心跳信息;心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在采集工具本地的采集任务的配置文件的校验信息;
校验信息获取模块52,设置为根据任务标识获取第二校验信息,第二校验信息是采集任务的最新配置文件的校验信息;
更新管理模块53,设置为在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,将采集工具的状态修改为第二状态,并向采集工具发送采集任务的最新配置文件。
在一个实施例中,电子设备50还包括状态修改模块,设置为:在采集工具的状态为第二状态,且第一校验信息与第二校验信息相同的情况下,将采集工具的状态修改为第一状态。
在一个实施例中,更新管理模块53,具体用于在再次接收到采集工具发送的心跳信息的情况下,向采集工具发送采集任务的最新配置文件。
在一个实施例中,更新管理模块53,具体用于在再次接收到采集工具发送的心跳信息的情况下,在向采集工具返回的心跳响应信息中添加升级通知,以提示采集工具发送升级请求;
在接收到采集工具发送的升级请求的情况下,向采集工具发送采集任务的最新配置文件。
在一个实施例中,电子设备50还包括参数值获取模块,以及配置文件生成模块。其中:
参数值获取模块,设置为获取用户输入的采集任务的参数值;
配置文件生成模块,设置为根据采集任务的参数值,生成采集任务的最新配置文件。
本公开实施例提供的电子设备50能够实现图2所示的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
<装置实施例二>
本公开实施例提供了一种电子设备60,如图6所示,该电子设备60包括心跳信息接收模块61、校验信息获取模块62、第一更新管理模块63、待升级列表管理模块64、第二更新管理模块65。其中:
心跳信息接收模块61,设置为接收采集工具发送的心跳信息;心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在采集工具本地的采集任务的配置文件的校验信息;
校验信息获取模块62,设置为根据任务标识获取第二校验信息,第二校验信息是采集任务的最新配置文件的校验信息;
第一更新管理模块63,设置为在采集工具的状态为第一状态,且第一校验信息与第二校验信息不同的情况下,将采集工具的状态修改为第三状态;
待升级列表管理模块64,设置为将处于第三状态的采集工具加入到待升级列表中,以供用户从待升级列表中选取出目标采集工具;
第二更新管理模块65,设置为将目标采集工具的状态修改为第二状态,从待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
在一个实施例中,电子设备60还包括状态修改模块,设置为:在采集工具的状态为第二状态,且第一校验信息与第二校验信息相同的情况下,将采集工具的状态修改为第一状态。
在一个实施例中,第二更新管理模块65,具体用于在再次接收到采集工具发送的心跳信息的情况下,向采集工具发送采集任务的最新配置文件。
在一个实施例中,第二更新管理模块65,具体用于在再次接收到采集工具发送的心跳信息的情况下,在向采集工具返回的心跳响应信息中添加升级通知,以提示采集工具发送升级请求;
在接收到采集工具发送的升级请求的情况下,向采集工具发送采集任务的 最新配置文件。
在一个实施例中,电子设备60还包括参数值获取模块,以及配置文件生成模块。其中:
参数值获取模块,设置为获取用户输入的采集任务的参数值;
配置文件生成模块,设置为根据采集任务的参数值,生成采集任务的最新配置文件。
本公开实施例提供的电子设备60能够实现图3所示的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
<装置实施例三>
本公开实施例提供了一种电子设备70,如图7所示,该电子设备70包括心跳信息发送模块71、配置文件更新模块72。其中:
心跳信息发送模块71,向服务端发送心跳信息;心跳信息中包括采集工具对应的采集任务的任务标识以及第一校验信息;第一校验信息是存储在本地的采集任务的配置文件的校验信息;
配置文件更新模块72,设置为接收服务端发送的采集任务的最新配置文件,以及将采集任务的最新配置文件更新到本地。
本公开实施例提供的电子设备70能够实现图4所示的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
<设备实施例>
本公开实施例提供一种电子设备80,如图8所示,包括存储器81和处理器82,其中,存储器81用于存储计算机指令,处理器82用于从存储器81中调用计算机指令,以执行上述方法实施例一、方法实施例二、方法实施例三中任一项的方法。
<系统实施例>
本公开实施例提供一种更新配置文件的系统,包括如图4所示的电子设备 和至少一个如图6所示的电子设备。或者,包括如图5所示的电子设备和至少一个如图6所示的电子设备。
<存储介质实施例>
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被处理器执行时实现根据方法实施例一、方法实施例二、方法实施例三中任一项的方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存 储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数 据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。本公开的范围由所附权利要求来限定。
工业实用性
针对相关技术存在的问题,本公开实施例提供的更新配置文件的方法、设备及存储介质,通过在服务端预先存储有采集任务的最新配置文件,在服务端确定采集工具的状态为第一状态,且采集工具发送的心跳信息中的第一校验信息,与采集工具发送的心跳信息中任务标识对应的第二校验信息不同时,确定采集工具本地的配置文件需要更新。此时,服务端向采集工具发送最新配置文件。采集工具可利用接收到的最新配置文件进行更新。在本公开实施例中,当采集任务对应的配置文件需要更新时,无需对每一采集工具进行配置文件的更新,仅需在服务端更新一次配置文件,由采集工具向服务端发送心跳信息即可。 可大大的降低更新成本,同时大大的提高更新效率。同时,避免了采用脚本的方式进行更新,即避免了使用脚本进行更新,需要频繁修改脚本的问题。

Claims (16)

  1. 一种更新配置文件的方法,所述方法应用于服务端,包括:
    接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
    根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
    在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第二状态,并向所述采集工具发送所述采集任务的最新配置文件。
  2. 根据权利要求1所述的方法,其中,还包括:
    在所述采集工具的状态为第二状态,且所述第一校验信息与所述第二校验信息相同的情况下,将所述采集工具的状态修改为第一状态。
  3. 根据权利要求1所述的方法,其中,所述向所述采集工具发送所述采集任务的最新配置文件,包括:
    在再次接收到所述采集工具发送的心跳信息的情况下,向所述采集工具发送所述采集任务的最新配置文件。
  4. 根据权利要求1所述的方法,其中,所述向所述采集工具发送所述采集任务的最新配置文件,包括:
    在再次接收到所述采集工具发送的心跳信息的情况下,在向所述采集工具返回的心跳响应信息中添加升级通知,以提示所述采集工具发送升级请求;
    在接收到所述采集工具发送的升级请求的情况下,向所述采集工具发送所述采集任务的最新配置文件。
  5. 根据权利要求1所述的方法,其中,还包括:
    获取用户输入的采集任务的参数值;
    根据采集任务的参数值,生成采集任务的最新配置文件。
  6. 一种更新配置文件的方法,所述方法应用于服务端,包括:
    接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
    根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
    在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第三状态;
    将处于第三状态的采集工具加入到待升级列表中,以供用户从所述待升级列表中选取出目标采集工具;
    将目标采集工具的状态修改为第二状态,从所述待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
  7. 根据权利要求6所述的方法,其中,还包括:
    在所述采集工具的状态为第二状态,且所述第一校验信息与所述第二校验信息相同的情况下,将所述采集工具的状态改为第一状态。
  8. 根据权利要求6所述的方法,其中,所述向目标采集工具发送目标采集工具对应的采集任务的最新配置文件,包括:
    在再次接收到目标采集工具发送的心跳信息的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
  9. 根据权利要求6所述的方法,其中,所述向目标采集工具发送目标采集工具对应的采集任务的最新配置文件,包括:
    在再次接收到目标采集工具发送的心跳信息的情况下,在向目标采集工具返回的心跳响应信息中添加升级通知,以提示目标采集工具发送升级请求;
    在接收到目标采集工具发送的升级请求的情况下,向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
  10. 根据权利要求6所述的方法,其中,还包括:
    获取用户输入的采集任务的参数值;
    根据采集任务的参数值,生成采集任务的最新配置文件。
  11. 一种更新配置文件的方法,所述方法应用于采集工具,包括:
    向服务端发送心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在本地的所述采集任务的配置文件的校验信息;
    接收服务端发送的所述采集任务的最新配置文件,将所述采集任务的最新配置文件更新到本地。
  12. 一种电子设备,包括:
    心跳信息接收模块,设置为接收采集工具发送的心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
    校验信息获取模块,设置为根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
    更新管理模块,设置为在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第二状态,并向所述采集工具发送所述采集任务的最新配置文件。
  13. 一种电子设备,包括:
    心跳信息接收模块,设置为接收采集工具发送的心跳信息;所述心跳信息 中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在所述采集工具本地的所述采集任务的配置文件的校验信息;
    校验信息获取模块,设置为根据所述任务标识获取第二校验信息,所述第二校验信息是所述采集任务的最新配置文件的校验信息;
    第一更新管理模块,设置为在所述采集工具的状态为第一状态,且所述第一校验信息与所述第二校验信息不同的情况下,将所述采集工具的状态修改为第三状态;
    待升级列表管理模块,设置为将处于第三状态的采集工具加入到待升级列表中,以供用户从所述待升级列表中选取出目标采集工具;
    第二更新管理模块,设置为将目标采集工具的状态修改为第二状态,从所述待升级列表中移除目标采集工具,以及向目标采集工具发送目标采集工具对应的采集任务的最新配置文件。
  14. 一种电子设备,包括:
    心跳信息发送模块,向服务端发送心跳信息;所述心跳信息中包括所述采集工具对应的采集任务的任务标识以及第一校验信息;所述第一校验信息是存储在本地的所述采集任务的配置文件的校验信息;
    配置文件更新模块,设置为接收服务端发送的所述采集任务的最新配置文件,以及将所述采集任务的最新配置文件更新到本地。
  15. 一种电子设备,包括存储器和处理器,所述存储器用于存储计算机指令,所述处理器用于从所述存储器中调用所述计算机指令,以执行权利要求1-11中任一项所述的方法。
  16. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现权利要求1-11中任一项所述的方法。
PCT/CN2021/081245 2020-05-26 2021-03-17 更新配置文件的方法、设备及存储介质 WO2021238350A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010457645.3A CN111708557B (zh) 2020-05-26 2020-05-26 更新配置文件的方法、设备及存储介质
CN202010457645.3 2020-05-26

Publications (1)

Publication Number Publication Date
WO2021238350A1 true WO2021238350A1 (zh) 2021-12-02

Family

ID=72538194

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/081245 WO2021238350A1 (zh) 2020-05-26 2021-03-17 更新配置文件的方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111708557B (zh)
WO (1) WO2021238350A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118504A (zh) * 2022-06-28 2022-09-27 北京天融信网络安全技术有限公司 知识库更新方法、装置、电子设备及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708557B (zh) * 2020-05-26 2024-01-26 北京金山云网络技术有限公司 更新配置文件的方法、设备及存储介质
CN112565025A (zh) * 2021-02-19 2021-03-26 北京声智科技有限公司 数据传输方法及装置
CN114666332A (zh) * 2022-03-29 2022-06-24 北京奕斯伟计算技术有限公司 数据传输方法、边缘盒子、边缘云及数据传输系统
CN114785683A (zh) * 2022-04-22 2022-07-22 中国电信股份有限公司 一种数据处理方法、采集系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100198947A1 (en) * 2009-02-04 2010-08-05 Raytheon Company System and Method for Dynamically Processing Electronic Data Between Multiple Data Sources
CN106341244A (zh) * 2015-07-06 2017-01-18 北京国双科技有限公司 配置文件的更新方法、客户端、服务器及系统
CN109697075A (zh) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 文件更新方法、系统和装置
CN111708557A (zh) * 2020-05-26 2020-09-25 北京金山云网络技术有限公司 更新配置文件的方法、设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106059825A (zh) * 2016-07-08 2016-10-26 福建天晴数码有限公司 一种分布式系统及配置方法
US10191736B2 (en) * 2017-04-28 2019-01-29 Servicenow, Inc. Systems and methods for tracking configuration file changes
CN107819828B (zh) * 2017-10-16 2020-03-10 平安科技(深圳)有限公司 数据传输方法、装置、计算机设备和存储介质
CN109976822B (zh) * 2017-12-25 2022-04-08 天翼云科技有限公司 分布式应用的配置方法、装置以及分布式系统
US10360017B1 (en) * 2018-01-02 2019-07-23 Microsoft Technology Licensing, Llc Updating program packages at distribution endpoint
CN110825420B (zh) * 2019-11-26 2023-09-22 中国银行股份有限公司 分布式集群的配置参数更新方法、装置、设备及存储介质
CN110990069A (zh) * 2019-12-13 2020-04-10 苏州浪潮智能科技有限公司 一种服务器bmc配置自动更新方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100198947A1 (en) * 2009-02-04 2010-08-05 Raytheon Company System and Method for Dynamically Processing Electronic Data Between Multiple Data Sources
CN106341244A (zh) * 2015-07-06 2017-01-18 北京国双科技有限公司 配置文件的更新方法、客户端、服务器及系统
CN109697075A (zh) * 2017-10-20 2019-04-30 北京京东尚科信息技术有限公司 文件更新方法、系统和装置
CN111708557A (zh) * 2020-05-26 2020-09-25 北京金山云网络技术有限公司 更新配置文件的方法、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118504A (zh) * 2022-06-28 2022-09-27 北京天融信网络安全技术有限公司 知识库更新方法、装置、电子设备及存储介质
CN115118504B (zh) * 2022-06-28 2023-11-14 北京天融信网络安全技术有限公司 知识库更新方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN111708557A (zh) 2020-09-25
CN111708557B (zh) 2024-01-26

Similar Documents

Publication Publication Date Title
WO2021238350A1 (zh) 更新配置文件的方法、设备及存储介质
US9959198B1 (en) Simulated testing of API
CN105701122B (zh) 一种日志收集方法、装置及系统
CN111614490B (zh) 基于顶级容器集群对托管容器集群的管理系统及方法
WO2019218510A1 (zh) 多业务系统交互方法及装置、存储介质、电子设备
CN109471626B (zh) 页面逻辑结构、页面生成方法、页面数据处理方法及装置
CN113365106B (zh) 一种多媒体资源生成方法、装置、电子设备及存储介质
CN108108342A (zh) 结构化文本的生成方法、检索方法及装置
JP2017531849A (ja) 画面表示装置用の文字編集方法及び装置
JP7200277B2 (ja) ワードスロットを識別するための方法及び装置、電子機器、記憶媒体並びにコンピュータプログラム
CN112099836A (zh) 更新配置文件方法、配置服务器、版本控制服务器及系统
CN108134696A (zh) 一种微服务配置更新方法及装置
CN110336733B (zh) 一种呈现表情包的方法与设备
WO2024066754A1 (zh) 交互控制方法、装置及电子设备
WO2018177032A1 (zh) 处理响应数据的方法、设备、客户端设备和电子设备
CN112926068A (zh) 权限管理方法、管理服务器、业务服务器及可读存储介质
WO2020123692A2 (en) Internet of things system topology generation
CN110752968B (zh) 性能基准测试方法、装置、电子设备及存储介质
US20150280996A1 (en) Cloud topology visualizations
CN103795764A (zh) 一种云业务触发的方法、云服务器和瘦客户机
WO2024109786A1 (zh) 即时通信会话信息的处理方法、装置及电子设备
CN110879676A (zh) 调试控制方法、主控设备、调试服务器、被控设备及系统
CN111158802B (zh) 音频播放的方法、设备、客户端装置及电子设备
CN112631497A (zh) 一种数据配置方法、输入方法、装置及电子设备
CN110858175A (zh) 测试控制方法、主控设备、被控设备及测试系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21814654

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21814654

Country of ref document: EP

Kind code of ref document: A1