Monitoring method, system, device and storage medium for 5G Internet of Things terminal
By writing terminal information into the target message of 5G IoT terminal and transmitting it to the monitoring platform, the problem of poor monitoring quality in the existing technology is solved, precise online status monitoring of the terminal is realized, and monitoring quality is improved.
Patent Information
- Application Number
- CN202210640932.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-06-07
AI Technical Summary
The monitoring quality of existing 5G IoT terminals is poor, mainly because multiple terminals use the same or partially the same public network address, which makes it impossible for the monitoring platform to determine which terminal's communication link is normal.
By writing terminal information into the target message generated by the 5G IoT terminal, it is placed in the fill section and transmitted to the monitoring platform. After receiving the message, the monitoring platform parses the terminal information in the fill section and updates the handshake information of the corresponding terminal to determine its online status.
It realizes accurate monitoring of 5G IoT terminals, can accurately judge the online status of the terminal, and improves monitoring quality and efficiency.
Smart Images

Figure CN115038102B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a 5G technical field, and in particular to a monitoring method, system, device and storage medium for a 5G Internet of Things terminal. Background Art
[0002] 5G terminals are increasingly being used, and are increasingly being used in the Internet of Things. 5G IoT terminals are used for environmental monitoring, traffic monitoring, climate monitoring, forest fire prevention, and hydrological monitoring, etc. The access method is to establish a wireless channel between the 5G module and the 5G base station, and finally access the Internet through the core gateway of the base station uplink. At the same time, the monitoring platform at the other end of the Internet of Things directly uses a public network address. The 5G terminal can establish communication with the public network address of the monitoring platform using the private network address assigned by the base station side. The communication relationship is as follows: Figure 1 shown.
[0003] In order to uniformly monitor all 5G terminals, 5G terminals need to send handshake messages to the monitoring platform regularly to prove that they are online. In the prior art, 5G terminals use core routers to convert private network addresses into public network addresses, so that messages can reach the Internet and communicate with the public network address of the monitoring platform. The main handshake mechanisms used include private protocols and ICMP protocols.
[0004] Among them, since multiple 5G terminals may not be provided by the same manufacturer, it is costly to support private protocols and the implementation of private protocols is cumbersome. Therefore, the ICMP protocol has been widely used, but when multiple 5G terminals convert private network addresses to public network addresses, the public network addresses may be the same or partially the same, making it impossible for the monitoring platform to determine which 5G terminal's communication link is normal, affecting the monitoring quality of 5G terminals. Summary of the invention
[0005] In view of this, the present invention provides a monitoring method, system, device and storage medium for a 5G Internet of Things terminal, which is used to solve the problem of poor monitoring quality in the prior art. In order to achieve one or part or all of the above purposes or other purposes, the present invention proposes a monitoring method, system, device and storage medium for a 5G Internet of Things terminal. In the first aspect:
[0006] A monitoring method for a 5G Internet of Things terminal, comprising:
[0007] After obtaining the handshake instruction, call the network management command to generate the target message;
[0008] Writing the terminal information into the padding segment of the target message based on a preset padding format;
[0009] The target message is transmitted to the monitoring platform.
[0010] Preferably, the step of writing the terminal information into the padding segment of the target message based on a preset padding format includes:
[0011] Obtaining a filling category and a filling order based on the filling format;
[0012] Acquire the corresponding terminal information based on the filling category; the terminal information includes a terminal serial number;
[0013] The terminal information is filled into the filling segment of the target message according to the filling order; the filling segment is a message field that is not processed by the protocol stack of the monitoring platform.
[0014] Preferably, before filling the terminal information into the filling segment of the target message according to the filling order, the method further includes:
[0015] When the padding length of the padding segment is less than the required length of the terminal information, configuring the byte space of the padding segment to expand the padding length;
[0016] After filling the terminal information into the filling segment of the target message according to the filling order, the method further includes:
[0017] Determine whether there is any remaining byte space in the filling segment;
[0018] If so, fill the remaining byte space with preset placeholder information.
[0019] Second aspect:
[0020] A monitoring method for a 5G Internet of Things terminal, comprising:
[0021] After receiving the target message, determining whether the target message meets the preset message requirements; the padding segment of the target message carries the terminal information;
[0022] When the target message meets the message requirement, obtaining the terminal information carried by the target message;
[0023] The handshake information of the corresponding Internet of Things terminal is updated based on the terminal information to monitor the online status of the corresponding Internet of Things terminal.
[0024] Preferably, the step of determining whether the target message meets the preset message requirements includes:
[0025] Determine whether the target message is an IP message;
[0026] If yes, determine whether the target message is an ICMP message;
[0027] If yes, obtain the field address of the padding segment in the target message;
[0028] Determining whether the padding segment carries the terminal information based on the field address;
[0029] If so, a check code is generated and it is determined whether the check code matches a preset check code to determine whether the target message meets the message requirement.
[0030] Preferably, the step of updating the handshake information of the corresponding Internet of Things terminal based on the terminal information includes:
[0031] Obtaining a terminal serial number from the terminal information;
[0032] When the terminal serial number exists in the preset terminal information table, the handshake time corresponding to the IoT terminal in the terminal information table is updated to the current time;
[0033] Increase the accumulated handshake count corresponding to the IoT terminal;
[0034] When the terminal serial number does not exist in the terminal information table, the terminal information, the handshake time and the handshake number are recorded in the terminal information table; the terminal information includes the terminal serial number.
[0035] The third aspect:
[0036] A monitoring system for a 5G Internet of Things terminal, comprising an Internet of Things terminal and a monitoring platform;
[0037] The Internet of Things terminal includes a message module, which is used to call the network management command to generate a target message after obtaining the handshake instruction;
[0038] A filling module, used for writing the terminal information into the filling segment of the target message based on a preset filling format;
[0039] A transmission module, used for transmitting the target message to the monitoring platform;
[0040] The monitoring platform includes a testing module, which is used to determine whether the target message meets the preset message requirements after receiving the target message;
[0041] an acquisition module, configured to acquire the terminal information carried by the target message when the inspection result of the inspection module is yes;
[0042] An updating module is used to update the handshake information corresponding to the Internet of Things terminal based on the terminal information to monitor the online status of the corresponding Internet of Things terminal.
[0043] Preferably, the filling module comprises a format unit for obtaining a filling category and a filling order based on the filling format;
[0044] An acquiring unit, configured to acquire the corresponding terminal information based on the filling category; the terminal information includes a terminal serial number;
[0045] A filling unit is used to fill the terminal information into the filling segment of the target message according to the filling order; the filling segment is a message field that is not processed by the protocol stack of the monitoring platform.
[0046] Preferably, the monitoring system further comprises an expansion module, which is used to configure the byte space of the filling segment to expand the filling length when the filling length of the filling segment is less than the required length of the terminal information;
[0047] A placeholder module, used to determine whether there is any remaining byte space in the filling segment;
[0048] If so, fill the remaining byte space with preset placeholder information.
[0049] Preferably, the inspection module includes a first verification unit, a second verification unit, a third verification unit, a fourth verification unit and a retrieval unit. The first verification unit is used to determine whether the target message is an IP message; if so, the second verification unit is used to determine whether the target message is an ICMP message; if so, the retrieval unit is used to obtain the field address of the padding segment in the target message; the third verification unit is used to determine whether the padding segment carries the terminal information based on the field address; if so, the fourth verification unit is used to generate a check code and determine whether the check code matches a preset check code.
[0050] Preferably, the update module includes a serial number unit for obtaining the terminal serial number in the terminal information; a first update unit for updating the handshake time of the corresponding IoT terminal in the terminal information table to the current time and increasing the accumulated handshake times of the corresponding IoT terminal when the terminal serial number exists in the preset terminal information table; and a second update unit for recording the terminal information, handshake time and handshake times in the terminal information table when the terminal serial number does not exist in the terminal information table. The terminal information includes the terminal serial number.
[0051] Fourth aspect:
[0052] A monitoring device for a 5G Internet of Things terminal includes a first memory and a first processor, wherein the first memory stores a monitoring method for the 5G Internet of Things terminal, and the first processor is used to adopt the above-described method when executing the monitoring method for the 5G Internet of Things terminal.
[0053] Fifth aspect:
[0054] A monitoring device for a 5G Internet of Things terminal, comprising a second memory and a second processor, characterized in that a monitoring method for a 5G Internet of Things terminal is stored in the second memory, and the second processor is used to adopt the above-described method when executing the monitoring method for the 5G Internet of Things terminal.
[0055] The sixth aspect:
[0056] A storage medium stores a computer program that can be loaded by a processor and execute the above method.
[0057] Implementing the embodiments of the present invention will have the following beneficial effects:
[0058] When the IoT terminal needs to shake hands with the monitoring platform, it writes its own terminal information into the generated target message, and it is located in the padding section of the target message. After the IoT information transmits the target message to the monitoring platform, the monitoring platform obtains the terminal information in the padding section by parsing the target message. Based on the terminal information, the monitoring platform can know which IoT terminal transmitted the target message, and thus determine that the communication link of the corresponding IoT terminal is normal, that is, the corresponding IoT terminal is online, realizing accurate monitoring of IoT terminals and improving monitoring quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0060] in:
[0061] Figure 1 This is the communication framework diagram between the 5G IoT terminal and the monitoring platform.
[0062] Figure 2 The present invention is a flowchart of a monitoring method for a 5G Internet of Things terminal in one embodiment.
[0063] Figure 3 The flowchart of writing terminal information into the padding segment of the target message in one embodiment.
[0064] Figure 4 This is a monitoring method for a 5G Internet of Things terminal in another embodiment.
[0065] Figure 5 This is a monitoring method for a 5G Internet of Things terminal in other embodiments.
[0066] Figure 6 The flowchart of one embodiment is to determine whether a target message meets the message requirements.
[0067] Figure 7 A flowchart of updating handshake information in one embodiment.
[0068] Figure 8 This is a structural diagram of a monitoring system for a 5G Internet of Things terminal in one embodiment. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will 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.
[0071] 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 the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0072] In order to monitor and manage 5G IoT terminals, 5G IoT terminals need to periodically send handshake messages to the monitoring platform to let the monitoring platform know that they are online. Limited by the number and cost of public IPs, most 5G IoT terminals use private IPs and monitoring platforms use public IPs. When a 5G IoT terminal sends a handshake message to the corresponding monitoring platform, the private network source IP address message is usually subjected to network address translation (NAT) through a core router, and finally converted to a public network source IP address to reach the Internet and communicate with the monitoring platform. The monitoring platform cannot actively communicate with the 5G IoT terminal because it cannot find the route on the 5G IoT terminal side. When the monitoring platform needs to receive handshake messages transmitted by multiple 5G IoT terminals, the converted public network addresses of multiple 5G IoT terminals may be the same, making it impossible for the monitoring platform to determine which 5G IoT terminal is online. Based on this, an embodiment of the present application discloses a monitoring method for 5G IoT terminals, such as Figure 2 As shown, the method includes:
[0073] S101. After obtaining a handshake instruction, call a network management command to generate a target message.
[0074] The 5G IoT terminal needs to periodically send a handshake message to the corresponding monitoring platform. Therefore, on the 5G IoT terminal side, a handshake instruction will be periodically received or generated to start the handshake message sending process. In one embodiment, the 5G IoT terminal will receive a handshake instruction every time a preset time period passes; the handshake instruction includes but is not limited to a clock signal. In another embodiment, the 5G IoT terminal will generate a handshake instruction every time a preset time period passes. Among them, the handshake instruction can be generated by a timer or by a processing chip. It should be noted that whether the 5G IoT terminal receives a handshake instruction or generates a handshake instruction, it is determined that the handshake instruction has been obtained.
[0075] After the 5G Internet of Things terminal obtains the handshake instruction, or when the handshake instruction is obtained, the network management command is called, and the target message is generated by the called network management command. Among them, the network management command refers to a command that can generate a message, including but not limited to the ping command. The target message generated based on the ping command is an IP message. Specifically, the type of the target message is an ICMP message. In addition, the message is a data unit exchanged and transmitted in the network, which contains the complete data information to be sent. The length is not limited and the length can be changed. In this embodiment, the target message generated by the called network management command is the handshake message that needs to be transmitted to the corresponding monitoring platform. S102. Write the terminal information into the fill segment of the target message based on the preset fill format.
[0076] In one embodiment, the target message includes an Ethernet header, an IP header, an ICMP header and a data field, wherein the data field is a padding segment. By writing the terminal information of the 5G Internet of Things terminal into the target message, multiple target messages received by the same monitoring platform can carry the terminal information of the corresponding 5G Internet of Things terminal, so that the monitoring platform can distinguish the source of each target message. After the monitoring platform knows the source of each target message, it can know which 5G Internet of Things terminals are online to realize the monitoring of the 5G Internet of Things terminal. In addition, since the protocol stack of the monitoring platform will not do any processing on the data field of the target message after receiving the target message, based on this mechanism, the terminal information is written in the padding segment, which can ensure the integrity and accuracy of the terminal information, and is not easy to be lost or tampered with, thereby improving the monitoring quality.
[0077] S103: Transmit the target message to the monitoring platform.
[0078] In one embodiment, a target message containing corresponding terminal information in the filling segment is sent to a corresponding monitoring platform, so that the monitoring platform can learn the terminal information from the target message, thereby locking the corresponding 5G Internet of Things terminal, enabling the monitoring platform to accurately monitor the 5G Internet of Things terminal and improving the monitoring quality.
[0079] In another embodiment of the present invention, in order to further define and illustrate, Figure 3 As shown, the step of writing the terminal information into the filling segment of the target message based on the preset filling format includes:
[0080] S201. Obtain a filling category and a filling order based on a filling format.
[0081] S202: Obtain corresponding terminal information based on the filling category.
[0082] S203: Fill the terminal information into the filling segment of the target message according to the filling order.
[0083] On the one hand, in order to enable the monitoring platform to identify the corresponding 5G IoT terminal through terminal information and improve the monitoring quality, the filling format constrains the filling category; on the other hand, in order to improve the writing efficiency of terminal information and the convenience of the monitoring platform reading the target message filling segment, the filling order is constrained to improve the monitoring efficiency.
[0084] Among them, in one embodiment, the filling format only includes the filling category, and the so-called filling category includes but is not limited to the terminal serial number, terminal manufacturer, terminal software version number, assigned 5G private network IP and check code, and there is no limit on the filling category and the number of filling categories. It is intended to enable the monitoring platform to lock the corresponding 5G Internet of Things terminal through the detailed information of the filling category. In this embodiment, the filling order is the arrangement order of the filling categories.
[0085] In other embodiments, the filling format includes a filling order in addition to the filling category. When filling the terminal information into the filling segment, it is performed according to the filling order. This facilitates orderly arrangement of the contents in the filling segment when there are a large number of filling categories, and efficient parsing of the monitoring platform, and quick search for the required terminal information.
[0086] In other embodiments, the filling order is the time sorting of the 5G Internet of Things terminal obtaining the terminal information corresponding to the filling category, that is, after obtaining the filling category through the filling format, the terminal information is obtained according to the filling category, and the terminal information obtained first is arranged in front, which is used as the filling order.
[0087] In one embodiment, the terminal information is stored in the memory of the corresponding 5G IoT terminal. According to the name or number of the filling category, the corresponding terminal information can be retrieved from the specified storage path or storage table. In other embodiments, after obtaining the filling category, the 5G IoT terminal outputs the filling category and then receives the terminal information transmitted by other terminals or input devices. Among them, the other terminal can be a database server, etc.
[0088] In another embodiment of the present invention, for further definition and explanation, before the step of filling the terminal information into the filling segment of the target message according to the filling order, the method includes:
[0089] Determine whether the padding length of the padding segment is less than the required length of the terminal information.
[0090] If so, configure the byte space of the padding segment to increase the padding length.
[0091] According to the mechanism of variable message length, in order to ensure that the terminal information of all filling categories can be written into the filling segment, the length of the filling segment is expanded to ensure the integrity of the terminal information and meet the requirements of the filling format. At the same time, it is also easy to meet the transmission of terminal information, so that more terminal information can be transmitted to the monitoring platform for other processing, and the purpose of the target message transmitted between the 5G IoT terminal and the monitoring platform can be expanded.
[0092] Specifically, in one embodiment, the padding length and the required length of the terminal information both refer to the number of bytes, such as 32 bytes, 128 bytes, and 256 bytes. After obtaining the terminal information, the required length can be estimated based on the terminal information, and then the padding length of the padding segment in the target message can be compared to obtain the size relationship between the two. In another embodiment, after the required length is estimated based on the terminal information, it is compared with the overall length of the target message. When the required length is less than the partial length of the target message, the byte space of the padding segment is configured. It should be noted that for a fixed application scenario, the lengths of the Ethernet header, IP header, and ICMP header in the target message are all fixed, that is, the proportion of the total length of the Ethernet header, IP header, and ICMP header in the target message length is certain and known, so that it can be obtained whether the padding length needs to be expanded.
[0093] In one embodiment, after configuring the byte space of the filling segment, the expansion request is transmitted to the operating system of the 5G IoT terminal, and the operating system expands the filling length. The expansion request can represent the number of bytes of the filling segment to be applied for, or it can represent the number of bytes of the target message to be applied for. In this embodiment, the expansion request applies to set the target message to 256 bytes.
[0094] In addition, in one embodiment, before the step of filling the terminal information into the filling segment of the target message according to the filling order, the step includes:
[0095] Configure the byte space of the padding segment to expand the padding space.
[0096] That is, the size between the padding length and the required length is no longer judged, but the target message is directly expanded to 256 bytes, which is conducive to reducing the execution steps and improving the efficiency of the 5G IoT terminal transmitting handshake messages to the monitoring platform, thereby improving the monitoring efficiency and saving network resources.
[0097] In another embodiment of the present invention, for further definition and explanation, after the step of filling the terminal information into the filling segment of the target message according to the filling order, the method includes:
[0098] Determine whether there is any remaining byte space in the padding segment.
[0099] If so, fill the remaining byte space with the preset placeholder information.
[0100] In order to fix the length of the target message, the unused space of the padding segment is occupied by placeholder information, which ensures the standardization and uniformity of the target message generated by the 5G IoT terminal. The placeholder information includes but is not limited to padding; the value of padding is 0.
[0101] For ease of understanding, Figure 4 As shown, in an application scenario, after the timer generates a handshake instruction, the handshake instruction triggers the start of a ping packet, which contains a ping program, and the ping program generates a network management command, namely, a ping command. Then configure the byte space of the padding segment and apply for a 256-byte ICMP message, namely, the target message. The ping command generates a 256-byte ICMP message, fills the IP header, wherein the IP header includes the destination IP and the source IP; fills the ICMP header, wherein the ICMP type is 8; fills the data field, namely, the padding segment, wherein the filling content of the data field is the magic word, the terminal serial number, the manufacturer, the version number and the private network address, and the check value of the magic word, the terminal serial number, the manufacturer, the version number and the private network address. Use padding to occupy the space, ensure that the length of the ICMP message is fixed, and output the ICMP message.
[0102] The present application embodiment discloses a monitoring method for a 5G Internet of Things terminal, such as Figure 5 As shown, the method includes:
[0103] L101. After receiving the target message, determine whether the target message meets the preset message requirements.
[0104] In one embodiment, the target message is a message whose filling segment carries the terminal information of the corresponding 5G Internet of Things terminal, and the target message is an IP message, and the specific type belongs to an ICMP message. Among them, the monitoring platform is preset with a message requirement, and the message requirement is used to determine whether the received target message is a handshake message transmitted by the 5G Internet of Things terminal, thereby determining the subsequent processing of the received target message. For example, in an application scenario, if the target message is not a handshake message transmitted by the 5G Internet of Things terminal after judgment, the target message is directly discarded or transmitted to the protocol stack for subsequent processing; if it is a handshake message, subsequent processing is performed. In addition, the usability and security of the target message can also be verified according to the message requirements. For example, if it is verified according to the message requirements that the target message does not carry terminal information, that is, there is no terminal information in the filling segment, then the target message is not usable.
[0105] L102. When the target message meets the message requirements, obtain the terminal information carried by the target message.
[0106] In one embodiment, the target message meets the message requirements, which proves that the target message is a handshake message sent by the 5G IoT terminal to the monitoring platform, and the target message is usable. At this time, the terminal information is obtained, and the 5G IoT terminal corresponding to the target message can be known through the terminal information, so as to lock the 5G IoT terminal and consider that the 5G IoT terminal is online. The monitoring process of the monitoring platform can accurately lock each 5G IoT terminal according to the target message, reduce the error rate and the discard rate of the target message, and improve the monitoring quality and efficiency.
[0107] L103. Update the handshake information of the corresponding IoT terminal based on the terminal information.
[0108] Among them, the IoT terminal is a 5G IoT terminal. The terminal information includes information that can represent the uniqueness of the 5G IoT terminal, so that the monitoring platform can know which 5G IoT terminal sent the target message, so that the monitoring platform can update the handshake information of the corresponding 5G IoT terminal. Through the handshake information, the online status of the 5G IoT terminal under the control of the monitoring platform can be known, and the 5G IoT terminal can be monitored.
[0109] In another embodiment of the present invention, in order to further define and illustrate, Figure 6 As shown, the steps for determining whether the target message meets the preset message requirements include:
[0110] L201. Get the storage address of the target message.
[0111] In order to verify whether the target message is a handshake message transmitted by the 5G IoT terminal and the availability of the target message, in one embodiment, the hook function packet_ptr is used to execute step L101. Therefore, the storage address of the target message is transmitted to the hook function so that the hook function obtains it. It is convenient to use the hook function to parse the target message, and it is also helpful to parse the target message in an orderly manner when the monitoring platform receives multiple target messages, thereby reducing the error rate.
[0112] L202. Determine whether the target message is an IP message.
[0113] In one embodiment, it is determined whether the Ethernet header eth.type in the target message is 0x800; if so, it is determined that the target message is an IP message, otherwise the target message is transmitted to the protocol stack on the monitoring platform side.
[0114] When the target message is an IP message, L203 determines whether the target message is an ICMP message.
[0115] In one embodiment, it is determined whether the IP header ip.ip_p is 1; if so, it is determined that the target message is an ICMP message, otherwise the target message is transmitted to the protocol stack on the monitoring platform side.
[0116] When the target message is an ICMP message, L204, obtain the field address of the padding segment in the target message.
[0117] In one embodiment, the field address of the padding segment is derived based on the Ethernet header length, the IP header length and the ICMP header length. Specifically, the field address of the padding segment = packet_ptr + Ethernet header length + IP header length + ICMP header length.
[0118] L205. Determine whether the padding segment carries terminal information based on the field address.
[0119] In one embodiment, after obtaining the field address, the starting position of the padding segment in the target message is known. The first field obtained from the starting position is the magic word. It is determined whether the magic word is 0x88991122; if so, it proves that the information in the padding segment is available and edited; if not, it proves that the padding segment does not have terminal information.
[0120] When the filling segment carries the terminal information, L206 generates a check code and determines whether the check code matches a preset check code.
[0121] In one embodiment, a check code is generated by term_info calculation and compared with a preset check code. If they are the same, they match, and if they are different, they do not match. The preset check code refers to the check code in the padding segment of the target message. Through the above steps to determine whether the target message meets the message requirements, on the one hand, the entire judgment process does not require manual intervention and is automatically executed, which can improve the efficiency and accuracy of the target message verification process; on the other hand, the information carried by the target message, such as the Ethernet header, IP header, etc., is verified one by one, which is convenient for improving the accuracy of the handshake information updated by the monitoring platform and improving the monitoring quality.
[0122] It should be noted that the field address of the filling segment is known in step L204, and part of the terminal information in the filling segment is subsequently read according to the field address. Step L102 can read all the terminal information in the filling segment according to the field address.
[0123] In another embodiment of the present invention, in order to further define and illustrate, Figure 7 As shown, the steps of updating the handshake information of the corresponding IoT terminal based on the terminal information include:
[0124] L301. Obtain the terminal serial number from the terminal information.
[0125] In one embodiment, the terminal information includes a terminal serial number. In one application scenario, the terminal serial number is searched in the terminal information according to the identifier of the terminal serial number, thereby obtaining the terminal serial number. In another application scenario, since the terminal information in the padding segment has a padding order, the terminal serial number can be searched according to the padding order, thereby obtaining the terminal serial number. In other application scenarios, the terminal serial number can also be found by combining the length of each type of terminal information, the field address of the padding segment, and the padding order.
[0126] L302. When a terminal serial number exists in the preset terminal information table, the handshake time of the corresponding IoT terminal in the terminal information table is updated to the current time, and the accumulated handshake times of the corresponding IoT terminal are increased.
[0127] In order to facilitate the monitoring of 5G IoT terminals, the terminal serial number is used to identify whether the handshake information of the corresponding 5G IoT terminal has been stored in the terminal information table. If so, it is directly updated on the basis of the handshake time. Among them, the handshake time is convenient for knowing the last online time of the 5G IoT terminal; the number of handshakes is convenient for knowing the length of time the 5G IoT terminal has been online since the start of monitoring, which improves the monitoring accuracy of the monitoring platform for 5G IoT terminals.
[0128] It should be noted that before executing step L302, in one embodiment, the monitoring platform searches the terminal information table to see whether there is a terminal serial number that is the same as the terminal serial number. If so, it proves that a handshake message related to the corresponding 5G Internet of Things information is stored in the terminal information table, and the update can be performed directly based on it.
[0129] L303. When the terminal serial number does not exist in the terminal information table, the terminal information, handshake time and handshake number are recorded in the terminal information table.
[0130] In order to record the handshake information in time and monitor the 5G IoT terminal, it is necessary to explain that, in one embodiment, in order to ensure that the handshake information of the 5G IoT terminal is stored in time and not easily lost, before the step of updating the handshake information of the corresponding IoT terminal based on the terminal information, the following steps are included:
[0131] Determine whether the terminal information table exists.
[0132] If it exists, execute step L301; if it does not exist, create a terminal information table based on a preset table template.
[0133] The present application also discloses a monitoring system for a 5G IoT terminal. Figure 8 As shown, the monitoring system includes a message module 1, which is used to call the network management command to generate a target message after obtaining a handshake instruction;
[0134] Filling module 2, used for writing terminal information into the filling segment of the target message based on a preset filling format;
[0135] Transmission module 3, used for transmitting the target message to the monitoring platform;
[0136] The inspection module 4 is used to determine whether the target message meets the preset message requirements after receiving the target message;
[0137] An acquisition module 5, configured to acquire the terminal information carried by the target message when the inspection result of the inspection module is yes;
[0138] The updating module 6 is used to update the handshake information corresponding to the IoT terminal based on the terminal information to monitor the online status of the IoT terminal.
[0139] Specifically, the filling module 2 includes a format unit for obtaining a filling category and a filling order based on a filling format;
[0140] An acquisition unit, used to acquire corresponding terminal information based on the filled category; the terminal category includes the terminal serial number, manufacturer, version number and private network address;
[0141] The filling unit is used to fill the terminal information into the filling segment of the target message according to the filling order; the filling segment is the message field that is not processed by the protocol stack of the monitoring platform.
[0142] Specifically, the monitoring system further includes an expansion module for configuring the byte space of the filling segment to expand the filling length when the filling length of the filling segment is less than the required length of the terminal information;
[0143] The placeholder module is used to determine whether there is any remaining byte space in the padding segment;
[0144] If so, fill the remaining byte space with the preset placeholder information.
[0145] Specifically, the inspection module 4 includes a first verification unit, a second verification unit, a third verification unit, a fourth verification unit and a call unit. The first verification unit is used to determine whether the target message is an IP message; if so, the second verification unit is used to determine whether the target message is an ICMP message; if so, the call unit is used to obtain the field address of the padding segment in the target message; the third verification unit is used to determine whether the padding segment carries the terminal information based on the field address; if so, the fourth verification unit is used to generate a check code and determine whether the check code matches a preset check code.
[0146] Specifically, the update module 6 includes a serial number unit for obtaining the terminal serial number in the terminal information; a first update unit for updating the handshake time of the corresponding IoT terminal in the terminal information table to the current time when the terminal serial number exists in the preset terminal information table, and increasing the accumulated handshake count of the corresponding IoT terminal; and a second update unit for recording the terminal information, handshake time and handshake count in the terminal information table when the terminal serial number does not exist in the terminal information table. The terminal information includes the terminal serial number.
[0147] A monitoring system for a 5G Internet of Things terminal in an embodiment of the present application utilizes the method of filling the terminal information of the 5G Internet of Things terminal into the filling segment of the target message, so that the monitoring platform can accurately determine which 5G Internet of Things terminal the target message belongs to based on the information in the filling segment, thereby determining that the corresponding 5G Internet of Things terminal is online, thereby achieving precise online control of the 5G Internet of Things terminal and improving the monitoring quality.
[0148] It should be noted here that the description of the above monitoring system embodiment items applied to 5G IoT terminals is similar to the above method description and has the same beneficial effects as the method embodiment. For technical details not disclosed in the monitoring system embodiment of the 5G IoT terminal of the present invention, technicians in this field should refer to the description of the method embodiment of the present invention for understanding.
[0149] It should be noted that, in the embodiment of the present invention, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. 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.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a magnetic disk or an optical disk. In this way, the embodiment of the present invention is not limited to any specific combination of hardware and software.
[0150] Correspondingly, an embodiment of the present application also discloses a storage medium storing a computer program that can be loaded by a processor and execute the above method.
[0151] An embodiment of the present application also discloses a monitoring device for a 5G Internet of Things terminal, including a first memory and a first processor, wherein a monitoring method for a 5G Internet of Things terminal is stored in the first memory; the first processor is used to adopt the above method when executing the monitoring method for a 5G Internet of Things terminal.
[0152] An embodiment of the present application also discloses a monitoring device for a 5G Internet of Things terminal, including a second memory and a second processor, wherein the second memory stores a monitoring method for the 5G Internet of Things terminal; the second processor is used to adopt the above method when executing the monitoring method for the 5G Internet of Things terminal.
[0153] The above description of the monitoring device and storage medium embodiment applied to the 5G IoT terminal is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the monitoring device and storage medium embodiment of the 5G IoT terminal of the present invention, please refer to the description of the method embodiment of the present invention for understanding.
[0154] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0155] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0156] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. 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 can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0157] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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 present embodiment.
[0158] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0159] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0160] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0161] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A monitoring method for a 5G Internet of Things terminal, characterized in that: include: After obtaining the handshake instruction, call the network management command to generate the target message; Writing the terminal information into the padding segment of the target message based on a preset padding format; Transmitting the target message to a monitoring platform; After receiving the target message, determining whether the target message meets the preset message requirements; the padding segment of the target message carries the terminal information; When the target message meets the message requirement, obtaining the terminal information carried by the target message; The handshake information of the corresponding Internet of Things terminal is updated based on the terminal information to monitor the online status of the corresponding Internet of Things terminal.
2. The monitoring method of the 5G Internet of Things terminal according to claim 1, characterized in that: The step of writing the terminal information into the filling segment of the target message based on the preset filling format includes: Obtaining a filling category and a filling order based on the filling format; Acquire the corresponding terminal information based on the filling category; the terminal information includes a terminal serial number; The terminal information is filled into the filling segment of the target message according to the filling order; the filling segment is a message field that is not processed by the protocol stack of the monitoring platform.
3. The monitoring method of the 5G Internet of Things terminal according to claim 2, characterized in that: Before filling the terminal information into the filling segment of the target message according to the filling order, the method further includes: When the padding length of the padding segment is less than the required length of the terminal information, configuring the byte space of the padding segment to expand the padding length; After filling the terminal information into the filling segment of the target message according to the filling order, the method further includes: Determine whether there is any remaining byte space in the filling segment; If so, fill the remaining byte space with preset placeholder information.
4. The monitoring method of the 5G Internet of Things terminal according to claim 1, characterized in that: The step of determining whether the target message meets the preset message requirements includes: Determine whether the target message is an IP message; If yes, determine whether the target message is an ICMP message; If yes, obtain the field address of the padding segment in the target message; Determining whether the padding segment carries the terminal information based on the field address; If so, a check code is generated and it is determined whether the check code matches a preset check code to determine whether the target message meets the message requirement.
5. The monitoring method of the 5G Internet of Things terminal according to claim 1, characterized in that: The step of updating the handshake information of the corresponding Internet of Things terminal based on the terminal information includes: Obtaining a terminal serial number from the terminal information; When the terminal serial number exists in the preset terminal information table, the handshake time corresponding to the IoT terminal in the terminal information table is updated to the current time; Increase the accumulated handshake count corresponding to the IoT terminal; When the terminal serial number does not exist in the terminal information table, the terminal information, the handshake time and the handshake number are recorded in the terminal information table; the terminal information includes the terminal serial number.
6. A monitoring system for a 5G Internet of Things terminal, characterized in that: It includes a message module, which is used to call the network management command to generate a target message after obtaining the handshake instruction; A filling module, used for writing the terminal information into the filling segment of the target message based on a preset filling format; A transmission module, used for transmitting the target message to the monitoring platform; A testing module, used for determining whether the target message meets the preset message requirements after receiving the target message; an acquisition module, configured to acquire the terminal information carried by the target message when the inspection result of the inspection module is yes; An updating module is used to update the handshake information corresponding to the Internet of Things terminal based on the terminal information to monitor the online status of the corresponding Internet of Things terminal.
7. A monitoring device for a 5G Internet of Things terminal, comprising a first memory and a first processor, characterized in that: The first memory stores a monitoring method for a 5G Internet of Things terminal, and the first processor is used to adopt the method described in claims 1-3 when executing the monitoring method for a 5G Internet of Things terminal.
8. A monitoring device for a 5G Internet of Things terminal, comprising a second memory and a second processor, characterized in that: The second memory stores a monitoring method for a 5G Internet of Things terminal, and the second processor is used to adopt the method described in claims 1, 4-5 when executing the monitoring method for a 5G Internet of Things terminal.
9. A storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 3 or any one of claims 4 to 5.
Citation Information
Patent Citations
Method and device for generating link state protocol data packet
CN104579976A
Method and device for checking IP address
CN106657434A
Data transmission method, network equipment and storage medium
CN111417108A