Release method and device of version file, storage medium and electronic device

By generating configuration copy files in the Internet of Things (IoT) and performing canary releases, the problem of configuration files not being able to be quickly and stably released and rolled back is solved, achieving high efficiency and stability in the process of hardware device updates and iterations.

CN115599430BActive Publication Date: 2026-06-26HANGZHOU HUACHENG SOFTWARE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HUACHENG SOFTWARE TECH CO LTD
Filing Date
2022-09-07
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, configuration files for hardware devices cannot be quickly and stably released and rolled back during the update and iteration process in the Internet of Things, which is prone to errors and time-consuming.

Method used

By generating a copy of the configuration file, modifying it, and then conducting a canary release, the system ensures that the release is successful before confirming it as the official version. In case of an error, it can roll back to the previous version, thus achieving rapid and stable release and rollback of the configuration file.

Benefits of technology

It achieves high efficiency and stability in the hardware device update and iteration process in the Internet of Things, ensures the rapid and stable release and rollback of configuration files, and avoids the propagation of errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599430B_ABST
    Figure CN115599430B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a version file publishing method and device, a storage medium and an electronic device, wherein the version file publishing method comprises: obtaining a configuration file of an n+1th gray-scale version; performing gray-scale publishing of the configuration file of the n+1th gray-scale version on a target platform; in the case that the gray-scale publishing of the configuration file of the n+1th gray-scale version is successful, determining the configuration file of the n+1th gray-scale version as a configuration file of an n+1th version, and publishing the configuration file of the n+1th version on the target platform. Through the present application, the problem that the configuration file cannot be quickly and stably published and rolled back in the updating and iteration process of the hardware device in the Internet of Things is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of the Internet of Things, and more specifically, to a method, apparatus, storage medium, and electronic device for publishing version files. Background Technology

[0002] The Internet of Things (IoT) is a crucial component of the next generation of information technology and a significant stage in the development of the information age. The IoT is essentially an internet connecting all things, encompassing two meanings: first, the core and foundation of the IoT remains the internet, serving as an extension and expansion of it; second, it extends to enable information exchange and communication between any two objects. Through intelligent sensing and identification technologies, the IoT is widely applied in network convergence, thus being hailed as the third wave of development in the global information industry, following computers and the internet.

[0003] In a complete IoT system, which includes smart hardware, cloud, and clients, configuration of the smart hardware is achieved by executing programs based on the configuration data in the smart hardware's configuration file. Currently, each hardware device model has only one configuration file. Upgrading the configuration file involves directly modifying it and making the changes effective. If an error occurs, the configuration data can only be restored by reverting to the original configuration file version. Therefore, when there are many modifications, the modification process is time-consuming and error-prone, and restoring the configuration data is also prone to errors, making stable rollback impossible. Thus, existing technologies suffer from the problem of slow and stable deployment and rollback of configuration files during hardware device updates and iterations in the IoT.

[0004] There is currently no effective solution to the problem that configuration files cannot be quickly and stably released and rolled back during the update and iteration process of hardware devices in the Internet of Things. Summary of the Invention

[0005] This invention provides a method, apparatus, storage medium, and electronic device for publishing version files, to at least solve the problem in related technologies where configuration files cannot be published and rolled back quickly and stably during the update and iteration process of hardware devices in the Internet of Things.

[0006] According to an embodiment of the present invention, a method for publishing a version file is provided, comprising: obtaining a configuration file of the (n+1)th grayscale version, wherein the configuration file of the (n+1)th grayscale version is a file obtained by modifying a configuration copy file of the nth version, wherein the configuration copy file of the nth version is a file obtained by copying the configuration file of the nth version when a published configuration file of the nth version exists on the target platform, the configuration file being used to configure a hardware device of a target model, wherein n is greater than or equal to 1; performing grayscale publishing of the configuration file of the (n+1)th grayscale version on the target platform; and, if the grayscale publishing of the configuration file of the (n+1)th grayscale version is successful, determining the configuration file of the (n+1)th grayscale version as the configuration file of the (n+1)th version, and publishing the configuration file of the (n+1)th version on the target platform.

[0007] In an exemplary embodiment, before obtaining the configuration file of the (n+1)th grayscale version, the method further includes: if a published configuration file exists on the target platform, determining the most recently published configuration file on the target platform as the configuration file of the nth version; copying the configuration file of the nth version to obtain a configuration copy file of the nth version; modifying the configuration copy file of the nth version to obtain the configuration file of the (n+1)th grayscale version.

[0008] In one exemplary embodiment, the method further includes: creating a first grayscale version of the configuration file if no published configuration file exists on the target platform; performing grayscale release of the first grayscale version of the configuration file on the target platform; and, if the grayscale release of the first grayscale version of the configuration file is successful, determining the first grayscale version of the configuration file as the first version of the configuration file and publishing the first version of the configuration file on the target platform.

[0009] In one exemplary embodiment, publishing the (n+1)th version of the configuration file on the target platform includes: establishing a first association between the (n+1)th version of the configuration file and the target model; and publishing the (n+1)th version of the configuration file and the target model together on the target platform.

[0010] In an exemplary embodiment, if an anomaly occurs after the (n+1)th version of the configuration file is published on the target platform, in response to a rollback operation, the first association relationship is modified to a second association relationship, wherein the second association relationship is the association relationship between the nth version of the configuration file and the target model.

[0011] In an exemplary embodiment, after the (n+1)th grayscale version of the configuration file is grayscale released on the target platform, the method further includes: obtaining an access request for the target hardware device, wherein the target hardware device is the hardware device of the target model, and the access request is used to request configuration of the target hardware device; and configuring the target hardware device using the (n+1)th version of the configuration file when the latest version of the configuration file of the target model hardware device is the configuration file of the (n+1)th version.

[0012] In one exemplary embodiment, the method further includes: configuring the target hardware device using the (n+1)th grayscale version configuration file when the latest version configuration file of the target model hardware device is not the (n+1)th version configuration file.

[0013] According to another embodiment of the present invention, a version file publishing apparatus is also provided, comprising: an acquisition module, configured to acquire a configuration file of a (n+1)th grayscale version, wherein the configuration file of the (n+1)th grayscale version is a file obtained by modifying a configuration copy file of the nth version, the configuration copy file of the nth version being a file obtained by copying the configuration file of the nth version when a published configuration file of the nth version exists on the target platform, the configuration file being used to configure a hardware device of a target model, and n being greater than or equal to 1; a grayscale publishing module, configured to perform grayscale publishing of the configuration file of the (n+1)th grayscale version on the target platform; and a publishing module, configured to, upon successful grayscale publishing of the configuration file of the (n+1)th grayscale version, determine the configuration file of the (n+1)th grayscale version as the configuration file of the (n+1)th version, and publish the configuration file of the (n+1)th version on the target platform.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0015] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0016] This invention generates a configuration copy file based on the latest configuration file corresponding to the target model hardware device on the target platform, modifies the configuration copy file to obtain a new configuration file, and publishes the new configuration file to the target platform after a successful gray-scale release, thus completing the configuration file upgrade process. Therefore, it solves the problem in related technologies where configuration files cannot be quickly and stably published and rolled back during the update and iteration process of hardware devices in the Internet of Things, achieving the effect of ensuring high efficiency and stability of hardware devices during the update and iteration process in the Internet of Things. Attached Figure Description

[0017] Figure 1 This is a mobile terminal hardware structure block diagram of the version file publishing method according to an embodiment of the present invention;

[0018] Figure 2 This is a flowchart of a method for publishing a version file according to an embodiment of the present invention;

[0019] Figure 3 This is a flowchart of a method for publishing version files according to a specific embodiment of the present invention;

[0020] Figure 4 This is a flowchart of network configuration for intelligent cameras according to a specific embodiment of the present invention;

[0021] Figure 5 This is a core data structure design diagram of the version file publishing method according to a specific embodiment of the present invention;

[0022] Figure 6 This is a structural block diagram of an apparatus for publishing version files according to an embodiment of the present invention. Detailed Implementation

[0023] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0025] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a mobile terminal hardware structure block diagram of the version file publishing method according to an embodiment of the present invention. For example... Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the version file publishing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0028] This embodiment provides a method for publishing version files. Figure 2 This is a flowchart of a version file publishing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0029] Step S202: Obtain the configuration file of the (n+1)th grayscale version. The configuration file of the (n+1)th grayscale version is a file obtained by modifying the configuration copy file of the nth version. The configuration copy file of the nth version is a file obtained by copying the configuration file of the nth version when the nth version configuration file already exists on the target platform. The configuration file is used to configure the hardware device of the target model, and n is greater than or equal to 1.

[0030] Step S204: Can beta release the configuration file of the (n+1)th can beta version on the target platform;

[0031] Step S206: If the grayscale release of the configuration file of the (n+1)th grayscale version is successful, the configuration file of the (n+1)th grayscale version is identified as the configuration file of the (n+1)th version, and the configuration file of the (n+1)th version is released on the target platform.

[0032] In this embodiment, a unique Product ID (PID) is generated for each type of hardware device in the Internet of Things (IoT). When any hardware device connects to the IoT, it needs to execute a program based on the configuration data in the configuration file. The configuration file is used to configure the hardware device, and the configuration data includes: multilingual text configuration, message push text, object model description, device network configuration process, custom image resource files, etc. Taking message push text as an example, when a camera connects to the IoT, the cloud platform pushes the information collected by the camera to the client. During the push, the information is pushed to the client according to the message push text configuration data in the configuration file. For example, if the camera detects someone in the monitoring screen, the configuration file in version 1 sets the message push text to: "Someone has appeared in the monitoring screen, please pay attention." However, based on personalized settings, the configuration file in version 2 modifies the message push text to: "Master, a target has appeared ahead!"

[0033] Before the configuration file is published to the target platform, the cloud and the client need to undergo rigorous matching tests and verifications. The verification process involves first conducting a canary release of the configuration file. If the canary release is successful, the configuration file is then published on the IoT platform (i.e., the target platform) so that all hardware devices of the target model corresponding to the configuration file can run when accessing the IoT.

[0034] It should be noted that, in this embodiment, the canary release of the configuration file refers to releasing the configuration file to a small number of target model hardware devices. If these target model hardware devices perform without any issues when configured according to the configuration file, the configuration file will then be released to the target platform, enabling all hardware devices corresponding to the target model to use the configuration file for configuration. Release to the target platform refers to a formal release, which can be applied to all target model hardware devices on the target platform.

[0035] If the target model of the hardware device has already released the nth version of the configuration file on the target platform, and you want to upgrade the configuration data of the target model, generate the nth version of the configuration file based on the nth version of the configuration file of the target model, modify the nth version of the configuration file to obtain the (n+1)th grayscale version of the configuration file.

[0036] Optionally, the (n+1)th grayscale version of the configuration file is obtained because before publishing the new configuration file to the target platform, the configuration file needs to be verified through grayscale release. If the grayscale release is successful, the (n+1)th grayscale version of the configuration file is determined as the (n+1)th version of the configuration file, and the (n+1)th version of the configuration file is published on the target platform.

[0037] Through the above steps, a configuration copy file is generated based on the latest configuration file corresponding to the target model hardware device on the target platform. The configuration copy file is modified to obtain a new configuration file. If the new configuration file is successfully released in a canary release, it is then released to the target platform to complete the configuration file upgrade process. Since the upgrade process involves modifying the copy file obtained from the existing configuration file, the already released configuration file remains unchanged. Therefore, even if an error occurs in modifying the copy file, causing the new configuration file to fail to be released, it can be quickly rolled back to the already released configuration file. Furthermore, a canary release is conducted before releasing the new configuration file to the target platform to verify the configuration file. This achieves rapid and stable release and rollback of the configuration file, ensuring the efficiency and stability of hardware devices during the update and iteration process in the Internet of Things.

[0038] In an optional embodiment, before obtaining the configuration file of the (n+1)th grayscale version, the method further includes: if a published configuration file exists on the target platform, determining the latest published configuration file on the target platform as the configuration file of the nth version; copying the configuration file of the nth version to obtain a configuration copy file of the nth version; and modifying the configuration copy file of the nth version to obtain the configuration file of the (n+1)th grayscale version.

[0039] In this embodiment, the situation where a published configuration file exists on the target platform refers to the fact that a configuration file corresponding to the target model hardware device already exists on the target platform. In this case, the existing configuration file is upgraded to obtain a new version of the configuration file.

[0040] The latest configuration file released on the target platform refers to the last configuration file released on the target platform before this upgrade. In other words, if n configuration files have been released on the target platform for the target model of hardware device, the nth configuration file released in the nth time is the latest configuration file released on the target platform.

[0041] Copy the configuration file of version n to obtain a configuration copy file of version n; in response to the user's modification command, modify the configuration copy file of version n to obtain the configuration file of version n+1 (n+1) grayscale version.

[0042] Optionally, if there is an (n+1)th configuration file that has been released in the grayscale information but has not been released on the target platform, the (n+1)th configuration file can be modified in response to the user's modification command to obtain the (n+1)th grayscale version configuration file. For example, if the latest released configuration file on the target platform is version 5, and you want to upgrade version 5 to version 6, if there is a 6th configuration file that has been released in the grayscale information, the 6th configuration file can be modified according to the user's requirements to obtain the 6th grayscale version configuration file, and then a grayscale release can be performed again. If the release is successful, the 6th grayscale version configuration file can be released to the target platform.

[0043] The presence of the (n+1)th configuration file that has already been released in the grayscale information is because the previous upgrade only performed a grayscale release and did not release it to the target platform. Therefore, the configuration file on the target platform was not upgraded.

[0044] In an optional embodiment, the method further includes: creating a first grayscale version of the configuration file if no published configuration file exists on the target platform; performing grayscale release of the first grayscale version of the configuration file on the target platform; and, if the grayscale release of the first grayscale version of the configuration file is successful, identifying the first grayscale version of the configuration file as the first version of the configuration file and publishing the first version of the configuration file on the target platform.

[0045] In this embodiment, the situation where there is no published configuration file on the target platform refers to the situation where there is no configuration file corresponding to the target model hardware device on the target platform, that is, the target model hardware device is being created on the target platform for the first time.

[0046] When the target model hardware device is created for the first time on the target platform, a new configuration file is created and associated with the target model hardware device. This is called the first gray-scale version configuration file. The configuration data in the first gray-scale version configuration file is either user-defined or directly obtained from the default configuration data. The first gray-scale version configuration file is then released in a gray-scale manner. If the gray-scale release is successful, the first gray-scale version configuration file is identified as the first version configuration file and is released on the target platform.

[0047] In an optional embodiment, publishing the (n+1)th version of the configuration file on the target platform includes: establishing a first association between the (n+1)th version of the configuration file and the target model; and publishing the (n+1)th version of the configuration file and the target model together on the target platform.

[0048] In this embodiment, when the (n+1)th version of the configuration file is published on the target platform, a first association relationship is created between the (n+1)th version of the configuration file and the target model. The target model is associated with the (n+1)th version of the configuration file and published on the target platform.

[0049] Optionally, if the configuration file of the (n+1)th grayscale version is successfully released, a fourth association between the configuration file of the (n+1)th grayscale version and the target model is established and recorded in the grayscale information table. At the same time, the configuration file of the (n+1)th grayscale version is identified as the configuration file of the (n+1)th version, a first association between the configuration file of the (n+1)th version and the target model is established, and the configuration file of the (n+1)th version is released on the target platform along with the target model. After release, the first association between the configuration file of the (n+1)th version and the target model is recorded in the configuration information table.

[0050] Optionally, after creating the configuration file for the first grayscale version, the method further includes: establishing a third association between the configuration file for the first grayscale version and the target model; and recording the third association in the grayscale information table.

[0051] In an optional embodiment, the method further includes: in the event of an anomaly after the n+1th version of the configuration file is published on the target platform, in response to a rollback operation, modifying the first association relationship to a second association relationship, wherein the second association relationship is the association relationship between the nth version of the configuration file and the target model.

[0052] In this embodiment, if an error occurs after the (n+1)th version of the configuration file is successfully published to the target platform, it indicates that the configuration data in the (n+1)th grayscale version of the configuration file is incorrect and cannot be used normally. Therefore, it is necessary to modify the first association relationship to the second association relationship, that is, to associate the target model with the nth version of the configuration file, so that when the hardware device of the target model accesses the Internet of Things, it will not select the (n+1)th version of the configuration file for configuration based on the first association, but will select the nth version of the configuration file (or the nth grayscale version of the configuration file) for configuration based on the second association, thus realizing the rollback of the configuration version.

[0053] In an optional embodiment, after the (n+1)th grayscale version of the configuration file is grayscale released on the target platform, the method further includes: obtaining an access request for the target hardware device, wherein the target hardware device is a hardware device of the target model, and the access request is used to request configuration of the target hardware device; and configuring the target hardware device using the (n+1)th version of the configuration file if the latest version of the configuration file of the target model hardware device is the (n+1)th version of the configuration file.

[0054] In this embodiment, after the (n+1)th grayscale version of the configuration file is grayscale released on the target platform, the latest grayscale version of the configuration file stored in the grayscale information table is the (n+1)th grayscale version of the configuration file.

[0055] If a target hardware device requests to connect to the Internet of Things at this time, and the latest version of the configuration file for the target model hardware device is the (n+1)th version of the configuration file, it means that the (n+1)th version of the configuration file has been released on the target platform, and the target hardware device can be configured directly using the (n+1)th version of the configuration file.

[0056] In an optional embodiment, the method further includes configuring the target hardware device using the (n+1)th grayscale version configuration file if the latest version configuration file of the target model hardware device is not the (n+1)th version configuration file.

[0057] In this embodiment, if the latest version configuration file of the target model hardware device is not the (n+1)th version configuration file, it means that the (n+1)th version configuration file has not yet been released on the target platform. The (n+1)th grayscale version configuration file can be obtained from the grayscale information table, and the target hardware device can be configured using the (n+1)th version configuration file.

[0058] This ensures that the configuration file used to configure the target hardware device is the latest configuration file in the configuration information table and the grayscale information table.

[0059] Optionally, if all configuration files published on the target platform have undergone canary releases in this system, the version number of the configuration file in the canary release information table will always be greater than or equal to the version number in the configuration information table. The latest canary version configuration file in the configuration information table (the (n+1)th canary version configuration file) can be directly used, where the version number is either the nth canary version configuration file or the 'n' in the nth version configuration file. However, in some special cases, the configuration file may be published directly to the target platform without canary releases. Therefore, the canary release information table may not record the configuration file corresponding to the latest version. For example, if the 5th version configuration file is published directly to the target platform, the latest canary version configuration file recorded in the canary release information table will be the 4th canary version configuration file. In this case, when a target hardware device requests access, the 5th version configuration file should be used to configure the target hardware device. That is, if the version number of the latest configuration file in the configuration information table is greater than or equal to the version number of the latest configuration file in the canary release information table, the latest configuration file in the configuration information table should be used to configure the target hardware device. If the version number of the latest configuration file in the configuration information table is less than the version number of the latest configuration file in the canary release information table, the latest configuration file in the canary release information table should be used to configure the target hardware device.

[0060] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments.

[0061] The present invention will be specifically described below with reference to embodiments:

[0062] Figure 3 This is a flowchart of a version file publishing method according to a specific embodiment of the present invention, such as... Figure 3 As shown, it includes the following steps:

[0063] Step 302: Create a copy of the configuration file from the perspective of smart hardware on the IoT cloud platform; specifically, this includes: generating a corresponding product ID (pid) in the IoT cloud platform to specifically describe the target model of smart hardware. When the target model of smart hardware is created for the first time in the IoT cloud platform, a new version 1 is created and associated with the pid by default. The corresponding pid is associated with version 1. If there is already a published configuration version n for the target model of smart hardware in the IoT cloud platform, the configuration file of configuration version n is copied with the model pid of the smart hardware to generate a copy of the configuration file and generate the configuration of version n+1.

[0064] Step 304: Modify the configuration copy and conduct a canary release of the modified configuration copy for verification. Modifying the configuration copy can be done in ways including but not limited to: exporting the configuration data from the configuration file to a local machine via a full file such as Excel or JSON, modifying it, importing it back into the IoT cloud platform, modifying each configuration item on the web interface according to the configuration data, and uploading static resources such as images and icons. The canary release of the configuration copy involves configuring the modified copy on a subset of hardware devices of the target model. Successful configuration indicates a successful canary release. The modified configuration copy (canary configuration), along with the corresponding PID and copy version number, is then written to the canary information table.

[0065] Step 306: If the canary release is successful, the user associates the modified replica configuration version with the smart hardware on the IoT cloud platform. The IoT cloud platform modifies the association information between the PID and the configuration version, revising the association information between the PID and version n to PID associated with version n+1, achieving seamless replication configuration release. If an anomaly occurs after configuration release, the user can choose to roll back the configuration. The IoT cloud platform will then modify the PID association information back to n to achieve configuration rollback. Optional: If a configuration with an unreleased version n+1 already exists in the system, to simplify smart hardware access to the IoT cloud, the generation of updated versions can be restricted, and interactive prompts can be used.

[0066] Hardware configuration includes: multilingual text configuration, message push text, object model description, device network configuration process, and custom image resource files. Taking the network configuration process of a smart camera as an example... Figure 4 This is a flowchart of network configuration for smart cameras according to a specific embodiment of the present invention, such as... Figure 4 As shown, it includes the following steps:

[0067] Step 402: Obtain the network configuration request for the smart camera. The network configuration request can be obtained by scanning the code with the client. The network configuration request must carry the unique product identifier of the smart camera, such as the device serial number.

[0068] Step 404: Obtain the corresponding model (PID) and version number (version) based on the product type and grayscale configuration. Using the product's unique identifier, obtain the model and PID corresponding to the smart camera. Obtain the latest version (n) of the configuration file published on the IoT platform (target platform) through the product association information within the IoT platform. Then, combine this with the grayscale version number of the configuration file in the grayscale information table to determine the version of the configuration file corresponding to the camera: If the grayscale version number of the configuration file in the grayscale information table is less than or equal to n, or if the grayscale information table is empty, then the latest version n of the configuration file published on the IoT platform is used for the configuration file corresponding to the camera. If the grayscale version number of the configuration file in the grayscale information table is greater than n, then the latest version of the configuration file in the grayscale information table is used, such as version n+1.

[0069] Step 406: Return the corresponding network configuration file based on the corresponding PID and version.

[0070] Step 408: Based on the returned configuration, the client displays the corresponding network configuration process and interface to configure the camera, such as WIFI network configuration or wired network configuration.

[0071] Figure 5 This is a core data structure design diagram of the version file publishing method according to a specific embodiment of the present invention, such as... Figure 5 As shown, the grayscale information (i.e., the grayscale information table) stores the grayscale configurations configured by the user. Each grayscale version configuration file (corresponding to the grayscale configuration in the figure) is associated with the corresponding product PID and version. The association information stores the association relationship between the officially released product PID and version. The configuration information (i.e., the configuration information table) contains detailed configuration file information (configuration keys and configuration details). Each configuration file is associated with the corresponding product PID and version.

[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0073] This embodiment also provides a version file publishing device. Figure 6This is a structural block diagram of a version file publishing device according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes:

[0074] The acquisition module 602 is used to acquire the configuration file of the (n+1)th grayscale version. The configuration file of the (n+1)th grayscale version is a file obtained by modifying the configuration copy file of the nth version. The configuration copy file of the nth version is a file obtained by copying the configuration file of the nth version when the nth version configuration file already exists on the target platform. The configuration file is used to configure the hardware device of the target model, and n is greater than or equal to 1.

[0075] The grayscale release module 604 is used to release the configuration file of the (n+1)th grayscale version on the target platform in a grayscale manner.

[0076] The publishing module 606 is used to determine the configuration file of the (n+1)th grayscale version as the configuration file of the (n+1)th version if the grayscale release of the configuration file of the (n+1)th grayscale version is successful, and to publish the configuration file of the (n+1)th version on the target platform.

[0077] In an optional embodiment, the above-described apparatus is further configured to, before obtaining the (n+1)th grayscale version of the configuration file, if a published configuration file exists on the target platform, determine the latest published configuration file on the target platform as the nth version of the configuration file; copy the nth version of the configuration file to obtain a configuration copy file of the nth version; modify the configuration copy file of the nth version to obtain the (n+1)th grayscale version of the configuration file.

[0078] In an optional embodiment, the above-described apparatus is further configured to: create a first grayscale version of the configuration file when no published configuration file exists on the target platform; perform grayscale release of the first grayscale version of the configuration file on the target platform; and, if the grayscale release of the first grayscale version of the configuration file is successful, determine the first grayscale version of the configuration file as the first version of the configuration file and release the first version of the configuration file on the target platform.

[0079] In an optional embodiment, the above-described apparatus is further configured to: establish a first association between the (n+1)th version of the configuration file and the target model; and associate and publish the (n+1)th version of the configuration file with the target model on the target platform.

[0080] In an optional embodiment, the above-described apparatus is further configured to, in response to a rollback operation, modify the first association relationship to a second association relationship in the event of an anomaly occurring after the n+1th version of the configuration file is released on the target platform, wherein the second association relationship is the association relationship between the nth version of the configuration file and the target model.

[0081] In an optional embodiment, the above-described apparatus is further configured to: after the (n+1)th grayscale version of the configuration file is grayscale released on the target platform, obtain an access request from the target hardware device, wherein the target hardware device is a hardware device of the target model, and the access request is used to request configuration of the target hardware device; and if the latest version of the configuration file of the target model hardware device is the (n+1)th version of the configuration file, configure the target hardware device using the (n+1)th version of the configuration file.

[0082] In an optional embodiment, the above-described apparatus is further configured to configure the target hardware device using the (n+1)th grayscale version configuration file when the latest version configuration file of the target model hardware device is not the (n+1)th version configuration file.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0084] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0085] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0086] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0087] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0088] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0089] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0090] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for publishing version files, characterized in that, include: Obtain the configuration file for the (n+1)th grayscale version, wherein the configuration file for the (n+1)th grayscale version is a file obtained by modifying the configuration copy file of the nth version, wherein the configuration copy file of the nth version is a file obtained by copying the configuration file of the nth version when the nth version of the configuration file already exists on the target platform, and the configuration file is used to configure the hardware device of the target model, wherein n is greater than or equal to 1; The configuration file of the (n+1)th grayscale version is distributed in a grayscale manner on the target platform; If the grayscale release of the configuration file of the (n+1)th grayscale version is successful, a fourth association relationship between the configuration file of the (n+1)th grayscale version and the target model is established, and the fourth association relationship is recorded in the grayscale information table; The configuration file of the (n+1)th grayscale version is determined as the configuration file of the (n+1)th version, and a first association relationship is established between the configuration file of the (n+1)th version and the target model; the configuration file of the (n+1)th version and the target model are associated and published on the target platform; the first association relationship is recorded in the configuration information table; Obtain an access request from a target hardware device, wherein the target hardware device is a hardware device of the target model, and the access request is used to request configuration of the target hardware device; If the version number of the latest configuration file in the configuration information table is greater than or equal to the version number of the latest configuration file in the grayscale information table, the target hardware device shall be configured using the latest configuration file in the configuration information table. If the version number of the latest configuration file in the configuration information table is less than the version number of the latest configuration file in the grayscale information table, the target hardware device shall be configured using the latest configuration file in the grayscale information table.

2. The method according to claim 1, characterized in that, Before obtaining the configuration file for the (n+1)th grayscale version, the method further includes: If a published configuration file exists on the target platform, the most recently published configuration file on the target platform is determined as the nth version of the configuration file; The configuration file of the nth version is copied to obtain a copy of the configuration file of the nth version; Modify the configuration copy file of the nth version to obtain the configuration file of the (n+1)th grayscale version.

3. The method according to claim 1, characterized in that, The method further includes: If no published configuration file exists on the target platform, create the first grayscale version of the configuration file; The configuration file of the first grayscale version is distributed in a grayscale manner on the target platform; If the grayscale release of the first grayscale version configuration file is successful, the first grayscale version configuration file is identified as the first version configuration file, and the first version configuration file is released on the target platform.

4. The method according to claim 1, characterized in that, The method further includes: If an anomaly occurs after the (n+1)th version of the configuration file is published on the target platform, in response to the rollback operation, the first association relationship is modified to a second association relationship, wherein the second association relationship is the association relationship between the nth version of the configuration file and the target model.

5. The method according to claim 1, characterized in that, The method further includes: If the version number of the latest configuration file in the configuration information table is greater than or equal to the version number of the latest configuration file in the grayscale information table, the latest version configuration file of the target model hardware device is determined to be the (n+1)th version configuration file, and the target hardware device is configured using the (n+1)th version configuration file.

6. The method according to claim 1, characterized in that, The method further includes: If the version number of the latest configuration file in the configuration information table is less than the version number of the latest configuration file in the grayscale information table, it is determined that the latest version configuration file of the target model hardware device is not the (n+1)th version configuration file, and the target hardware device is configured using the (n+1)th grayscale version configuration file.

7. A version file publishing device, characterized in that, include: The acquisition module is used to acquire the configuration file of the (n+1)th grayscale version, wherein the configuration file of the (n+1)th grayscale version is a file obtained by modifying the configuration copy file of the nth version. The configuration copy file of the nth version is a file obtained by copying the configuration file of the nth version when the nth version configuration file already exists on the target platform. The configuration file is used to configure the hardware device of the target model, and n is greater than or equal to 1. The gray-scale release module is used to perform gray-scale release of the configuration file of the (n+1)th gray-scale version on the target platform. The publishing module is configured to, upon successful grayscale publishing of the (n+1)th grayscale version configuration file, establish a fourth association between the (n+1)th grayscale version configuration file and the target model, and record the fourth association in the grayscale information table; determine the (n+1)th grayscale version configuration file as the (n+1)th version configuration file, establish a first association between the (n+1)th version configuration file and the target model; associate and publish the (n+1)th version configuration file and the target model on the target platform; and record the first association in the configuration information table. The device is further configured to obtain an access request from a target hardware device, wherein the target hardware device is a hardware device of the target model, and the access request is used to request configuration of the target hardware device; If the version number of the latest configuration file in the configuration information table is greater than or equal to the version number of the latest configuration file in the grayscale information table, the target hardware device shall be configured using the latest configuration file in the configuration information table. If the version number of the latest configuration file in the configuration information table is less than the version number of the latest configuration file in the grayscale information table, the target hardware device shall be configured using the latest configuration file in the grayscale information table.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 6.