Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart.
Thus, the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable medium having instructions stored thereon, the computer program product being usable by or in connection with an instruction execution system. In the context of this disclosure, a computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a computer-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of a computer-readable medium include magnetic storage devices such as magnetic tape or hard disk (HDD), optical storage devices such as compact disk (CD-ROM), memory such as Random Access Memory (RAM) or flash memory, and/or wired/wireless communication links.
With the continuous progress of technology and the diversified demands of markets, the scope of server compatibility is wider and wider, and various components, such as network cards, storage devices and the like of different manufacturers, are more customized special components for users. The tool for refreshing and checking is also a five-flower eight-door tool. In order to ensure the performance and stability of the firmware, the server needs to perform multi-version refreshing verification, such as local or remote verification, on the firmware in different forms during the processes of refreshing, verifying, testing and the like. At present, for a plurality of scenes needing refreshing and checking, a unified platform does not realize corresponding functions, and a plurality of refreshing and checking scenes are difficult to deal with.
In order to solve the above problems, embodiments of the present disclosure provide a firmware management method and apparatus. The method comprises the steps of responding to a received firmware management task, determining firmware information of firmware to be refreshed from the firmware management task, determining a refreshing tool matched with the firmware information from a refreshing description document, wherein the refreshing description document is used for indicating information of each of a plurality of different refreshing tools, and refreshing the firmware by utilizing the refreshing tool and a firmware file matched with the firmware information.
Fig. 1 schematically illustrates a system architecture diagram of firmware management methods and apparatus according to embodiments of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as a knowledge reading class application, a web browser application, a search class application, an instant messaging tool, a mailbox client and/or social platform software, etc. (as examples only).
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for content browsed by the user using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
The firmware management methods provided by embodiments of the present disclosure may also be generally performed by server 105. Accordingly, the firmware management apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The firmware management method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the firmware management apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
For example, the user may generate a firmware management task through the terminal devices 101, 102, 103, and then transmit the firmware management task to the server 105, and the server 105 determines firmware information based on the firmware management task and determines a refresh tool matching the firmware information from the refresh specification document. And refreshing the firmware by using a refreshing tool and a firmware file matched with the firmware information. Or firmware is refreshed by a server or cluster of servers capable of communicating with terminal devices 101, 102, 103 and/or server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The firmware management method of the disclosed embodiment will be described in detail with reference to fig. 2 to 5 based on the system architecture described in fig. 1.
Fig. 2 schematically illustrates a flowchart of a firmware management method according to an embodiment of the present disclosure.
As shown in FIG. 2, the method may include operations S201-S203.
In operation S201, in response to receiving the firmware management task, firmware information of firmware to be refreshed is determined from the firmware management task.
Firmware (Firmware) may refer to a device "driver" that is stored inside the device. Through firmware, the operating system can implement the operation of a particular machine in accordance with standard device drivers. The firmware determines the functionality and performance of the hardware device. Generally, firmware may be loaded into any digital product for supporting digital product infrastructure or underlying work.
With the increase of the functions and the improvement of the performances of the hardware devices, the firmware loaded on the hardware devices is required to be continuously updated, upgraded, downgraded and other refreshing operations. The bugs of the old version firmware can be repaired by refreshing the firmware, the stability of the system is improved, some newly added functions are experienced, and the like.
The firmware management platform may be designed, and the user may input firmware information of the firmware on a client side of the firmware management platform, for example, a user interface, generate a firmware management task for refreshing the firmware, and transmit the firmware management task to a server side of the firmware management platform through a network. Firmware information of the firmware is determined from the firmware management task in response to the received firmware management task by the server.
The firmware information may include firmware attribute information such as firmware name, model, vendor, etc. firmware basic information. But is not limited thereto. Firmware information may also include firmware functional information such as drive, control, decode, transfer, detect, etc. Firmware information may also include firmware operating information, such as operating environment, operating device, etc., related to firmware operation.
In operation S202, a refresh tool matching the firmware information is determined from the refresh explanation document.
The refresh tool may refer to an auxiliary tool for refreshing firmware. The refresh explanation document is used for indicating information of each of a different plurality of refresh tools.
The refresh tool that matches the firmware information may be determined from the refresh explanatory document by the firmware information.
For example, the respective information of the refresh tools may include information related to firmware information a and refresh tool a, firmware information B and refresh tool B, firmware information C and refresh tool C, and the like having a mapping relationship. The mapping relationship may be represented by a list, for example, firmware of the same row in the table has a mapping relationship with a refresh tool of the same row. But is not limited thereto. The mapping relationship can also be represented by text or an identifier, for example, if the firmware information A++ and the refreshing tool A++ both have the same identifier A++, then the mapping relationship exists between the firmware information A++ and the refreshing tool A++. The refresh tool for refreshing the firmware may be determined from a refresh specification document indicating a mapping relationship between firmware information and the refresh tool by firmware information in the firmware management task.
Also for example, the respective information of the refresh tool may include an application range of the refresh tool, firmware information of applicable firmware. The refresh tool for refreshing the firmware may be determined from the refresh specification document based on information of the refresh tool including pendant information of the applicable firmware, and firmware information in the firmware management task, performing semantic similarity matching or keyword similarity matching.
In operation S203, the firmware is refreshed using the refresh tool and the firmware file matched with the firmware information.
The firmware files may include all files for running firmware, such as configuration files, driver files, and running files, etc. But is not limited thereto. The firmware file may also include only patch files for upgrading firmware functions. Correspondingly, the refreshing tool is matched with the firmware file, and can be used for installing the firmware file in the hardware device, starting and activating the firmware file, and finishing firmware refreshing.
By utilizing the firmware management method provided by the embodiment of the disclosure, a plurality of refreshing tools of different types can be integrated and the refreshing description document for describing the refreshing tools can be generated in advance, so that the refreshing tools matched with the firmware information can be determined through the refreshing description document in response to the received firmware management task, the flexibility and the universality of firmware refreshing are improved, the application scenes of different firmware refreshing can be dealt with, and the application range is improved.
Having described firmware refresh management in the firmware management method, a specific explanation will be given below for firmware refresh as shown in fig. 2.
According to an embodiment of the present disclosure, for operation S230 shown in fig. 2, refreshing the firmware using the refreshing tool and the firmware file matched with the firmware information may include performing parameter update on the refreshing script for refreshing the firmware based on respective storage spaces of the refreshing tool and the firmware file to obtain the target refreshing script. And refreshing the firmware by using the target refreshing script.
The refresh script may include a running program or running code for automating the execution of firmware refreshes. And firmware is refreshed by utilizing the automatic control of the refresh script, so that the automatic effect is improved, and the manpower is liberated.
A tool library for storing the refresh tool and a file library for storing the firmware file may be provided. A plurality of refresh tools of different types are stored in the tool library. A plurality of firmware files of different types are stored in the file library. Thereby serving to cope with refreshing of multiple firmware of different types.
Dynamically adjustable parameters can be set in the refresh script to adapt to the refresh tool and the retrieval of the firmware file. For example, based on the calling parameter information representing the respective storage space of the refreshing tool and the firmware file, the preset field parameters in the refreshing script are subjected to parameter updating to obtain the target refreshing script, so that the refreshing tool and the firmware file are called according to the corresponding parameters of the storage space in the running process of the target refreshing script, and firmware refreshing is completed.
And in addition, dynamic adjustable parameters are set in the refreshing script, and the refreshing script is subjected to parameter updating according to the storage space of the refreshing tool and the firmware file, so that a target refreshing script is obtained, the functionality of the target refreshing script is ensured, and meanwhile, the dynamic adjustment and flexibility of the target refreshing script are improved, and the application range of firmware refreshing is further enlarged.
According to the embodiment of the present disclosure, the refresh script may be preset, but is not limited thereto, and may be obtained by dynamically updating a preset refresh script. The generation of the refresh script will be further described below.
According to the embodiment of the disclosure, the firmware management method can comprise the steps of dynamically updating a preset refreshing script to obtain the refreshing script.
Optionally, dynamically updating the preset refresh script to obtain the refresh script may include updating the preset refresh script based on dynamic refresh parameters used to characterize the refresh mode to obtain the refresh script.
The refresh mode may be determined from a firmware management task. Based on the refresh mode, a dynamic refresh parameter is determined. And updating the preset refreshing script based on the dynamic refreshing parameter to obtain the refreshing script of the firmware.
The refresh mode may refer to a refresh mode for indicating an operation mode for refreshing firmware using a refresh tool and a firmware file.
The refresh mode may include refreshing a scene. The dynamic refresh parameter embodying the refresh mode can be updated to the preset refresh script, and the refresh operation is executed by the updated refresh script according to the refresh mode in the running process. But is not limited thereto. The operation instruction corresponding to the refresh mode can be issued by a manual click mode, so that the corresponding refresh operation is performed in response to the operation instruction.
Compared with the mode of manually issuing the operation instruction, the method has the advantages that the firmware is automatically updated by using the refresh script added with the dynamic refresh parameters representing the refresh mode, the automation and the intellectualization of firmware management are improved, the manpower is liberated, the efficiency of the refresh operation is improved, and the stable operation of the refresh operation is ensured.
The above specifically describes updating the preset refresh script through the refresh mode and the memory space to obtain the target refresh script. The manner in which the target refresh script is generated will be further described below in conjunction with fig. 3.
FIG. 3 schematically illustrates a flow diagram for generating a targeted refresh script, according to an embodiment of the present disclosure.
As shown in fig. 3, firmware information 302 of firmware may be determined from firmware management task 301. Based on the firmware information 302 and the refresh explanation document 303, a refresh tool 304 is determined. Based on the firmware management task 301, a refresh mode 305 is determined. Based on the refresh mode 305, dynamic update parameters 306 are determined. Firmware file 308 may also be determined based on firmware information 302 and file description document 307. Based on the respective storage space 309 and dynamic update parameters 306 of the refresh tool 304 and the firmware file 308, the preset refresh script 310 is subjected to parameter update to obtain a target refresh script 311.
The dynamic updating parameters and the storage space can be utilized to update the parameters of the preset refreshing script sequentially, and the parameters of the preset refreshing script can be updated at the same time, so long as the dynamic adjustable parameters of the target refreshing script can be updated, and the target refreshing script can call the refreshing tool and the firmware file and complete refreshing of the firmware according to the refreshing mode.
By using the firmware management method provided by the embodiment of the disclosure, a plurality of refreshing scenes of different types can be covered by setting a plurality of refreshing tools of different types and a plurality of firmware files of different types. In addition, the dynamic adjustable parameters set for the preset refreshing script can replace or add the call parameters corresponding to the storage space for indicating the refreshing tool, the firmware file and the like and the dynamic refreshing parameters for indicating the refreshing mode into the preset refreshing script, so that the flexibility and the adjustability of the refreshing operation are improved. Therefore, the two aspects are combined, the scene coverage range of firmware refreshing is improved from different angles, and the user experience is improved.
How the target refresh script is generated is further described above by means of fig. 3, and how firmware refreshes are performed by means of the target refresh script will be further described below.
Refreshing firmware with a target refresh script, according to embodiments of the present disclosure, may include performing operations to configure a refresh environment with the target refresh script. And calling the firmware file and the refreshing tool at the moment corresponding to the refreshing time, and repeatedly executing refreshing operation of refreshing times on the firmware in the refreshing environment.
The refresh mode may include, for example, a refresh number, a refresh timing, and a refresh environment. Correspondingly, the dynamic update parameters determined based on the refresh mode include a refresh times parameter, a refresh timing parameter, and a refresh environment parameter.
The refresh mode may also include refreshing the scene. A flush environment may refer to an environment in which a hardware device loading firmware is to be configured. Such as off-site refresh or local refresh, and also such as real-time refresh or asynchronous refresh, etc.
Optionally, in the case where the refresh scene is a remote refresh, the refresh environment may further include network communication. The communication connection can be carried out with the hardware device loaded with the firmware, and the refreshing environment is configured on the hardware device with the communication connection established.
Optionally, the refresh opportunity may include a response time corresponding to the refresh trigger instruction. The refresh trigger instruction may include an instruction triggered by a corresponding time, and may further include an instruction triggered by a device state of the hardware device. For example, the hardware device initiates a triggered refresh trigger instruction.
The dynamic refresh parameters can be determined based on the refresh mode, and the dynamic adjustable parameters in the preset refresh script are updated by utilizing the dynamic refresh parameters, so that the method is convenient for coping with various refresh scenes and refresh requirements, improves the processing efficiency and improves the application range.
The above has described how firmware is refreshed in the refresh mode, and the countermeasure of a special case occurring in the process of refreshing firmware will be explained below.
For example, in refreshing firmware using a target refresh script, it may be the case that the firmware is operated. Performing this operation affects the refreshing of the firmware.
An alert message indicating that execution is disabled may be displayed in response to receiving an operation instruction for firmware being refreshed, and a response operation to execute the operation instruction is stopped.
Alternatively, an anti-misoperation sub-script may be set in the target refresh script. And displaying alarm information for incapability and stopping subsequent response operation under the condition that an operation instruction for firmware being refreshed is received by utilizing the misoperation prevention sub-script.
Therefore, the anti-misoperation sub-script is utilized to improve the refreshing stability and success rate of firmware, and the problem of refreshing failure caused by misoperation is avoided.
How firmware refresh is performed is described above, and the determining refresh tool will be described in detail below with reference to operation S220 shown in fig. 2.
According to an embodiment of the present disclosure, determining a refresh tool matching firmware information from refresh explanation documents may include determining a sub-refresh explanation document matching firmware function information from refresh explanation documents based on firmware function information in the firmware information, for operation S220 shown in fig. 2. Based on the firmware attribute information in the firmware information, a refresh tool matching the firmware attribute information is determined from the sub-refresh specification document.
The firmware function information is used to indicate a function to be refreshed of the firmware, and the function to be refreshed may include one or more functions of startup, transmission, calculation, detection, and the like.
The refresh explanation document may include a plurality of sub-refresh explanation documents divided by firmware function information, for example, the plurality of sub-refresh explanation documents differ from each other in firmware function information.
Specifically, the refresh tools listed in the sub-refresh specification document a are all used to refresh the boot functions of the firmware. The refresh tools listed in the sub-refresh specification document B are all used to refresh the transmission functions of the firmware.
The refresh tool may be categorized according to firmware functional information to form a plurality of sub-refresh explanatory documents. When matching is carried out from the refreshing description document based on the firmware information, the sub-refreshing description document is determined by utilizing the firmware function information, so that the query range is reduced, and the query efficiency is improved.
In addition, each sub-refresh explanation document may include a mapping relationship between each of the plurality of refresh tools and the firmware attribute information. For example, the mapping relationship between the tool a and the firmware attribute information a, the mapping relationship between the tool B and the firmware attribute information B, and the like are refreshed.
The firmware attribute information may be used to indicate firmware basic information, for example, firmware type, firmware name, firmware brand, and the like.
And keyword matching can be carried out on the firmware attribute information and the contents in the sub-refreshing description document, so that a refreshing tool with a mapping relation with the firmware attribute information is determined.
The matching may be performed by a precise matching manner, for example, in a case where the firmware attribute information in the firmware information is completely identical to the firmware attribute information in the sub-refresh specification document, the matching result may be determined. Based on the matching result and the mapping relation, a refreshing tool matched with the firmware attribute information is determined.
The matching may also be performed by using a fuzzy matching method, for example, in a case where the matching similarity between the firmware attribute information in the firmware information and the firmware attribute information in the sub-refresh explanatory document reaches a predetermined threshold, the matching result may be determined. Based on the matching result and the mapping relation, a refreshing tool matched with the firmware attribute information is determined.
Compared with a fuzzy matching mode, the precision of the matched refreshing tool can be improved by adopting the precision matching mode, and the operation problems of refreshing downtime and the like caused by unmatched refreshing tools are avoided.
In the case where it is determined that there is no content matching the firmware attribute information of the firmware information in the sub-refresh explanation document, it may be determined that there is no corresponding refresh tool. In this case, information indicating "refresh inoperable" may be displayed and exited.
The refreshing description document is functionally divided to obtain a plurality of sub-refreshing description documents, mapping relations between firmware information and refreshing tools are listed in the plurality of sub-refreshing description documents, information characteristics of good clustering effect of the firmware function information and high matching precision of the firmware attribute information are fully combined, and a matching mode of hierarchical matching is realized, so that matching precision is ensured, and meanwhile matching efficiency is improved.
How the refresh tool is determined is described above, and the determination of the refresh tool will be explained in detail with reference to fig. 4.
Fig. 4 schematically illustrates an application diagram of a determined refresh tool according to an embodiment of the present disclosure.
As shown in fig. 4, the refresh explanation document 410 includes a sub-refresh explanation document of a start-up function, a sub-refresh explanation document of a transfer function, and a sub-refresh explanation document of a test function.
As shown in fig. 4, the function to be refreshed of the firmware a is determined to be a start-up function based on firmware function information 421 in the firmware information of the firmware a. The sub-refresh explanation document 411 of the start-up function is determined to be a sub-refresh explanation document matching with firmware a based on the firmware function information.
As shown in fig. 4, the model and brand of the firmware a are determined based on the firmware attribute information 422 in the firmware information of the firmware a. Based on the firmware attribute information and the mapping relationship between the firmware attribute information and the refresh tool in the sub-refresh specification document, it is determined that refresh tool a is refresh tool 430 batched with firmware a.
The determination of the refresh tool from the refresh explanation document is specifically described above by fig. 4, and the generation of the refresh explanation document will be further described below.
Tool attribute information for a plurality of refresh tools may be collected. The tool attribute information may include tool basic information such as a tool name, a tool model number, a tool brand, and the like, and may include unique identification information for indicating the refreshable firmware. The unique identification information is used to uniquely characterize the refreshable firmware.
A refresh-explanation document embodying the mapping relationship may be created based on the tool attribute information and the firmware attribute information. Based on the firmware function information, clustering the firmware to obtain a clustering result. And carrying out post-processing on the refreshing description document based on the clustering result to obtain a plurality of sub-refreshing description documents.
In the actual operation process, the refreshing description document is not fixed and can be changed along with the addition and deletion of the firmware.
Optionally, the firmware management method may include configuring a new refresh tool based on firmware information in the firmware hint information in response to receiving firmware hint information characterizing that new firmware has been added. A sub-refresh explanation document is determined from the refresh explanation documents based on firmware function information in the firmware information. And updating the mapping relation between the firmware in the sub-refreshing document and the refreshing tool based on the tool attribute information of the new refreshing tool and the firmware attribute information in the firmware information to obtain the updated refreshing document.
The new refresh tool matched with the firmware information may be acquired from a provider of the firmware based on the firmware information such as the firmware function information and the firmware attribute information, but is not limited thereto, and the new refresh tool adapted thereto may be generated based on the firmware information. As long as it can assist in refreshing the new firmware.
The sub-refresh explanation document to be updated may be determined based on the firmware function information. And updating the mapping relation based on the tool attribute information and the firmware attribute information of the new refreshing tool, for example, adding the mapping relation with the new refreshing tool into the sub-refreshing description document, completing information updating, and obtaining the updated refreshing document.
In addition, the configured new refresh tools may also be stored to the tool library.
By using the updating method of the refreshing description document provided by the embodiment of the invention, the updating method can be matched with the management of the actual firmware and the refreshing tool in real time, thereby improving the accuracy and the effectiveness of the refreshing description document and avoiding the problem that the corresponding refreshing tool cannot be matched due to untimely updating of the refreshing description document.
It should be noted that a file description document may be set for a firmware file. The generation mode, the document organization mode and the update mode of the file description document are similar to those of the refreshing description document, and the difference is that the refreshing description document is related information about a refreshing tool, and the file description document records related information about a firmware file. And will not be described in detail herein.
The new firmware file may be configured based on firmware information in the firmware hint information in response to receiving firmware hint information characterizing that new firmware has been added. The configuration of the new firmware file is similar to that of the new refreshing tool, and will not be described here again.
The generation method and the update method of the refresh description document and the file description document are described above, and other management operations in the firmware management method will be described below.
According to embodiments of the present disclosure, the firmware management method may include firmware refresh, but is not limited thereto, and may include refresh check, firmware test, and the like.
The refresh check operation will be specifically described below.
According to an embodiment of the present disclosure, after performing the operation of refreshing the firmware using the refreshing tool and the firmware file matched with the firmware information as shown in fig. 2, the firmware management method may further include verifying the refreshed firmware using the verification tool.
Alternatively, the refreshed firmware may be verified with a verification tool in response to receiving a hint information that characterizes the completion of the refresh.
Alternatively, verification tools that match the firmware information may be determined from the verification specification document. The verification specification document is used to indicate information for each of a different plurality of verification tools.
Illustratively, the generation mode, the document organization mode and the update mode of the verification description document are similar to those of the refreshing description document, except that the refreshing description document is related information about the refreshing tool, and the verification description document records related information about the verification tool. And will not be described in detail herein.
For example, the operation mode of the verification tool that is determined to be matched with the firmware information from the verification specification document may refer to the operation mode of the refresh tool that is determined to be matched with the firmware information from the refresh specification document. And will not be described in detail herein.
Optionally, verifying the refreshed firmware with the verification tool may include determining a task firmware version identification from the firmware file with the verification tool and determining a device firmware version identification from the refreshed firmware. And obtaining a verification result based on the task firmware version identifier and the equipment firmware version identifier.
And under the condition that the task firmware version identification is consistent with the device firmware version identification, obtaining a verification result representing successful refreshing. And under the condition that the task firmware version identification is inconsistent with the device firmware version identification, obtaining a verification result for representing the refreshing failure.
By utilizing the refresh check operation provided by the embodiment of the disclosure, the completion condition of firmware refresh can be determined based on the check result, so that the repair can be performed under the condition that the check result represents refresh failure, and the refresh success rate is improved.
Fig. 5 schematically illustrates a flow diagram of firmware refresh and verification according to an embodiment of the disclosure.
As shown in fig. 5, the method includes operations S501 to S509.
In operation S501, it is determined whether a refresh thread can be generated. In the case where it is determined that the refresh thread can be generated, operation S502 is performed. In the case where it is determined that the refresh thread cannot be generated, operation S503 is performed.
In operation S502, a refresh operation is performed using a refresh thread.
In operation S503, a hint information for indicating that refreshing is impossible is displayed.
In operation S504, after the refresh is completed, it may be determined whether a check thread can be generated. In the case where it is determined that the check thread can be generated, operation S505 is performed. In the case where it is determined that the check thread cannot be generated, operation S506 is performed.
In operation S505, a verification operation is performed using a verification thread.
In operation S506, a prompt for characterizing the inability to verify is displayed.
In operation S507, after the verification is completed, it may be determined whether the verification is passed based on the verification result. In case that the verification result indicates that the refresh is successful, operation S508 is performed. In the case where the verification result characterizes the refresh failure, operation S509 is performed.
In operation S508, a hint information for characterizing the verification pass may be displayed.
In operation S509, a prompt for indicating that the verification is not passed may be displayed.
Optionally, determining whether a refresh thread can be generated may include determining whether a refresh tool is matched from the refresh specification document. It is determined whether a firmware file is matched from the file specification document. If at least one of the refresh tool or the firmware file cannot be matched, it is determined that the refresh thread cannot be generated. In the event that a match is made to both the refresh tool and the firmware file, then it is determined that a refresh thread can be generated.
Optionally, determining whether the verification thread can be generated may include determining whether a verification tool is matched from the verification specification document. Whether the firmware management task comprises a verification task for executing verification or not. In the event that no verification tool is matched or no verification task is identified, it is determined that a verification thread cannot be generated. In the event that a verification tool is matched and a verification task is identified, a determination may be made that a verification thread may be generated.
Optionally, performing the operation of refreshing the firmware using the refresh thread may include determining a refresh tool from the refresh specification document. The firmware file is determined from the file description document. A refresh mode is determined. And updating a preset refreshing script based on the storage space of each refreshing tool and the firmware file and the dynamic refreshing parameter used for representing the refreshing mode to obtain a target refreshing script. And calling a refreshing tool and a firmware file by using the target refreshing script to refresh the firmware.
The verification operation in the firmware management method is specifically described above with reference to fig. 5. The test operation in the firmware management method will be specifically described below.
According to an embodiment of the present disclosure, after performing the operation of verifying the firmware, the firmware management method may further include testing the verified firmware.
Alternatively, the verified firmware may be tested with a test tool that matches the firmware information in response to receiving the hint information that the characterization verification was completed.
Test tools that match the firmware information may be determined from the test specification document. And testing the verified firmware by using a testing tool. The test type is not limited, and may be any type of test that can test the operation state of firmware, such as a health test and an operation rate test.
The verified firmware can be tested by using a testing tool matched with the testing type to obtain a testing result and the testing result is displayed.
Illustratively, the generation mode, the document organization mode and the update mode of the test description document are similar to those of the refresh description document, except that the refresh description document is related information about the refresh tool, and the test description document records related information about the test tool. And will not be described in detail herein.
For example, determining the manner of operation of the test tool from the test specification document that matches the firmware information may refer to determining the manner of operation of the refresh tool from the refresh specification document that matches the firmware information. And will not be described in detail herein.
By using the test tool provided by the embodiment of the disclosure to test the verified firmware, the running state of the refreshed firmware can be accurately known under the condition that the refreshing is successful, and further the firmware used for running is guaranteed to be in good running state, so that the system stability is improved.
Alternatively, the verified firmware may be tested using a test tool, but is not limited thereto, and the refreshed firmware information may be tested using a test tool. As long as the operation can be performed according to the firmware management task proposed by the user.
Based on the firmware management method, the disclosure also provides a firmware management device. The camera module will be described in detail with reference to fig. 6.
Fig. 6 schematically shows a block diagram of a firmware management apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the firmware management apparatus 600 of this embodiment includes a determination module 610, a matching module 620, and a refresh module 630.
A determining module 610, configured to determine firmware information of the firmware to be refreshed from the firmware management task in response to the received firmware management task. In an embodiment, the determining module 610 may be configured to perform the operation S201 described above, which is not described herein.
A matching module 620 for determining a refresh tool from the refresh explanatory document that matches the firmware information. The refresh explanation document is used for indicating information of each of a different plurality of refresh tools. In an embodiment, the matching module 620 may be configured to perform the operation S202 described above, which is not described herein.
And the refreshing module 630 is configured to refresh the firmware by using the refreshing tool and the firmware file matched with the firmware information. In an embodiment, the refresh module 630 may be configured to perform the operation S203 described above, which is not described herein.
According to an embodiment of the present disclosure, the refresh module includes a space update sub-module and a refresh sub-module.
And the space updating sub-module is used for updating parameters of the refreshing script for refreshing the firmware based on the storage space of each refreshing tool and the firmware file to obtain a target refreshing script.
And the refreshing sub-module is used for refreshing the firmware by utilizing the target refreshing script.
According to an embodiment of the present disclosure, the firmware management apparatus further includes a mode update module.
And the mode updating module is used for updating a preset refreshing script based on the dynamic refreshing parameter used for representing the refreshing mode to obtain the refreshing script of the firmware, wherein the refreshing mode is determined based on the firmware management task.
According to an embodiment of the present disclosure, the refresh mode includes a refresh number, a refresh timing, and a refresh environment.
According to an embodiment of the present disclosure, the refresh module includes a refresh sub-module.
The refreshing sub-module is used for executing the following operations by utilizing the target refreshing script:
configuring a refreshing environment;
and calling the firmware file and the refreshing tool at the moment corresponding to the refreshing time, and repeatedly executing refreshing operation of refreshing times on the firmware in the refreshing environment.
According to an embodiment of the present disclosure, a matching module includes:
The sub-document matching sub-module is used for determining a sub-refreshing description document matched with firmware function information in firmware information from the refreshing description document, wherein the firmware function information is used for indicating a function to be refreshed of the firmware, the refreshing description document comprises a plurality of sub-refreshing description documents divided according to the firmware function information, and the sub-refreshing description document is used for indicating a mapping relation between a refreshing tool and the firmware;
And the refreshing matching sub-module is used for determining refreshing tools matched with the firmware attribute information in the firmware information from the sub-refreshing description document.
According to the embodiment of the disclosure, the firmware management device further comprises a configuration module, a sub-document matching module and an updating module.
The configuration module is used for responding to the received firmware prompt information representing that the new firmware is added, and configuring the new refreshing tool based on the firmware information in the firmware prompt information.
And the sub-document matching module is used for determining the sub-refreshing description document from the refreshing description document based on the firmware function information in the firmware information. The firmware function information is used to indicate the function of the new firmware, and the refresh explanation document includes a plurality of sub-refresh explanation documents divided by the firmware function information.
And the updating module is used for updating the mapping relation between the refreshing tool and the firmware in the sub-refreshing description document based on the tool attribute information of the new refreshing tool and the firmware attribute information in the firmware information to obtain the updated refreshing description document.
According to an embodiment of the disclosure, the firmware management apparatus further includes an alarm module.
And the alarm module is used for responding to the received operation instruction for the firmware being refreshed and displaying alarm information for indicating that the firmware cannot be executed.
According to the embodiment of the disclosure, the firmware management device further comprises a verification matching module and a verification module.
And the verification matching module is used for determining a verification tool matched with the firmware information from the verification description document in response to receiving prompt information representing that refreshing is completed. The verification specification document is used to indicate information for each of a different plurality of verification tools.
And the verification module is used for verifying the refreshed firmware by utilizing a verification tool.
According to an embodiment of the present disclosure, the firmware management apparatus further includes a test module.
And the test module is used for responding to the received prompt information that the characterization verification is completed and testing the verified firmware by using a test tool matched with the firmware information.
Any of the determination module 610, the matching module 620, and the refresh module 630 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules, according to embodiments of the present disclosure. Or at least some of the functionality of one or more of the modules may be combined with, and implemented in, at least some of the functionality of other modules. According to embodiments of the present disclosure, at least one of the determination module 610, the matching module 620, and the refresh module 630 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging circuitry, or in any one of or a suitable combination of any of three implementations of software, hardware, and firmware. Or at least one of the determination module 610, the matching module 620, and the refresh module 630 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.