CN111949289A - File updating method and device, electronic equipment and storage medium - Google Patents

File updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111949289A
CN111949289A CN202010667932.7A CN202010667932A CN111949289A CN 111949289 A CN111949289 A CN 111949289A CN 202010667932 A CN202010667932 A CN 202010667932A CN 111949289 A CN111949289 A CN 111949289A
Authority
CN
China
Prior art keywords
file
configuration files
updating
verified
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010667932.7A
Other languages
Chinese (zh)
Inventor
朱坤旺
曹力
张思栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Great Wall Technology Group Co ltd
Original Assignee
China Great Wall Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Great Wall Technology Group Co ltd filed Critical China Great Wall Technology Group Co ltd
Priority to CN202010667932.7A priority Critical patent/CN111949289A/en
Publication of CN111949289A publication Critical patent/CN111949289A/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

The application provides a file updating method, a file updating device, electronic equipment and a storage medium, which are applicable to the technical field of information processing and can stably improve the file updating efficiency. The method comprises the following steps: verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein a plurality of the configuration files are the same file; and finishing updating the file to be updated based on the plurality of verified configuration files.

Description

File updating method and device, electronic equipment and storage medium
Technical Field
The present application belongs to the field of information processing technologies, and in particular, to a file updating method and apparatus, an electronic device, and a storage medium.
Background
With the increasing requirements of users on the reliability and the security of the device, if the device has problems or changes in functional requirements during operation, the file needs to be acquired to update the file to be updated in the device. For example, if a Complex Programmable Logic Device (CPLD) has a problem or a change in functional requirements while running, a file needs to be acquired and used to complete the upgrade of the firmware version of the CPLD.
However, in the existing file updating method, in the process of updating the file to be updated by using the file, when the file has an error, the file needs to be downloaded again, so that the file to be updated is updated by using the downloaded file again, and the file updating efficiency is extremely affected. For example, when the firmware version of the CPLD is upgraded by using a downloaded file, if the file is damaged or the operation is wrong, a file needs to be downloaded again from time to time, and the firmware version of the CPLD is upgraded by using the file again. Therefore, the existing file updating method has the problem of low file updating efficiency.
Disclosure of Invention
The embodiment of the application provides a file updating method, a file updating device, a server and a storage medium, and aims to solve the problem that the existing file updating mode is low in file updating efficiency.
In a first aspect, an embodiment of the present application provides a file updating method, where the method includes:
verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein a plurality of the configuration files are the same file;
and finishing updating the file to be updated based on the plurality of verified configuration files.
By adopting the file updating method provided by the application, the plurality of configuration files are verified by using the preset verification strategy so as to ensure the safety of the files, and the files to be updated are updated based on the plurality of verified configuration files, so that the file updating efficiency can be effectively improved.
Optionally, after the verifying the plurality of configuration files by using a preset verification policy to obtain a plurality of verified configuration files, the method further includes:
and respectively storing the plurality of verified configuration files into preset storage areas.
Optionally, the verifying the multiple configuration files by using a preset verification policy to obtain multiple verified configuration files includes:
and respectively verifying the file identification information of each configuration file in the plurality of configuration files by using a preset verification strategy, and determining the plurality of configuration files which are verified correctly.
Optionally, the updating the file to be updated based on the plurality of verified configuration files includes:
determining one of the plurality of verified configuration files as a first target configuration file;
and finishing updating the file to be updated based on the first target configuration file.
Optionally, the updating the file to be updated based on the plurality of verified configuration files is completed, further including:
and confirming the updating state of the file to be updated.
Optionally, the updating the file to be updated based on the plurality of verified configuration files is completed, further including:
if the state indicates that the updating is abnormal, determining one of a plurality of verified configuration files except the first target configuration file as a second target configuration file;
and finishing updating the file to be updated based on the second target configuration file.
Optionally, the updating the file to be updated based on the plurality of verified configuration files includes:
acquiring a receiving time sequence of a plurality of verified configuration files;
and according to the received time sequence, finishing updating the file to be updated based on the plurality of verified configuration files.
In a second aspect, an embodiment of the present application provides a file updating apparatus, including:
the verification module is used for verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein a plurality of the configuration files are the same file;
and the updating module is used for finishing updating the file to be updated based on the plurality of verified configuration files.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the file updating method when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the file updating method.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the file updating method according to any one of the first aspect.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic application environment diagram of a file update method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a file update method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a specific step S102 of a file updating method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a specific step S102 of a file updating method according to another embodiment of the present application;
FIG. 5 is a schematic structural diagram of a file update apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a file updating method in an embodiment of the present application. As shown in fig. 1, the application environment includes: a master device, at least one slave device. Wherein, in order to save the hardware pipelining quantity, the master device is connected with the slave device through an I2C bus. For example, a Micro Control Unit (MCU) is connected to a Field Programmable Gate Array (FPGA) or a CPLD via an I2C bus. The master device is used for acquiring a file for updating the file to be updated of the slave device. And the slave equipment is used for updating the file to be updated based on the file transmitted by the master equipment.
In an example, when one master device is connected with a plurality of slave devices, the I2C interfaces of the slave devices are configured as different slave addresses, so that the downloading of files between different slave devices is independent. For example, when the MCU downloads the configuration files of the CPLDs through the I2C interface, the I2C interfaces of the CPLDs of different boards are configured as different slave addresses, that is, when downloading the configuration files, the configuration files obtained by the CPLDs are not affected by each other. The single board CPLD may be a motherboard CPLD or a backplane CPLD.
Referring to fig. 2, fig. 2 is a schematic flowchart of a file updating method according to an embodiment of the present application. In this embodiment, the main execution body of the file updating method is an electronic device. As shown in fig. 2, the file update method in the present application may include the following steps:
s101: verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein, a plurality of configuration files are the same file.
In step S101, a preset verification policy is used to describe a logical process of verifying the configuration file by the electronic device. For example, it is verified whether a predetermined sequence exists in the configuration file, if the sequence is 123456, it is verified whether the configuration file includes the sequence, and if the sequence is verified to be correct, it indicates that the file is a correct file.
The configuration file is used for describing the logic process of target data information of file updating.
In some embodiments, the plurality of configuration files may be files generated by the electronic device or files received by the electronic device from other devices via network communication.
In some embodiments, the preset authentication policy may be a detection program pre-configured in the electronic device.
In practical application, since the configuration file is not necessarily the target file required for updating the file, if the configuration file may be a file disguised by virus data, the file is not the target file required for updating the file, or the file is not the file required for updating the current file, and if the CPLD firmware version is to be updated, the acquired file is a historical firmware version and cannot be used for the current CPLD firmware version. Therefore, the configuration files are verified by the preset verification strategy in advance to obtain the verified configuration files, that is, the files which can be verified by the preset verification strategy are files meeting the file updating requirement.
In this embodiment, the preset verification policy is used to verify the plurality of configuration files, and the preset verification policy may be used to verify whether the plurality of configuration files are files meeting the file update requirement. Therefore, the same configuration files are verified by using the preset verification strategy, a plurality of configuration files meeting the file updating requirement can be determined, and a file updating basis is provided for the whole file updating. For example, when a file to be updated is updated by using one target file, and the target file runs bad or runs wrong, the file to be updated can be updated by using other files in the plurality of configuration files. It should be understood that in all embodiments of the present application, the verification of the plurality of configuration files is performed by using a preset verification policy, in fact, to ensure that the file update can be performed smoothly.
When the plurality of profiles are verified using the preset verification policy, the following two scenarios may be included, but not limited to.
Scene 1: and if the file updating request is detected, verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files, and downloading the plurality of verified configuration files.
For example, when a version update request of the firmware version of the CPLD is detected, the multiple version files are verified by using a preset verification policy to obtain multiple verified version files, and then the multiple verified version files are downloaded.
Scene 2: and if the downloaded configuration files are detected, verifying the configuration files by using a preset verification strategy to obtain the verified configuration files.
For example, a plurality of downloaded CPLD firmware version files are detected, and the plurality of CPLD firmware versions are verified by using a preset verification policy, so as to obtain a plurality of verified CPLD firmware versions.
It should be understood that, in practical applications, the plurality of configuration files to be verified may be the configuration files that are verified by the electronic device before downloading the files, and then the configuration files after verification are downloaded; or after downloading the plurality of configuration files, the electronic device verifies the plurality of configuration files by using a preset verification strategy.
S102: and finishing updating the file to be updated based on the plurality of verified configuration files.
In step S102, the file to be updated is a file for guiding the device logic to run, and when a problem occurs or a function needs to be changed while the slave device logic is running, the file is a file that needs to be updated. For example, the firmware version in the CPLD needs to be updated when the CPLD is required to have a problem in operation or new functions need to be added.
In this embodiment, when obtaining a plurality of verified configuration files, the electronic device completes updating of the corresponding file to be updated by using the plurality of verified configuration files.
It is understood that the file to be updated may be a file in the electronic device, and may also be a file in a slave device of the electronic device.
For example, in conjunction with fig. 1, the master device is connected to the slave device 1 and the slave device 2 through I2C interfaces, respectively, and the configuration file to be updated 1 exists in the slave device 1, and the file to be updated does not exist in the slave device 2. The main device verifies a plurality of configuration files, such as configuration file 1, configuration file 2, configuration file 3, and configuration file 4, by using a preset verification policy to obtain a plurality of verified configuration files, such as configuration file 1, configuration file 2, and configuration file 3. And further completing updating of the configuration file 1 to be updated in the slave device 1 by using the configuration files 1, 2 and 3 after verification, for example, upgrading the version of the configuration file 1 to be updated from version 1 to version 2, and adding a function in version 2.
For another example, referring to fig. 1, the master device is connected to the slave device 1 and the slave device 2 through an I2C interface, respectively, and the configuration file to be updated 1 exists in the slave device 1 and the configuration file to be updated 2 exists in the slave device 2. The main device verifies a plurality of configuration files, such as configuration file 1, configuration file 2, configuration file 3, and configuration file 4, by using a preset verification policy to obtain a plurality of verified configuration files, such as configuration file 1, configuration file 2, configuration file 3, and configuration file 4. And further completing updating of the configuration file 1 to be updated in the slave device 1 based on the verified configuration file 1 and the verified configuration file 2, for example, upgrading the version of the configuration file 1 to be updated from version 1 to version 2, and adding a new function in version 2. The updating of the configuration file 2 to be updated in the slave device 2 is completed based on the verified configuration files 3 and 4, for example, the defect problem of the configuration file 2 to be updated is repaired, and for example, after the configuration file 2 to be updated is repaired, the slave device 2 is not automatically closed any more when running based on the repaired configuration file 2 to be updated.
By adopting the file updating method provided by the application, the plurality of configuration files are verified by using the preset verification strategy so as to ensure the safety of the files, and the files to be updated are updated based on the plurality of verified configuration files, so that the file updating efficiency can be effectively improved.
In an embodiment of the present application, there is a possible scenario that, in a process of downloading a file, the file to be updated is updated by using the file at the same time, and when the file is updated, only a part of the file is downloaded due to a network or hardware reason of the downloading, so that the file updating also fails.
Therefore, in order to update the file to be updated more smoothly, the method for verifying the configuration files by using the preset verification policy to obtain a plurality of verified configuration files further includes:
and respectively storing the plurality of verified configuration files into preset storage areas.
In this embodiment, the preset storage area may be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device.
In some embodiments, the predetermined storage area may also be an external storage device of the electronic device, for example, a plug-in hard disk equipped on the electronic device.
In some embodiments, the preset storage area may also be an internal storage unit in the slave device, for example, a non-volatile memory (Flash) in the CPLD.
In some embodiments, the plurality of verified configuration files are stored in different preset storage areas respectively. For example, a plurality of verified configuration files are respectively stored in different flashes in the CPLD.
In an example, after verifying the configuration file 1, the configuration file 2, the configuration file 3, and the configuration file 4 by using a preset verification policy, the verified configuration file 1, the verified configuration file 2, and the verified configuration file 3 are obtained, the 3 files are stored in a memory of the electronic device, or are respectively stored in 3 different flashes, when the file to be updated needs to be updated, the configuration file is obtained from a storage area, and the update of the file to be updated is completed based on the obtained configuration file.
In an embodiment of the present application, there is a possible scenario that when a preset verification policy is used to verify a file, it is often the case that whether the file is a file required for updating the file, the verification is mostly from the file head to the file tail of the file, and the verification efficiency is low.
Therefore, in order to improve the efficiency of file verification, the method for verifying the plurality of configuration files by using the preset verification strategy to obtain a plurality of verified configuration files comprises the following steps:
and respectively verifying the file identification information of each configuration file in the plurality of configuration files by using a preset verification strategy, and determining the plurality of configuration files which are verified correctly.
In the present embodiment, the file identification information is identification data for describing whether or not the file is a target file. For example, when the configuration file is generated, a byte is generated by using a preset generation strategy, and whether the file is the target file is determined by the byte. The preset generation strategy is a logic mode indicating generation of identification data, and corresponds to a preset verification strategy, that is, file identification information generated based on the preset generation strategy can only be verified by using the preset verification strategy, and the verification can be successful.
In some embodiments, the file identification information may be data in a file header or a file trailer, for example, the file identification information is one byte in the file header or the file trailer.
In some embodiments, the file identification information may be a preset encoding mode of information in the file.
For example, if the presence identifier 1 in the configuration file 1 is 12345678, the presence identifier 2 in the configuration file 2 is 12345679, and the presence identifier 3 in the configuration file 3 is 12345678, the identifier 1 in the configuration file 1, the identifier 2 in the configuration file 2, and the identifier 3 in the configuration file 3 are respectively verified by using a preset verification policy, and only if the verification results of the identifier 1 and the identifier 3 are correct, it is determined that the configuration files 1 and 3 are configuration files for which the verification is correct.
It will be appreciated that the multiple profiles that are verified to be correct are the same file.
In an embodiment of the present application, referring to fig. 3, fig. 3 is a flowchart illustrating a file updating method provided in the embodiment of the present application, and mainly relates to a specific process of updating a file to be updated based on a plurality of verified configuration files. The method specifically comprises the following steps:
finishing the update of the file to be updated based on the plurality of verified configuration files, comprising:
s201: determining one of the plurality of verified profiles as a first target profile.
S202: and finishing updating the file to be updated based on the first target configuration file.
For example, the existing configuration files 1, 2, 3 and 4 after verification, the configuration file 1 in the 4 files is determined to be a first target configuration file, and the file to be updated is updated based on the first target configuration file.
In an embodiment of the present application, completing updating a file to be updated based on a plurality of verified configuration files, includes:
determining one of a plurality of profiles that are verified to be correct as a first target profile.
And finishing updating the file to be updated based on the first target configuration file.
For example, the existing configuration files 1, 2, 3 and 4 are verified to be correct, the configuration file 1 in the files 4 is determined to be a first target configuration file, and the file to be updated is updated based on the first target configuration file.
In an embodiment of the present application, completing updating a file to be updated based on a plurality of verified configuration files, includes:
numbering and sequencing the plurality of verified configuration files;
and updating the file to be updated based on the numbered and sequenced verified configuration files.
For example, after the configuration files 1, 2, 3 and 4 which exist after verification are numbered and sorted, 4 verified a1 with the numbers sorted are obtained: profile 1, a 2: configuration files 2, a 3: profile 3, a 4: and configuring a file 4, and updating the file to be updated based on the 4 files after the serial number sorting.
In an embodiment of the present application, completing updating a file to be updated based on a plurality of verified configuration files, includes:
numbering and sequencing a plurality of configuration files which are verified to be correct;
and updating the file to be updated based on the numbered and sequenced configuration files which are verified to be correct.
For example, after verifying the correct configuration files 1, 2, 3, and 4, numbering and sorting the existing configuration files, 4 verified correct a1 with the numbers sorted are obtained: profile 1, a 2: configuration files 2, a 3: profile 3, a 4: and configuring a file 4, and updating the file to be updated by the 4 files after the serial numbers are sorted.
In an embodiment of the present application, when the update of the file to be updated is completed based on the plurality of verified configuration files, the update state of the file to be updated cannot be accurately known, and the time point for stopping the update is determined, so that the file to be updated is updated for multiple times by using the plurality of verified configuration files.
Therefore, after the updating of the file to be updated is completed based on the plurality of verified configuration files, the method further includes:
and confirming the state of updating the file to be updated.
In this embodiment, the status is used to describe a result of updating the file to be updated by using the configuration file. And when the file to be updated is updated based on the plurality of verified configuration files, acquiring the updating state of the file to be updated through the electronic equipment. For example, when a file to be updated is updated based on a verified configuration file, the update is successful, or the configuration file has an error and the update is failed.
In an embodiment of the present application, completing updating a file to be updated based on a plurality of verified configuration files, further includes:
if the state indicates that the updating is abnormal, determining one configuration file of a plurality of verified configuration files except the first target configuration file as a second target configuration file;
and finishing updating the file to be updated based on the second target configuration file.
For example, the files to be updated are updated based on the configuration files 1, 2, 3, and 4 after verification, where when the file to be updated is updated by using the first target configuration file 1, an error occurs in the configuration file 1, which results in an update failure, that is, the status indicates that the update is abnormal, one of the configuration files 2, 3, and 4 is determined as the second target configuration file, and if the configuration file 2 is determined as the second target configuration file, the file to be updated is updated by using the configuration file 2.
In an embodiment of the present application, the updating of the file to be updated is completed based on the plurality of configuration files verified to be correct, and the method further includes:
if the state indicates that the updating is abnormal, determining one of a plurality of configuration files which are verified correctly except the first target configuration file as a second target configuration file;
and finishing updating the file to be updated based on the second target configuration file.
For example, the files to be updated are updated based on the configuration file 1, the configuration file 2, the configuration file 3, and the configuration file 4 which are verified to be correct, where when the files to be updated are updated by using the first target configuration file 1, an error occurs in the configuration file 1, which results in an update failure, that is, the status indicates that the update is abnormal, one of the configuration file 2, the configuration file 3, and the configuration file 4 is determined to be the second target configuration file, and if the configuration file 2 is determined to be the second target configuration file, the files to be updated are updated by using the configuration file 2.
In an embodiment of the present application, referring to fig. 4, fig. 4 is a schematic flowchart of a file updating method provided in the embodiment of the present application, and mainly relates to a process of updating a file to be updated based on a time sequence of receiving a configuration file. The method specifically comprises the following steps:
finishing the update of the file to be updated based on the plurality of verified configuration files, comprising:
s301: and acquiring the receiving time sequence of the plurality of verified configuration files.
S301: and according to the receiving time sequence, finishing the updating of the file to be updated based on the plurality of verified configuration files.
In this embodiment, the receiving time sequence is used to describe a sequence of obtaining a plurality of verified configuration files.
For example, when the time points of downloading the profiles 1 and 2 are a1 and a2, respectively, and a1 is later than a2, the receiving time sequence of the profiles 1 and 2 is the profiles 2 and 1.
In an embodiment of the present application, a generation time point recorded in each of a plurality of verified configuration files is extracted, the plurality of verified configuration files are sorted according to the extracted generation time point of each configuration file, and a file to be updated is updated according to the sorted plurality of verified configuration files.
In this embodiment, the generation time point is the time when the profile is obtained. For example, the time for generating the profile 1 is 1 month, 1 day, 13 hours, 13 minutes, and 13 seconds in 2020.
In an embodiment of the present application, a generation sequence number recorded in each of a plurality of verified configuration files is extracted, the plurality of verified configuration files are sorted according to the extracted generation sequence number of each configuration file, and a file to be updated is updated according to the sorted plurality of verified configuration files.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 5 shows a block diagram of a file updating apparatus provided in the embodiment of the present application, which corresponds to the file updating method in the foregoing embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 5, the apparatus 100 includes:
the verification module 101 is configured to verify the plurality of configuration files by using a preset verification policy to obtain a plurality of verified configuration files; wherein, the plurality of configuration files are the same file;
and the updating module 102 is configured to complete updating of the file to be updated based on the plurality of verified configuration files.
Optionally, the apparatus 100 further comprises a storage module.
And the storage module is used for respectively storing the plurality of verified configuration files into preset storage areas.
Optionally, the verification module 101 is further configured to verify the file identification information of each of the multiple configuration files by using a preset verification policy, and determine multiple configuration files that are verified correctly.
Optionally, the update module 102 includes a determination unit and an update unit.
A determining unit, configured to determine one of the plurality of verified configuration files as a first target configuration file.
And the updating unit is used for updating the file to be updated based on the first target configuration file.
Optionally, the apparatus 100 further comprises a status determination module.
And the state determining module is used for determining the state of updating the file to be updated.
Optionally, the determining unit is further configured to determine, if the status indicates that the update is abnormal, one of the plurality of verified configuration files other than the first target configuration file as a second target configuration file;
and the updating unit is also used for updating the file to be updated based on the second target configuration file.
Optionally, the update module 102 includes an obtaining unit.
An acquisition unit configured to acquire a reception time sequence of the plurality of verified configuration files;
and the updating unit is also used for finishing the updating of the files to be updated based on the plurality of verified configuration files according to the received time sequence.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic apparatus 6 of this embodiment includes: at least one processor 60 (only one processor is shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the steps in any of the various file update method embodiments described above being implemented when the computer program 62 is executed by the processor 60.
The electronic device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of the electronic device 6, and does not constitute a limitation of the electronic device 6, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The Processor 60 may be a Central Processing Unit (CPU), and the Processor 60 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the electronic device 6, such as a hard disk or a memory of the electronic device 6. The memory 61 may also be an external storage device of the electronic device 6 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device 6. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides an electronic device, including: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on an electronic device, enables the electronic device to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A file update method, the method comprising:
verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein a plurality of the configuration files are the same file;
and finishing updating the file to be updated based on the plurality of verified configuration files.
2. The file updating method according to claim 1, wherein the verifying the plurality of configuration files by using a preset verification policy further comprises, after obtaining a plurality of verified configuration files:
and respectively storing the plurality of verified configuration files into preset storage areas.
3. The file updating method according to claim 1, wherein the verifying the plurality of configuration files by using a preset verification policy to obtain a plurality of verified configuration files comprises:
and respectively verifying the file identification information of each configuration file in the plurality of configuration files by using a preset verification strategy, and determining the plurality of configuration files which are verified correctly.
4. The file updating method according to claim 1, wherein the completing the updating of the file to be updated based on the plurality of verified configuration files comprises:
determining one of the plurality of verified configuration files as a first target configuration file;
and finishing updating the file to be updated based on the first target configuration file.
5. The file updating method according to claim 1, wherein after the updating of the file to be updated is completed based on the plurality of verified configuration files, further comprising:
and confirming the updating state of the file to be updated.
6. The file updating method according to claim 5, wherein the updating of the file to be updated is completed based on the plurality of verified configuration files, further comprising:
if the state indicates that the updating is abnormal, determining one of a plurality of verified configuration files except the first target configuration file as a second target configuration file;
and finishing updating the file to be updated based on the second target configuration file.
7. The file updating method according to claim 1, wherein the completing the updating of the file to be updated based on the plurality of verified configuration files comprises:
acquiring a receiving time sequence of a plurality of verified configuration files;
and according to the receiving time sequence, finishing updating the file to be updated based on the plurality of verified configuration files.
8. A file update apparatus, comprising:
the verification module is used for verifying the plurality of configuration files by using a preset verification strategy to obtain a plurality of verified configuration files; wherein a plurality of the configuration files are the same file;
and the updating module is used for finishing updating the file to be updated based on the plurality of verified configuration files.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202010667932.7A 2020-07-13 2020-07-13 File updating method and device, electronic equipment and storage medium Pending CN111949289A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010667932.7A CN111949289A (en) 2020-07-13 2020-07-13 File updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010667932.7A CN111949289A (en) 2020-07-13 2020-07-13 File updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111949289A true CN111949289A (en) 2020-11-17

Family

ID=73341285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010667932.7A Pending CN111949289A (en) 2020-07-13 2020-07-13 File updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111949289A (en)

Similar Documents

Publication Publication Date Title
US20150113520A1 (en) Method for confirming correction program and information processing apparatus
CN111045933B (en) Regression strategy updating method and device, storage medium and terminal equipment
CN106484453B (en) Method and device for realizing system upgrading
CN107704258B (en) Uboot upgrading method, system and terminal equipment
CN112015489A (en) Management method, device, storage medium and system for vehicle-mounted software
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN114185571A (en) Firmware upgrading method and device of CPLD, terminal and readable storage medium
CN111176685A (en) Upgrading method and device
CN110908943A (en) Board card automatic adapting method, device, network equipment and storage medium
CN114050982A (en) Software upgrading method and device, electronic equipment and storage medium
CN109582334B (en) Upgrading method and device for programmable logic device
CN116820528A (en) Firmware version upgrading method and device, chip and electronic equipment
CN112306041A (en) Vehicle configuration information writing method and device and electronic equipment
CN111949289A (en) File updating method and device, electronic equipment and storage medium
CN115981687A (en) Firmware upgrading method, device, equipment and storage medium
CN112559349B (en) Program running method and running device
CN114281065A (en) Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN115220796A (en) Secure boot device
CN112860283B (en) SP upgrade package self-identification upgrade method and device and computer equipment
CN109472148B (en) Method, device and storage medium for loading hot patch
CN115102855A (en) Intelligent water meter embedded software online upgrading method and system
CN111221556B (en) Remote upgrade RSU mirror image method and system
US20180096152A1 (en) Systems and methods for software integrity assurance via validation using build-time integrity windows
WO2016127587A1 (en) Software version updating method and apparatus
CN117494232B (en) Method, device, system, storage medium and electronic equipment for executing firmware

Legal Events

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