Configuration data acquisition method and device, equipment and storage medium
Connecting to IoT devices through short-range wireless communication, obtaining their configuration data and generating model configuration files, solves the problem that the terminal cannot obtain the cloud server's configuration data without pre-stored configuration data, and realizes the efficiency of device interaction and configuration data upload.
Patent Information
- Application Number
- CN202311558696.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
Smart Images

Figure CN120034571A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and specifically relates to a configuration data acquisition method, device, equipment, and storage medium. Background Art
[0002] In the era of the Internet of Things, many electrical appliances have the ability to connect to the Internet, and by interacting with terminals, they can meet the different needs of users and bring a lot of convenience to users.
[0003] If a terminal wants to interact with an IoT device, it first needs to obtain the programs and functions supported by the IoT device, that is, the configuration data of the IoT device, so that it can remotely control the IoT device. In the prior art, the method for a terminal to obtain the configuration data of a certain model of IoT device is to download it from a cloud server, so that the terminal can display the program or function matching the model of IoT device to the user.
[0004] However, as the categories and models of IoT devices become increasingly diverse, the configuration data of a certain IoT device that a user wants to connect to may not be pre-stored on the cloud server. In this case, the terminal cannot obtain the configuration data of the IoT device. Summary of the invention
[0005] The present application provides a configuration data acquisition method, apparatus, device, and storage medium to solve the technical problem in the prior art that the configuration data of a certain IoT device that a user wants to connect to may not be pre-stored in a cloud server, and in this case the terminal cannot obtain the configuration data of the IoT device.
[0006] In a first aspect, the present application provides a method for acquiring configuration data, the method comprising:
[0007] After searching for the target device through the short-range wireless communication device, establishing a wireless communication connection between the terminal and the target device;
[0008] sending a configuration data query instruction to the target device via the wireless communication connection;
[0009] Acquiring configuration data sent by the target device through the wireless communication connection, wherein the configuration data includes function information of the target device;
[0010] Obtaining a model configuration template file corresponding to the target device from a server;
[0011] Inputting the configuration data sent by the target device into the model configuration template file to generate a model configuration file for the target device;
[0012] Upload the model configuration file to the server.
[0013] In the above preferred technical solution of the configuration data acquisition method, after searching for the target device through the short-range communication device and before establishing a wireless communication connection between the terminal and the target device, the method further includes:
[0014] The model information of the target device is obtained, where the model information includes: the model name of the target device and the first identification information of the target device.
[0015] In the above preferred technical solution of the configuration data acquisition method, after establishing a wireless communication connection between the terminal and the target device and before sending a configuration data query instruction to the target device through the wireless communication connection, the method further includes:
[0016] Acquire second identification information sent by the target device through the wireless communication connection;
[0017] Verify whether the first identification information is consistent with the second identification information:
[0018] If so, the step of sending a configuration data query instruction to the target device via the wireless communication connection is executed.
[0019] In the above preferred technical solution of the configuration data acquisition method, after acquiring the configuration data sent by the target device through the wireless communication connection, the method further includes:
[0020] Check whether the historical configuration data of the target device is pre-stored:
[0021] If yes, then after comparing the configuration data sent by the target device with the historical configuration data, obtaining difference data between the configuration data sent by the target device and the historical configuration data;
[0022] Displaying the configuration data and the difference data on the terminal interface;
[0023] If not, the configuration data is displayed on the terminal interface.
[0024] In the above preferred technical solution of the configuration data acquisition method, after searching for the target device through the short-range wireless communication device, establishing a wireless communication connection between the terminal and the target device includes:
[0025] After the target device is found through Bluetooth search, a Bluetooth connection is established between the terminal and the target device.
[0026] The present application provides another configuration data acquisition method, the method comprising:
[0027] In response to a configuration data query instruction sent by the terminal through a wireless communication connection, acquiring configuration data of the device stored in the device, wherein the configuration data of the device includes function information of the device;
[0028] The configuration data of the device is sent to the terminal via the wireless communication connection.
[0029] In a second aspect, the present application provides a configuration data acquisition device, the device comprising:
[0030] The wireless communication connection module is used to: after searching for a target device through a short-range wireless communication device, establish a wireless communication connection between the terminal and the target device;
[0031] The data acquisition module is used to: send a configuration data query instruction to the target device through the wireless communication connection, and obtain the configuration data sent by the target device through the wireless communication connection, wherein the configuration data includes the function information of the target device.
[0032] The present application provides another configuration data acquisition device, the device comprising:
[0033] An acquisition module, configured to: in response to a configuration data query instruction sent by a terminal via a wireless communication connection, acquire configuration data of the device stored in the device, wherein the configuration data of the device includes function information of the device;
[0034] The sending module is used to send the configuration data of the device to the terminal.
[0035] In a third aspect, the present application provides a configuration data acquisition device, the device comprising:
[0036] Processor and memory;
[0037] The memory is used to store computer programs;
[0038] The processor is used to execute the computer program stored in the memory to implement the configuration data acquisition method as described above or another configuration data acquisition method as described above.
[0039] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon; the computer program is used to implement the configuration data acquisition method as described above or another configuration data acquisition method as described above.
[0040] The present application provides a configuration data acquisition method, device, equipment, and storage medium. By establishing a short-range wireless communication connection with the target device and acquiring the configuration data of the target device through the short-range wireless communication connection, the terminal can be free from the restriction of whether the cloud server pre-stores the configuration data of the target device, and conveniently acquire the configuration data of the target device. After acquiring the configuration data of the target device, the configuration data is input into a template file and uploaded to the server. On the one hand, the configuration data that is not pre-stored in the server can be uploaded, which is convenient for other terminal devices to download the configuration data of the target device from the server. On the other hand, it avoids manual parsing and input by personnel, and improves the efficiency and accuracy of uploading configuration data. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] Figure 1 is a flow chart of a configuration data acquisition method provided in an embodiment of the present application;
[0043] Figure 2 It is a flow chart of a configuration data acquisition method for verifying identification information provided by an embodiment of the present application;
[0044] Figure 3 is a flow chart of another configuration data acquisition method provided in an embodiment of the present application;
[0045] Figure 4 is a schematic diagram of a configuration data acquisition device provided in an embodiment of the present application;
[0046] Figure 5 is a schematic diagram of another configuration data acquisition device provided in an embodiment of the present application;
[0047] Figure 6 It is a schematic diagram of a configuration data acquisition device provided in an embodiment of the present application.
[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0051] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0052] In the era of the Internet of Things, many electrical appliances have networking capabilities and can meet the different needs of users by interacting with terminals. Users can remotely control home appliances through terminals, such as controlling the air conditioner to turn on cooling before going home, or controlling the dryer to dry. The interaction between terminals and IoT devices brings a lot of convenience to users.
[0053] If a terminal wants to interact with an IoT device, it must first obtain the programs and functions supported by the IoT device, that is, the configuration data of the IoT device, in order to remotely control the IoT device. In the prior art, a terminal can be connected to an IoT device by wire and obtain the configuration data of the IoT device through the line. A more common method is for the terminal to obtain the configuration data of the IoT device from a cloud server, so that the terminal can display the programs or functions that match the IoT device model to the user.
[0054] However, as the categories and models of IoT devices are becoming more and more diverse, even for the same appliance, different models may support different programs and functions. The configuration data of a certain IoT device that the user wants to connect to may not be pre-stored in the cloud server. In this case, the terminal cannot obtain the configuration data of the IoT device. In addition, current IoT devices sometimes need to receive program updates from cloud servers, and the configuration data stored in the cloud server is not updated in a timely manner. In this case, the user's terminal device cannot interact with the IoT device.
[0055] To solve the above-mentioned technical problems, the technical concept of the present application is: after the terminal searches for and connects to the target device through a short-range wireless communication device, it sends a query instruction to the target device to obtain the configuration data fed back by the target device, and then inputs the configuration data fed back by the target device into the model configuration template file corresponding to the target device, generates a model configuration file and uploads it to the server.
[0056] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0057] In a possible embodiment of the present application, a configuration data acquisition method is provided, which can be applied to a terminal device. Figure 1 is a flow chart of a configuration data acquisition method provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0058] S101, after searching for a target device through a short-range wireless communication device, establishing a wireless communication connection between the terminal and the target device;
[0059] It should be noted that the short-range wireless communication device in this embodiment may include Bluetooth, WIFI, and NFC communication devices. WIFI may be a hotspot connection device of the terminal.
[0060] Taking Bluetooth as an example, after the terminal searches for a target device via Bluetooth, it can establish a Bluetooth connection with the target device.
[0061] S102, sending a configuration data query instruction to the target device via a wireless communication connection;
[0062] The configuration data query instruction may be one or more.
[0063] S103, obtaining configuration data sent by the target device through a wireless communication connection, where the configuration data includes function information of the target device;
[0064] In this step, the configuration data at least includes the function information of the target device. The configuration data may also include the model information and program information of the target device, wherein the model information includes the model name of the target device, and the program information includes the programs supported by the target device.
[0065] S104, obtaining a model configuration template file corresponding to the target device from the server;
[0066] S105, inputting the configuration data sent by the target device into the model configuration template file to generate a model configuration file for the target device;
[0067] After the configuration data is obtained, it can be input into the model configuration template file by automatically filling in or automatically checking according to the functions and programs supported by the target device, thereby generating a model configuration file for the target device.
[0068] S106: Upload the model configuration file to the server.
[0069] After uploading the model configuration file to the server, the server can obtain the configuration data of the target device by parsing the model configuration file.
[0070] The technical effect of this embodiment is: by establishing a short-range wireless communication connection with the target device and obtaining the configuration data of the target device through the short-range wireless communication connection, the terminal is not restricted by whether the cloud server pre-stores the configuration data of the target device, and the configuration data of the target device can be obtained conveniently and quickly through short-range wireless communication. After obtaining the configuration data of the target device, the configuration data is input into a template file and uploaded to the server. On the one hand, the configuration data that is not pre-stored in the server can be uploaded, which is convenient for other terminal devices to download the configuration data of the target device from the server. On the other hand, it avoids manual analysis and entry by personnel, and improves the efficiency and accuracy of uploading configuration data.
[0071] In a possible embodiment of the present application, a configuration data acquisition method for verifying identification information is provided. Figure 2 is a flow chart of a configuration data acquisition method for verifying identification information provided by an embodiment of the present application, such as Figure 2 As shown, the method includes:
[0072] S201. After searching for a target device through a short-range communication device and establishing a wireless communication connection between the terminal and the target device, obtain model information of the target device, where the model information includes: a model name of the target device and first identification information of the target device.
[0073] S202, obtaining second identification information sent by the target device through a wireless communication connection;
[0074] S203: Verify whether the first identification information is consistent with the second identification information:
[0075] In this embodiment, the identification information may be a model name of the target device, or a device ID of the target device. Whether the first identification information is consistent with the second identification information is verified to confirm whether the connection to the target device is established.
[0076] If yes, then S204, sending a configuration data query instruction to the target device via a wireless communication connection;
[0077] S205, obtaining configuration data sent by the target device through a wireless communication connection, where the configuration data includes function information of the target device;
[0078] S206, obtaining a model configuration template file corresponding to the target device from the server;
[0079] S207, inputting the configuration data sent by the target device into the model configuration template file to generate a model configuration file for the target device;
[0080] S208, uploading the model configuration file to the server;
[0081] If not, then S209, terminate the process.
[0082] In a possible embodiment of the present application, after obtaining the configuration data sent by the target device through the wireless communication connection, the method further includes:
[0083] Check whether the historical configuration data of the target device is pre-stored:
[0084] If yes, then after comparing the configuration data sent by the target device with the historical configuration data, obtain the difference data between the configuration data sent by the target device and the historical configuration data;
[0085] Display configuration data and difference data on the terminal interface;
[0086] If not, the configuration data is displayed on the terminal interface.
[0087] Considering that IoT devices often update their programs, in this embodiment, after obtaining the current configuration data of the target device, it is compared with the historical configuration data of the target device and the differences are displayed on the terminal device, so that the user can clearly understand the changes in the programs or functions currently supported by the target device, providing convenience for the user.
[0088] In a possible embodiment of the present application, another configuration data acquisition method is provided, which can be applied to a control module of an Internet of Things device. Figure 3 is another flow chart of a configuration data acquisition method provided in an embodiment of the present application. Figure 3 As shown, the method includes:
[0089] S301, after detecting that a wireless communication connection is established between a device and a terminal, sending identification information of the device to the terminal;
[0090] S302, in response to a configuration data query instruction sent by the terminal through a wireless communication connection, acquiring configuration data of the device stored in the device, where the configuration data of the device includes function information of the device;
[0091] S303: Send the configuration data of the device to the terminal via a wireless communication connection.
[0092] In a possible embodiment of the present application, a configuration data acquisition device is provided. Figure 4 is a schematic diagram of a configuration data acquisition device provided in an embodiment of the present application, such as Figure 4 As shown, the device 40 includes: a wireless communication connection module 401, a data acquisition module 402;
[0093] The wireless communication connection module 401 is used to establish a wireless communication connection between the terminal and the target device after searching for the target device through the short-range communication device;
[0094] The data acquisition module 402 is used to: send a configuration data query instruction to the target device through a wireless communication connection, and obtain the configuration data sent by the target device through the wireless communication connection, where the configuration data includes function information of the target device.
[0095] In a possible embodiment of the present application, another configuration data acquisition device is provided. Figure 5 is a schematic diagram of another configuration data acquisition device provided in an embodiment of the present application, such as Figure 5 As shown, the device 50 includes: an acquisition module 501 and a sending module 502;
[0096] The acquisition module 501 is used to: in response to a configuration data query instruction sent by the terminal through a wireless communication connection, acquire the configuration data of the device stored in the device, where the configuration data of the device includes function information of the device;
[0097] The sending module 502 is used to send the configuration data of the device to the terminal.
[0098] In a possible embodiment of the present application, a configuration data acquisition device is provided. Figure 6 is a schematic diagram of a configuration data acquisition device provided in an embodiment of the present application, such as Figure 6 As shown, the device includes:
[0099] Memory 601, processor 602, interactive interface 603, memory 601, processor 602, interactive interface 603 are connected via bus 604;
[0100] The memory 601 is used to store computer programs;
[0101] The processor 602 is used to execute the computer program stored in the memory 601 to implement the above configuration data acquisition method or another configuration data acquisition method.
[0102] The specific implementation process of the processor 602 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0103] In the above Figure 6 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0104] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0105] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or type of bus.
[0106] In a possible embodiment of the present application, a readable storage medium is further provided, on which a computer program is stored; the computer program is used to implement the above-mentioned configuration data acquisition method or the above-mentioned another configuration data acquisition method.
[0107] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0108] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0109] The division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0113] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0114] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A configuration data acquisition method, It is characterized in that The method comprises: After searching for the target device through the short-range wireless communication device, establishing a wireless communication connection between the terminal and the target device; sending a configuration data query instruction to the target device via the wireless communication connection; Acquiring configuration data sent by the target device through the wireless communication connection, wherein the configuration data includes function information of the target device; Obtaining a model configuration template file corresponding to the target device from a server; Inputting the configuration data sent by the target device into the model configuration template file to generate a model configuration file for the target device; Upload the model configuration file to the server.
2. The method according to claim 1, It is characterized in that After searching for the target device through the short-range wireless communication device, before establishing a wireless communication connection between the terminal and the target device, the method further includes: The model information of the target device is obtained, where the model information includes: the model name of the target device and the first identification information of the target device.
3. The method according to claim 2, It is characterized in that After establishing a wireless communication connection between the terminal and the target device, and before sending a configuration data query instruction to the target device through the wireless communication connection, the method further includes: Acquire second identification information sent by the target device through the wireless communication connection; Verify whether the first identification information is consistent with the second identification information: If so, the step of sending a configuration data query instruction to the target device via the wireless communication connection is executed.
4. The method according to claim 1, It is characterized in that After acquiring the configuration data sent by the target device through the wireless communication connection, the method further includes: Check whether the historical configuration data of the target device is pre-stored: If yes, then after comparing the configuration data sent by the target device with the historical configuration data, obtaining difference data between the configuration data sent by the target device and the historical configuration data; Displaying the configuration data and the difference data on the terminal interface; If not, the configuration data is displayed on the terminal interface.
5. The method according to any one of claims 1 to 4, It is characterized in that After the target device is searched for by the short-range wireless communication device, a wireless communication connection is established between the terminal and the target device, including: After the target device is found through Bluetooth search, a Bluetooth connection is established between the terminal and the target device.
6. A configuration data acquisition method, It is characterized in that The method comprises: In response to a configuration data query instruction sent by the terminal through a wireless communication connection, acquiring configuration data of the device stored in the device, wherein the configuration data of the device includes function information of the device; The configuration data of the device is sent to the terminal via the wireless communication connection.
7. A configuration data acquisition device, It is characterized in that The device comprises: The wireless communication connection module is used to establish a wireless communication connection between the terminal and the target device after searching the target device through the short-range wireless communication device; The data acquisition module is used to: send a configuration data query instruction to the target device through the wireless communication connection, and obtain the configuration data sent by the target device through the wireless communication connection, wherein the configuration data includes the function information of the target device.
8. A configuration data acquisition device, It is characterized in that The device comprises: An acquisition module, configured to: in response to a configuration data query instruction sent by a terminal via a wireless communication connection, acquire configuration data of the device stored in the device, wherein the configuration data of the device includes function information of the device; The sending module is used to send the configuration data of the device to the terminal.
9. A configuration data acquisition device, It is characterized in that The device comprises: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory to implement the configuration data acquisition method according to any one of claims 1 to 5, or the configuration data acquisition method according to claim 6.
10. A readable storage medium, It is characterized in that The readable storage medium stores a computer program; the computer program is used to implement the configuration data acquisition method according to any one of claims 1 to 5, or the configuration data acquisition method according to claim 6.