Configuration method, target object, server and medium
By obtaining and utilizing the identification information in the firmware packet in the cleaning robot, the problems of long parsing time and information leakage are solved, and a simplified configuration process and secure functional updates are achieved.
Patent Information
- Application Number
- CN202510804269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, cleaning robots need to parse full amount of JSON data when new functions are configured, resulting in a long parsing time and high risk of information leakage, and a cumbersome configuration process each time.
By obtaining the first identification information of the target object, the corresponding second identification information is found in the received firmware data packet, the configuration information is obtained and the result file is generated, which avoids direct parsing and manual configuration of the JSON file.
It realizes that when cleaning the new functions of the robot, only the firmware packets need to be updated, reducing the analysis time and the risk of information leakage, and simplifying the configuration process.
Smart Images

Figure CN120455271A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of target object technology, and in particular to a configuration method, a target object, a server, and a medium. Background Art
[0002] With the development of technology and the improvement of people's living standards, smart devices are increasingly being used in various places, such as homes, shopping malls, hospitals, and offices. For example, cleaning robots, a smart device, free people from tedious tasks, keeping homes and offices clean while allowing people to enjoy more free time, making them popular.
[0003] Due to the differences in the cleaning robots' execution functions, for example, if cleaning robot 1 has function A and cleaning robot 2 does not (for example, cleaning robot 1 does not have a lifting function, while cleaning robot 2 does), they are generally distinguished by identification numbers, which are stored in a JSON file. JSON (JavaScript Object Notation) is a lightweight data exchange format that uses a text format that is completely independent of the programming language to store and represent data. Its concise and clear hierarchical structure makes JSON an ideal data exchange language, easy for humans to read and write, as well as easy for machines to parse and generate, and effectively improves network transmission efficiency.
[0004] Every time a new configuration is added (for example, adding a cleaning robot function), the JSON file needs to be parsed. Since JSON contains full data, the parsing time increases. In addition, JSON data is transparent, which may cause information leakage. Finally, each new configuration needs to be reconfigured, which is cumbersome.
[0005] The above content is only used to assist in understanding the technical solution of the present disclosure and does not constitute an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of the present disclosure is to provide a configuration method, target object, server and medium, aiming to solve the above technical problems in the prior art.
[0007] To achieve the above objectives, the present disclosure provides a configuration method, which is applied to a target object. The configuration method includes:
[0008] Obtaining first identification information of a target object;
[0009] Searching for second identification information corresponding to the first identification information in the received firmware data packet, wherein the second identification information is set corresponding to configuration information, and the configuration information is used to indicate functions of the target object;
[0010] When the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information;
[0011] Generate a corresponding result file based on the acquired configuration information, where the result file is used to indicate the configuration information corresponding to the target object.
[0012] Preferably, in the configuration method, obtaining configuration information corresponding to the target object includes:
[0013] Acquire configuration information corresponding to the second identification information from the firmware data packet sent by the server, wherein the firmware data packet includes a correspondence between the second identification information and the configuration information;
[0014] or,
[0015] According to the binary executable program, configuration information corresponding to the second identification information is obtained, wherein the binary executable program is generated according to the firmware data packet sent by the server, and the binary executable program includes a correspondence between the second identification information and the configuration information.
[0016] Preferably, in the configuration method, after the step of searching for the second identification information corresponding to the first identification information in the received firmware data packet and before the step of generating a corresponding result file based on the acquired configuration information, the configuration method further includes:
[0017] When the corresponding second identification information is not found, the configuration information corresponding to the target object is obtained according to the preset third identification information.
[0018] Preferably, in the configuration method, the configuration method further includes:
[0019] In response to receiving a firmware update request sent by the server, determining whether a completion result file is generated to obtain a first determination result, wherein the firmware update request carries a firmware update data packet;
[0020] When the first judgment result is yes, according to the result file, an update file in the firmware update data package that matches the configuration information corresponding to the target object is selected for updating.
[0021] Preferably, in the configuration method, the configuration method further includes:
[0022] In response to receiving the firmware update request sent by the server, determining whether a completion result file is generated to obtain a first determination result;
[0023] When the first judgment result is yes, the second identification information matching the target object is sent to the server according to the result file, so that the server can filter out the corresponding update file from the firmware update data packet;
[0024] When receiving the update file sent by the server, the target object is updated.
[0025] In order to achieve the above objectives, the present disclosure further provides a configuration method, which is applied to a server. The configuration method includes:
[0026] Parsing the configuration master file, extracting the correspondence between the first identification information and the second identification information indicating the target object, and obtaining a first configuration sub-file, wherein the configuration master file is used to indicate the first identification information of all target objects, the second identification information corresponding to each first identification information, and the corresponding configuration information, wherein the configuration information is used to indicate the functions of the target object;
[0027] Generate a correspondence between the second identification information and the configuration information according to the configuration master file;
[0028] A firmware data package is generated according to the first configuration sub-file and the correspondence between the second identification information and the configuration information, wherein the firmware data package is used for updating the target object.
[0029] Preferably, in the configuration method, generating a correspondence between the second identification information and the configuration information according to the configuration master file includes:
[0030] Generate a binary executable program according to the configuration file, wherein the binary executable program includes a correspondence between the second identification information and the configuration information;
[0031] or,
[0032] The configuration master file is parsed to extract the correspondence between the second identification information and the configuration information to obtain a second configuration sub-file, wherein the second configuration sub-file and the first configuration sub-file are the same file or different files.
[0033] Preferably, in the configuration method, the configuration method further includes:
[0034] In response to the modification of the configuration data, generating an updated configuration master file according to the modified configuration data;
[0035] Update the correspondence between the second identification information and the configuration information according to the updated configuration master file;
[0036] An updated firmware data package is generated according to the updated corresponding relationship.
[0037] In order to achieve the above objectives, the present disclosure further provides a target object, which includes:
[0038] at least one processor; and,
[0039] a memory communicatively connected to at least one processor; wherein,
[0040] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above configuration method.
[0041] In order to achieve the above object, the present disclosure further provides a server, the server comprising:
[0042] at least one processor; and,
[0043] a memory communicatively connected to at least one processor; wherein,
[0044] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above configuration method.
[0045] In order to achieve the above objectives, the present disclosure further provides a computer-readable storage medium storing a computer program, which implements the above configuration method when executed by a processor.
[0046] The present disclosure has at least the following beneficial effects:
[0047] For the target object, the present disclosure obtains the first identification information of the target object; searches for the second identification information corresponding to the first identification information in the received firmware data packet, wherein the second identification information is set corresponding to the configuration information, and the configuration information is used to indicate the functions of the target object; when the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information; and generates a corresponding result file according to the obtained configuration information, wherein the result file is used to indicate the configuration information corresponding to the target object, so that when the same target object has new configuration information, it only needs to be updated in the firmware data packet without the need for reconfiguration.
[0048] Furthermore, when the same target object has new configuration information, the firmware data packet will be updated, and the target object will first obtain the first identification information of the target object when executing; in the received firmware data packet, the second identification information corresponding to the first identification information is searched; when the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information; based on the obtained configuration information, a corresponding result file is generated, so that the result file indicates that there is new configuration information, and no reconfiguration is required.
[0049] Furthermore, when the same target object has new configuration information, the target object can obtain its corresponding configuration information in real time during runtime without manually updating the configuration information in the result file.
[0050] Furthermore, in related art, if the same target object has new configuration information or first identification information, it is necessary to manually add or modify it in the result file. As the configuration information increases, this addition process becomes very cumbersome. However, in the present disclosure, when the same target object has new first identification information, it is only necessary to update the correspondence between the first identification information and the second identification information in the firmware data packet, without manually updating the first identification information in the result file.
[0051] For the server, the present disclosure parses the configuration master file, extracts the correspondence between the first identification information and the second identification information used to indicate the target object, and obtains the first configuration sub-file, wherein the configuration master file is used to indicate the first identification information of all target objects, the second identification information corresponding to each first identification information, and the corresponding configuration information, and the configuration information is used to indicate the functions possessed by the target object. According to the configuration master file, the correspondence between the second identification information and the configuration information is generated. According to the first configuration sub-file, and the correspondence between the second identification information and the configuration information, a firmware data packet is generated, wherein the firmware data packet is used to update the target object. In this way, when the target object has new configuration information, it is directly updated in the configuration master file, and the corresponding new firmware data packet is generated through parsing, so that the target object can directly obtain the newly added configuration information from the firmware data packet during execution without the need for reconfiguration. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of a first embodiment of the configuration method provided by the present disclosure;
[0053] Figure 2 A schematic diagram of a second embodiment of the configuration method provided by the present disclosure;
[0054] Figure 3 A schematic diagram of a third embodiment of the configuration method provided by the present disclosure;
[0055] Figure 4 A schematic diagram of a fourth embodiment of the configuration method provided by the present disclosure;
[0056] Figure 5 A schematic diagram of a fifth embodiment of the configuration method provided by the present disclosure;
[0057] Figure 6 A schematic diagram of a sixth embodiment of the configuration method provided by the present disclosure;
[0058] Figure 7 A schematic diagram of a seventh embodiment of the configuration method provided by the present disclosure;
[0059] Figure 8A schematic diagram of a target object or server provided by the present disclosure.
[0060] The purpose, features and advantages of the present disclosure will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0061] The technical solutions of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present disclosure, not all embodiments. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other unless there is a conflict.
[0062] In the embodiments of the present disclosure, the term "and / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0063] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0064] In the embodiments of the present disclosure, the term "plurality" refers to two or more than two, and other quantifiers are similar thereto.
[0065] In the present disclosure, unless otherwise specified, directional words such as "up, down, top, bottom" are usually used with reference to the directions shown in the drawings, or with reference to the components themselves in the vertical, perpendicular or gravity direction; similarly, for ease of understanding and description, "inside and outside" refer to the inside and outside relative to the outline of each component itself, but the above directional words are not used to limit the present disclosure.
[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in the various embodiments of the present disclosure, many technical details are provided to enable readers to better understand the present disclosure. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present disclosure can be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present disclosure. The various embodiments can be combined with each other and referenced to each other under the premise that there is no contradiction.
[0067] In order to solve the above problems, the present embodiment relates to a configuration method, which is applied to a target object. In other embodiments, it can also be applied to other smart devices. Taking a cleaning robot as an example, the target object can be but is not limited to a sweeper; in other embodiments, it can also be other cleaning robots, and no specific restrictions are made here.
[0068] The following describes the implementation details of the configuration method of the first embodiment of the present disclosure. The following content is only provided for ease of understanding and is not necessary for implementing this solution. Figure 1 A schematic diagram of the configuration method provided by the present disclosure is shown.
[0069] The specific process of this embodiment is as follows Figure 1 As shown, it specifically includes steps S1100 to S1400.
[0070] Step S1100: Acquire first identification information of the target object.
[0071] It should be noted that the first identification information refers to an identifier that can be used to identify the target object. Each target object corresponds to a piece of first identification information. The first identification information can be pre-burned into the target object. The target object can obtain the first identification information by, but is not limited to, directly reading it.
[0072] The target object may be, but is not limited to, a smart device. In some embodiments, the target object may be a cleaning robot, such as a sweeper. Of course, in other embodiments, the target object may also be other smart devices.
[0073] Step S1200: searching for second identification information corresponding to the first identification information in the received firmware data packet, wherein the second identification information is set corresponding to configuration information, and the configuration information is used to indicate the functions of the target object.
[0074] It should be noted that the firmware data packet can be sent by the server to the target object or pre-stored in the target object, without any specific limitation herein. When the target object needs to be updated, the firmware data packet is typically sent by the server to the target object, so that the target object can update according to the received firmware data packet.
[0075] The second identification information is set corresponding to the first identification information, and the second identification information corresponds to the configuration information. In some embodiments, one second identification information may correspond to multiple first identification information, that is, multiple different first identification information may correspond to the same second identification information.
[0076] Taking a robot vacuum as an example, different robots have different corresponding first identification information. For example, the first identification information corresponding to robot vacuum A is 0000010, and the first identification information corresponding to robot vacuum B is 0000011. The first identification information 0000010 of robot vacuum A and the first identification information 0000011 of robot vacuum B may correspond to the same second identification information, such as 1000010. The first identification information 0000010 of robot vacuum A and the first identification information 0000011 of robot vacuum B may correspond to different second identification information, such as 1000010 and 1100010, respectively. The configuration information corresponding to the second identification information 1000010 of robot vacuum A is that it has a lifting function, while the configuration information corresponding to the second identification information 1100010 of robot vacuum B is that it has a voice interaction function. Then when the first identification information of sweeping machine A and sweeping machine B corresponds to the same second identification information, sweeping machine A and sweeping machine B have the same configuration information; when the first identification information of sweeping machine A and sweeping machine B corresponds to different second identification information, sweeping machine A and sweeping machine B have different configuration information.
[0077] Among them, in some embodiments, the second identification information may correspond to the model of the sweeper, and the configuration information may include but is not limited to including a lifting function (such as roller brush lifting or side brush lifting), a lifting function (such as chassis lifting), no WIFI function, AI function, and voice interaction function, etc.; of course, in some other embodiments, the configuration information may also have other functions, which are not listed here one by one.
[0078] Step S1300: When the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information;
[0079] It should be understood that, since the second identification information is set corresponding to the configuration information, the configuration information corresponding to the target object is obtained according to the second identification information, for example, the target object has a lifting function and an AI function.
[0080] It should be noted that, in some implementations, the configuration information may be configuration information corresponding to the second identification information obtained in a firmware data packet sent by the server, wherein the firmware data packet includes a correspondence between the second identification information and the configuration information.
[0081] In some other embodiments, the configuration information may also be obtained from a binary executable program, corresponding to the second identification information. The binary executable program may be generated based on a firmware data package sent by a server, generated by the target object and generated based on the firmware data package each time it is used, or generated by the server and stored in the firmware data package. The binary executable program includes the correspondence between the second identification information and the configuration information.
[0082] In addition, it is worth noting that the first identification information and the second identification information usually correspond to each other, that is, there is a second identification information corresponding to the first identification information. Of course, in some embodiments, it is also possible that there is no second identification information corresponding to the first identification information. In this case, the second identification information corresponding to the first identification information is a null value. In this case, the preset third identification information can be used as the second identification information corresponding to the first identification information. That is, if the second identification information corresponding to the first identification information exists, the second identification information is used to obtain the corresponding configuration information; if the second identification information corresponding to the first identification information does not exist, the third identification information is used to obtain the corresponding configuration information.
[0083] In a specific implementation, after step S1300 and before step S1400, the process further includes obtaining configuration information corresponding to the target object according to preset third identification information when the corresponding second identification information is not found.
[0084] Step S1400: Generate a corresponding result file based on the acquired configuration information, wherein the result file is used to indicate the configuration information corresponding to the target object.
[0085] It should be understood that based on the configuration information obtained, a result file will be generated. On the one hand, the result file serves as the result of this step. On the other hand, the result file can be used in various modules, such as the middle platform, algorithms, and so on. Taking the target object as a sweeper as an example, through the result file, it can be determined whether the sweeper and the base station are communicating with wifi. In other words, the result file is used to indicate the configuration corresponding to the target object and whether the result of the configuration corresponding to the target object is generated (it can also be understood as whether the result of the result file is generated).
[0086] In some embodiments, the result file can be used to subsequently determine whether the configuration corresponding to the target object has been generated, avoiding repeated reading. In other embodiments, the result file can also be used to call the file when other algorithms read the configuration corresponding to the target object. The result file can also be used in other situations where the configuration corresponding to the target object needs to be read, which are not listed here one by one.
[0087] The present disclosure obtains first identification information of a target object; searches for second identification information corresponding to the first identification information in a received firmware data packet, wherein the second identification information is set corresponding to configuration information, and the configuration information is used to indicate the functions possessed by the target object; when the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information; and generates a corresponding result file according to the obtained configuration information, wherein the result file is used to indicate the configuration information corresponding to the target object, so that when the same target object has new configuration information, it only needs to be updated in the firmware data packet without the need for reconfiguration.
[0088] Furthermore, when the same target object has new configuration information, the firmware data packet will be updated, and the target object will first obtain the first identification information of the target object when executing; in the received firmware data packet, the second identification information corresponding to the first identification information is searched; when the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information; based on the obtained configuration information, a corresponding result file is generated, so that the result file indicates that there is new configuration information, and no reconfiguration is required.
[0089] Furthermore, when the same target object has new configuration information, the target object can obtain its corresponding configuration information in real time during runtime without manually updating the configuration information in the result file.
[0090] like Figure 2 As shown, Figure 2 The second embodiment of the configuration method of the present disclosure is illustrated. Based on the first embodiment, the configuration method further includes step S1510 and step S1520.
[0091] Step S1510 , in response to receiving a firmware update request sent by a server, determining whether a completion result file is generated, and obtaining a first determination result, wherein the firmware update request carries a firmware update data packet.
[0092] It should be understood that upon receiving a firmware update request from the server, a check is first performed to determine whether a result file has been generated. This avoids the need for repeated generation of the result file and provides an additional layer of security for the update. If a result file exists, the configuration information corresponding to the target object can be directly read based on the result file.
[0093] Step S1520: When the first judgment result is yes, select the update file in the firmware update data package that matches the configuration information corresponding to the target object according to the result file for updating.
[0094] It should be noted that there are usually multiple target objects, and multiple target objects usually share a firmware update package, that is, the firmware update package may contain multiple update files. Therefore, it is necessary to match the update file adapted to the target object in the firmware update package according to the configuration information corresponding to the target object to perform the update.
[0095] For example, there are two target objects (target object A and target object B), and the firmware update package includes update file 1 with a lifting function and update file 2 with a liftable function. Target object A has a lifting function, and target object B has a liftable function. Therefore, when updating, update file 1 needs to be matched with the lifting function corresponding to target object A, and update file 2 needs to be matched with the liftable function corresponding to target object B.
[0096] like Figure 3 As shown, Figure 3 The third embodiment of the configuration method of the present disclosure is illustrated. Based on the first embodiment, the configuration method further includes steps S1610 to S1630.
[0097] Step S1610 , in response to receiving the firmware update request sent by the server, determining whether a completion result file is generated, and obtaining a first determination result.
[0098] It should be understood that when a firmware update request is received from the server, a check is first performed to determine whether a result file has been generated. This avoids the need to repeatedly generate a result file and provides an additional layer of security for the update. If a result file exists, the corresponding configuration information can be directly read based on the result file.
[0099] Step S1620: When the first judgment result is yes, the second identification information matching the target object is sent to the server according to the result file, so that the server can filter out the corresponding update file from the firmware update data packet;
[0100] It should be understood that there are typically multiple target objects, and these multiple target objects typically share a single firmware update package. This means that the firmware update package may contain multiple update files. Therefore, the server must match the update files compatible with the target object within the firmware update package based on the second identification information corresponding to the target object, thereby filtering out the corresponding update files. Since the second identification information corresponds to the configuration information, matching the update files compatible with the target object based on the second identification information can also be understood as matching the update files compatible with the target object based on the configuration information corresponding to the target object.
[0101] For example, there are two target objects (target object A and target object B), and the firmware update package includes an update file 1 with a lifting function and an update file 2 with a liftable function. Target object A has second identification information 1, and the second identification information 1 corresponds to the configuration information with a lifting function. Target object B has second identification information 2, and the second identification information 2 corresponds to the configuration information with a liftable function. Then, when updating, it is necessary to match update file 1 based on the lifting function (or second identification information 1) corresponding to target object A, and match update file 2 based on the liftable function (or second identification information 2) corresponding to target object B.
[0102] Step S1630: When the update file sent by the server is received, the target object is updated.
[0103] Figure 7 An embodiment of the configuration method provided by the present disclosure is shown. Figure 7 After the target device is powered on, step S22 is executed to obtain the first identification information, search for the correspondence between the first identification information and the second identification information, and determine whether the corresponding second identification information is matched. If the corresponding second identification information is matched, the configuration information corresponding to the second identification information is directly obtained. If the corresponding second identification information is not matched, the default second identification information (i.e., the preset third identification information) is used to obtain the configuration information corresponding to the third identification information. Finally, a result file is generated.
[0104] When a firmware update or upgrade is required, steps S31 to S34 are executed. The result file is read, the current second identification information is determined from the result file, and the corresponding configuration information is obtained based on the second identification information. An update file is obtained based on the configuration information. The specific method for obtaining the update file can be referred to in step S1520. The update file in the firmware update data packet that matches the configuration information corresponding to the target object is selected and updated.
[0105] In order to solve the above problems, this embodiment relates to a configuration method, which is applied to a server, such as a desktop computer, tablet computer, notebook computer, mobile terminal, and other electronic devices with data processing capabilities; it can also be other electronic devices with data processing capabilities, and no specific restrictions are made here.
[0106] The following describes the implementation details of the configuration method of the fourth embodiment of the present disclosure. The following content is only provided for ease of understanding and is not necessary for implementing this solution. Figure 4 A schematic diagram of the configuration method provided by the present disclosure is shown.
[0107] The specific process of this embodiment is as follows Figure 4 As shown, it specifically includes steps S2100 to S2300.
[0108] Step S2100, parse the configuration master file, extract the correspondence between the first identification information and the second identification information used to indicate the target object, and obtain the first configuration sub-file, wherein the configuration master file is used to indicate the first identification information of all target objects, the second identification information corresponding to each first identification information, and the corresponding configuration information are used to indicate the functions of the target object.
[0109] It should be noted that the total configuration file can be, but is not limited to, integrated into a JSON file to facilitate searching.
[0110] Taking a robot vacuum as an example, the configuration file includes different robot vacuum models (second identification information), the first identification information corresponding to each second identification information, and the configuration information corresponding to each second identification information. For example, if the first identification information corresponding to robot vacuum A in the configuration file is 0000010 and the second identification information is 1000010, then the configuration information corresponding to the second identification information indicates that it has voice interaction functionality.
[0111] Since the first identification information, second identification information and second identification information of all target objects are integrated in the configuration master file, the problem can be simplified by separating the correspondence between the first identification information and the second identification information used to indicate the target object to obtain the first configuration sub-file.
[0112] Step S2200: Generate a correspondence between the second identification information and the configuration information according to the configuration master file.
[0113] It should be understood that separating the correspondence between each second identification information and the configuration information separately can facilitate searching.
[0114] For example, second identification information 1 corresponds to configuration information 1, and second identification information 2 corresponds to configuration information 2. Then, when searching, configuration information 1 corresponding to target object 1 can be directly obtained based on second identification information 1; configuration information 2 corresponding to target object 2 can be obtained based on second identification information 2.
[0115] In some implementations, a binary executable program may be generated based on the master configuration file, wherein the binary executable program includes a correspondence between the second identification information and the configuration information. In other implementations, the master configuration file may be parsed to extract the correspondence between the second identification information and the configuration information to obtain a second configuration sub-file, wherein the second configuration sub-file and the first configuration sub-file may be the same file or different files.
[0116] Step S2300: Generate a firmware data package according to the first configuration sub-file and the correspondence between the second identification information and the configuration information, wherein the firmware data package is used for updating the target object.
[0117] It should be noted that each time the server receives a modification to the master configuration file, the user typically makes the modification on an interface (e.g., the CI interface). Each time the server receives a modification to the master configuration file, the server generates a new firmware data package. In other embodiments, the user can also compile directly on the server. Since the target object generates a result file each time it is executed, there is no need to manually modify the relevant files on the target object based on the modification.
[0118] After the server-side remote configuration is completed, a firmware data package is generated and remotely upgraded to the target object. When the target object is executed, the corresponding configuration information can be obtained in real time without manually modifying the relevant files on the target object one by one.
[0119] For the server, the present disclosure parses the configuration master file, extracts the correspondence between the first identification information and the second identification information used to indicate the target object, and obtains the first configuration sub-file, wherein the configuration master file is used to indicate the first identification information of all target objects, the second identification information corresponding to each first identification information, and the corresponding configuration information, and the configuration information is used to indicate the functions possessed by the target object; based on the configuration master file, a correspondence between the second identification information and the configuration information is generated; based on the first configuration sub-file and the correspondence between the second identification information and the configuration information, a firmware data packet is generated, wherein the firmware data packet is used to update the target object, so that when the target object has new configuration information, it is directly updated in the configuration master file, and the corresponding new firmware data packet is generated through parsing, so that the target object can directly obtain the newly added configuration information from the firmware data packet during execution without the need for reconfiguration.
[0120] like Figure 5 As shown, Figure 5 The fifth embodiment of the configuration method of the present disclosure is illustrated. Based on the fourth embodiment, the configuration method further includes steps S2410 to S2430.
[0121] Step S2410: In response to the modification of the configuration data, an updated configuration file is generated according to the modified configuration data.
[0122] It should be noted that the modification of the configuration data may be to add configuration data or to reduce configuration data, and there is no specific limitation here. For example, the lifting function may be added or reduced in the corresponding functions of the sweeper model.
[0123] In addition, the configuration data may be modified, but is not limited to, on an interface (eg, a CI interface).
[0124] Step S2420: Update the correspondence between the second identification information and the configuration information according to the updated configuration file.
[0125] It should be understood that each time the configuration data is modified, the correspondence between the second identification information and the configuration information needs to be synchronously updated to complete the update.
[0126] Step S2430: Generate an updated firmware data package according to the updated correspondence.
[0127] Furthermore, Figure 6 The diagram shows an embodiment of the configuration method provided by the present disclosure. Figure 6 , Figure 6 In step S11, the configuration information is modified or configured in response to the interface. Usually, the user configures or modifies the configuration information on the interface. For example, the configuration information corresponding to a certain sweeper is added or modified to have a lifting function.
[0128] At step S12, a configuration summary file is generated. The configuration summary file can be stored in, but is not limited to, a JSON file.
[0129] In step S13, the configuration file is parsed to generate a first configuration sub-file. In some embodiments, the first configuration sub-file can be generated by parsing the configuration file using the jq command. The jq command is a lightweight command-line JSON processing tool that is powerful and flexible and can be used to parse, filter, convert, and format JSON data. The configuration file is parsed to extract the correspondence between the first identification information and the second identification information used to indicate the target object, thereby obtaining the first configuration sub-file. In some embodiments, the first configuration sub-file can be stored in an ini file; in other embodiments, the first configuration sub-file can also be stored in other types of files.
[0130] In step S14, the configuration information required by different target objects is confirmed.
[0131] Adding the configuration information to the library at step S15 can be understood as constantly improving the library to update the configuration information required by the target object in real time. The library corresponds to a collection of configuration information.
[0132] At step S16, a binary executable program is generated. Usually, a binary executable program is formed so as to facilitate searching.
[0133] In step S17 and step S18, the generated binary executable program and the first configuration sub-file are compiled and packaged to form a firmware data package.
[0134] In order to achieve the above objectives, the present disclosure also provides a target object or server, such as Figure 8 As shown, the endoscope system includes at least one processor 301; and a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute the above-mentioned configuration method.
[0135] The memory 302 and processor 301 are connected using a bus. The bus can include any number of interconnected buses and bridges, connecting various circuits of one or more processors 301 and memory 302. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor 301 is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor 301.
[0136] The processor 301 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 302 can be used to store data used by the processor 301 when performing operations.
[0137] In order to achieve the above objectives, the present disclosure provides a computer-readable storage medium storing a computer program, which implements the above configuration method when executed by the processor 301.
[0138] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing related hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or processor 3014 (processor) to execute all or part of the steps in the various embodiments of the present disclosure. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0139] In the description of this specification, reference to the terms "this embodiment" or "other embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.
[0140] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features of the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] Obviously, the embodiments described above are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present disclosure, ordinary technicians in this field can make other different forms of changes or modifications without making any creative work, which should fall within the scope of protection of the present disclosure.
Claims
1. A configuration method, applied to a target object, characterized in that: include: Acquire first identification information of the target object; Searching for second identification information corresponding to the first identification information in the received firmware data packet, wherein the second identification information is set corresponding to configuration information, and the configuration information is used to indicate functions of the target object; When the corresponding second identification information is found, the configuration information corresponding to the target object is obtained according to the second identification information; A corresponding result file is generated according to the acquired configuration information, wherein the result file is used to indicate the configuration information corresponding to the target object.
2. The configuration method according to claim 1, wherein: The acquiring of the configuration information corresponding to the target object includes: Acquire configuration information corresponding to the second identification information from a firmware data packet sent by the server, wherein the firmware data packet includes a correspondence between the second identification information and the configuration information; or, According to the binary executable program, configuration information corresponding to the second identification information is obtained, wherein the binary executable program is generated according to the firmware data packet sent by the server, and the binary executable program includes a correspondence between the second identification information and the configuration information.
3. The configuration method according to claim 1, wherein: After the step of searching for second identification information corresponding to the first identification information in the received firmware data packet and before the step of generating a corresponding result file based on the acquired configuration information, the configuration method further includes: When the corresponding second identification information is not found, the configuration information corresponding to the target object is obtained according to the preset third identification information.
4. The configuration method according to claim 1, wherein: The configuration method further includes: In response to receiving a firmware update request sent by the server, determining whether the result file is generated, and obtaining a first determination result, wherein the firmware update request carries a firmware update data packet; When the first judgment result is yes, according to the result file, an update file in the firmware update data packet that matches the configuration information corresponding to the target object is selected for updating.
5. The configuration method according to claim 1, wherein: The configuration method further includes: In response to receiving the firmware update request sent by the server, determining whether the result file is generated and obtaining a first determination result; When the first judgment result is yes, sending the second identification information matching the target object to the server according to the result file, so that the server can filter out the corresponding update file from the firmware update data packet; When the update file sent by the server is received, the target object is updated.
6. A configuration method, applied to a server, characterized in that: include: Parsing the configuration master file, extracting a correspondence between the first identification information and the second identification information indicating the target object, and obtaining a first configuration sub-file, wherein the configuration master file indicates the first identification information of all target objects, the second identification information corresponding to each first identification information, and the corresponding configuration information, wherein the configuration information indicates the functions of the target object; Generating a correspondence between the second identification information and the configuration information according to the configuration master file; A firmware data package is generated according to the first configuration sub-file and the correspondence between the second identification information and the configuration information, wherein the firmware data package is used for updating the target object.
7. The configuration method according to claim 6, wherein: Generating a correspondence between the second identification information and the configuration information according to the configuration master file includes: Generate a binary executable program according to the configuration file, wherein the binary executable program includes a correspondence between the second identification information and the configuration information; or, The configuration master file is parsed to extract the correspondence between the second identification information and the configuration information to obtain a second configuration sub-file, wherein the second configuration sub-file and the first configuration sub-file are the same file or different files.
8. The configuration method according to claim 6, wherein: The configuration method further includes: In response to the modification of the configuration data, generating an updated configuration master file according to the modified configuration data; Update the correspondence between the second identification information and the configuration information according to the updated configuration file; An updated firmware data package is generated according to the updated corresponding relationship.
9. A target object, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the configuration method according to any one of claims 1 to 5.
10. A server, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the configuration method according to any one of claims 6 to 8.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the configuration method according to any one of claims 1 to 8 is implemented.