Method and device for acquiring communication connection relationship, equipment and medium
By analyzing the message data of the Internet of Things devices and establishing mapping relationships, the problem of low efficiency and accuracy of communication connection relationship acquisition in the prior art is solved, and more efficient and reliable communication connection relationship acquisition is achieved.
Patent Information
- Application Number
- CN202411779288.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
The existing communication connection relationship acquisition methods are inefficient and have low accuracy, resulting in serious problems such as data transmission interruption, data loss and data error interpretation.
By obtaining pre-configured IoT device information and communication interface information, analyzing the message data to obtain the device message number, establishing a mapping relationship between the communication interface number and the IoT device, and verifying the mapping relationship based on the IoT device information to generate a communication connection relationship.
It improves the efficiency and accuracy of the acquisition of communication connection relationships, reduces errors and deviations in manual operations, and ensures the reliability and integrity of data applications.
Smart Images

Figure CN119652847A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication connections, and in particular to a method, apparatus, device and medium for acquiring a communication connection relationship. Background Art
[0002] In today's Internet of Things (IoT) era, the interconnection of everything has become a core trend. With the continuous advancement of technology, a variety of IoT devices are widely used in various fields. These devices establish communication links through wireless or wired means to achieve data interaction and sharing.
[0003] Accurately documenting the communication connections between IoT devices is crucial for building digital twin platforms. However, currently, obtaining and delivering these connections primarily relies on manual on-site wiring and establishing relationships. This traditional method is not only inefficient and time-consuming, but also prone to errors and deviations due to its reliance on manual operations. Furthermore, manually established relationships cannot be effectively verified to ensure their accuracy and completeness. This creates significant uncertainty and risk for subsequent data applications based on these relationships. Errors in communication connections can lead to serious issues such as data transmission interruption, data loss, and data misinterpretation, compromising the normal operation and functionality of the entire building digital twin platform and failing to provide reliable support and assurance for related decision-making and applications.
[0004] In summary, existing methods for acquiring communication connection relationships have the problem of low acquisition efficiency and accuracy. Summary of the Invention
[0005] The present invention provides a method, apparatus, device and medium for acquiring a communication connection relationship, which can solve the problem of low acquisition efficiency and accuracy caused by existing methods for acquiring a communication connection relationship.
[0006] In a first aspect, an embodiment of the present invention provides a method for acquiring a communication connection relationship, the method comprising:
[0007] Obtaining pre-configured information of at least one IoT device and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period;
[0008] In response to the user's connection relationship acquisition operation, each message data in the communication interface information is parsed to obtain each device message number that matches each message data;
[0009] According to the message number of each device, the communication interface number and the IoT device information, the mapping relationship between each communication interface number and each IoT device is obtained;
[0010] The mapping relationship is verified based on the IoT device information, and a communication connection relationship is generated according to the verification result.
[0011] In a second aspect, an embodiment of the present invention provides a device for obtaining a communication connection relationship, the device comprising:
[0012] An information acquisition module, configured to acquire pre-configured information of at least one IoT device and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period;
[0013] The message parsing module is used to parse each message data in the communication interface information in response to the user's connection relationship acquisition operation, and obtain the message number of each device that matches each message data;
[0014] A mapping relationship acquisition module is used to obtain the mapping relationship between each communication interface number and each IoT device based on the message number of each device, the communication interface number and the IoT device information;
[0015] A verification module is used to verify the mapping relationship based on the Internet of Things device information and generate a communication connection relationship according to the verification result.
[0016] In a third aspect, an embodiment of the present invention provides an electronic device, comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the method for obtaining a communication connection relationship described in any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for obtaining a communication connection relationship described in any embodiment of the present invention when executed.
[0021] The technical solution of the embodiment of the present invention obtains at least one pre-configured Internet of Things device information and communication interface information, and then responds to the user's connection relationship acquisition operation to parse each message data in the communication interface information to obtain each device message number that matches each message data. Then, based on each device message number, communication interface number and Internet of Things device information, a mapping relationship between each communication interface number and each Internet of Things device is obtained. Finally, the mapping relationship is verified based on the Internet of Things device information, and a communication connection relationship is generated according to the verification result. This solves the problem of low acquisition efficiency and accuracy caused by the existing communication connection relationship acquisition method, realizes the acquisition of communication connection relationship, and improves the acquisition efficiency and accuracy of communication connection relationship.
[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0024] Figure 1 This is a flowchart of a method for obtaining a communication connection relationship according to the first embodiment of the present invention;
[0025] Figure 2 is a flowchart of a method for obtaining a communication connection relationship provided according to a second embodiment of the present invention;
[0026] Figure 3 This is a schematic structural diagram of a device for obtaining a communication connection relationship according to a third embodiment of the present invention;
[0027] Figure 4 It is a structural diagram of an electronic device for implementing a method for acquiring a communication connection relationship according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0030] Example 1
[0031] Figure 1 A flowchart of a method for obtaining a communication connection relationship is provided in Example 1 of the present invention. This embodiment is applicable to situations where a communication connection relationship is obtained. The method can be executed by a device for obtaining a communication connection relationship. The device for obtaining a communication connection relationship can be implemented in the form of hardware and / or software. The device for obtaining a communication connection relationship can be configured in a terminal or server with a communication connection relationship acquisition function.
[0032] like Figure 1 As shown, the method includes:
[0033] S110: Obtain at least one pre-configured IoT device information and communication interface information.
[0034] The communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period.
[0035] The IoT device information includes: a device type, a device number, and an information point number of at least one IoT device, wherein the IoT device is composed of at least one information point.
[0036] In this embodiment, at least one pre-configured IoT device information and communication interface information are obtained. Specifically, the IoT device refers to various terminal devices that can communicate and interact through the network and have the ability to perceive, process and transmit data, such as common smart sensors, smart home appliances, smart cameras, etc.; the device type can be used to describe the attributes or categories of the current IoT device, such as temperature sensors, humidity sensors, smoke alarms, etc.; the device number is a specific code used to uniquely identify each IoT device; further, the information point is the part of the IoT device responsible for collecting or processing specific types of data, and each information point has its corresponding number; the communication interface is the connection point for IoT devices to transmit and communicate data with other devices or networks, such as common Ethernet interfaces, Bluetooth interfaces, Wi-Fi interfaces, etc. are all communication interfaces.
[0037] Furthermore, the communication interface information includes at least one communication interface number, which can be used to accurately identify different interfaces. It also includes all message data transmitted through each communication interface during a specific time period. The message data is a data packet containing various information transmitted during the communication process, such as device status information and collected data.
[0038] Furthermore, the IoT device is composed of at least one information point, which can be understood as the smallest unit in the IoT device responsible for implementing a specific function or collecting a specific type of data. For example, the temperature acquisition module in a temperature sensor is an information point.
[0039] S120 . In response to the user's connection relationship acquisition operation, each message data in the communication interface information is parsed to obtain each device message number that matches each message data.
[0040] Specifically, when a user initiates a connection relationship acquisition operation, the system will immediately respond. This connection relationship acquisition operation can be a user clicking a button on a specific software interface or entering a specific command to indicate that they wish to obtain the communication connection relationship between related devices. Next, the system will conduct an in-depth analysis of the individual message data in the communication interface information. The communication interface can be used for data transmission between two different devices. Common communication interfaces include serial interfaces (such as RS232, RS485), Ethernet interfaces, Bluetooth interfaces, etc.; further, the specific content of the message data includes the device message number, the relevant data of the device, and the attribute data of other devices. The attribute data can be set by relevant personnel according to the attributes of the actual Internet of Things device. This embodiment does not limit this. During the parsing process, the system will obtain the device message number that matches each message data. The device message number can be understood as the ID of each message data. Through this number, different message data can be accurately identified and distinguished. For example, if there are multiple temperature sensors working at the same time in a factory, the message data sent by each of them will have a unique corresponding number, such as 001, 002, 003, etc. Through these numbers, it is possible to clearly know which specific sensor each message data comes from. Through such a parsing operation, it is finally possible to obtain the device message number that corresponds one to one to each message data, laying the foundation for the subsequent clear communication connection relationship between devices.
[0041] S130. Obtain a mapping relationship between each communication interface number and each IoT device according to the message number of each device, the communication interface number, and IoT device information.
[0042] Based on the above steps, the communication interface number is a unique identifier set for each communication interface. For example, an Ethernet interface may be marked as 01, a Bluetooth interface may be marked as 02, and so on.
[0043] Among them, according to the message number of each device, the communication interface number and the Internet of Things device information, the mapping relationship between each communication interface number and each Internet of Things device is obtained, including: obtaining the device type and device number of each Internet of Things device in the Internet of Things device information; searching in the Internet of Things information whether there is a target device number that matches at least one device message number; when it is detected that there is a target device number, obtaining the target device type that matches the target device number, and at the same time parsing the target message data that matches the device message number to obtain the target communication interface number of the target message data, and finally establishing a mapping relationship between the target communication interface number and the target device type.
[0044] For example, in a specific implementation scenario of this embodiment, a mapping relationship between each communication interface number and each IoT device is obtained based on each device's message number, communication interface number, and IoT device information. The first step is to obtain the device type and device number of each IoT device in the IoT device information. Device types vary, such as temperature sensors, humidity sensors, and smart door locks. The device number is a unique number or code assigned to each IoT device, such as 0001 or 0002. Next, the IoT information is searched to determine whether a target device number matches at least one device message number. If a target device number is detected, subsequent operations are performed. The target device type matching the target device number is obtained, and the target message data matching the device message number is parsed. For example, the message is parsed to determine whether it is temperature measurement data. The target communication interface number of the target message data is then obtained. Finally, a mapping relationship between the target communication interface number and the target device type is established. For example, a mapping relationship is established between Ethernet interface 01 and the device type of temperature sensor, so that it is clear which communication interface is used to communicate with which type of device.
[0045] S140: Verify the mapping relationship based on the IoT device information, and generate a communication connection relationship according to the verification result.
[0046] The technical solution of the embodiment of the present invention obtains at least one pre-configured Internet of Things device information and communication interface information, and then responds to the user's connection relationship acquisition operation to parse each message data in the communication interface information to obtain each device message number that matches each message data. Then, based on each device message number, communication interface number and Internet of Things device information, a mapping relationship between each communication interface number and each Internet of Things device is obtained. Finally, the mapping relationship is verified based on the Internet of Things device information, and a communication connection relationship is generated according to the verification result, thereby realizing the acquisition of the communication connection relationship and improving the efficiency and accuracy of acquiring the communication connection relationship.
[0047] Example 2
[0048] Figure 2 This is a flowchart of a method for obtaining a communication connection relationship provided in Example 2 of the present invention. This embodiment is refined based on the above embodiment. In this embodiment, the method of verifying the mapping relationship based on the Internet of Things device information and generating a communication connection relationship based on the verification result is refined.
[0049] like Figure 2 As shown, the method includes:
[0050] S210: Obtain at least one pre-configured IoT device information and communication interface information.
[0051] The communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period.
[0052] Furthermore, the communication interface information also includes: interface protocol drivers that match the numbers of each communication interface; wherein, the interface protocol driver refers to a software component or program, whose function is to support and manage a specific interface protocol between different hardware devices or software systems. The interface protocol is a standard that specifies the format, transmission method, control signal and other rules of data during the communication process. The task of the interface protocol driver is to follow these rules to ensure that data can be accurately, efficiently and stably transmitted and interacted between different devices or systems. For example, in a computer system, the USB interface protocol driver enables the computer to correctly identify and communicate with devices connected via the USB interface (such as a mouse, keyboard, mobile hard disk, etc.); the network interface protocol driver can support the computer to exchange data with other devices in the network according to the network protocol (such as the TCP / IP protocol).
[0053] S220 . In response to the user's connection relationship acquisition operation, each message data in the communication interface information is parsed to obtain each device message number that matches each message data.
[0054] S230. Obtain a mapping relationship between each communication interface number and each IoT device according to the message number of each device, the communication interface number, and IoT device information.
[0055] S240: Generate communication confirmation requests that match each communication interface according to the interface protocol driver of each communication interface.
[0056] Among them, the communication confirmation request is a set of data commands that can be sent to relevant devices so that the relevant devices respond to the communication confirmation request and generate reply information. It should be noted that the method of sending a communication confirmation request to the device to confirm that the connection is successful is a mature existing technology and will not be elaborated in this embodiment.
[0057] S250. According to the mapping relationship between the communication interface number and each IoT device, obtain each target IoT device that has a mapping relationship with the current communication interface.
[0058] Based on the above steps, the target IoT devices associated with the current communication interface are retrieved based on the previously determined mapping between communication interface numbers and IoT devices. For example, suppose we have established mappings between communication interface number "01" and a smart temperature sensor, and "02" and a smart smoke alarm. When we focus on the current communication interface number "01," this mapping clearly indicates that the corresponding target IoT device is the smart temperature sensor. Alternatively, if communication interface number "03" is mapped to a smart camera, then when we check the current communication interface number "03," we know that the corresponding target IoT device is the smart camera. This method allows us to accurately and quickly filter out the specific target IoT device associated with the current communication interface from a large number of IoT devices, providing a clear target and basis for subsequent operations such as data processing, device control, and system management.
[0059] S260: Obtain the information point number of each target IoT device from the IoT device information, and calculate the total number of the information point numbers of each target IoT device as the number of information points.
[0060] Specifically, the information point numbers of each target IoT device are obtained from the IoT device information. For example, in a smart factory IoT system, the target IoT devices are a group of pressure sensors, whose information point numbers might be PS001, PS002, and so on. Another example is that in a smart home IoT environment, the target IoT devices are several smart sockets, whose information point numbers might be SS001, SS002, and so on. The obtained information point numbers of each target IoT device are then counted and calculated to determine the total number of these information point numbers, which is defined as the number of information points. For example, if statistics reveal that the pressure sensors have 20 information point numbers, then the number of information points is 20; if the smart sockets have 15 information point numbers, then the number of information points is 15. This operation clearly and accurately understands the overall scale of information points associated with the target IoT devices, providing important data support for subsequent system analysis, resource allocation, and optimized management.
[0061] S270: Send the communication confirmation request to each information point of each target IoT device via a communication interface that matches the communication confirmation request, so that each information point generates communication feedback based on the communication confirmation request.
[0062] S280: Generate a verification result based on the relationship between the total number of received communication feedbacks and the number of information points, and generate a communication connection relationship based on the verification result.
[0063] Specifically, a verification result is generated based on the relationship between the total number of communication feedbacks received and the number of information points, including: when the total number of communication feedbacks is equal to the number of information points, a verification success result is generated; when the total number of communication feedback information is greater than the number of information points, a first verification failure result is generated; when the total number of communication feedback information is less than the number of information points, a second verification failure result is generated.
[0064] Furthermore, a communication connection relationship is generated based on the verification result, including: when the verification result is a successful verification result, the mapping relationship between each communication interface number and each Internet of Things device is used as a communication connection relationship, and displayed through the relevant device; when the verification result is a first verification failure result, a first error prompt is generated and displayed; when the verification result is a second verification failure result, each communication feedback information is parsed to obtain a feedback information point number that matches each communication feedback information, and the information point number of each target Internet of Things device is queried to see whether the target information point number is inconsistent with all feedback information point numbers; if so, a connection failure prompt is generated based on the target information point number and displayed; if not, a second error prompt is generated and displayed.
[0065] Based on the above steps, a verification result is generated based on the relationship between the total number of received communication feedback and the number of information points, and a communication connection is established based on this verification result. Communication feedback refers to the response returned by an information point after receiving a communication confirmation request. For example, in an intelligent security system, the response of "normal operation" or "faulty" returned by a camera's information point after receiving a request to confirm whether it is working properly is communication feedback.
[0066] Specifically, based on the relationship between the total number of received communication feedback and the number of information points, the verification result is generated as follows: When the total number of communication feedback equals the number of information points, it means that all information points have provided valid feedback, and a verification success result is generated. For example, if a factory has 50 temperature monitoring points as information points and receives 50 communication feedback, a verification success result is generated. When the total number of communication feedback exceeds the number of information points, a first verification failure result is generated. This may be due to duplicate or erroneous feedback. For example, if a smart home system has only 20 smart sockets as information points but receives 25 communication feedbacks, a first verification failure result is generated. When the total number of communication feedback is less than the number of information points, a second verification failure result is generated. This indicates that some information points have not provided feedback. For example, in a smart agricultural monitoring system, if there are 100 soil moisture monitoring points as information points but only 80 communication feedbacks are received, a second verification failure result is generated.
[0067] Furthermore, the method for generating a communication connection relationship based on the verification result includes: when the verification result is a successful verification result, directly identifying the previously determined mapping relationship between each communication interface number and each IoT device as a communication connection relationship and displaying it on a relevant display device (such as a computer screen, mobile phone interface, etc.). When the verification result is a first verification failure result, a first error message is generated, such as "Abnormal number of communication feedbacks, duplicate feedback exists," and displayed on the display device. When the verification result is a second verification failure result, each communication feedback message is parsed to obtain a feedback information point number that matches each communication feedback message. Then, a query is made among the information point numbers of each target IoT device to determine whether the target information point number is inconsistent with all feedback information point numbers. If so, a connection failure message is generated based on the target information point number, such as "Connection failure to information point number XX" and displayed; if not, a second error message is generated, such as "Communication feedback missing, reason unknown," and displayed. Through this rigorous verification and processing process, the communication connection relationship can be accurately determined, potential problems can be promptly identified and addressed, and the stable and effective operation of the IoT system can be ensured.
[0068] The technical solution of the embodiment of the present invention obtains at least one pre-configured Internet of Things device information and communication interface information, and then responds to the user's connection relationship acquisition operation, parses each message data in the communication interface information, obtains each device message number that matches each message data, and then obtains the mapping relationship between each communication interface number and each Internet of Things device according to each device message number, communication interface number and Internet of Things device information, and generates a communication confirmation request that matches each communication interface according to the interface protocol of each communication interface, and then obtains the mapping relationship between the communication interface number and each Internet of Things device according to the mapping relationship between the communication interface number and the current communication interface. The target IoT devices of the relationship are obtained, and the information point number of each target IoT device is obtained from the IoT device information, and the total number of information point numbers of each target IoT device is calculated as the number of information points. Then, the communication confirmation request is sent to each information point of each target IoT device via a communication interface that matches the communication confirmation request, so that each information point generates a communication feedback based on the communication confirmation request, and generates a verification result according to the relationship between the total number of received communication feedback and the number of information points. Finally, a communication connection relationship is generated according to the verification result, thereby realizing the acquisition of the communication connection relationship and improving the efficiency and accuracy of acquiring the communication connection relationship.
[0069] Example 3
[0070] Figure 3 This is a schematic diagram of a device for obtaining a communication connection relationship according to the third embodiment of the present invention. Figure 3 As shown, the device includes:
[0071] An information acquisition module 310 is configured to acquire information of at least one pre-configured IoT device and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period;
[0072] The message parsing module 320 is used to parse each message data in the communication interface information in response to the user's connection relationship acquisition operation to obtain each device message number that matches each message data;
[0073] A mapping relationship acquisition module 330 is configured to obtain a mapping relationship between each communication interface number and each IoT device based on the message number of each device, the communication interface number, and IoT device information;
[0074] The verification module 340 is used to verify the mapping relationship based on the IoT device information and generate a communication connection relationship according to the verification result.
[0075] The technical solution of the embodiment of the present invention obtains at least one pre-configured Internet of Things device information and communication interface information, and then responds to the user's connection relationship acquisition operation to parse each message data in the communication interface information to obtain each device message number that matches each message data. Then, based on each device message number, communication interface number and Internet of Things device information, a mapping relationship between each communication interface number and each Internet of Things device is obtained. Finally, the mapping relationship is verified based on the Internet of Things device information, and a communication connection relationship is generated according to the verification result, thereby realizing the acquisition of the communication connection relationship and improving the efficiency and accuracy of acquiring the communication connection relationship.
[0076] Based on the above embodiment, the mapping relationship acquisition module 330 includes:
[0077] A device information acquisition unit, configured to acquire a device type and a device number of each IoT device in the IoT device information;
[0078] a number search unit, configured to search the IoT information for a target device number that matches at least one device message number;
[0079] a target message parsing unit, configured to, upon detecting the presence of a target device number, obtain a target device type that matches the target device number, and simultaneously parse target message data that matches the device message number to obtain a target communication interface number of the target message data;
[0080] A mapping establishing unit is used to establish a mapping relationship between the target communication interface number and the target device type.
[0081] Based on the above embodiment, the verification module 340 includes:
[0082] A communication confirmation request generating unit, configured to generate communication confirmation requests matching each communication interface according to the interface protocol driver of each communication interface;
[0083] A target IoT device acquisition unit is configured to acquire target IoT devices that have a mapping relationship with the current communication interface based on the mapping relationship between the communication interface number and each IoT device;
[0084] an information point counting unit, configured to obtain the information point number of each target IoT device from the IoT device information, and calculate the total number of the information point numbers of the target IoT devices as the number of information points;
[0085] a communication confirmation request sending unit, configured to send the communication confirmation request to each information point of each target IoT device via a communication interface matching the communication confirmation request, so that each information point generates communication feedback based on the communication confirmation request;
[0086] A verification result generating unit, configured to generate a verification result based on a relationship between the total number of received communication feedbacks and the number of information points;
[0087] The communication connection relationship generating unit is used to generate a communication connection relationship according to the verification result.
[0088] Based on the above embodiment, the verification result generating unit further includes:
[0089] A verification success result generating unit, configured to generate a verification success result when the total number of communication feedbacks is equal to the number of information points;
[0090] A first verification failure result generating unit, configured to generate a first verification failure result when the total amount of the communication feedback information is greater than the number of information points;
[0091] The second verification failure result generating unit is configured to generate a second verification failure result when the total amount of the communication feedback information is less than the number of information points.
[0092] Based on the above embodiment, the communication connection relationship generating unit further includes:
[0093] A first display unit is configured to, when the verification result is a successful verification result, use the mapping relationship between each communication interface number and each IoT device as a communication connection relationship and display it through a relevant device;
[0094] A first error reporting unit, configured to generate and display a first error prompt when the verification result is a first verification failure result;
[0095] a number query unit, configured to, when the verification result is a second verification failure result, parse each communication feedback information to obtain a feedback information point number matching each communication feedback information, and query among the information point numbers of each target IoT device whether a target information point number is inconsistent with all feedback information point numbers;
[0096] A second display unit, configured to generate and display a connection failure prompt based on the target information point number, if any;
[0097] The second error reporting unit is used to generate and display a second error prompt if it does not exist.
[0098] An apparatus for acquiring a communication connection relationship provided by an embodiment of the present invention can execute a method for acquiring a communication connection relationship provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.
[0099] Example 4
[0100] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0101] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12 and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0102] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0103] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for obtaining a communication connection relationship.
[0104] Accordingly, the method includes:
[0105] Obtaining pre-configured information of at least one IoT device and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period;
[0106] In response to the user's connection relationship acquisition operation, each message data in the communication interface information is parsed to obtain each device message number that matches each message data;
[0107] According to the message number of each device, the communication interface number and the IoT device information, the mapping relationship between each communication interface number and each IoT device is obtained;
[0108] The mapping relationship is verified based on the IoT device information, and a communication connection relationship is generated according to the verification result.
[0109] In some embodiments, a method for obtaining a communication connection relationship may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for obtaining a communication connection relationship described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for obtaining a communication connection relationship in any other appropriate manner (for example, by means of firmware).
[0110] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0111] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0112] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0113] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0114] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0115] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0116] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
Claims
1. A method for acquiring a communication connection relationship, characterized in that: include: Obtaining at least one pre-configured IoT device information and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period; In response to the user's connection relationship acquisition operation, each message data in the communication interface information is parsed to obtain each device message number that matches each message data; According to the message number of each device, the communication interface number and the IoT device information, the mapping relationship between each communication interface number and each IoT device is obtained; The mapping relationship is verified based on the IoT device information, and a communication connection relationship is generated according to the verification result.
2. The method according to claim 1, characterized in that The IoT device information includes: a device type, a device number, and an information point number of at least one IoT device, wherein the IoT device is composed of at least one information point.
3. The method according to claim 1, characterized in that According to the message number of each device, the communication interface number and the IoT device information, the mapping relationship between each communication interface number and each IoT device is obtained, including: Obtain the device type and device number of each IoT device in the IoT device information; Searching in the IoT information whether a target device number matches at least one device message number; When the target device number is detected, the target device type matching the target device number is obtained, and the target message data matching the device message number is parsed to obtain the target communication interface number of the target message data; A mapping relationship between the target communication interface number and the target device type is established.
4. The method according to claim 1, characterized in that: The communication interface information also includes: interface protocol drivers that match the communication interface numbers respectively.
5. The method according to any one of claims 1 to 4, characterized in that: The mapping relationship is verified based on the IoT device information, and a communication connection relationship is generated according to the verification result, including: Generate communication confirmation requests matching each communication interface respectively according to the interface protocol driver of each communication interface; According to the mapping relationship between the communication interface number and each IoT device, each target IoT device having a mapping relationship with the current communication interface is obtained; Obtaining the information point number of each target IoT device from the IoT device information, and calculating the total number of the information point numbers of each target IoT device as the number of information points; Sending the communication confirmation request to each information point of each target IoT device via a communication interface matching the communication confirmation request, so that each information point generates communication feedback based on the communication confirmation request; Generating a verification result according to the relationship between the total number of received communication feedbacks and the number of information points; A communication connection relationship is generated according to the verification result.
6. The method according to claim 5, characterized in that Based on the relationship between the total number of received communication feedback and the number of information points, a verification result is generated, including: When the total number of communication feedbacks is equal to the number of information points, generating a verification success result; When the total amount of the communication feedback information is greater than the number of information points, generating a first verification failure result; When the total amount of the communication feedback information is less than the number of information points, a second verification failure result is generated.
7. The method according to any one of claims 5-6, characterized in that: Generate a communication connection relationship based on the verification result, including: When the verification result is a successful verification result, the mapping relationship between each communication interface number and each IoT device is used as a communication connection relationship and displayed through the relevant device; When the verification result is a first verification failure result, a first error prompt is generated and displayed; When the verification result is a second verification failure result, parsing each communication feedback information to obtain a feedback information point number matching each communication feedback information, and querying among the information point numbers of each target IoT device whether there is a target information point number that is inconsistent with all feedback information point numbers; If it exists, a connection failure prompt is generated based on the target information point number and displayed; If it does not exist, a second error prompt is generated and displayed.
8. A device for acquiring a communication connection relationship, characterized in that: include: An information acquisition module, used to acquire at least one pre-configured IoT device information and communication interface information, wherein the communication interface information includes at least one communication interface number and all message data passing through each communication interface within a specific time period; The message parsing module is used to parse each message data in the communication interface information in response to the user's connection relationship acquisition operation, and obtain each device message number that matches each message data; A mapping relationship acquisition module is used to obtain the mapping relationship between each communication interface number and each IoT device according to the message number of each device, the communication interface number and the IoT device information; A verification module is used to verify the mapping relationship based on the Internet of Things device information and generate a communication connection relationship according to the verification result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for acquiring a communication connection relationship as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for obtaining a communication connection relationship according to any one of claims 1 to 7 when executed.