Detailed Description
The technical solutions in the embodiments of the present application will be described below clearly with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When a component is referred to as being "connected" to another component, it can be directly connected to the other component or intervening components may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
The embodiment of the application provides a system operation method. Fig. 1 is a flowchart of a system operation method according to an embodiment of the present disclosure. The execution subject of the method may be a control system of a device, such as an unmanned aerial vehicle or a smart driving vehicle, which is equipped with sensors, and parameters of the sensors are different from one vehicle to another, for example, the unmanned aerial vehicle according to the present embodiment may include an unmanned ship or an unmanned aerial vehicle, and accordingly, the control system according to the present embodiment may be a navigation control system of the unmanned ship or a flight control system of the unmanned aerial vehicle, and the smart driving vehicle according to the present embodiment refers to a vehicle, such as an unmanned vehicle or an automobile equipped with an auxiliary driving system, which can execute automatic control or auxiliary control of the vehicle through the sensors mounted on the vehicle itself. As shown in fig. 1, the method in this embodiment may include:
step 101, obtaining and operating a first configuration file, wherein the first configuration file comprises difference information between the first configuration file and configuration files of previous versions.
The designation of "first profile" in this embodiment is only used to distinguish this profile from other profiles, and does not have other meanings. For ease of understanding, the first configuration file may be understood as an example of a configuration file of a latest version of firmware, and the configuration file may be obtained by a template programming method (e.g., protobuf), so that the configuration file may be compared with an old version of the configuration file obtained by the method before, replaced, and the like, and at the same time, the configuration file obtained by the method may lack fields and/or include undefined fields.
The "difference information" referred to in this embodiment may be recorded in an undefined field of the first configuration file, and for example, the difference information may include at least one of the following information: the configuration file of the later version is compared with the configuration file of the previous version to delete the field and the field value, add the field and the field data, change the field of the data, and the value before the field is changed and the value after the field is changed.
The process of acquiring and running the first configuration file in the embodiment may be exemplarily understood as a process of firmware upgrade.
For example, fig. 2 is a schematic diagram of an application scenario provided in the embodiment of the present application, where the scenario includes the smart driving vehicle 21 and the server 22. As shown in fig. 2, in an embodiment, data transmission may be performed between the intelligent driving vehicle 21 and the server 22 by using wireless communication, before the upgrade, the server 22 configures difference information between the first configuration file and the configuration files of previous versions, and records the difference information in an undefined field of the first configuration file, during the upgrade, the server 22 sends the first configuration file carrying the difference information to the intelligent driving vehicle 21, and the intelligent driving vehicle 21 overwrites the original configuration file by the received first configuration file.
The first configuration file is adopted to cover the original configuration file, so that the storage space of the control system which is taken as the execution main body in the embodiment can be saved, the space waste is avoided, and because the difference information in the first configuration file is configured by the server, the operation of configuring the difference information by the control system can be saved, the processing resource of the control system is saved, meanwhile, the control system is allowed to return to the old version according to the difference information, and the version returning efficiency is improved.
For example, fig. 3 is a schematic diagram of another application scenario provided in the embodiment of the present application, as shown in fig. 3, in another embodiment mode, the server 22 sends a configuration file of a latest version of firmware to the smart driving vehicle 21, where the configuration file does not include the difference information, and after receiving the configuration file of the latest version of firmware, the smart driving vehicle 21 may compare the latest configuration file with a configuration file of a current version to obtain difference information between the configuration file of the current operating version and the latest configuration file, and obtain difference information between the configuration file of the latest version and the configuration files of the previous versions according to the difference information between the configuration file of the current version and the configuration files of the previous versions included in the configuration file of the current version. The first configuration file is then generated by recording the difference information into an undefined field of the latest version of the configuration file.
The control system serving as the execution main body of the embodiment generates the difference information between the configuration file of the latest version and the configuration files of the previous version, so that the calculation amount of the server side can be reduced, the efficiency of the server side for distributing the new version configuration file is improved, meanwhile, the difference information between the previous configuration file and the latest configuration file can be accurately obtained, automatic rollback can be ensured according to the difference information in a version rollback scene, parameters of devices such as sensors are prevented from being manually configured, and the rollback operation efficiency is improved.
Of course, the above description is only given by using fig. 2 and fig. 3 as an example, and is not intended to limit the application scenario to which the present embodiment is applied and the manner of acquiring the first configuration file. In fact, in some embodiments, the smart driving vehicle 21 in fig. 2 and 3 may also be replaced by an unmanned aerial vehicle or other device equipped with sensor devices, and parameters of the sensor devices are different according to different bodies, and in fact, the server 22 in fig. 2 and 3 may also be replaced by other devices having data processing and transmitting capabilities, such as a ground station.
Step 102, receiving a version rollback instruction, wherein the version rollback instruction comprises version information to which a target is rolled back.
For example, the user may send a version rollback instruction to the execution subject control system of the present embodiment through a ground station, a mobile phone, or other devices, or, in other embodiments, the control system may receive a rollback instruction input by the user via the user interface by providing a user interface, such as, for example, fig. 4 a-4 b are schematic diagrams of a user interaction interface provided by an embodiment of the present application, as shown in fig. 4a, in some scenarios, the control system may display the version information for the current version Vn and the previous old versions V1 through Vn-1 on a user interactive interface, from which the user selects the version to which the target is to be backed by means such as clicking, pressing or voice command, and the control system obtains the information of the target backspacing version according to the operation instruction or the voice instruction input by the user. Or, as shown in fig. 4b, in other scenarios, the control system may set an input area 421 on the user interaction interface, where the input area 421 may include a first sub-area 4211 for inputting version information of the target fallback and a second sub-area 4212 for inputting a current version, where in some scenarios, the input area 421 may not include the second sub-area 4212, and the user may fill the version of the target fallback in the input area 421 by touching or voice inputting, and generate the fallback instruction by triggering the enter key 422 on the interaction interface manually or by voice.
The rollback instruction referred to in this embodiment includes version information of the target rollback, for example, in some embodiments, the rollback instruction may carry a version number of the target rollback, in other embodiments, the rollback instruction may use the current version number to point to the version number of the target rollback, and the current version number may be, for example, VB-VA, VB represents the current version number, and VA represents the version number of the target rollback.
Step 103, according to the version information, finding and obtaining difference information between the first configuration file and a second configuration file corresponding to the version from the first configuration file.
For example, fig. 5a is a schematic diagram of exemplary difference information provided in an embodiment of the present application, in fig. 5a, a later version VB differs from a previous version VA in that values of the field a and the field B are changed, and when it is determined that the version VA is a target fallback version, values aa and bb of the field a and the field B in the version VA are obtained. For another example, fig. 5b is a schematic diagram of another exemplary difference information provided in the embodiment of the present application, as shown in fig. 5b, a difference between a later version VB and a previous version VA is that a field C is added to the later version, and when it is determined that the version VA is a target fallback version, the configuration file for obtaining the version VA does not include information of the field C. For another example, fig. 5c is a schematic diagram of still another exemplary difference information provided in the embodiment of the present application, in fig. 5c, a difference between the later version VB and the previous version VA is that the field D is deleted in the later version, and then, when it is determined that the version VA is the target fallback version, the value jj of the field D is included in the configuration file of the version VA.
Although the case of individually changing the value, adding the field, and deleting the field is exemplarily illustrated only in fig. 5a, 5b, and 5c, it is not excluded that the two or more differences may exist between the configuration file of the later version and the configuration file of the previous version at the same time, and when the two or more differences are included between the configuration file of the later version and the configuration file of the previous version, the difference information may be obtained by referring to the corresponding difference cases in fig. 5a, 5b, and 5c, respectively, and will not be described herein again.
And 104, generating and operating the second configuration file corresponding to the version according to the difference information and the first configuration file so as to rollback from the version corresponding to the first configuration file to the version corresponding to the second configuration file.
For example, when the configuration file of the target fallback-to version is different from the first configuration file in that the first configuration file deletes the field D, according to the difference information, when the fallback-to target fallback-to version, the data of the field D deleted by the first configuration file is added to the first configuration file to form the second configuration file.
Or when the configuration file of the target rollback version is different from the first configuration file in that the field C is added to the first configuration file, deleting the field C from the first configuration file when the target rollback version is in the rollback state, and generating a second configuration file.
Or when the difference between the configuration file of the target fallback to version and the first configuration file is that the first configuration file modifies the value of the field B, acquiring the value of the field B in the target fallback to version according to the difference information, and changing the value of the field B in the first configuration file to the value to generate a second configuration file.
Further, the second configuration file generated in this embodiment may still carry difference information between the first configuration file and the configuration files of the previous versions, or, while the second configuration file is generated, according to a difference between the second configuration file and the first configuration file and a difference between the first configuration file and another previous configuration file, difference information between the second configuration file and the first configuration file and difference information between the second configuration file and the previous configuration file are generated and recorded in an undefined field of the second configuration file, so that the control system can upgrade to a version corresponding to the first configuration file again according to the difference information or further reduce to an older version.
By obtaining and operating the first configuration file containing the difference information between the configuration files of the previous versions, when a version rollback instruction is received, the difference information between the configuration file of the version and the first configuration file can be searched and obtained from the first configuration file according to the information of the version to which the target is rolled back, so that the second configuration file corresponding to the version is generated and operated according to the difference information and the first configuration file, the automatic rollback of the firmware version is further realized, the manual configuration of firmware parameters is not needed, the manual operation is saved, the efficiency is improved, particularly on equipment which carries sensor equipment and has different parameters, such as an unmanned aerial vehicle or an unmanned system, and the version rollback can be automatically executed on the basis of the difference information of the configuration files of different versions without additionally reconfiguring individualized parameters for the sensor on each equipment, batch version rollback operations are easy to perform.
Fig. 6 is a flowchart of a method for acquiring a first configuration file according to an embodiment of the present application, where as shown in fig. 6, the method includes the following steps:
step 601, receiving update data, where the update data includes a configuration file to be filled, and the configuration file to be filled includes data of a field updated by the current update with respect to a currently running third configuration file.
The third configuration file referred to in this embodiment is used to refer to the configuration file of the currently running version, and its name is only for descriptive convenience and convenience of distinction, and has no other meaning.
The configuration file to be filled in this embodiment is obtained by using a template programming method (for example, protobuf), so that the configuration file may implement operations such as comparison and replacement with an old version of the configuration file (for example, a third configuration file) obtained by using the method before, and at the same time, the configuration file obtained by using the method may lack fields and/or include undefined fields.
Taking the scenario shown in fig. 3 as an example, the configuration file of the latest version sent by the server 22 to the intelligent driving vehicle 21 in fig. 3 may be specifically referred to as a to-be-filled configuration file in this embodiment, where the configuration file includes data of fields updated with respect to the currently running third configuration file at this time, for example, fig. 7a is a schematic comparison diagram between a third configuration file provided in this embodiment of the present application and the to-be-filled configuration file, as shown in fig. 7a, if the value of the field B is changed with respect to the third configuration file by the configuration file of the latest version, and the field a and the field C are not changed, then the to-be-filled configuration file includes the updated value aa of the field B, and other fields are empty; for another example, fig. 7b is a schematic diagram illustrating a comparison between another third configuration file and a configuration file to be filled in provided in this embodiment, where when the content dd of the field D is added to the third configuration file in the latest version, the value of the field D is included in the configuration file to be filled in, and other fields are null. For another example, fig. 7C is a schematic diagram illustrating a comparison between a third profile and a to-be-filled profile provided in an embodiment of the present application, where when the content of the field C is deleted from the third profile in the latest version of the profile, the content of the field C is not included in the to-be-filled profile, where the symbol "…" in fig. 7a to 7C represents an omitted numerical value.
Of course, the above cases of fig. 7a to 7c are only illustrative and not exclusive, and actually, the configuration file to be filled in may be in the form of a combination of two or more cases of fig. 7a to 7 c.
Step 602, based on the data of the field making the update, configuring the data not making the update in the third configuration file in the corresponding field of the configuration file to be filled, and generating a first configuration file.
Step 603, recording the difference between the data corresponding to the updated field in the first configuration file and the third configuration file, and the data of the field existing in the third configuration file but not existing in the first configuration file into the first configuration file, and generating difference information between the first configuration file and the third configuration file.
For example, to implement the generation and operation of the first configuration file, an implementation of this embodiment may copy the third configuration file from the first storage area to the second storage area before receiving the update data, and store the configuration file to be filled in the first area after receiving the update data, and overwrite the third configuration file in the first area, where the second storage area is used to store the backup file.
In the process of generating the first configuration file, a third configuration file may be obtained by searching in the second storage area, and then the third configuration file is traversed by a traversal method, if a traversed field is included in the configuration file to be filled, and the value of the field in the configuration file to be filled is null, the value of the field in the third configuration file is configured to the configuration file to be filled, if the third configuration file includes some fields that are not included in the configuration file to be filled, information and values of the fields are filled into undefined fields of the configuration file to be filled to obtain first difference information, further, the configuration file to be filled is traversed, if the configuration file to be filled includes fields that are not included in the third configuration file and/or the value of a field of the configuration file to be filled is different from the value of the corresponding field in the third configuration file, and filling the information and the numerical values of the fields into undefined fields of the configuration file to be filled to obtain second difference information, and further obtaining the first configuration file.
After the first configuration file is obtained, the third configuration file in the second area can be deleted, so that the storage space is saved.
Or, in another implementation manner of this embodiment, the received configuration file to be filled may also be stored in the second area. And then obtaining a first configuration file by adopting a method similar to the first mode, covering a third configuration file in the first area by adopting the first configuration file after obtaining the first configuration file, and deleting the first configuration file in the second area.
By comparing the fields contained in the configuration file to be filled with the fields in the currently running third configuration file in the firmware version updating process, filling the empty fields in the configuration file to be filled with the contents of the corresponding fields in the third configuration file, filling the information of the fields of adding, deleting and changing numerical values of the configuration file to be filled with respect to the third configuration file in the undefined fields of the configuration file to be filled, generating difference information, so that when the control system performs version rollback operation, the control system can automatically obtain the configuration file of the old version according to the difference information without manually changing firmware parameters, thereby improving the efficiency, particularly in unmanned aerial vehicles or unmanned aerial vehicle systems, the parameters of sensors of each unmanned aerial vehicle or unmanned aerial vehicle system are different, under the condition, the method according to the embodiment can avoid the situation that the version is degraded, the complex operation of manual reconfiguration sensor parameter has improved efficiency, can carry out version to a large amount of unmanned aerial vehicle or unmanned driving system simultaneously and roll back or upgrade the operation.
Fig. 8 is a schematic structural diagram of a control system provided in an embodiment of the present application, where the control system may be configured to perform the method of any of the embodiments, as shown in fig. 8, where the control system 80 includes: an instruction receiving component 81, a memory 82 and one or more processors 83, the one or more processors 83 being operated separately or in cooperation, the instruction receiving component 81 being in communication connection with the one or more processors 83, the memory 82 having stored therein a computer program for, when executed by the processor: obtaining and operating a first configuration file, wherein the first configuration file comprises difference information between the first configuration file and configuration files of previous versions; the instruction receiving component is to: receiving a version rollback instruction, wherein the version rollback instruction comprises version information to which a target is rolled back; the processor is further configured to: according to the version information, searching and obtaining difference information between the first configuration file and a second configuration file corresponding to the version from the first configuration file; and generating and operating the second configuration file corresponding to the version according to the difference information and the first configuration file so as to rollback from the version corresponding to the first configuration file to the version corresponding to the second configuration file.
In one embodiment, the system further comprises: the transceiving component 84, when the processor 83 performs the operation of obtaining and running the first configuration file, includes the following operations:
receiving update data through the transceiving component, wherein the update data comprises a configuration file to be filled, and the configuration file to be filled comprises data of a field updated relative to a currently running third configuration file at this time; configuring data which is not updated in the third configuration file in the current updating to corresponding fields of the configuration file to be filled based on the data of the fields which are updated, and generating a first configuration file; recording the difference of the data corresponding to the updated fields on the first configuration file and the third configuration file and the data of the fields existing in the third configuration file but not existing in the first configuration file into the first configuration file, and generating difference information between the first configuration file and the third configuration file.
In one embodiment, the processor 83 is further configured to, before generating the first configuration file, perform the following operations: copying the third configuration file from a first storage area storing the third configuration file into a second storage area.
In one embodiment, the processor 83 is further configured to, after copying the third configuration file from the first storage area storing the third configuration file to the second storage area, perform the following operations: and covering the third configuration file in the first storage area by using the received configuration file to be filled.
In one embodiment, the processor 83, when performing the operation of generating the first configuration file, is configured to: searching the second storage area to obtain the third configuration file; and traversing each field of the third configuration file, and if the traversed field is included in the configuration file to be filled and the numerical value of the field on the configuration file to be filled is null, configuring the numerical value of the field on the third configuration file to the configuration file to be filled.
In one embodiment, the processor 83, after receiving the update data through the transceiving component, is further configured to: and storing the received configuration file to be filled in a second storage area.
In one embodiment, the processor, after generating the first configuration file, is further configured to:
and overwriting the third configuration file stored in the first storage area by using the generated first configuration file.
In one embodiment, the generated second configuration file includes difference information between the second configuration file and the first configuration file, and difference information between the second configuration file and previous versions of the second configuration file.
The control system provided by this embodiment can be used to execute the method of any of the above embodiments, and the execution mode and the beneficial effect are similar, and are not described herein again.
The embodiment of the application also provides a movable platform, and the movable bottle cap comprises the control system as shown in the embodiment of fig. 8.
Wherein the movement should include a smart driving vehicle or drone. The unmanned aerial vehicle or the intelligent driving vehicle is equipped with a sensor, and parameters of the sensor are different from those of the equipment of the unmanned aerial vehicle or the intelligent driving vehicle, for example, the unmanned aerial vehicle according to the present embodiment may include an unmanned ship or an unmanned aerial vehicle, accordingly, the control system according to the present embodiment may be a navigation control system of the unmanned ship or a flight control system of the unmanned aerial vehicle, and the intelligent driving vehicle according to the present embodiment refers to a vehicle which can perform automatic control or auxiliary control of the vehicle through the sensor mounted on the vehicle itself, such as an unmanned vehicle or an automobile equipped with an auxiliary driving system.
For example, the drone includes: an unmanned ship or an unmanned aerial vehicle.
The execution mode and the beneficial effects of the movable platform provided by the embodiment are similar to those of the control system, and are not described again here.
In addition, the present embodiment also provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method of any of the above embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. 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.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.