Identification and statistical method, system and storage medium of Internet of Things terminals
By carrying preset optional fields in the communication packets reported by the Internet of Things terminal and analyzing them according to the preset analysis rules, the problem that the Internet of Things platform is difficult to identify and count different types of terminals is solved, and data processing capabilities are improved.
Patent Information
- Application Number
- CN202311873484.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-12-29
AI Technical Summary
It is difficult for the Internet of Things platform to identify various types of IoT terminals that are accessed, and it is also difficult to conduct data statistics on different types of IoT terminals.
By obtaining preset optional fields in the communication message reported by the Internet of Things terminal, these fields are analyzed according to the preset analysis rules, terminal identification information is obtained, and the accessed Internet of Things terminals is counted based on this information.
It has realized the identification and statistics of data information of different types of IoT terminals, effectively improving the data processing capabilities of IoT platforms.
Smart Images

Figure CN118041969B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an Internet of Things terminal identification and statistics method, system and storage medium. Background Art
[0002] At present, the IoT platform can support many types of terminals. Accordingly, the access specification SDK types involved can be divided into: MQTT SDK using MQTT protocol access and NB SDK using LWM2M protocol access, and the module types involved can be divided into: customized modules and non-customized modules. In the related technology, it is difficult for the IoT platform to identify the various types of IoT terminals that are connected, and it is also difficult to collect data statistics for different types of IoT terminals. Summary of the invention
[0003] In order to solve at least one of the above technical problems, the present invention proposes an IoT terminal identification and statistics method, system and storage medium, which can distinguish and count data information of different types of IoT terminals, effectively improving the data processing capability of the IoT platform.
[0004] On the one hand, an embodiment of the present invention provides an IoT terminal identification and statistics method, comprising the following steps:
[0005] Obtaining a communication message reported by an Internet of Things terminal; wherein the communication message includes a preset optional field;
[0006] Parsing the preset optional fields according to preset parsing rules to obtain parsed data;
[0007] Identify the parsed data to obtain terminal identification information; wherein the terminal identification information includes terminal type information;
[0008] Statistics are collected on the connected IoT terminals according to the terminal type information to obtain terminal statistical data.
[0009] According to some embodiments of the present invention, the step of constructing the preset optional field includes:
[0010] Acquire module model data of the IoT terminal to construct module model parameters according to the module model data; wherein the module model parameters include a preset terminal flag and a preset module type flag;
[0011] Obtain chip model information of the IoT terminal to construct chip model parameters according to the chip model information;
[0012] Obtaining software version information of the IoT terminal to construct software version parameters according to the software version information;
[0013] The preset optional field is constructed according to the module model parameter, the chip model parameter and the software version parameter.
[0014] According to some embodiments of the present invention, constructing the preset optional field according to the module model parameter, the chip model parameter and the software version parameter includes:
[0015] Determine a module model length parameter according to the character length data of the module model parameter, so as to construct a module model field according to the module model length parameter and the module model parameter;
[0016] Determine a chip model length parameter according to the character length data of the chip model parameter, so as to construct a chip model field according to the chip model length parameter and the chip model parameter;
[0017] Determine a software version length parameter according to the character length data of the software version parameter, so as to construct a software version field according to the software version length parameter and the software version parameter;
[0018] The module model field, the chip model field and the software version field are sequentially connected to construct the preset optional field.
[0019] According to some embodiments of the present invention, the terminal type information includes a self-developed terminal or a non-self-developed terminal;
[0020] The step of identifying the parsed data to obtain terminal identification information includes:
[0021] When it is determined that the preset terminal mark is identified in the parsed data, marking the IoT terminal as the self-developed terminal;
[0022] Alternatively, when it is determined that the preset terminal mark is not identified in the parsed data, the Internet of Things terminal is marked as the non-self-developed terminal.
[0023] According to some embodiments of the present invention, identifying the parsed data to obtain terminal identification information further includes:
[0024] The module information of the Internet of Things terminal is determined according to the preset terminal flag and the preset module type identifier; wherein the module information includes a narrowband customized module, a message queue telemetry transmission customized module or a message queue telemetry transmission non-customized module.
[0025] According to some embodiments of the present invention, the performing statistics on the connected IoT terminals according to the terminal type information to obtain terminal statistical data includes:
[0026] Classifying the IoT terminals according to the module information to obtain classification results;
[0027] According to the classification result, the corresponding terminal group data is added by one to obtain the terminal statistical data.
[0028] According to some embodiments of the present invention, the method further comprises:
[0029] Storing the terminal statistical data and the parsed data in an Internet of Things platform to obtain terminal information data;
[0030] When it is determined that the terminal information query instruction is received, the corresponding terminal information data is visualized.
[0031] On the other hand, an embodiment of the present invention further provides an Internet of Things terminal identification and statistics system, including:
[0032] The first module is used to obtain a communication message reported by an Internet of Things terminal; wherein the communication message includes a preset optional field;
[0033] The second module is used to parse the preset optional fields according to preset parsing rules to obtain parsed data;
[0034] The third module is used to identify the parsed data to obtain terminal identification information; wherein the terminal identification information includes terminal type information;
[0035] The fourth module is used to count the connected Internet of Things terminals according to the terminal type information to obtain terminal statistical data.
[0036] On the other hand, an embodiment of the present invention further provides an Internet of Things terminal identification and statistics system, including:
[0037] at least one processor;
[0038] at least one memory for storing at least one program;
[0039] When the at least one program is executed by the at least one processor, the at least one processor implements the Internet of Things terminal identification and statistics method as described in the above embodiment.
[0040] On the other hand, an embodiment of the present invention further provides a computer storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the Internet of Things terminal identification and statistics method as described in the above embodiment.
[0041] According to an embodiment of the present invention, an Internet of Things terminal identification and statistics method, system and storage medium have at least the following beneficial effects: the embodiment of the present invention first obtains a communication message reported by an Internet of Things terminal, wherein the communication message includes a preset optional field. Then, the embodiment of the present invention parses the preset optional field according to the preset parsing rule to obtain parsed data, and then identifies the parsed data to obtain terminal identification data including terminal type information. Finally, the embodiment of the present invention counts the connected Internet of Things terminals according to the terminal type information to obtain corresponding terminal statistical data, so that the data information of different types of Internet of Things terminals can be distinguished and counted, and the data processing capability of the Internet of Things platform is effectively improved. It is easy to understand that the embodiment of the present invention can recognize different types of Internet of Things terminals by parsing the preset optional fields in the communication message without increasing the business workload, thereby effectively improving the data processing capability of the Internet of Things platform. At the same time, the embodiment of the present invention can distinguish the Internet of Things terminals by identifying the parsed data obtained by parsing, and then count the terminal type information obtained by identification, so as to realize the statistics of data information of various types of Internet of Things terminals. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of the method for identifying and counting IoT terminals provided by an embodiment of the present invention;
[0043] Figure 2 It is a schematic diagram of the construction steps of the preset optional fields provided in an embodiment of the present invention;
[0044] Figure 3 It is a schematic diagram of a step flow of constructing a preset optional field according to a module model parameter, a chip model parameter and a software version parameter provided by an embodiment of the present invention;
[0045] Figure 4 It is a schematic flow chart of steps for identifying parsed data and obtaining terminal identification information provided by an embodiment of the present invention;
[0046] Figure 5 It is a schematic diagram of a flow chart of steps for determining module information of an Internet of Things terminal provided by an embodiment of the present invention;
[0047] Figure 6 It is a schematic flow chart of the steps of obtaining terminal statistical data by counting connected Internet of Things terminals according to terminal type information provided by an embodiment of the present invention;
[0048] Figure 7 It is a schematic diagram of the steps of data visualization provided by an embodiment of the present invention;
[0049] Figure 8Schematic diagram of the architecture of the Internet of Things identification and statistics method provided by an embodiment of the present invention;
[0050] Fig. 9 This is a modular schematic diagram of the IoT terminal identification and statistics system provided by an embodiment of the present invention.
[0051] Fig.10 It is a principle block diagram of the Internet of Things terminal identification and statistics system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The embodiments described in the embodiments of this application should not be regarded as limitations of this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0053] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0055] Before introducing the embodiments of the present application, the relevant terms involved in the present application are first explained.
[0056] Message Queue Telemetry Transport (MQTT) protocol: It is a message protocol based on the publish / subscribe paradigm under the ISO standard. It works on the TCP / IP protocol family and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions.
[0057] LwM2M protocol: It is a communication protocol for managing and controlling IoT devices. Its full name is Lightweight M2M. Accordingly, it is based on the CoAP protocol and provides standard OTA (Over-The-Air) upgrade, remote configuration and monitoring functions. In addition, the LwM2M protocol can provide a simple and efficient management and control method for IoT devices, which conforms to the characteristics of limited device network capabilities and cross-business field applications, and is suitable for managing a large number of widely distributed and diverse types of smart devices and sensor nodes.
[0058] At present, there are many types of terminals that can be supported by the IoT platform. Accordingly, the access specification SDK types involved in the relevant IoT platform can be divided into: MQTT SDK using the MQTT protocol for access and NBSDK using the LWM2M protocol for access, and the module types involved can be divided into: customized modules and non-customized modules. In the related technology, it is difficult for the IoT platform to identify the various types of IoT terminals that are connected, and it is also difficult to collect data statistics for different types of IoT terminals. Therefore, the above technical problems need to be solved urgently.
[0059] Based on this, an embodiment of the present invention provides an IoT terminal identification and statistics method, system and storage medium, which can distinguish and count data information of different types of IoT terminals, and effectively improve the data processing capability of the IoT platform. Figure 1 The method of the embodiment of the present invention includes but is not limited to step S110, step S120, step S130 and step S140.
[0060] Specifically, the method application process of the embodiment of the present invention includes but is not limited to the following steps:
[0061] S110: Acquire a communication message reported by an IoT terminal, wherein the communication message includes a preset optional field.
[0062] S120: Parse the preset optional fields according to preset parsing rules to obtain parsed data.
[0063] S130: Identify the parsed data to obtain terminal identification information, wherein the terminal identification information includes terminal type information.
[0064] S140: Count the connected IoT terminals according to the terminal type information to obtain terminal statistical data.
[0065] In this specific embodiment, the embodiment of the present invention first obtains the communication message reported by the Internet of Things terminal. Specifically, the communication message (login message) reported by the Internet of Things terminal in the embodiment of the present invention includes a preset optional field. Among them, the preset optional field in the embodiment of the present invention refers to a tag field used to carry corresponding statistical information, such as module information and chip information. The embodiment of the present invention carries the corresponding tag field, that is, the preset optional field, in the communication message reported by the Internet of Things terminal, so as to send the corresponding statistical information of the Internet of Things terminal to the Internet of Things platform, such as the CTWING platform, without increasing the business workload. Exemplarily, in the embodiment of the present invention, for the NB terminal, a specific OPT field, that is, a preset optional field, is added to the communication message (login message) of the LWM2M protocol, as a tag field for the NB terminal to use the self-developed SDK. The NB terminal logs in to the core network and can report the corresponding statistical information to the Internet of Things platform. For example, the field content of the preset optional field in the embodiment of the present invention is "tyv=tywl_###", where "tyv" is the keyword of the tag information of the OPT of the LWM2M login message, and "tywl_###" is the tag information. Next, the embodiment of the present invention parses the preset optional field according to the preset parsing rule to obtain the corresponding parsing data. Specifically, the preset parsing rule in the embodiment of the present invention corresponds to the encoding rule of the preset optional field, that is, it is determined according to the definition of each field in the preset optional field. Correspondingly, when the Internet of Things platform receives the communication message uploaded by the Internet of Things terminal, it extracts the corresponding preset optional field, and parses the preset optional field according to the preset parsing rule, thereby parsing and obtaining the corresponding statistical information of the Internet of Things terminal, that is, parsing data. Further, the embodiment of the present invention identifies the parsed data to obtain terminal identification information. Specifically, the terminal identification information in the embodiment of the present invention includes terminal type information. Among them, the terminal type information in the embodiment of the present invention refers to the type of the corresponding Internet of Things terminal, such as customized type and non-customized type, or the MQTT SDK type accessed using the MQTT protocol and the NBSDK type accessed using the LWM2M protocol, etc. The embodiment of the present invention identifies the parsed data obtained by parsing, such as identifying whether the parsed data carries the corresponding Internet of Things terminal type identification information, thereby obtaining the terminal identification information. Finally, the embodiment of the present invention counts the connected Internet of Things terminals according to the terminal type information to obtain terminal statistical data. Specifically, in the embodiment of the present invention, terminal statistical data refers to data obtained by counting various types of IoT terminals connected to the IoT platform, such as the number of various types of IoT terminals, corresponding model information, and version information.The embodiment of the present invention performs statistical analysis on the terminal type information of each identified IoT terminal, thereby being able to count the data information of different types of IoT terminals, thereby alleviating the problem that the current IoT platform is difficult to automatically identify and count different types of IoT terminals, and effectively improving the data processing capability of the IoT platform.
[0066] Reference Figure 2 In some embodiments of the present invention, the steps of constructing the preset optional fields include but are not limited to:
[0067] S210: Acquire module model data of the IoT terminal to construct module model parameters according to the module model data, wherein the module model parameters include a preset terminal flag and a preset module type flag.
[0068] S220: Obtain chip model information of the IoT terminal to construct chip model parameters according to the chip model information.
[0069] S230: Obtain software version information of the IoT terminal to construct software version parameters according to the software version information.
[0070] S240: Constructing preset optional fields according to the module model parameters, chip model parameters, and software version parameters.
[0071] In this specific embodiment, the preset optional fields include module signal parameters, chip signal parameters, and software version parameters. Specifically, the embodiment of the present invention first obtains the module model data of the Internet of Things terminal to construct the model parameters according to the model data. Among them, the module model data in the embodiment of the present invention refers to the module model information of the corresponding Internet of Things terminal, such as the actual model and the module type identifier. Next, the embodiment of the present invention obtains the chip model information of the Internet of Things terminal to construct the corresponding chip model parameters according to the chip model information. Specifically, the chip model information in the embodiment of the present invention refers to the model information of the main control chip or processor used in the Internet of Things terminal, such as the model of the chip such as the microcontroller and the processor. The embodiment of the present invention obtains the chip model information of the Internet of Things terminal to construct the corresponding chip model parameters. Further, the embodiment of the present invention obtains the software version information of the Internet of Things terminal to construct the corresponding software version parameters according to the software version information. Specifically, the software version information in the embodiment of the present invention refers to the version number of the software or firmware used by the Internet of Things terminal device, such as the operating system version number, the communication protocol version number, the driver version number and other information. The embodiment of the present invention obtains the software version information of the Internet of Things terminal to construct the corresponding software version parameters. Finally, the embodiment of the present invention constructs preset optional fields based on module model parameters, chip model parameters and software version parameters. Specifically, the preset optional fields in the embodiment of the present invention include module model, chip model and software version, and the preset optional fields are constructed by combining the constructed module model parameters, chip model parameters and software version parameters to form a string. Among them, the preset optional fields in the embodiment of the present invention carry the module model information, chip model information and software version information of the corresponding Internet of Things terminal, so that the Internet of Things platform can obtain the corresponding information of the Internet of Things terminal after parsing the communication message.
[0072] Reference Figure 3 In some embodiments of the present invention, the preset optional fields are constructed according to the module model parameters, chip model parameters and software version parameters, including but not limited to the following steps:
[0073] S310: Determine the module model length parameter according to the character length data of the module model parameter, so as to construct a module model field according to the module model length parameter and the module model parameter.
[0074] S320: Determine the chip model length parameter according to the character length data of the chip model parameter, so as to construct a chip model field according to the chip model length parameter and the chip model parameter.
[0075] S330: Determine the software version length parameter according to the character length data of the software version parameter, so as to construct a software version field according to the software version length parameter and the software version parameter.
[0076] S340: Connect the module model field, the chip model field, and the software version field in sequence to construct a preset optional field.
[0077] In this specific embodiment, each part of the fields in the preset optional fields of the embodiment of the present invention is composed of Length+Value, that is, a character length combined with the corresponding parameters to form a string. For example, in the embodiment of the present invention, the character length field is 2 characters, indicating the length of the following field Value. Among them, the actual length of Value in the embodiment of the present invention shall not exceed 20 characters. Specifically, the embodiment of the present invention first determines the module model according to the character length data of the module model parameter, and then constructs the module model field according to the module model length parameter and the module model parameter. For example, in the embodiment of the present invention, the module model parameter is "moduleCT11", then the character length data of the module model parameter is determined to be 10, that is, the module model length parameter is "10". Therefore, the module model field is "10moduleCT11" constructed according to the module model parameter and the module model length parameter. Further, the embodiment of the present invention determines the chip model length parameter according to the character length data of the chip model parameter, and then constructs the chip model field according to the chip model length parameter and the corresponding chip model parameter. For example, the chip model parameter determined in the embodiment of the present invention is "chiptype", then the character length data of the chip model parameter is determined to be 8, that is, the chip model length parameter is "08". Therefore, the chip model field obtained by the embodiment of the present invention according to the chip model length parameter and the chip model parameter is "08chiptype". Next, the embodiment of the present invention determines the corresponding software version length parameter according to the character length data of the software version parameter, so as to construct the software version field according to the software version parameter and the software version length parameter. For example, in the embodiment of the present invention, the software version parameter is "softversion", and its corresponding character length is determined to be 11, that is, the software version length parameter is "11". Therefore, the corresponding software version field obtained by the embodiment of the present invention according to the software version parameter and the software version length parameter is "11softversion". Finally, the embodiment of the present invention connects the module signal field, the chip model field and the software version field in sequence to construct a preset optional field. For example, the module model field constructed in the embodiment of the present invention is "10moduleCT11", the chip model field is "08chiptype", and the software version field is "11softversion". By splicing these fields in sequence, a preset optional field such as "10moduleCT1108chiptype11softversion" is constructed.
[0078] It should be noted that in some embodiments of the present invention, the module model parameters include the actual module signal, the preset terminal flag (such as the self-developed SDK flag) and the preset module type flag. Among them, the embodiment of the present invention distinguishes the module type of the IoT terminal by the preset module type flag. In addition, the embodiment of the present invention distinguishes between self-developed IoT terminals and non-self-developed IoT terminals, that is, customized IoT terminals and non-customized IoT terminals, by preset terminal flags. Exemplarily, the preset optional fields in the embodiment of the present invention are shown in Table 1 below:
[0079] Table 1
[0080]
[0081]
[0082] Combination Figure 1 , refer to Figure 4 In some embodiments of the present invention, the terminal type information includes a self-developed terminal or a non-self-developed terminal. Accordingly, in an embodiment of the present invention, the parsed data is identified to obtain the terminal identification information, including but not limited to the following steps:
[0083] S410: When it is determined that a preset terminal logo is identified in the parsed data, the IoT terminal is marked as a self-developed terminal.
[0084] S420: When it is determined that the preset terminal mark is not recognized in the parsed data, the IoT terminal is marked as a non-self-developed terminal.
[0085] In this specific embodiment, the terminal type information includes self-developed terminals and non-self-developed terminals. Among them, in the embodiment of the present invention, the self-developed terminal refers to an Internet of Things terminal that uses a self-developed SDK or a customized module, and the non-self-developed terminal refers to an Internet of Things terminal that uses a non-self-developed SDK or a non-customized module. Correspondingly, the embodiment of the present invention distinguishes whether the Internet of Things terminal is a self-developed terminal by identifying the preset terminal flag in the parsed data. Specifically, in the process of constructing the preset optional field, the embodiment of the present invention sets the preset terminal flag to distinguish between the self-developed terminal and the non-self-developed terminal. Among them, when it is determined that the preset terminal flag is identified in the parsed data, the embodiment of the present invention marks the Internet of Things terminal as a self-developed terminal, that is, it is judged that the Internet of Things terminal is a self-developed terminal. Alternatively, when it is determined that the preset terminal flag is identified in the parsed data, it is judged that the Internet of Things terminal is a non-self-developed terminal, and the embodiment of the present invention marks the Internet of Things terminal as a non-self-developed terminal. Exemplarily, the embodiment of the present invention sets the preset terminal flag corresponding to the self-developed terminal to "CT", and when the preset terminal flag "CT" is identified from the parsed data, it indicates that the Internet of Things terminal is a self-developed terminal. For example, in the embodiment of the present invention, the parsed data is "10moduleCT1108chiptype11softversion". By identifying the parsed data and determining that the preset terminal mark "CT" is identified in the parsed data, the embodiment of the present invention marks the Internet of Things terminal as a self-developed terminal.
[0086] Combination Figure 1 , refer to Figure 5 In some embodiments of the present invention, identifying the parsed data to obtain terminal identification information also includes but is not limited to the following steps:
[0087] S510: Determine module information of the IoT terminal according to a preset terminal identifier and a preset module type identifier, wherein the module information includes a narrowband customized module, a message queue telemetry transmission customized module, or a message queue telemetry transmission non-customized module.
[0088] In this specific embodiment, the embodiment of the present invention identifies the parsed data and also includes identifying the module information of the Internet of Things terminal. Specifically, the embodiment of the present invention determines the module information of the Internet of Things terminal according to the preset terminal flag and the preset module type identifier. Among them, the module information in the embodiment of the present invention includes a narrowband (NB) customized module, a message queue telemetry transmission (MQTT) customized module, and a message queue telemetry transmission (MQTT) non-customized module. After the embodiment of the present invention identifies the type of the Internet of Things terminal according to the preset terminal flag, the corresponding preset module type identifier is analyzed to determine the module information of the Internet of Things terminal. Exemplarily, the definition rules of the preset module type identifier in the embodiment of the present invention are shown in Table 2 below:
[0089] Table 2
[0090] Module type identification value Module type identification meaning 11 NB custom module 21 MQTT custom module 22 MQTT non-customized module
[0091] It is easy to understand that when the preset module type identifier is identified as "11", the module information of the IoT terminal is an NB customized module. When the preset module type identifier is identified as "21", the module information of the IoT terminal is an MQTT customized module. The embodiment of the present invention parses the preset optional field information reported by the IoT terminal, and the "CT" identifier is parsed as a self-developed terminal, and then the preset module type identifier after "CT" is parsed to determine the corresponding module information.
[0092] Combination Figure 5 , refer to Figure 6 In some embodiments of the present invention, statistics are collected on connected IoT terminals according to terminal type information to obtain terminal statistical data, including but not limited to the following steps:
[0093] S610: Classify the IoT terminals according to the module information to obtain classification results.
[0094] S620: According to the classification result, the corresponding terminal group data is incremented by one to obtain terminal statistical data.
[0095] In this specific embodiment, the embodiment of the present invention classifies the Internet of Things terminals according to the satisfying information to obtain the classification results, and adds one to the corresponding terminal grouping data according to the classification results to obtain terminal statistical data. Specifically, in the embodiment of the present invention, each classification result is provided with corresponding terminal grouping data. When the Internet of Things terminals are classified by module information, the Internet of Things terminals are divided into corresponding groups to obtain classification results. Among them, different groups are provided with corresponding terminal grouping data to count the number of Internet of Things terminals in the group. Accordingly, after the classification results of each Internet of Things terminal are obtained by the embodiment of the present invention, the corresponding terminal grouping data is added by one to obtain terminal statistical data. For example, according to the module information, the corresponding Internet of Things terminal is divided into a terminal using the self-developed NB SDK with a NB customized module to obtain a classification result. Then, the embodiment of the present invention adds one to the terminal grouping data count corresponding to the classification result. It is easy to understand that the embodiment of the present invention realizes statistical analysis of different types of Internet of Things terminals by classifying each Internet of Things terminal and adding one to the corresponding terminal grouping data.
[0096] Reference Figure 7 In some embodiments of the present invention, the IoT terminal identification and statistics method provided by the embodiments of the present invention further includes but is not limited to the following steps:
[0097] S710: Store terminal statistical data and parsed data in the IoT platform to obtain terminal information data.
[0098] S720: When it is determined that the terminal information query instruction is received, the corresponding terminal information data is visualized.
[0099] In this specific embodiment, the embodiment of the present invention stores the terminal statistical data and the corresponding parsed data to the Internet of Things platform to obtain the corresponding terminal information data, and then when it is determined that the terminal information query instruction is received, the corresponding terminal information data is visualized, so that the target object can query the information of the corresponding Internet of Things terminal on the Internet of Things platform. Specifically, the terminal information data in the embodiment of the present invention refers to the relevant information of each Internet of Things terminal, such as module model information, chip model information, software version information, and the number information of each type of Internet of Things terminal. In addition, the terminal information query instruction in the embodiment of the present invention refers to the instruction for the target object to query the information of the Internet of Things terminal through the Internet of Things platform. After the corresponding terminal statistical data is obtained by statistics, the embodiment of the present invention stores the terminal statistical data and the parsed data of the corresponding Internet of Things terminal in the Internet of Things platform. Further, when the target object needs to query the information of the Internet of Things terminal connected to the Internet of Things platform, the terminal information query instruction is triggered on the Internet of Things platform to view the corresponding Internet of Things terminal information, such as the count of a certain type of Internet of Things terminal. Correspondingly, when the terminal information query instruction is received, the embodiment of the present invention visualizes the corresponding terminal information data, so that the target object can view the terminal information data of the corresponding Internet of Things terminal on the Internet of Things platform.
[0100] For example, refer to Figure 8 , Figure 8It is a schematic diagram of the architecture of the Internet of Things identification and statistics method provided by an embodiment of the present invention. The embodiment of the present invention processes the received communication messages by setting a data statistics display module in the Internet of Things platform. Specifically, the communication message (login message) reported by the Internet of Things terminal in the embodiment of the present invention is provided with a tag field, that is, a preset optional field, to report statistical information (customized module / chip name, etc.). Correspondingly, after the data statistics display module obtains the communication message reported by the Internet of Things terminal, it stores and parses the communication message. The embodiment of the present invention parses the preset optional field according to the preset parsing rules to obtain the parsed data, and then identifies it according to the parsed data, so as to distinguish whether the Internet of Things terminal uses the self-developed SDK and the customized module. Correspondingly, when the Internet of Things terminal uses the self-developed SDK, the data statistics display module can parse whether the terminal uses an NB customized module, an MQTT (Message Queuing TelemetryTransport) customized module, an MQTT non-customized module or other modules. In addition, in the embodiment of the present invention, the data statistics display module parses out the IoT terminal using the self-developed SDK, and the IoT platform side obtains the self-developed terminal and other terminal information from the data statistics display module, and performs data visualization to display the statistical information of the self-developed terminals of different modules. Correspondingly, in the embodiment of the present invention, the preset optional field is a variable-length field, which is divided into three parts: a custom module model, i.e., a module model field, a chip model field, and a software version field (this field is not used as a statistical dimension). For example, the content of the custom module model in the embodiment of the present invention includes the actual module model, the self-developed SDK flag (fixed as "CT"), and the module type identifier ("11", "21", "22"). The embodiment of the present invention establishes a preset parsing rule through the data statistics display module to parse the preset optional field information reported by the IoT terminal. Among them, when it is identified that the preset optional field carries the "CT" identifier, it is parsed as a self-developed SDK, i.e., a self-developed terminal, and then the preset module type identifier is parsed to determine the module information of the IoT terminal. At the same time, the embodiment of the present invention counts the connected IoT terminals according to the terminal type information to obtain terminal statistical data. For example, the data statistics display module parses the corresponding IoT terminal as a terminal whose NB customized module uses the self-developed NB SDK, thereby adding 1 to the corresponding terminal group count, that is, adding one to the corresponding terminal group data to obtain terminal statistical data. Accordingly, when it is determined that a terminal information query instruction has been received, the embodiment of the present invention visualizes the corresponding terminal information data. For example, the IoT platform side obtains the terminal count number of the customized module using the self-developed NB SDK from the data statistics display module, stores and visualizes it on the IoT platform, and the target object can view the count data of this type of IoT terminal and the terminal information of the corresponding IoT terminal on the IoT platform.
[0101] Reference Fig. 9 An embodiment of the present invention further provides an Internet of Things terminal identification and statistics system, including:
[0102] The first module 810 is used to obtain a communication message reported by an IoT terminal, wherein the communication message includes a preset optional field.
[0103] The second module 820 is used to parse the preset optional field according to the preset parsing rule to obtain parsed data.
[0104] The third module 830 is used to identify the parsed data and obtain terminal identification information, wherein the terminal identification information includes terminal type information.
[0105] The fourth module 840 is used to count the connected IoT terminals according to the terminal type information to obtain terminal statistical data.
[0106] The contents of the method embodiments of the present invention are all applicable to the system embodiments. The functions specifically implemented by the system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method.
[0107] Reference Fig.10 An embodiment of the present invention further provides an Internet of Things terminal identification and statistics system, including:
[0108] At least one processor 910 .
[0109] At least one memory 920 is used to store at least one program.
[0110] When at least one program is executed by at least one processor 910, the at least one processor 910 implements the Internet of Things terminal identification and statistics method described in the above embodiment.
[0111] The contents of the method embodiments of the present invention are all applicable to the system embodiments. The functions specifically implemented by the system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method.
[0112] An embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by one or more control processors, for example, to execute the steps of the Internet of Things terminal identification statistics method described in the above embodiment.
[0113] The contents of the method embodiments of the present invention are all applicable to the system embodiments. The functions specifically implemented by the system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method.
[0114] The terms "first", "second", "third", "fourth", etc. (if any) in the specification 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 of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. 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.
[0115] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0116] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0117] 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.
[0118] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0119] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0120] The step numbers in the above method embodiment are only provided for the convenience of explanation and description, and no limitation is imposed on the order of the steps. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0121] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A method for identifying and counting IoT terminals, characterized in that: The following steps are involved: Obtaining a communication message reported by an Internet of Things terminal; wherein the communication message includes a preset optional field; Parsing the preset optional fields according to preset parsing rules to obtain parsed data; Identify the parsed data to obtain terminal identification information; wherein the terminal identification information includes terminal type information; Perform statistics on the connected IoT terminals according to the terminal type information to obtain terminal statistical data; The steps of constructing the preset optional fields include: Acquire module model data of the IoT terminal to construct module model parameters according to the module model data; wherein the module model parameters include a preset terminal flag and a preset module type flag; Obtain chip model information of the IoT terminal to construct chip model parameters according to the chip model information; Obtaining software version information of the IoT terminal to construct software version parameters according to the software version information; The preset optional field is constructed according to the module model parameter, the chip model parameter and the software version parameter; The preset optional fields are constructed according to the module model parameters, the chip model parameters and the software version parameters, including: Determine a module model length parameter according to the character length data of the module model parameter, so as to construct a module model field according to the module model length parameter and the module model parameter; Determine a chip model length parameter according to the character length data of the chip model parameter, so as to construct a chip model field according to the chip model length parameter and the chip model parameter; Determine a software version length parameter according to the character length data of the software version parameter, so as to construct a software version field according to the software version length parameter and the software version parameter; The module model field, the chip model field and the software version field are sequentially connected to construct the preset optional field.
2. The method for identifying and counting Internet of Things terminals according to claim 1, characterized in that: The terminal type information includes a self-developed terminal or a non-self-developed terminal; The step of identifying the parsed data to obtain terminal identification information includes: When it is determined that the preset terminal mark is identified in the parsed data, marking the IoT terminal as the self-developed terminal; Alternatively, when it is determined that the preset terminal mark is not identified in the parsed data, the Internet of Things terminal is marked as the non-self-developed terminal.
3. The method for identifying and counting Internet of Things terminals according to claim 1, characterized in that: The identifying the parsed data to obtain terminal identification information further includes: The module information of the Internet of Things terminal is determined according to the preset terminal flag and the preset module type identifier; wherein the module information includes a narrowband customized module, a message queue telemetry transmission customized module or a message queue telemetry transmission non-customized module.
4. The method for identifying and counting Internet of Things terminals according to claim 3 is characterized in that: The step of counting the connected IoT terminals according to the terminal type information to obtain terminal statistical data includes: Classifying the IoT terminals according to the module information to obtain classification results; According to the classification result, the corresponding terminal group data is added by one to obtain the terminal statistical data.
5. The method for identifying and counting Internet of Things terminals according to claim 1, characterized in that: The method further comprises: Storing the terminal statistical data and the parsed data in an Internet of Things platform to obtain terminal information data; When it is determined that the terminal information query instruction is received, the corresponding terminal information data is visualized.
6. An Internet of Things terminal identification and statistics system, characterized in that: include: The first module is used to obtain a communication message reported by an Internet of Things terminal; wherein the communication message includes a preset optional field; The second module is used to parse the preset optional fields according to the preset parsing rules to obtain parsed data; The third module is used to identify the parsed data to obtain terminal identification information; wherein the terminal identification information includes terminal type information; The fourth module is used to count the connected IoT terminals according to the terminal type information to obtain terminal statistical data; The steps of constructing the preset optional fields include: Acquire module model data of the IoT terminal to construct module model parameters according to the module model data; wherein the module model parameters include a preset terminal flag and a preset module type flag; Obtain chip model information of the IoT terminal to construct chip model parameters according to the chip model information; Obtaining software version information of the IoT terminal to construct software version parameters according to the software version information; The preset optional field is constructed according to the module model parameter, the chip model parameter and the software version parameter; The preset optional fields are constructed according to the module model parameters, the chip model parameters and the software version parameters, including: Determine a module model length parameter according to the character length data of the module model parameter, so as to construct a module model field according to the module model length parameter and the module model parameter; Determine a chip model length parameter according to the character length data of the chip model parameter, so as to construct a chip model field according to the chip model length parameter and the chip model parameter; Determine a software version length parameter according to the character length data of the software version parameter, so as to construct a software version field according to the software version length parameter and the software version parameter; The module model field, the chip model field and the software version field are sequentially connected to construct the preset optional field.
7. An Internet of Things terminal identification and statistics system, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the Internet of Things terminal identification and statistics method as described in any one of claims 1 to 5.
8. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the Internet of Things terminal identification and statistics method as described in any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Message forwarding method and device
CN108521371A
Terminal identification method and device
CN114710781A