Information processing method for power terminal equipment and storage medium
By obtaining the communication correlation information and equipment correlation information of terminal equipment in the power system, combining preset classification rules and target classification models, the automatic identification and classification of terminal equipment is realized, and the equipment management efficiency and poor accuracy in the existing technology is solved. The problem has improved the safety of the power system and optimized resource allocation.
Patent Information
- Application Number
- CN202411513101.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to realize the automatic discovery, identification and classification of terminal equipment in power systems, resulting in low efficiency, poor accuracy of equipment management, unreasonable resource allocation, high maintenance costs and safety hazards.
By obtaining communication association information of active terminal devices in the power system based on multiple device detection methods, determining the communication protocol and device association information used by the device, performing preliminary classification based on preset classification rules, building device feature vectors and classifying through targets The model is classified and finally writes the device association information to the target database.
It realizes automatic identification and classification of terminal equipment, improves the efficiency and accuracy of equipment management, enhances the safety of power systems and optimized resource allocation, and promotes intelligent operation and maintenance.
Smart Images

Figure CN119475017A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid technology, and in particular to an information processing method and storage medium for power terminal equipment. Background Art
[0002] In modern power systems, the diversity and complexity of power terminal devices are increasing. With the development of smart grid and Internet of Things technologies, a large number of heterogeneous power terminal devices are being connected to the power grid. These devices include various sensors, smart meters, load controllers, and distributed energy management systems, each with its own unique communication protocols and operating environments. Unified management and monitoring of these devices is crucial for ensuring stable power system operation and optimizing energy resource allocation.
[0003] Traditional methods for managing power terminal equipment rely primarily on manual configuration and maintenance, which is not only time-consuming and labor-intensive but also prone to omissions or misconfigurations, resulting in incomplete or inaccurate device information. Furthermore, due to the wide variety of device types and varying communication protocols, manual methods struggle to quickly and accurately identify and classify devices, hindering subsequent data collection, analysis, and decision support. Summary of the Invention
[0004] The present invention provides an information processing method and storage medium for power terminal equipment, so as to realize automatic discovery, identification and classification of terminal equipment in a power system and improve the efficiency and accuracy of equipment management.
[0005] According to one aspect of the present invention, there is provided an information processing method for a power terminal device, the method comprising:
[0006] An information processing method for power terminal equipment, characterized by comprising:
[0007] Acquire active terminal devices in the power system based on multiple device detection methods, and acquire communication-related information of the terminal devices; wherein the communication-related information includes at least an open port and a service type of the terminal devices;
[0008] For a single terminal device, determining the communication protocol used by the terminal device based on the communication association information, determining the device association information of the terminal device based on the communication protocol, and determining a preliminary classification result for the terminal device based on the device association information and preset classification rules;
[0009] A device feature vector is constructed based on the device association information and the preliminary classification result, the device feature vector is classified through a target classification model to obtain a target classification result corresponding to the terminal device, and the device association information of the terminal device is written into a target database based on the target classification result of the terminal device; wherein, the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
[0010] According to another aspect of the present invention, there is provided an information processing device for a power terminal device, the device comprising:
[0011] a communication-related information acquisition module, configured to acquire active terminal devices in the power system based on a plurality of device detection methods, and acquire communication-related information of the terminal devices; wherein the communication-related information includes at least the open ports and service types of the terminal devices;
[0012] a preliminary classification result determination module, configured to determine, for a single terminal device, the communication protocol used by the terminal device based on the communication association information, determine the device association information of the terminal device based on the communication protocol, and determine a preliminary classification result for the terminal device based on the device association information and preset classification rules;
[0013] A target database writing module is used to construct a device feature vector based on the device association information and the preliminary classification result, classify the device feature vector through a target classification model to obtain a target classification result corresponding to the terminal device, and write the device association information of the terminal device into a target database based on the target classification result of the terminal device; wherein, the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed 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 the information processing method for power terminal equipment described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the information processing method for power terminal equipment described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention is as follows: first, terminal devices in an active state in the power system are obtained based on multiple device detection methods, and communication-related information of the terminal devices is obtained. Since the communication-related information at least includes the open ports and service types of the terminal devices, active terminals can be accurately managed and resource allocation can be optimized; then, for a single terminal device, the communication protocol used by the terminal device is determined according to the communication-related information, and the device-related information of the terminal device is determined according to the communication protocol. A preliminary classification result of the terminal device is determined according to the device-related information and preset classification rules, thereby realizing automatic identification and classification of the terminal device; finally, a device feature vector is constructed according to the device-related information and the preliminary classification result. The target classification model classifies the device feature vector to obtain a target classification result corresponding to the terminal device, and writes the device association information of the terminal device into a target database according to the target classification result of the terminal device. Since the target classification model is obtained by training a preset machine learning algorithm based on sample feature data, the target classification model can be used to process the device association information and the preliminary classification result to achieve accurate classification of the terminal device, optimize power system management, and solve the problems of low terminal device classification accuracy, unreasonable resource allocation, high maintenance cost, and safety hazards in related technologies. It can automate terminal device identification and classification, improve power system management efficiency, enhance safety and resource optimization configuration, and promote intelligent operation and maintenance.
[0020] 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
[0021] 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.
[0022] Figure 1 This is a flowchart of an information processing method for a power terminal device provided in accordance with a first embodiment of the present invention;
[0023] Figure 2 This is a flowchart of an information processing method for a power terminal device provided according to a second embodiment of the present invention;
[0024] Figure 3 This is a schematic structural diagram of an information processing device for power terminal equipment provided in accordance with a third embodiment of the present invention;
[0025] Figure 4 It is a structural diagram of an electronic device for implementing the information processing method for power terminal equipment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] 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.
[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0032] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0035] Example 1
[0036] Figure 1 A flowchart of an information processing method for power terminal equipment is provided for the first embodiment of the present invention. This embodiment is applicable to the automatic identification, classification and management of power system terminal equipment. The method can be executed by an information processing device for power terminal equipment. The information processing device for power terminal equipment can be implemented in the form of hardware and / or software. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, PC or server, etc.
[0037] like Figure 1 As shown, the method may specifically include:
[0038] S110. Acquire active terminal devices in the power system based on multiple device detection methods, and acquire communication-related information of the terminal devices; wherein the communication-related information includes at least an open port and a service type of the terminal devices.
[0039] The device detection method can be understood as a technical method for identifying and assessing the status of terminal devices in a power system. The device detection method may include, but is not limited to, detecting the power system using a multicast or broadcast mechanism based on the User Datagram Protocol (UDP) and / or detecting the power system using network detection technology. The power system can be understood as the entire energy supply system, where electricity generated by power stations is transmitted via high-voltage transmission lines to local substations, and then distributed by the substations to end users. The power system includes, but is not limited to, multiple processes such as power generation, transmission, distribution, and consumption. The active state can be understood as the terminal device performing its functions or exchanging data with the network. For example, the active state of a terminal device indicates that the terminal device is sending data, receiving instructions, or participating in some form of data communication. The terminal device can be understood as various electrical devices installed at the user side or at the end of the power grid. The terminal device may include, but is not limited to, smart meters, sensors, and controllers, and is used for measurement, detection, or control tasks. The communication-related information can be understood as information such as the open ports and service types of the terminal devices, which is used to indicate the communication relationship between terminal devices. This communication-related information is of great significance for network management and security. The open ports can be understood as the port numbers on the terminal devices used to detect external connection requests. The service type can be understood as the type of application or protocol running on the terminal device. For example, the service type may include, but is not limited to, web servers, FTP servers, and mail servers. It is understood that different service types are typically bound to specific ports. For example, HTTP services typically use port 80, while HTTPS services use port 443.
[0040] On the basis of the above scheme, in the case where the device detection method is a multicast or broadcast mechanism based on the user data packet protocol to detect the power system, the terminal devices in the power system that are active are obtained based on multiple device detection methods, and the communication-related information of the terminal devices is obtained, including: obtaining the address to be detected corresponding to the power system, and using a multicast or broadcast mechanism based on the user data packet protocol to send a data packet containing target request information to the address to be detected, wherein the address to be detected is the Internet Protocol address of the terminal device to be detected; determining the terminal devices in the power system that are active and the communication-related information of the terminal devices based on the received response data packet corresponding to the target request information.
[0041] Among them, the multicast can be understood as a network communication method that allows multiple receivers to receive the same data stream at the same time. The multicast can effectively reduce the consumption of network bandwidth. The broadcast can be understood as a network communication method that sends data packets to all devices in the network. Exemplarily, broadcast is used in a local area network, such as discovering devices or services in the network. The address to be detected can be understood as the Internet Protocol address of the terminal device that needs to be detected. The address to be detected can be the IP address of a single terminal device, or it can be a multicast or broadcast address, which is not limited here. The target request information can be understood as the information contained in the data packet sent to the address to be detected, which is used to request a response from the terminal device. The response data packet can be understood as the data packet generated and returned by the terminal device after receiving the target request information. The response data packet may include status information and communication association information of the terminal device.
[0042] The above solution, through a multicast or broadcast mechanism based on the User Datagram Protocol, can efficiently discover active terminal devices in the power system and obtain their communication-related information. This not only reduces network bandwidth consumption and improves detection speed, but also ensures the comprehensiveness and accuracy of detection, thereby improving the operation and maintenance efficiency and safety of the power system.
[0043] S120. For a single terminal device, determine the communication protocol used by the terminal device based on the communication association information, determine the device association information of the terminal device based on the communication protocol, and determine a preliminary classification result for the terminal device based on the device association information and preset classification rules.
[0044] The communication protocol can be understood as the rules that specify the exchange of information between two or more devices on the network. The communication protocol may include but is not limited to TCP / IP, HTTP, HTTPS, and FTP. The device association information can be understood as detailed information about the terminal device, and the device association information may include the device model, brand, and operating system version. The device association information is used to identify and manage terminal devices. The preset classification rules can be understood as a set of rules formulated according to specific standards or patterns, which are used to indicate the preliminary classification of terminal devices based on the device association information. The preset classification rules can be determined based on the function, purpose, or security level of the device.
[0045] On the basis of the above scheme, optionally, obtaining the device association information of the terminal device according to the communication protocol includes: sending a preset protocol request corresponding to the communication protocol to the terminal device based on the communication protocol used by the terminal device; obtaining the device response information of the terminal device to the preset protocol request, and obtaining the device association information of the terminal device from the device response information.
[0046] The preset protocol request can be understood as a request message in a specific format sent according to the communication protocol used by the terminal device, which is used to trigger a device response and obtain the required information. For example, if the terminal device uses the HTTP protocol, the preset protocol request can be an HTTP GET request. The device response information can be understood as the response data generated and returned by the terminal device after receiving the preset protocol request. The device response information may include, but is not limited to, detailed information about the terminal device, such as the device model, manufacturer, operating system version, and service status.
[0047] The above solution sends a preset protocol request based on the communication protocol used by the terminal device and parses the device response information to obtain device-related information. It can accurately identify and obtain detailed information of the terminal device, improve the accuracy and efficiency of device management, and enhance the safety and reliability of the power system.
[0048] The device association information includes multiple target device parameters; the preset classification rules include category judgment conditions corresponding to multiple device categories; determining the preliminary classification result of the terminal device based on the device association information and the preset classification rules includes: determining the preliminary classification result of the terminal device based on the category judgment conditions satisfied by the multiple target device parameters included in the device association information and the device category corresponding to the category judgment conditions.
[0049] The multiple target device parameters can be understood as multiple specific parameters included in the device association information, each parameter representing a specific attribute or characteristic of the terminal device. The category determination condition can be understood as a specific condition or standard used to determine which category the terminal device belongs to. The category determination condition can be defined based on one or more target device parameters in the device association information.
[0050] This solution analyzes multiple target device parameters in device association information and determines a preliminary classification result for terminal devices based on the category judgment criteria in pre-set classification rules. It accurately identifies device types, improving the efficiency and accuracy of device management while simplifying the complexity of manual classification and enhancing the operation, maintenance, and safety management capabilities of power systems.
[0051] S130. Construct a device feature vector based on the device association information and the preliminary classification result, classify the device feature vector through a target classification model to obtain a target classification result corresponding to the terminal device, and write the device association information of the terminal device into a target database based on the target classification result of the terminal device; wherein, the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
[0052] The device feature vector can be understood as describing the characteristics of a terminal device. The feature vector consists of numbers, each representing a specific feature. The device feature vector may include, but is not limited to, the IP address, MAC address prefix, open ports, service type, manufacturer information, and preliminary classification results. The target classification model can be understood as a model trained using a machine learning algorithm and used to classify device feature vectors. The target classification model can be trained using a preset machine learning algorithm based on sample feature data. It is understood that during the training process of the target classification model, the model learns to predict the correct classification result based on the input device feature vector. The sample feature data can be understood as a dataset used to train the target classification model, with each data record in the dataset containing a device feature vector and its corresponding correct classification label. The target database can be understood as a database used to store the classification results and related information of terminal devices. It is understood that by writing the target classification results into the target database, subsequent data query, analysis, and management can be facilitated.
[0053] Based on the above scheme, optionally, the machine learning model includes a random forest model; the device feature vector is classified by the target classification model to obtain a target classification result corresponding to the terminal device, including: inputting the device feature vector into multiple decision trees of a pre-constructed random forest model respectively to obtain a classification prediction result of each decision tree for the device feature vector; voting on the classification prediction results of multiple decision trees, and determining the classification prediction result with the most votes as the target classification result corresponding to the terminal device.
[0054] The random forest model is constructed in the following manner: a plurality of sample feature data are obtained, a plurality of sample subsets are constructed based on the plurality of sample feature data, and a decision tree is constructed for each of the sample subsets, wherein each of the sample subsets contains a first number of the sample feature data; for each of the sample subsets, a second number of the sample feature data are obtained in the sample subset to construct a feature subset, and a decision tree corresponding to the sample subset is trained based on the sample subset and the feature subset; and a plurality of trained decision trees are combined into the random forest model.
[0055] Furthermore, the training of the decision tree corresponding to the sample subset based on the sample subset and the feature subset may specifically include: constructing a decision tree corresponding to the sample subset for each sample subset, determining the optimal splitting method for each node of the decision tree based on the feature subset and the Gini coefficient, performing node splitting based on the feature subset and the optimal splitting method, and recursively performing splitting operations on the child nodes of the node; obtaining a trained decision tree when the depth of the decision tree reaches the maximum depth or the number of sample feature data in the nodes of the decision tree is less than a preset number threshold.
[0056] In embodiments of the present invention, the random forest model can be understood as an ensemble learning method that improves prediction accuracy and stability by constructing multiple decision trees and averaging their results. The decision tree can be understood as a tree-structured machine learning model that gradually divides device feature vectors into different categories through conditional judgments (nodes). The classification prediction result can be understood as the result obtained by the decision tree after classifying the input device feature vector, which is used to indicate the specific category to which the terminal device belongs. The sample feature data can be understood as a dataset used to train the machine learning model. Each data record in the dataset contains the device feature vector of a terminal device and its corresponding correct classification label. The sample subset can be understood as a portion of data randomly extracted from the sample feature data and used to construct a single decision tree. Each sample subset contains a certain amount of sample feature data. The first number can be understood as the number of sample feature data contained in each sample subset, which is randomly extracted from the sample feature data. The second number can be understood as the number of features contained in each feature subset, which is generally less than or equal to the total number of features in the sample feature data. The feature subset can be understood as a portion of features randomly selected from the sample subset and used to train a single decision tree. Introducing randomness by feature subsets can reduce the risk of overfitting.
[0057] The above solution constructs a random forest model, uses multiple decision trees to classify device feature vectors, and determines the final classification results through a voting mechanism. This not only improves the accuracy and stability of classification, but also effectively reduces the risk of overfitting by introducing randomness in sample subsets and feature subsets, and improves the generalization ability of the model, thereby achieving efficient and reliable equipment classification and management in the power system.
[0058] Based on the above scheme, the loss function of the random forest model can be determined based on the true label vector, the matrix composed of the prediction probabilities of all decision trees, the class weight vector, the number of classes, and the prediction probability of the decision tree for the sample feature data. Specifically, the loss function of the random forest model is as follows:
[0059]
[0060] Where: y represents the true label vector; H represents the matrix composed of the predicted probabilities of all decision trees; w represents the class weight vector; T represents the number of classes; h t (x) i It represents the predicted probability of the sample feature data x belonging to category i by the t-th decision tree.
[0061] The true label vector can be understood as representing the true category label of each sample. The category weight vector can be understood as being used to address category imbalance, with each category having a corresponding category weight.
[0062] The above scheme, by defining the loss function of the random forest model, can accurately evaluate the classification performance of the model. Since the loss function comprehensively considers the prediction probability and category weights of all decision trees, it minimizes the overall loss, optimizes the model parameters, improves the accuracy and stability of classification, and introduces category weights, effectively solves the category imbalance problem, and enhances the robustness and generalization ability of the model in practical applications.
[0063] The technical solution of the embodiment of the present invention is as follows: first, terminal devices in an active state in the power system are obtained based on multiple device detection methods, and communication-related information of the terminal devices is obtained. Since the communication-related information at least includes the open ports and service types of the terminal devices, active terminals can be accurately managed and resource allocation can be optimized; then, for a single terminal device, the communication protocol used by the terminal device is determined according to the communication-related information, and the device-related information of the terminal device is determined according to the communication protocol. A preliminary classification result of the terminal device is determined according to the device-related information and preset classification rules, thereby realizing automatic identification and classification of the terminal device; finally, a device feature vector is constructed according to the device-related information and the preliminary classification result. The target classification model classifies the device feature vector to obtain a target classification result corresponding to the terminal device, and writes the device association information of the terminal device into a target database according to the target classification result of the terminal device. Since the target classification model is obtained by training a preset machine learning algorithm based on sample feature data, the target classification model can be used to process the device association information and the preliminary classification result to achieve accurate classification of the terminal device, optimize power system management, and solve the problems of low terminal device classification accuracy, unreasonable resource allocation, high maintenance cost, and safety hazards in related technologies. It can automate terminal device identification and classification, improve power system management efficiency, enhance safety and resource optimization configuration, and promote intelligent operation and maintenance.
[0064] Example 2
[0065] Figure 2A flowchart of an information processing method for power terminal equipment provided in the second embodiment of the present invention, this embodiment is a further refinement based on the above embodiment. Optionally, the device detection method includes detecting the power system based on network detection technology; the terminal equipment in the power system that is active based on multiple network communication protocols is obtained, and the communication-related information of the terminal equipment is obtained, including: obtaining the address to be detected corresponding to the power system, configuring scanning parameters based on the Internet Control Message Protocol, sending a target protocol request of the network control message protocol to the address to be detected according to the scanning parameters, and determining the terminal equipment in the power system that is active according to the received request response information corresponding to the target protocol request; wherein the address to be detected is the Internet Protocol address of the terminal equipment to be detected; for the terminal equipment in the active state, the terminal equipment is port scanned according to the Internet Protocol address and open port corresponding to the terminal equipment, and the communication-related information of the terminal equipment is determined according to the scanning results. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to those in the above embodiment are not repeated here.
[0066] like Figure 2 As shown, when the device detection method is to detect the power system based on network detection technology, the method may specifically include:
[0067] S210. Obtain an address to be detected corresponding to the power system, configure scanning parameters based on the Internet Control Message Protocol, send a target protocol request corresponding to the Internet Control Message Protocol to the address to be detected according to the scanning parameters, and determine the terminal device in an active state in the power system according to the received request response information corresponding to the target protocol request; wherein the address to be detected is the Internet Protocol address of the terminal device to be detected.
[0068] The Internet Control Message Protocol (ICMP) can be understood as a network layer protocol used to transmit control messages and error reports in IP networks. The ICMP can detect active devices in the network by sending a target protocol request. After configuring scan parameters, the ICMP scan is performed, the scan results are parsed, the IP addresses and MAC addresses of the responding devices are extracted, and the active device information is stored in a temporary device list. The scan parameters can be understood as parameters configured for ICMP scanning, which may include but are not limited to the scan time interval, number of retries, timeout period, etc., used to improve the efficiency and accuracy of the scan. The target protocol request can be understood as a request message generated according to the ICMP protocol, used to detect whether the target device is online, etc. The target protocol request corresponding to the ICMP can be an ICMP Echo request. The Internet Protocol address can be understood as a digital label used to uniquely identify a device in the network. Specifically, the ICMP Echo request can be sent using the ping command and the ICMP Echo reply can be received. The active terminal devices in the power system can then be determined based on the ICMP Echo reply.
[0069] An optional implementation method includes determining the IP address or IP address range of the terminal device to be detected; setting specific parameters of the ICMP scan, such as the scanning time interval, number of retries, timeout period, etc.; using the configured scanning parameters, sending an ICMP protocol request to the address to be detected; receiving and parsing the protocol request returned by the target device, and determining which terminal devices are active based on the response information.
[0070] S220. For the terminal device in the active state, perform a port scan on the terminal device according to the Internet Protocol address and open port corresponding to the terminal device, and determine the communication association information of the terminal device according to the scanning result, wherein the communication association information at least includes the open port and service type of the terminal device.
[0071] The open port can be understood as the port number used on the device to detect external connection requests. The port scan can be understood as a detection technology used to determine which ports on the target device are open, closed, or filtered, and can be used to identify services running on the terminal device and potential security vulnerabilities.
[0072] Based on the above scheme, the communication-related information includes a media access control address; the method of obtaining active terminal devices in the power system based on multiple network communication protocols and obtaining the communication-related information of the terminal devices also includes: for the terminal devices in the active state, sending an address acquisition request to the terminal device based on the address resolution protocol to obtain the media access control address of the terminal device in the active state.
[0073] Among them, the Media Access Control Address (MAC address) can be understood as the hardware address used to identify the network interface controller. It is understandable that each network device has a unique MAC address for data transmission in the network. The Address Resolution Protocol (ARP) can be understood as a protocol for converting an IP address into a MAC address. For example, in a local area network, when a terminal device needs to communicate with another terminal device, an ARP request will be sent to obtain the MAC address of the terminal device. The ARP request usually contains the IP address of the terminal device, and the response contains the MAC address of the target terminal device. The address acquisition request can be understood as a request message sent through the ARP protocol to obtain the MAC address of the terminal device. For example, the sender will broadcast an ARP request, which contains the IP address of the terminal device. After receiving the request, the terminal device will reply with an ARP response, which contains its MAC address.
[0074] The above solution uses multiple network communication protocols to obtain communication association information of active terminal devices in the power system, and obtains the media access control address of the device through the address resolution protocol. This not only can understand the network status of the device, but also enhances network management and security protection capabilities, improves the accuracy of device identification and network stability.
[0075] S230. For a single terminal device, determine the communication protocol used by the terminal device based on the communication association information, determine the device association information of the terminal device based on the communication protocol, and determine a preliminary classification result for the terminal device based on the device association information and preset classification rules.
[0076] S240. Construct a device feature vector based on the device association information and the preliminary classification result, classify the device feature vector through a target classification model to obtain a target classification result corresponding to the terminal device, and write the device association information of the terminal device into a target database based on the target classification result of the terminal device; wherein, the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
[0077] The above solution, through scanning parameters based on network detection technology and Internet Control Message Protocol, can efficiently discover and identify active terminal devices in the network and obtain their Internet Protocol (IP) addresses. It can also determine the open ports and service types of the devices through port scanning, thereby obtaining detailed communication association information. It uses the Address Resolution Protocol to obtain the media access control address of the device, further enriching the device's identification information, which not only improves the accuracy and efficiency of device management, but also enhances the safety and stability of the power system, ensuring the normal operation of the power system and the optimal allocation of resources.
[0078] Example 3
[0079] Figure 3 This is a structural diagram of an information processing device for power terminal equipment provided by the third embodiment of the present invention. Figure 3 As shown, the device includes: a communication-related information acquisition module 310 , a preliminary classification result determination module 320 , and a target database writing module 330 .
[0080] Among them, the communication association information acquisition module 310 is used to obtain terminal devices in an active state in the power system based on multiple device detection methods, and obtain the communication association information of the terminal devices; wherein the communication association information at least includes the open port and service type of the terminal device; the preliminary classification result determination module 320 is used to determine, for a single terminal device, the communication protocol used by the terminal device according to the communication association information, and determine the device association information of the terminal device according to the communication protocol, and determine the preliminary classification result of the terminal device according to the device association information and preset classification rules; the target database writing module 330 is used to construct a device feature vector according to the device association information and the preliminary classification result, classify the device feature vector through the target classification model to obtain the target classification result corresponding to the terminal device, and write the device association information of the terminal device into the target database according to the target classification result of the terminal device; wherein the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
[0081] The technical solution of the embodiment of the present invention is as follows: first, the terminal devices in an active state in the power system are acquired based on a plurality of device detection methods through the communication association information acquisition module 310, and the communication association information of the terminal devices is acquired. Since the communication association information at least includes the open ports and service types of the terminal devices, the active terminals can be accurately managed and resource allocation can be optimized; then, the preliminary classification result determination module 320 determines the communication protocol used by the terminal device according to the communication association information for a single terminal device, and determines the device association information of the terminal device according to the communication protocol, and determines the preliminary classification result of the terminal device according to the device association information and preset classification rules, thereby realizing automatic identification and classification of the terminal device; finally, the target database writing module 330 determines the communication protocol used by the terminal device according to the device association information A device feature vector is constructed based on the preliminary classification result, and the device feature vector is classified by a target classification model to obtain a target classification result corresponding to the terminal device, and the device association information of the terminal device is written into a target database according to the target classification result of the terminal device. Since the target classification model is obtained by training a preset machine learning algorithm based on sample feature data, the device association information and the preliminary classification result can be processed by the target classification model to achieve accurate classification of the terminal device, optimize the power system management, and solve the problems of low terminal device classification accuracy, unreasonable resource allocation, high maintenance cost and safety hazards in related technologies. It can automate terminal device identification and classification, improve power system management efficiency, enhance safety and resource optimization configuration, and promote intelligent operation and maintenance.
[0082] Based on the above scheme, optionally, the equipment detection method includes detecting the power system based on a multicast or broadcast mechanism of the user data packet protocol; the communication-related information acquisition module includes: a data packet sending submodule and a first communication-related information determination submodule.
[0083] Among them, the data packet sending submodule is used to obtain the address to be detected corresponding to the power system, and adopts a multicast or broadcast mechanism based on the user data packet protocol to send a data packet containing target request information to the address to be detected, and the address to be detected is the Internet Protocol address of the terminal device to be detected; the first communication association information determination submodule is used to determine the terminal device in the power system that is active and the communication association information of the terminal device based on the received response data packet corresponding to the target request information.
[0084] On the basis of the above solution, optionally, the equipment detection method includes detecting the power system based on network detection technology; the communication-related information acquisition module includes: a terminal device determination submodule and a second communication-related information determination submodule.
[0085] Among them, the terminal device determination submodule is used to obtain the address to be detected corresponding to the power system, configure the scanning parameters based on the Internet Control Message Protocol, send the target protocol request of the network control message protocol to the address to be detected according to the scanning parameters, and determine the terminal device in the active state in the power system according to the received request response information corresponding to the target protocol request; wherein, the address to be detected is the Internet Protocol address of the terminal device to be detected; the second communication association information determination submodule is used to perform a port scan on the terminal device in the active state according to the Internet Protocol address and open port corresponding to the terminal device, and determine the communication association information of the terminal device according to the scanning result.
[0086] Based on the above scheme, optionally, the communication association information includes a media access control address; the second communication association information determination submodule is used to: for the terminal device in the active state, send an address acquisition request to the terminal device based on the address resolution protocol to obtain the media access control address of the terminal device in the active state.
[0087] On the basis of the above solution, optionally, the preliminary classification result determination module includes: a communication protocol determination submodule.
[0088] Among them, the communication protocol determination submodule is used to determine the first candidate protocol that matches the terminal device based on the open port of the terminal device, determine the second candidate protocol that matches the terminal device based on the service type of the terminal device, and determine the communication protocol to be used based on the first candidate protocol and the second candidate protocol.
[0089] On the basis of the above solution, optionally, the preliminary classification result determination module includes: a preset protocol request sending submodule and a device association information acquisition submodule.
[0090] Among them, the preset protocol request sending submodule is used to send a preset protocol request corresponding to the communication protocol to the terminal device based on the communication protocol used by the terminal device; the device association information acquisition submodule is used to obtain the device response information of the terminal device to the preset protocol request, and obtain the device association information of the terminal device from the device response information.
[0091] Based on the above solution, optionally, the device association information includes multiple target device parameters; the preset classification rules include category judgment conditions corresponding to multiple device categories; the preliminary classification result determination module includes: a preliminary classification result determination submodule.
[0092] The preliminary classification result determination submodule is configured to determine a preliminary classification result of the terminal device according to the device association information including category judgment conditions satisfied by multiple target device parameters and the device category corresponding to the category judgment conditions.
[0093] Based on the above solution, optionally, the machine learning model includes a random forest model; the target database writing module includes: a device feature vector input submodule and a target classification result determination submodule.
[0094] Among them, the device feature vector input submodule is used to input the device feature vector into multiple decision trees of a pre-constructed random forest model respectively to obtain the classification prediction results of each decision tree for the device feature vector; the target classification result determination submodule is used to vote on the classification prediction results of multiple decision trees, and determine the classification prediction result with the most votes as the target classification result corresponding to the terminal device; wherein, the random forest model is constructed in the following manner: obtaining multiple sample feature data, constructing multiple sample subsets based on the multiple sample feature data, and constructing a decision tree for each sample subset respectively, wherein each sample subset contains a first number of sample feature data; for each sample subset, obtaining a second number of sample feature data in the sample subset to construct a feature subset, and training the decision tree corresponding to the sample subset based on the sample subset and the feature subset; combining multiple trained decision trees into the random forest model.
[0095] Based on the above solution, optionally, the loss function of the random forest model is as follows:
[0096]
[0097] Where: y represents the true label vector; H represents the matrix composed of the predicted probabilities of all decision trees; w represents the class weight vector; T represents the number of classes; h t (x) i It represents the predicted probability of the sample feature data x belonging to category i by the t-th decision tree.
[0098] An information processing device for a power terminal device provided by an embodiment of the present invention can execute an information processing method for a power terminal device provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0099] Example 4
[0100] Figure 4A 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, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. 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 into 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 running 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 an information processing method for a power terminal device.
[0104] In some embodiments, an information processing method for a power terminal device 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 information processing method for a power terminal device described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute an information processing method for a power terminal device in any other appropriate manner (for example, by means of firmware).
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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).
[0109] 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.
[0110] 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 a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0111] 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.
[0112] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. An information processing method for power terminal equipment, characterized in that: include: Acquire active terminal devices in the power system based on multiple device detection methods, and acquire communication-related information of the terminal devices; wherein the communication-related information at least includes an open port and a service type of the terminal devices; For a single terminal device, determine the communication protocol used by the terminal device according to the communication association information, determine the device association information of the terminal device according to the communication protocol, and determine a preliminary classification result for the terminal device according to the device association information and a preset classification rule; A device feature vector is constructed based on the device association information and the preliminary classification result, the device feature vector is classified through a target classification model to obtain a target classification result corresponding to the terminal device, and the device association information of the terminal device is written into a target database based on the target classification result of the terminal device; wherein the target classification model is obtained by training a preset machine learning algorithm based on sample feature data.
2. The method according to claim 1, characterized in that The device detection method includes detecting the power system based on a multicast or broadcast mechanism of a user data packet protocol; the method of obtaining active terminal devices in the power system based on multiple device detection methods and obtaining communication-related information of the terminal devices includes: Acquire an address to be detected corresponding to the power system, and send a data packet containing target request information to the address to be detected by using a multicast or broadcast mechanism based on a user data packet protocol, wherein the address to be detected is an Internet protocol address of a terminal device to be detected; The terminal devices in the power system that are active and the communication-related information of the terminal devices are determined according to the received response data packets corresponding to the target request information.
3. The method according to claim 1, characterized in that The equipment detection method includes detecting the power system based on network detection technology; The method of acquiring active terminal devices in the power system based on multiple network communication protocols and acquiring communication-related information of the terminal devices includes: Acquire an address to be detected corresponding to the power system, configure a scanning parameter based on the Internet Control Message Protocol, send a target protocol request of the Internet Control Message Protocol to the address to be detected according to the scanning parameter, and determine an active terminal device in the power system according to the received request response information corresponding to the target protocol request; wherein the address to be detected is an Internet Protocol address of the terminal device to be detected; For the terminal device in an active state, a port scan is performed on the terminal device according to the Internet Protocol address and open port corresponding to the terminal device, and the communication association information of the terminal device is determined according to the scanning result.
4. The method according to claim 3, characterized in that: The communication-related information includes a media access control address; the method of obtaining active terminal devices in the power system based on multiple network communication protocols and obtaining the communication-related information of the terminal devices also includes: For the terminal device in the active state, an address acquisition request is sent to the terminal device based on an address resolution protocol to acquire a media access control address of the terminal device in the active state.
5. The method according to claim 1, characterized in that The determining the communication protocol used by the terminal device according to the communication association information includes: A first candidate protocol matching the terminal device is determined according to an open port of the terminal device, a second candidate protocol matching the terminal device is determined according to a service type of the terminal device, and a communication protocol to be used is determined according to the first candidate protocol and the second candidate protocol.
6. The method according to claim 1, characterized in that The acquiring device association information of the terminal device according to the communication protocol includes: Sending a preset protocol request corresponding to the communication protocol to the terminal device based on the communication protocol used by the terminal device; Obtain device response information of the terminal device to the preset protocol request, and obtain device association information of the terminal device from the device response information.
7. The method according to claim 1, characterized in that The device association information includes multiple target device parameters; the preset classification rule includes category judgment conditions corresponding to multiple device categories; the preliminary classification result of the terminal device determined according to the device association information and the preset classification rule includes: According to the device association information including the category judgment conditions satisfied by the multiple target device parameters and the device category corresponding to the category judgment conditions, a preliminary classification result of the terminal device is determined.
8. The method according to claim 1, characterized in that The machine learning model includes a random forest model; and the classifying the device feature vector by the target classification model to obtain a target classification result corresponding to the terminal device includes: Inputting the device feature vectors into multiple decision trees of a pre-constructed random forest model respectively to obtain classification prediction results of each decision tree for the device feature vector; Voting on the classification prediction results of the plurality of decision trees, and determining the classification prediction result with the most votes as the target classification result corresponding to the terminal device; The random forest model is constructed in the following way: Acquire multiple sample feature data, construct multiple sample subsets based on the multiple sample feature data, and construct a decision tree for each sample subset, wherein each sample subset contains a first amount of the sample feature data; For each of the sample subsets, a second amount of the sample feature data is acquired in the sample subset to construct a feature subset, and a decision tree corresponding to the sample subset is trained according to the sample subset and the feature subset; Combining multiple trained decision trees into the random forest model.
9. The method according to claim 8, characterized in that The loss function of the random forest model is as follows: Where: y represents the true label vector; H represents the matrix composed of the prediction probabilities of all decision trees; w represents the category weight vector; T represents the number of categories; h t (x) i It represents the predicted probability that the sample feature data x belongs to category i by the t-th decision tree.
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 the information processing method for a power terminal device according to any one of claims 1 to 9 when executed.
Citation Information
Patent Citations
Topological hierarchy and type discrimination method and system for electric power information equipment
CN115695207A
Modbus protocol-based electric power Internet of Things equipment identification method and system
CN117061566A
Automatic extraction method for electric power internet of things terminal features
CN117354251A
Method and device for identifying network risk behavior of electric power internet of things terminal, and medium
CN118473730A
Access method and device of power grid equipment, equipment and storage medium
CN118631647A