Protocol file generation system, method, equipment and medium

By using a protocol file generation system to convert and parse the protocols of IoT devices, the system solves the problems of difficult interoperability and low access efficiency of different devices, enabling efficient and flexible IoT device access and data parsing, and simplifying the device access process.

CN118945239APending Publication Date: 2024-11-12ZHEJIANG DAHUA SMART IOT OPERATION SERVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410905748.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Different manufacturers and equipment types of IoT devices use different communication protocols, which makes it difficult to connect IoT platforms. Furthermore, existing technologies are inefficient in terms of device access and data parsing. System performance and security depend on the manufacturer's management platform, which limits the application of smart city vertical industries.

Method used

This invention provides a protocol file generation system that, through modules for raw data acquisition, parsing and encapsulation, language model generation, and target protocol file generation, enables protocol conversion and data parsing for IoT devices. It supports multi-language conversion and parallel processing, and generates protocol files that match the target IoT platform.

Benefits of technology

It simplifies the access process for IoT devices, improves device access efficiency, supports a unified integration standard for multiple devices and programming languages, reduces R&D difficulty and development complexity, and enhances the system's flexibility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945239A_ABST
    Figure CN118945239A_ABST
Patent Text Reader

Abstract

The invention discloses a protocol file generation system and method, equipment and a medium, which are used for enabling the generation of a target protocol file to be more convenient and efficient, thereby facilitating the access of different Internet of Things equipment to an Internet of Things platform. The system comprises an original data acquisition module used for acquiring original byte code data from at least one piece of Internet of Things equipment; the original data analyzing and packaging module is used for analyzing the original bytecode data of each piece of Internet of Things equipment according to the preset field type and length corresponding to the Internet of Things equipment to obtain the information content of each field of the original bytecode data of the Internet of Things equipment; and generating a target protocol file matched with a target Internet of Things platform to which the Internet of Things equipment needs to access according to a preset target language corresponding to the Internet of Things equipment by using the information content of each field of the original byte code data of the Internet of Things equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a protocol file generation system, method, device and medium. Background Art

[0002] With the development of information technology, IoT devices involve the power industry, hydrological industry, environmental protection industry and other industries. The IoT platform receives data collected by IoT devices to realize functions such as connection management, device management, application enablement and business analysis. Summary of the invention

[0003] The embodiments of the present application provide a protocol file generation system, method, device and medium, which are used to make it more convenient and efficient to generate a target protocol file that matches a target IoT platform that an IoT device needs to access, thereby facilitating different IoT devices to access the IoT platform.

[0004] A protocol file generation system provided in an embodiment of the present application includes:

[0005] A raw data acquisition module, used to acquire raw bytecode data from at least one IoT device;

[0006] The original data parsing and encapsulation module is used for the original bytecode data of each of the IoT devices: parsing the original bytecode data of the IoT device according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; and generating a target protocol file matching the target IoT platform that the IoT device needs to access according to the preset target language corresponding to the IoT device based on the information content of each field of the original bytecode data of the IoT device.

[0007] The protocol file generation system provided in the embodiment of the present application obtains the original bytecode data from at least one IoT device through the original data acquisition module, and then, through the original data parsing and encapsulation module, for the original bytecode data of each IoT device: the original bytecode data of the IoT device is parsed according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; the information content of each field of the original bytecode data of the IoT device is generated according to the preset target language corresponding to the IoT device to generate a target protocol file that matches the target IoT platform that the IoT device needs to access. Therefore, the protocol file generation system provided in the embodiment of the present application makes it more convenient and efficient to generate a target protocol file that matches the target IoT platform that the IoT device needs to access, and facilitates a variety of different IoT devices to access their respective target IoT platforms.

[0008] In some embodiments, the raw data parsing and encapsulation module includes:

[0009] A field syntax conversion module is used to parse the original bytecode data of each IoT device according to a preset field type and length corresponding to the IoT device, and obtain information content of each field of the original bytecode data of the IoT device;

[0010] A language model generation module is used to convert the information content of each field of the original bytecode data of the IoT device into a preset target language corresponding to the IoT device, and generate a language model corresponding to the original bytecode data of the IoT device;

[0011] The target protocol file generation module is used to generate a target protocol file that matches the target IoT platform that the IoT device needs to access based on the language model corresponding to the original bytecode data of the IoT device.

[0012] In some embodiments, the target protocol file generation module includes:

[0013] A data correction module is used to check the data of the language model corresponding to the original bytecode data of the IoT device according to the predefined language model architecture requirements, and when an error is found, correct the data to obtain the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements;

[0014] The template engine module is used to use the language model data corresponding to the original bytecode data of the Internet of Things device that meets the predefined language model architecture requirements as a data source, and generate a target protocol file that matches the target Internet of Things platform that the Internet of Things device needs to access based on the data source.

[0015] In some embodiments, the data check includes: data format verification, field verification, field type and length check.

[0016] In some embodiments, the data correction module is further used to: record correction process information in a preset log file.

[0017] In some embodiments, the system further comprises:

[0018] The user interface module is used to provide a user interface, on which a configuration control is provided, and the configuration control is used for a user to configure access channel information of an Internet of Things device and device information of the Internet of Things device.

[0019] In some embodiments, a data control is also provided on the user interface, and the data control is used to display to the user the bytecode data of the IoT device currently acquired by the system; and to allow the user to select the bytecode data of the IoT device that needs to be parsed.

[0020] In some embodiments, the data control is also used for the user to set the bytecode data of the IoT device, and / or to import the bytecode data of the IoT device.

[0021] In some embodiments, a conversion control is also provided on the user interface, and the conversion control is used for the user to set: the IoT device that needs to be connected, the conversion rule for protocol conversion of the bytecode data of the IoT device, the conversion name corresponding to the conversion rule, and the target language for protocol conversion; and for the user to select and export a target protocol file that matches the target IoT platform that the IoT device needs to access.

[0022] A method for generating a protocol file provided in an embodiment of the present application includes:

[0023] Obtaining raw bytecode data from at least one IoT device;

[0024] For the original bytecode data of each of the IoT devices: the original bytecode data of the IoT device is parsed according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; the information content of each field of the original bytecode data of the IoT device is generated according to the preset target language corresponding to the IoT device to generate a target protocol file that matches the target IoT platform that the IoT device needs to access.

[0025] Another embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.

[0026] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A schematic diagram of the overall structure of a protocol file generation system provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of the structure of a raw data parsing and encapsulation module provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of the structure of a target protocol file generation module provided in an embodiment of the present application;

[0031] Figures 4 to 9 A schematic diagram of a user interface provided in an embodiment of the present application;

[0032] Fig.10 A schematic diagram of the specific structure of a protocol file generation system provided in an embodiment of the present application;

[0033] Fig.11 A flowchart of a method for generating a protocol file provided in an embodiment of the present application;

[0034] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0036] The embodiments of the present application provide a protocol file generation system, method, device and medium, which are used to make it more convenient and efficient to generate a target protocol file that matches a target IoT platform that an IoT device needs to access, thereby facilitating different IoT devices to access the IoT platform.

[0037] Among them, the method and the device, equipment, and medium are based on the same application concept. Since the principles of solving problems by the method and the device, equipment, and medium are similar, the implementation of the device, equipment, medium, and method can refer to each other, and the repeated parts will not be repeated.

[0038] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to only those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.

[0040] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0041] At present, due to the large number of manufacturers of IoT devices and the rich and large number of IoT device types, different manufacturers, different device types, and even different batches of IoT devices produced by the same manufacturer may use different communication or application protocols. Based on this problem, for different dedicated protocols, the IoT platform functions are expanded by writing codes, and then customized and developed new industry protocol parsing modules. Due to the wide variety of protocols used by IoT devices in various industries, it is difficult to connect the newly added IoT devices with the IoT platform, and it is difficult to parse the IoT data of the newly added IoT devices. At the same time, the scalability of the customized developed protocol is poor; in addition, directly obtaining IoT data from the manufacturer management platform of the IoT device can simplify the system architecture and software development workload, but the system performance and security are extremely dependent on the manufacturer management platform, which imposes great constraints on various vertical industry smart applications in smart cities. Therefore, it is particularly important to provide a way for IoT devices to access the IoT platform.

[0042] See also Figure 1 , a protocol file generation system provided in an embodiment of the present application includes:

[0043] The original data acquisition module 11 is used to acquire original bytecode data from at least one IoT device;

[0044] For example, the raw bytecode data of IoT devices can be monitored and captured through hardware channels such as serial ports and network interfaces.

[0045] Bytecode data represents the code or instruction set of the communication protocol used by IoT devices. For example, a temperature sensor sends its readings using a specific binary protocol, and these binary data can be considered as the "bytecode data" of the temperature sensor device.

[0046] The IoT device, such as a temperature sensor device, then obtains the original bytecode data of the temperature sensor device, for example:

[0047] [0x01,0x7A,0x02,0x58].

[0048] The original data parsing and encapsulation module 12 is used for parsing the original bytecode data of each of the IoT devices according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; and generating a target protocol file matching the target IoT platform that the IoT device needs to access according to the preset target language corresponding to the IoT device based on the information content of each field of the original bytecode data of the IoT device.

[0049] It can be seen that the embodiment of the present application provides a protocol file generation system, which realizes the conversion of the access protocol of the Internet of Things device, and is applicable to a variety of Internet of Things scenarios. The Internet of Things access platforms in different languages ​​can be converted into protocol files in the development language that matches the target Internet of Things platform with the help of this system. The embodiment of the present application can package and transform different Internet of Things device protocols, combine multi-language conversion protocols, parse and encapsulate the data of the Internet of Things device, and correct the data in the process, and finally complete the generation of the protocol file, which is conducive to solving the problem of the difficulty and cumbersome development of the research and development of the Internet of Things device docking caused by the large number of Internet of Things device protocols and low development efficiency, and improve the device access efficiency of the Internet of Things platform. It can provide a unified integration standard for Internet of Things (IoT) applications implemented by different devices and different programming languages, and simplify the device access process.

[0050] In some embodiments, see Figure 2 , the raw data parsing and encapsulation module 12 comprises:

[0051] The field syntax conversion module 101 is used for parsing the original bytecode data of each IoT device according to the preset field type and length corresponding to the IoT device, and obtaining the information content of each field of the original bytecode data of the IoT device;

[0052] Taking the original bytecode data [0x01, 0x7A, 0x02, 0x58] of the temperature sensor device as an example, then, according to the preset field type and length, [0x01, 0x7A, 0x02, 0x58] is parsed to obtain:

[0053] Field 1 (Device ID): 0x01 0x7A.

[0054] Field 2 (temperature value): 0x02 0x58.

[0055] Further, according to the preset conversion rules, the above two fields are converted to obtain specific information content, for example: for field 1, 0x01 0x7A is converted to decimal to obtain 378, which is the identifier of the temperature sensor device; for field 2, when the conversion constant is 100, 0x02 0x58 is converted to 6.00 degrees. The specific conversion rules can be determined according to actual needs.

[0056] Then, the information content of each field of the original bytecode data of the IoT device is obtained, including the temperature sensor device with ID 378, whose input temperature value is 6.00 degrees.

[0057] In addition, other methods can be used, such as using artificial intelligence (AI) technology or machine learning models, to automatically identify and set the type and length of the field. The conversion of field attributes can be achieved by using plug-ins or extension modules, which can flexibly adapt to new or special data structures and language requirements.

[0058] The language model generation module 102 is used to convert the information content of each field of the original bytecode data of the IoT device into a preset target language corresponding to the IoT device, and generate a language model corresponding to the original bytecode data of the IoT device;

[0059] The target protocol file generation module 103 is used to generate a target protocol file matching the target IoT platform that the IoT device needs to access based on the language model corresponding to the original bytecode data of the IoT device.

[0060] It can be seen that when the original bytecode data of multiple IoT devices needs to be processed at the same time, the embodiment of the present application can realize the parallel processing and instruction encapsulation mechanism of multi-language conversion programs, for example, it can process the conversion instructions of multiple programming languages ​​such as c, cpp, java, python, go in parallel, and can collect the conversion instructions of various languages ​​and encapsulate them. This parallel processing and encapsulation mechanism realizes a highly customized solution to realize cross-language protocol conversion.

[0061] In addition, instructions in different languages ​​can be uniformly represented through an intermediate language or abstract syntax tree (AST) and then converted into target code, which helps simplify the collection and packaging of multi-language instructions. A cloud-based conversion system can be configurably supported for syntax features and instruction sets of different languages, thereby providing a wider range of services.

[0062] In some embodiments, see Figure 3 , the target protocol file generation module includes:

[0063] The data correction module 201 is used to check the data of the language model corresponding to the original bytecode data of the IoT device according to the predefined language model architecture requirements, and when an error is found, correct the data to obtain the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements;

[0064] For example, the data correction module 201 uses JSON Schema to perform data format and field verification to ensure that the received data meets predefined schema requirements.

[0065] In some embodiments, the data check includes: data format verification, field verification, field type and length check.

[0066] In some embodiments, the data correction module 201 is further used to record correction process information in a preset log file, that is, the data correction module 201 can correct the checked data and store the correction process in the log file.

[0067] In some embodiments, the data correction algorithm used by the data correction module 201 includes, for example, error checking and correction for error detection and correction, and parity check (adding additional parity bits to detect and correct single error bits).

[0068] 1. Data Check and Correction: It receives a binary string with a parity bit. It checks all bits in the data except the last bit (parity bit) and counts the number of 1s. It then compares the calculated parity with the parity bit at the end of the data. If they do not match, it means there is an error in the data, and it will try to correct it and return the corrected string.

[0069] 2. Parity bit addition: For a given binary string data, the parity is determined by counting the number of 1s in the string, and a parity bit is added to the end of the string to ensure that the number of 1s contained is always even (or always odd, depending on the specific parity scheme).

[0070] After the data modification is completed, the modification result is passed to the next link in the form of a method call as the data source for the template engine module 202 to generate the protocol file, ensuring that the generated target protocol file meets the expected multi-language format and requirements.

[0071] The template engine module 202 is used to use the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements as a data source, and generate a target protocol file that matches the target IoT platform that the IoT device needs to access based on the data source.

[0072] For example, the template engine module 202 can use the above-mentioned corrected data as a data source and rely on the template engine to generate a protocol file. The protocol file finally generated is a program package consisting of a string of codes, and the content of the program package consists of a standard model structure of properties, events and services of the Internet of Things (IoT) device.

[0073] The process of generating a protocol file, for example, taking the design of the Java language template engine Velocity as an example, needs to be carried out in two steps:

[0074] 1. Design a Velocity template to describe the physical model structure of the protocol file. First, you need to define these functions and communication interfaces and add these definitions to the Velocity context.

[0075] 2. Assume that the template file is named tcp_server.vm, and use Java code to fill in the template. In this template, the content defined by ${} is the placeholder that will be replaced in the Java code. The data in the above data source is used to fill in these template variables to generate the final code, that is, to generate the target protocol file, which conforms to the structure of the object model, facilitates access device management and data exchange, and exports the protocol file. This protocol can provide a unified integration standard for IoT applications implemented in different access devices and different programming languages, and with the help of this protocol, the device access process is simplified.

[0076] Furthermore, in order to support multiple languages ​​and customizable expansion, facilitate the integration of new devices and new functions, and facilitate future system expansion and upgrades, the system provided in the embodiment of the present application can also output a user interface to the user.

[0077] In some embodiments, the system further comprises:

[0078] The user interface module is used to provide a user interface, on which a configuration control is provided, and the configuration control is used for a user to configure access channel information of an Internet of Things device and device information of the Internet of Things device.

[0079] Among them, the interface for users to configure the access channel information of IoT devices, such as Figure 4 As shown, the user can create an access channel through the configuration control of the user interface. The access channel is a key attribute of the IoT device, and the access channel determines the communication method of the IoT device; and the user can further configure whether the access channel is closed.

[0080] An interface for users to configure device information of IoT devices, such as Figure 5 As shown, the user configures the device information of the IoT device by clicking the "Device" control, and further configures whether the device information of the IoT device is enabled or disabled. This enables the integration of multiple IoT devices, so that the system provided in the embodiment of the present application can have the conversion capabilities of multiple protocols, multiple languages, and multiple fields.

[0081] In some embodiments, a data control is also provided on the user interface, and the data control is used to display to the user the bytecode data of the IoT device currently acquired by the system; and to allow the user to select the bytecode data of the IoT device that needs to be parsed.

[0082] The data control displays to the user the bytecode data of the IoT device currently acquired by the system, for example Figure 6 shown.

[0083] Furthermore, the user can also select the bytecode data of the IoT device TEMP001 with the serial number 001 as the bytecode data of the IoT device that currently needs to be parsed. Figure 7 As shown, the user can select the number of fields and the starting address of the bytecode data of the IoT device TEMP001, thereby enabling the user to select the bytecode data of the IoT device that needs to be parsed.

[0084] In some embodiments, the data control is also used for the user to set the bytecode data of the IoT device, and / or to import the bytecode data of the IoT device.

[0085] The data control allows users to set the bytecode data of IoT devices, such as Figure 8 As shown, users can set the name, value type, unit, address, quantity, bit offset, number of bits, etc. of the bytecode data of the IoT device.

[0086] In some embodiments, a conversion control is also provided on the user interface, and the conversion control is used for the user to set: the IoT device that needs to be connected, the conversion rule for protocol conversion of the bytecode data of the IoT device, the conversion name corresponding to the conversion rule, and the target language for protocol conversion; and for the user to select and export a target protocol file that matches the target IoT platform that the IoT device needs to access.

[0087] For example Fig. 9 As shown, the user can set the conversion name corresponding to the conversion rule, such as conversion 001, conversion 002. The conversion rule can be a numerical conversion, a string and text conversion, a time and date conversion, a data structure conversion, and the like.

[0088] It can be seen that the embodiment of the present application provides a visual configuration tool through the above user interface. The embodiment of the present application uses a graphical interface as a configuration tool, allowing users to intuitively select and define multi-language protocol conversion rules. Users can define fields, set types and lengths by dragging and dropping components, thereby eliminating the need to directly write code and reducing the requirements for professional skills.

[0089] In summary, in some embodiments, see Fig.10 The system provided by the embodiment of the present application may include the above-mentioned modules. The system may also be called a protocol converter, a tool for converting between different communication protocols, so that devices using different protocols can be converted into the object model protocol format required by a specific platform, and are suitable for a variety of IoT scenarios and IoT access platforms in different languages. With the help of a visual multi-language protocol converter, it is converted into a protocol file in a development language that matches the target IoT platform, thereby improving the compatibility and interoperability of IoT devices and IoT access platforms, and simplifying the communication and collaboration between a variety of different IoT devices and access platforms. For IoT devices, the embodiment of the present application can reduce or eliminate the need to redevelop and configure communication protocols for each target IoT access platform. For IoT access platforms, the embodiment of the present application provides a more flexible way to access and manage devices with a variety of different protocols, thereby simplifying the integration and expansion of IoT systems.

[0090] The embodiment of the present application can perform parallel packaging and conversion of different IoT device protocols, combine multi-language conversion protocols, perform parsing and packaging operations on IoT data, obtain data results for conversion, and modify the data in the process to finally generate the target protocol file. It is conducive to solving the problem of difficulty in research and development and cumbersome development of IoT device docking caused by multiple IoT device protocols and low development efficiency, and improves the device access efficiency of the IoT platform. The embodiment of the present application supports multiple languages ​​and customizable expansion, so it can easily support the integration of new devices and new functions, which is conducive to the expansion and upgrading of future systems. The embodiment of the present application can provide a unified integration standard for IoT applications implemented by different devices and different programming languages, and simplify the device access process. For example, the user simply defines the object model of the smart thermostat (IoT device) and uses the visualization tool provided by the embodiment of the present application to set the protocol conversion rules. The above system handles all complex protocol conversion tasks and automatically generates thermostat access codes suitable for different programming languages, so that it can access the IoT access platform more conveniently. The device access process is simplified and the inconsistency of protocols between different programming languages ​​is avoided.

[0091] The method provided by the embodiments of the present application is introduced below.

[0092] See also Fig.11 , a device access control method provided in an embodiment of the present application generally includes:

[0093] S101, obtaining original bytecode data from at least one IoT device;

[0094] S102. For the original bytecode data of each IoT device, the original bytecode data of the IoT device is parsed according to a preset field type and length corresponding to the IoT device to obtain information content of each field of the original bytecode data of the IoT device; and a target protocol file matching a target IoT platform to be accessed by the IoT device is generated according to a preset target language corresponding to the IoT device, based on the information content of each field of the original bytecode data of the IoT device.

[0095] In some embodiments, step S102 includes:

[0096] The original bytecode data for each IoT device:

[0097] Parsing the original bytecode data of the IoT device according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device;

[0098] Convert the information content of each field of the original bytecode data of the IoT device into a preset target language corresponding to the IoT device, and generate a language model corresponding to the original bytecode data of the IoT device;

[0099] Based on the language model corresponding to the original bytecode data of the IoT device, a target protocol file matching the target IoT platform that the IoT device needs to access is generated.

[0100] In some embodiments, based on the language model corresponding to the original bytecode data of the IoT device, a target protocol file matching the target IoT platform that the IoT device needs to access is generated, including:

[0101] The data of the language model corresponding to the original bytecode data of the IoT device is checked according to the predefined language model architecture requirements, and when an error is found, the data is corrected to obtain the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements;

[0102] The language model data corresponding to the original bytecode data of the Internet of Things device that meets the predefined language model architecture requirements is used as a data source, and a target protocol file matching the target Internet of Things platform that the Internet of Things device needs to access is generated based on the data source.

[0103] The following is an introduction to the device provided in the embodiments of the present application, in which the explanations or examples of technical features that are the same or corresponding to those described in the above method will not be repeated later.

[0104] An electronic device provided in an embodiment of the present application, see Fig.12 , for example:

[0105] The processor 600 is used to read the program in the memory 620 and execute the following process:

[0106] Obtaining raw bytecode data from at least one IoT device;

[0107] For the original bytecode data of each of the IoT devices: the original bytecode data of the IoT device is parsed according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; the information content of each field of the original bytecode data of the IoT device is generated according to the preset target language corresponding to the IoT device to generate a target protocol file that matches the target IoT platform that the IoT device needs to access.

[0108] In some embodiments, for the original bytecode data of each IoT device: the original bytecode data of the IoT device is parsed according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; the information content of each field of the original bytecode data of the IoT device is generated according to the preset target language corresponding to the IoT device to generate a target protocol file matching the target IoT platform that the IoT device needs to access, including:

[0109] The original bytecode data for each IoT device:

[0110] Parsing the original bytecode data of the IoT device according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device;

[0111] Convert the information content of each field of the original bytecode data of the IoT device into a preset target language corresponding to the IoT device, and generate a language model corresponding to the original bytecode data of the IoT device;

[0112] Based on the language model corresponding to the original bytecode data of the IoT device, a target protocol file matching the target IoT platform that the IoT device needs to access is generated.

[0113] In some embodiments, based on the language model corresponding to the original bytecode data of the IoT device, a target protocol file matching the target IoT platform that the IoT device needs to access is generated, including:

[0114] The data of the language model corresponding to the original bytecode data of the IoT device is checked according to the predefined language model architecture requirements, and when an error is found, the data is corrected to obtain the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements;

[0115] The language model data corresponding to the original bytecode data of the Internet of Things device that meets the predefined language model architecture requirements is used as a data source, and a target protocol file matching the target Internet of Things platform that the Internet of Things device needs to access is generated based on the data source.

[0116] In some embodiments, the processor 600 is further configured to read a program in the memory 620 and execute the following process:

[0117] A user interface is provided, on which a configuration control is provided, and the configuration control is used for a user to configure access channel information of an Internet of Things device and device information of the Internet of Things device.

[0118] In some embodiments, a data control is also provided on the user interface, and the data control is used to display to the user the bytecode data of the IoT device currently acquired by the system; and to allow the user to select the bytecode data of the IoT device that needs to be parsed.

[0119] In some embodiments, the data control is also used for the user to set the bytecode data of the IoT device, and / or to import the bytecode data of the IoT device.

[0120] In some embodiments, a conversion control is also provided on the user interface, and the conversion control is used for the user to set: the IoT device that needs to be connected, the conversion rule for protocol conversion of the bytecode data of the IoT device, the conversion name corresponding to the conversion rule, and the target language for protocol conversion; and for the user to select and export a target protocol file that matches the target IoT platform that the IoT device needs to access.

[0121] The transceiver 610 is configured to receive and send data under the control of the processor 600 .

[0122] Among them, Fig.12 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 600 and various circuits of memory represented by memory 620 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, including wireless channels, wired channels, optical cables, and other transmission media. For different user devices, the user interface 630 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0123] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.

[0124] In some embodiments, the processor 600 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device), and the processor may also adopt a multi-core architecture.

[0125] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.

[0126] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0127] It should be noted that the division of functional modules or units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0129] Any of the devices or apparatuses provided in the embodiments of the present application may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. It may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.

[0130] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.

[0131] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.

[0132] The present application embodiment also provides a computer program product or computer program, which includes a computer instruction, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device executes any of the methods described in the above embodiments. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0133] The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the embodiment of the present application, which includes a program for executing any of the methods provided in the embodiment of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.

[0134] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0135] It should be understood that:

[0136] The access technology through which entities in the communication network transmit traffic can be any suitable current or future technology, such as WLAN (Wireless Local Access Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE-A, 5G, Bluetooth, infrared, etc.; in addition, the embodiments can also apply wired technology, for example, IP-based access technology, such as a wired network or a fixed line.

[0137] Embodiments suitable for being implemented as software code or a portion thereof and running using a processor or processing functionality are independent of the software code and may be specified using any known or future developed programming language, such as a high-level programming language such as objective-C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or a low-level programming language such as machine language or assembler.

[0138] The implementation of the embodiments is hardware independent and may be implemented using any known or future developed hardware technology or any mixture thereof, such as a microprocessor or CPU (central processing unit), MOS (metal oxide semiconductor), CMOS (complementary MOS), BiMOS (bipolar MOS), BiCMOS (bipolar CMOS), ECL (emitter coupled logic) and / or TTL (transistor-transistor logic).

[0139] Embodiments may be implemented as separate devices, apparatuses, units, components, or functions, or in a distributed manner, for example, one or more processors or processing functions may be used or shared in a process, or one or more processing segments or processing portions may be used and shared in a process, wherein one physical processor or more than one physical processor may be used to implement one or more processing portions dedicated to a specific process as described.

[0140] The device may be implemented by a semiconductor chip, a chipset, or a (hardware) module including such a chip or chipset.

[0141] The embodiments may also be implemented as any combination of hardware and software, such as ASIC (Application Specific IC (Integrated Circuit)) components, FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device) components or DSP (Digital Signal Processor) components.

[0142] The embodiments may also be implemented as a computer program product including a computer usable medium having computer readable program code embodied therein, the computer readable program code being adapted to perform the processes as described in the embodiments, wherein the computer usable medium may be a non-transitory medium.

[0143] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0144] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0145] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0147] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A protocol file generation system, characterized in that: The system comprises: A raw data acquisition module, used to acquire raw bytecode data from at least one IoT device; The original data parsing and encapsulation module is used for the original bytecode data of each of the IoT devices: parsing the original bytecode data of the IoT device according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; and generating a target protocol file matching the target IoT platform that the IoT device needs to access according to the preset target language corresponding to the IoT device based on the information content of each field of the original bytecode data of the IoT device.

2. The system according to claim 1, characterized in that The raw data parsing and encapsulation module comprises: A field syntax conversion module is used to parse the original bytecode data of each IoT device according to a preset field type and length corresponding to the IoT device, and obtain information content of each field of the original bytecode data of the IoT device; A language model generation module is used to convert the information content of each field of the original bytecode data of the IoT device into a preset target language corresponding to the IoT device, and generate a language model corresponding to the original bytecode data of the IoT device; The target protocol file generation module is used to generate a target protocol file that matches the target IoT platform that the IoT device needs to access based on the language model corresponding to the original bytecode data of the IoT device.

3. The system according to claim 2, characterized in that The target protocol file generation module includes: A data correction module is used to check the data of the language model corresponding to the original bytecode data of the IoT device according to the predefined language model architecture requirements, and when an error is found, correct the data to obtain the language model data corresponding to the original bytecode data of the IoT device that meets the predefined language model architecture requirements; The template engine module is used to use the language model data corresponding to the original bytecode data of the Internet of Things device that meets the predefined language model architecture requirements as a data source, and generate a target protocol file that matches the target Internet of Things platform that the Internet of Things device needs to access based on the data source.

4. The system according to claim 1, characterized in that The system further comprises: The user interface module is used to provide a user interface, on which a configuration control is provided, and the configuration control is used for a user to configure access channel information of an Internet of Things device and device information of the Internet of Things device.

5. The system according to claim 4, characterized in that The user interface is also provided with a data control, which is used to display to the user the bytecode data of the IoT device currently acquired by the system; and to allow the user to select the bytecode data of the IoT device that needs to be parsed.

6. The system according to claim 5, characterized in that The data control is also used for the user to set the bytecode data of the Internet of Things device, and / or to import the bytecode data of the Internet of Things device.

7. The system according to claim 4, characterized in that The user interface is also provided with a conversion control, which is used for the user to set: the IoT device that needs to be connected, the conversion rule for protocol conversion of the bytecode data of the IoT device, the conversion name corresponding to the conversion rule, and the target language for protocol conversion; and for the user to select and export a target protocol file that matches the target IoT platform that the IoT device needs to access.

8. A method for generating a protocol file, characterized in that: The method comprises: Obtaining raw bytecode data from at least one IoT device; For the original bytecode data of each of the IoT devices: the original bytecode data of the IoT device is parsed according to the preset field type and length corresponding to the IoT device to obtain the information content of each field of the original bytecode data of the IoT device; the information content of each field of the original bytecode data of the IoT device is generated according to the preset target language corresponding to the IoT device to generate a target protocol file that matches the target IoT platform that the IoT device needs to access.

9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory and execute the method according to claim 8 according to the obtained program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the method of claim 8.

Citation Information

Cited By

  • Telegraph text repairing method and telegraph text repairing system

    CN121036917A

  • Internet of Things equipment data analysis method and system supporting multi-protocol user-defined splicing

    CN121262306A