Message sending and receiving method, system and medium based on industrial Internet
By analyzing the abnormal situation and busyness of the sending and receiving devices in the industrial LAN and optimizing the message transmission path, the packet data transmission problem caused by abnormalities and congestion in the industrial LAN is solved, and information transmission efficiency and network stability are improved.
Patent Information
- Application Number
- CN202411554985.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In an industrial LAN, the sending device itself has abnormalities or the amount of message data sent is too large, resulting in network congestion and the message data cannot reach the destination accurately and promptly, affecting information transmission efficiency and network stability.
By obtaining the transmission and reception records of each transceiver device, analyzing the time change of the message data it sends in the preset period, calculating the abnormality coefficient to filter the suspected abnormality device, and distinguishing the final abnormality device from the normal device according to the abnormality degree value. For the normal device, the receiving device is selected based on the busy coefficient of the next hop transceiver device.
Effectively identify and isolate abnormal devices, optimize message transmission paths, reduce network congestion, improve the information transmission efficiency and stability of industrial LANs, and realize maintenance services for industrial LANs.
Smart Images

Figure CN119383245B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial local area network maintenance services, and in particular to a message receiving and sending method, system and medium based on the industrial Internet. Background Art
[0002] The Industrial Internet is the product of the deep integration of information and communication technology and industry. It builds a new intelligent manufacturing and service system by connecting people, machines, objects and other elements. As the infrastructure of the Industrial Internet, the Industrial LAN carries a large number of data communication tasks between devices, including the issuance of production instructions, monitoring of equipment status, and collection of production data. However, with the expansion of the scale and complexity of industrial networks, the management of message sending and receiving in the Industrial LAN faces many challenges.
[0003] In an industrial LAN, the message sending and receiving process should strictly follow the main functions, responsibilities and permissions of the current equipment to perform data transmission. In the existing technology, when sending and receiving message data in an industrial LAN, the message data is usually transmitted along a fixed route. However, if during the message data transmission process, the sending device itself has an abnormality or the amount of message data sent is too large, causing network congestion, if the message is still transmitted along a fixed route, the message data will not be able to reach the destination accurately and timely, thereby affecting the overall transmission efficiency of information in the industrial LAN and resulting in poor stability of the industrial LAN. Summary of the invention
[0004] In order to solve the problem that when there is an abnormality in the sending device itself or the amount of data of the message data sent is too large, causing network congestion, the message data will not be able to reach the destination accurately and timely if it is still transmitted according to a fixed route, thereby affecting the overall transmission efficiency of information in the industrial LAN, resulting in poor stability of the industrial LAN. The purpose of the present invention is to provide a message sending and receiving method, system and medium based on the industrial Internet. The technical solutions adopted are as follows:
[0005] Obtaining the transceiver record of each transceiver device in the industrial local area network, wherein the transceiver record includes the number of transceivers of each transceiver device and the time of each reception and transmission of message data;
[0006] Analyze the time variation of the message data sent by each transceiver within a preset time period, determine the abnormal coefficient, and thus screen suspected abnormal devices from all transceivers; during the message data transmission process, determine the abnormal degree value of each suspected abnormal device based on the number of transceivers through which the message data passes, the abnormal coefficient of each suspected abnormal device, and the number of times all the transceivers next to each suspected abnormal device receive the message data within the preset time period, so as to distinguish the final abnormal device from the normal device among all the suspected abnormal devices;
[0007] For any normal device, within a preset time period, the busy coefficient of each next-hop transceiver device is determined based on the time required for the next-hop transceiver device of the normal device to process message data and the number of transmissions and receptions of each next-hop transceiver device; based on the busy coefficient, the receiving device is screened among all the next-hop transceiver devices of the normal device.
[0008] Furthermore, the analyzing of the time variation of the message data sent by each transceiver within a preset period of time, determining the abnormal coefficient and thereby screening suspected abnormal devices from all transceivers includes:
[0009] For any transceiver device, within a preset time period, the time interval between two adjacent message data transmissions is used as a duration factor;
[0010] The value after normalizing the difference between the maximum duration factor and the mean of all duration factors is used as the abnormal coefficient of the transceiver device;
[0011] The transceiver device whose abnormal coefficient is greater than the preset first abnormal threshold is regarded as the suspected abnormal device.
[0012] Furthermore, the step of distinguishing the final abnormal device and the normal device from all the suspected abnormal devices includes:
[0013] Determine the number of abnormal values based on the number of transceiver devices that all message data pass through on the transmission path within a preset time period;
[0014] For any suspected abnormal device, the ratio between the number of times each next-hop transceiver device of the suspected abnormal device receives message data and the number of times the suspected abnormal device sends message data is used as the access factor of each next-hop transceiver device, and the variance of the access abnormality values of all next-hop transceiver devices of the suspected abnormal device is used as the access abnormality value;
[0015] The value obtained by normalizing the product of the quantity abnormal value, the access abnormal value corresponding to the suspected abnormal device, and the abnormal coefficient is used as the abnormal degree value of the suspected abnormal device;
[0016] The suspected abnormal device whose abnormality degree value is greater than or equal to the preset second abnormality threshold is regarded as the final abnormal device, and the suspected abnormal device whose abnormality degree value is less than the preset second abnormality threshold is regarded as the normal device.
[0017] Furthermore, the method for obtaining the quantity abnormal value includes:
[0018] The transmission path of each message data is obtained, and the ratio of the average value of the number of transceiver devices passing through the transmission path of all message data to the number of all transceiver devices in the industrial local area network is used as the quantity abnormal value.
[0019] Furthermore, the method for obtaining the busy coefficient includes:
[0020] For any normal device, within a preset time period, based on the time required for the next-hop transceiver device of the normal device to process the message data, determine the weight of each next-hop transceiver device;
[0021] The sum of the number of transceivers of all transceivers in the industrial LAN is taken as the total transceiver value, and the ratio of the sum of the number of transceivers of each next-hop transceiver to the total transceiver value is taken as the busy factor of each next-hop transceiver;
[0022] The value obtained by normalizing the product of the weight of each next-hop transceiver device and the corresponding busy factor is used as the busy coefficient of each next-hop transceiver device.
[0023] Furthermore, the method for obtaining the weight includes:
[0024] Calculate the difference between the receiving and sending time of each message data forwarded by each next-hop transceiver device of the normal device as the message data processing factor;
[0025] A value obtained by normalizing the average of the message data processing factors of all message data forwarded by each next-hop transceiver device of the normal device is used as the weight of each next-hop transceiver device.
[0026] Furthermore, the method for screening receiving devices includes:
[0027] For any normal device, among all the next-hop transceiver devices of the normal device, the next-hop transceiver device with the smallest busy coefficient is used as the receiving device.
[0028] Furthermore, after the final abnormal device is screened out, the location of the final abnormal device is obtained and an alarm is issued.
[0029] The present invention also proposes a message sending and receiving system based on the industrial Internet, including a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and when the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor, any step of the message sending and receiving method based on the industrial Internet is implemented.
[0030] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any one of the steps of the method for sending and receiving messages based on the industrial Internet.
[0031] The present invention has the following beneficial effects:
[0032] In an industrial LAN, each device can be used as both a sending device and a receiving device. Detailed message data sending and receiving records are an important basis for detecting abnormalities in network equipment. Therefore, the sending and receiving records of each device in the industrial LAN are obtained, including the number of times each transceiver sends and receives messages and the time nodes for each reception and sending of message data. Under normal circumstances, since the frequency of data generated by industrial production is relatively stable, the frequency of each transceiver sending message data will also be relatively fixed. Therefore, the time changes of each transceiver sending message data within a preset time period are analyzed, and the abnormal coefficient of each transceiver is calculated to screen out suspected abnormal devices. At this time, the suspected abnormal device indicates that the amount of received message data is abnormal or the device is abnormal, and further judgment is required. When a device in the industrial LAN has a problem, the network equipment will usually adjust automatically, that is, it will try to continue to transmit the message data through other paths, so the number of devices through which the message data passes will increase significantly. At the same time, if the sending device has an abnormality, it will send message data at a high frequency, resulting in high-frequency access to the next-hop transceiver device. Therefore, the number of transceivers through which the message data passes during the transmission process, the abnormal coefficient of the suspected abnormal device, and the number of times all the transceivers of the next hop of the suspected abnormal device receive the message data within a preset period of time are analyzed to determine the abnormal degree value of the suspected abnormal device and distinguish the final abnormal device from the normal device. For the normal device, in order to ensure that the message data stored therein arrives at the destination in a timely and accurate manner, it is necessary to select a transceiver with a lower busyness as the receiving device from all the next-hop transceivers of the normal device, and the determination of the busyness can be quantified by the number of times the transceiver receives the message data and the time required to process the message data, thereby determining the busy coefficient, and finally selecting the receiving device based on the busy coefficient, which helps to optimize load balancing, reduce network congestion, and ensure the overall transmission efficiency of information in the industrial LAN, thereby realizing maintenance services for the industrial LAN. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A method flow chart of a message sending and receiving method based on the industrial Internet provided by an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a mesh topology structure provided by an embodiment of the present invention;
[0036] Figure 3 A method flow chart of a method for distinguishing between an abnormal device and a normal device provided by an embodiment of the present invention;
[0037] Figure 4 A method flow chart of a method for obtaining a busy coefficient provided by an embodiment of the present invention;
[0038] Figure 5 A system block diagram of a message transceiver system based on the industrial Internet provided by an embodiment of the present invention;
[0039] Figure 6 A schematic diagram of the system structure of a message transceiver system based on the industrial Internet provided by one embodiment of the present invention;
[0040] Figure 7 A schematic diagram of a computer-readable storage medium provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the message sending and receiving method, system and medium based on the industrial Internet proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0043] The following is a detailed description of a specific scheme of a message sending and receiving method, system and medium based on the industrial Internet provided by the present invention in conjunction with the accompanying drawings.
[0044] See also Figure 1 , which shows a method flow chart of a message sending and receiving method based on industrial Internet provided by an embodiment of the present invention, the method comprising the following steps:
[0045] Step S1: Obtain the transceiver record of each transceiver device in the industrial local area network, wherein the transceiver record includes the number of transceivers of each transceiver device and the time of each reception and transmission of message data.
[0046] In an industrial LAN, the sending device is first responsible for collecting production data and constructing message data, which are then transmitted through the industrial LAN network. At the same time, the receiving device is responsible for receiving the message data sent by the sending device, parsing, decoding, and subsequent data processing of the message data, thereby achieving efficient and secure data transmission and sharing within the network. In actual network deployment, the network architecture of the industrial LAN usually adopts a mesh topology, that is, one device can send message data to multiple devices. Similarly, one device can also receive message data from multiple devices and parse and process the message data. Therefore, each device can be used as both a sending device and a receiving device. Therefore, the devices in the industrial LAN are collectively referred to as transceiver devices. Please refer to Figure 2 , which shows a schematic diagram of a mesh topology structure in an embodiment of the present invention.
[0047] During the message data transmission process, the sending device itself may have an abnormality or when the data volume is too large, the network may be congested. Therefore, in an embodiment of the present invention, a message sending and receiving method based on the industrial Internet is proposed. While analyzing the abnormal situation of the industrial LAN, it can also provide a more timely and accurate transmission path for the transmission of message data.
[0048] First, obtain the transceiver records of each transceiver in the industrial LAN. The transceiver records include the number of times each transceiver receives and sends message data (including the number of times the message data is received and the number of times the message data is sent) and the time of each reception and sending of the message data. It should be noted that the acquisition of the transceiver records can use network monitoring tools (Wireshark, tcpdump, etc.) to capture the message data on the network, record the source address, destination address, port number, protocol type, and timestamp of the message data, so as to calculate and record the transceiver records of each transceiver and the transmission path of each message data; you can also view and analyze the log files of each transceiver to obtain the number of times each transceiver sends and receives and the time point information; in addition, the acquisition of the transceiver records can also be achieved through custom scripts or applications.
[0049] Step S2: Analyze the time variation of the message data sent by each transceiver within a preset time period, determine the abnormal coefficient, and thus screen out suspected abnormal devices from all transceivers; during the message data transmission process, based on the number of transceivers through which the message data passes, the abnormal coefficient of each suspected abnormal device, and the number of times all the transceivers next to each suspected abnormal device receive the message data within the preset time period, determine the abnormal degree value of each suspected abnormal device, so as to distinguish the final abnormal device from the normal device among all the suspected abnormal devices.
[0050] In the industrial production process, it is necessary to ensure the stability of the production environment. Therefore, the message sending device collects data information in real time and processes the collected data on time, converts it into the form of message data, and transmits it to the corresponding receiving device. Then the receiving device begins to pair and analyze the message data and process it. Under normal circumstances, when the amount of data received by the transceiver reaches the set threshold, such as 500KB, the data will be uploaded and sent. Since the frequency of the data generated by industrial production is stable, the time interval or frequency of the transceiver sending messages will also be regular. When an abnormality occurs, a large amount of production data will be generated in a short time, and the time interval or frequency of the transceiver sending messages will change. Therefore, the time change of each transceiver sending message data within the preset time period is analyzed, and the abnormal coefficient is determined to screen suspected abnormal devices from all transceivers. Since the abnormal cause of the suspected abnormal device screened out at this time may be that the transceiver is abnormal, resulting in frequent sending of message data, or it may be that the industrial production state is abnormal, resulting in a large amount of data being generated in a short time, causing the transceiver to frequently send message data, it is necessary to further distinguish different abnormal situations. In view of the fact that when an abnormality occurs in a device in the network topology structure, the original fixed route of the message data will change during the transmission process, and the number of transceiver devices on the transmission path of the message data will increase. At the same time, due to the failure or abnormality of the transceiver device itself, it may not receive the feedback of the next-hop transceiver device, so the message data is frequently sent to the next-hop transceiver device. Therefore, during the message data transmission process, for any suspected abnormal device, the number of transceiver devices on the transmission path through which the message data passes, the abnormal coefficient of the suspected abnormal device, and the access of the suspected abnormal device to other transceiver devices are comprehensively analyzed to determine the abnormal degree value of the suspected abnormal device, so as to distinguish the final abnormal device and the normal device from all the suspected abnormal devices. It should be noted that in this embodiment of the present invention, the next-hop transceiver device is represented by the directly connected downstream (subsequent or subsequent) transceiver device accessible to the current transceiver device.
[0051] Preferably, in one embodiment of the present invention, analyzing the time variation of message data sent by each transceiver within a preset period of time, determining the abnormal coefficient, and thus screening suspected abnormal devices from all transceivers, includes:
[0052] Based on the above analysis, it can be seen that in an industrial production environment, the frequency of data generation is stable, so the time interval for the transceiver to send message data should also be relatively stable. Therefore, for any transceiver, within a preset time period, the time interval between each two adjacent message data transmissions is used as the duration factor. In this way, all duration factors within the preset time period can be obtained. The size of the duration factor represents the time interval for the transceiver to send message data.
[0053] Then calculate the mean of all duration factors, which characterizes the general level of the time interval for the transceiver to send message data. The smaller the mean, the shorter the time interval for the transceiver to send message data, that is, the more frequent. Then, normalize the difference between the largest duration factor and the mean and use it as the abnormality coefficient of the transceiver. Since the transceiver will upload and send data only when the amount of data received reaches the set threshold, the largest duration factor can characterize the time interval for the transceiver to send message data under normal production conditions. Therefore, when the abnormality coefficient is larger, it means that there is an abnormality in the time interval for the transceiver to send message data, resulting in an abnormal increase in the number of times the transceiver sends message data within a preset time period. In this case, there may be an abnormality in the transceiver or the production environment. It should be noted that the normalization method here can be used. Normalization function.
[0054] Finally, the transceiver device with an abnormal coefficient greater than a preset first abnormal threshold is regarded as a suspected abnormal device.
[0055] It should be noted that the preset first abnormal threshold is set to 0.4; the preset time period is set to within 5 minutes before the current time, and the length of the specific time period can be adjusted according to the implementation scenario and is not limited here.
[0056] At this point, the abnormal coefficient can be determined and the suspected abnormal devices can be preliminarily screened out through the time changes of the message data sent by all transceiver devices within the preset time period. The reason why the transceiver device is a suspected abnormal device at this time may be that the transceiver device is abnormal, resulting in frequent sending of message data, or it may be that the industrial production status is abnormal, resulting in a large amount of data in a short period of time, causing the transceiver device to frequently send message data, so further distinction is needed.
[0057] In the network topology, under normal conditions, the communication protocol follows a fixed transmission route for the transmission of message data. However, when some transceivers are abnormal, the network equipment will automatically adjust and try other paths to transmit the message data. Therefore, the number of transceivers passed by the message data on the transmission path will increase significantly. At the same time, due to the abnormality of the transceiver, the transceiver will continue to try to retransmit due to its own failure or inability to receive feedback in time, etc., thereby significantly increasing the number of visits to the next-hop transceiver. Therefore, by analyzing the number of transceivers passed by the message data during the transmission process, the abnormal coefficient of the suspected abnormal device, and the number of times all the transceivers at the next hop of the suspected abnormal device receive the message data within a preset time period, it is possible to determine the abnormality level of the suspected abnormal device and distinguish between the final abnormal device and the normal device.
[0058] Preferably, in one embodiment of the present invention, distinguishing final abnormal devices and normal devices from all suspected abnormal devices includes:
[0059] See also Figure 3 , which shows a method flow chart of a method for distinguishing between an abnormal device and a normal device in an embodiment of the present invention, the method comprising the following steps:
[0060] Step S201: within a preset time period, based on the number of transceiver devices through which the message data passes during transmission, determine a quantity abnormality value.
[0061] Because when some transceiver devices in the industrial LAN fail or malfunction, the message data will change its original transmission path, causing the number of transceiver devices passed by the message data to increase. Therefore, within a preset time period, the transmission path of each message data is obtained, and the average of the number of transceiver devices passed on the transmission path of all message data is used as the ratio of the number of all transceiver devices in the industrial LAN as the quantity abnormality value. At this time, when the quantity abnormality value is larger, it means that when the message data within the preset time period is transmitted in the industrial LAN, the more transceiver devices are passed, that is, the more transceiver devices the message data accesses during the transmission process, which can be regarded as an abnormality in the working state of the current industrial LAN, and there may be an abnormality or failure in the transceiver device.
[0062] Step S202: for any suspected abnormal device, analyzing the access situation of the suspected abnormal device to each next-hop transceiver device, and determining the access abnormality value of the suspected abnormal device.
[0063] When the original transmission path of the message data is blocked, in order to ensure that the message data can continue to be transmitted, other transceiver devices will be accessed. However, if the data message of the suspected abnormal device accesses other transceiver devices, the transceiver device itself fails or is abnormal, causing it to fail to receive feedback from the next-hop transceiver device, resulting in the suspected abnormal device frequently sending message data to the next-hop transceiver device, that is, an access abnormality occurs, which means that the suspected abnormal device has a high degree of abnormality.
[0064] Within a preset time period, the ratio between the number of times each next-hop transceiver device of the suspected abnormal device receives message data and the number of times the suspected abnormal device sends message data is used as the access factor of each next-hop transceiver device. The larger the access factor, the more frequently the suspected abnormal device accesses the next-hop transceiver device. When the message data tries other transmission paths, if a path is blocked, the next path will be tried. Therefore, if the suspected abnormal device frequently accesses a next-hop transceiver device, it means that the suspected abnormal device is very likely to have an abnormality.
[0065] Therefore, the variance of the access anomaly values of all next-hop transceiver devices of the suspected abnormal device is finally used as the access anomaly value. The larger the access anomaly value is, the more likely it is that the suspected abnormal device frequently attempts to access a certain transceiver device among all the next-hop transceiver devices, and will not try other paths when the path is blocked. Therefore, the abnormal possibility of the suspected abnormal device is higher.
[0066] Step S203: The quantity abnormality value combines the access abnormality value and the abnormality coefficient of the suspected abnormal device to determine the abnormality degree value of the suspected abnormal device.
[0067] Based on the above steps, we can obtain the quantitative anomaly value that measures the overall abnormality of the industrial LAN and the access anomaly value of the suspected abnormal device. The larger the quantitative anomaly value, the more abnormal the current working state of the industrial LAN is, and there may be an abnormality or failure in the transceiver device; the larger the access anomaly value, the more likely it is that the suspected abnormal device has an abnormality; similarly, the larger the anomaly coefficient, the more abnormal the time interval for sending message data by the suspected abnormal device is.
[0068] Therefore, the value after normalizing the product of the number of abnormal values, the access abnormal value corresponding to the suspected abnormal device, and the abnormal coefficient is used as the abnormality degree value of the suspected abnormal device. The larger the abnormality degree value, the greater the possibility that the suspected abnormal device is abnormal itself. It should be noted that the normalization method here can be used Normalization function.
[0069] Step S204: Differentiate all suspected abnormal devices based on the abnormality degree values, thereby obtaining final abnormal devices and normal devices.
[0070] Based on the analysis in step S203, it can be seen that when the abnormality value of a suspected abnormal device is larger, it means that the reason why the suspected abnormal device is judged as abnormal is that the device itself has a fault or abnormality, so the suspected abnormal device with an abnormality value greater than or equal to the preset second abnormality threshold is regarded as the final abnormal device, and the suspected abnormal device with an abnormality value less than the preset second abnormality threshold is regarded as a normal device. It should be noted that the preset second abnormality threshold is set to 0.7, and the specific value can be adjusted according to the implementation scenario, which is not limited here.
[0071] After distinguishing the final abnormal device from the normal device, the reason why the normal device is judged as a suspected abnormal device is that a large amount of production data is generated in a short period of time during industrial production, and the final abnormal device itself has a fault or abnormality. Therefore, when the final abnormal device is determined among the suspected abnormal devices, it is necessary to obtain the location of the final abnormal device and issue an alarm to notify the staff to carry out maintenance in time.
[0072] Step S3: For any normal device, within a preset time period, based on the time required for the next-hop transceiver device of the normal device to process the message data and the number of transmissions and receptions of each next-hop transceiver device, determine the busy coefficient of each next-hop transceiver device; based on the busy coefficient, filter the receiving device among all the next-hop transceiver devices of the normal device.
[0073] For any normal device, in order to more accurately and timely transmit a large amount of industrial production data to the target transceiver device for analysis and processing, in an embodiment of the present invention, the weight of each next-hop transceiver device is evaluated by analyzing the time required for the next-hop transceiver device of the normal device to process the message data. At the same time, on this basis, combined with the number of times the message data is sent and received in the sending and receiving records of each next-hop transceiver device, the busy coefficient of each next-hop transceiver device is quantified, thereby evaluating the busyness and load conditions of each next-hop transceiver device when processing the message data, so as to facilitate more reasonable determination of the receiving device for receiving the message data in the subsequent process.
[0074] Preferably, in one embodiment of the present invention, the method for obtaining the busy coefficient includes:
[0075] See also Figure 4 , which shows a method flow chart of a method for obtaining a busy coefficient in one embodiment of the present invention, the method comprising the following steps:
[0076] Step S301: For any normal device, within a preset time period, based on the time required for the next-hop transceiver device of the normal device to process message data, determine the weight of each next-hop transceiver device.
[0077] For any normal device, if a next-hop transceiver device processes message data faster, it means that the next-hop transceiver device can be used as a receiving device to process message data more promptly; the speed at which the transceiver device processes message data can be measured by the time difference between the transceiver device receiving the message data and sending the message data, so the difference between the receiving and sending time of each message data forwarded by each next-hop transceiver device of the normal device is calculated as the message data processing factor. The smaller the message data processing factor, the faster the transceiver device processes the message data.
[0078] Finally, the average value of the message data processing factor of all message data forwarded by each next-hop transceiver device of the normal device is normalized and used as the weight of each next-hop transceiver device. If the weight corresponding to a next-hop transceiver device is smaller, it means that the next-hop transceiver device processes message data faster, and the possibility of it being a receiving device for message data is higher. It should be noted that the normalization method here can be adopted Normalization function.
[0079] Step S302: The weight and the number of transmission and reception of each next-hop transceiver device of the normal device are comprehensively considered to determine the busy coefficient of each next-hop transceiver device.
[0080] In step S301, the weight of each next-hop transceiver is calculated by quantifying the speed of each next-hop transceiver in processing message data. Here, the load of each next-hop transceiver, that is, the amount of message data currently processed, can be further analyzed.
[0081] The amount of processed message data can be characterized by the number of transceiver times in the transceiver record of the transceiver device, so the sum of the transceiver times of all transceiver devices in the industrial LAN is taken as the total transceiver value, and the ratio of the sum of the transceiver times of each next-hop transceiver device to the total transceiver value is taken as the busy factor of each next-hop transceiver device; if the busy factor of a next-hop transceiver device is larger, it means that the load of the next-hop transceiver device in the industrial LAN is heavier, then the possibility of it being a receiving device for message data should be reduced, conversely, if the busy factor is smaller, it means that the next-hop transceiver device is more idle in the industrial LAN, then the possibility of it being a receiving device for message data is greater.
[0082] Finally, the product of the weight of each next-hop transceiver device and the corresponding busy factor is normalized to obtain the value as the busy coefficient of each next-hop transceiver device; since the smaller the weight, the faster the next-hop transceiver device processes the message data, the higher the possibility of it being a receiving device for the message data, and the smaller the busy factor, the more idle the next-hop transceiver device is in the industrial LAN, the greater the possibility of it being a receiving device for the message data, so the smaller the busy coefficient, the greater the possibility of the next-hop transceiver device being selected as the receiving device. It should be noted that the normalization method here can be used Normalization function.
[0083] In other embodiments of the present invention, the method for obtaining the busy coefficient may also be:
[0084] For any normal device, among all the next-hop transceiver devices of the normal device, first determine the current state of the device (whether it is processing message data or idle). The current state can be determined by the number of times the message data is sent and received. If the total value of the number of times the message data is sent and received is an odd number, it means that the current transceiver is processing message data. If the total value of the number of times the message data is sent and received is an even number, it means that the current transceiver is in an idle state. The process of determining the state of the transceiver can also be done by checking the state flag of the device (for example, if the flag is 1, it means that the message data is being processed, and if the flag is 0, it means that it is in an idle state). Filter out the transceiver devices in the idle state, and combine any two idle transceiver devices to obtain all non-repeating device combinations. For any device combination, if there is a large difference in the time it takes for the devices to complete processing the message data, it can be considered that there is a device that processes the message data faster. Therefore, in any device combination, the difference between the time points when two devices last sent message data is normalized and used as the idle factor. The larger the idle factor, the more idle devices there are in the device combination. Therefore, the device combination with the largest idle factor is used as the target combination. You can also set an idle threshold and use all device combinations corresponding to idle factors greater than the idle threshold as the target combination. It should be noted that the normalization method here can be used Normalization function; the idle threshold is set to 0.7, and the specific value can be adjusted according to the implementation scenario and is not limited here.
[0085] Next, we continue to analyze the load of the devices in all target combinations, that is, the number of processed message data. The number of processed message data can be characterized by the number of transceiver times in the transceiver record of the transceiver, so the ratio of the number of transceiver times of each transceiver in the target combination to the sum of the number of transceiver times of all transceivers in the industrial LAN is used as the busy factor of each transceiver; if the busy factor of a certain transceiver is larger, it means that the load of the transceiver in the industrial LAN is heavier, so the possibility of it being a receiving device for message data should be reduced, and conversely, if the busy factor is smaller, it means that the transceiver is more idle in the industrial LAN, so the possibility of it being a receiving device for message data is greater.
[0086] Finally, the normalized busy factor of each transceiver in all target combinations is used as the busy coefficient of each next-hop transceiver. The smaller the busy coefficient, the more idle the next-hop transceiver is in the industrial LAN, and the greater the possibility that it will be selected as a receiving device for message data. The larger the busy coefficient, the less likely the next-hop transceiver will be selected as a receiving device. It should be noted that the normalization method here can be used Normalization function.
[0087] At this point, the busy coefficient of each next-hop transceiver device of each normal device can be obtained based on the above method, and the receiving device of the message data in each normal device can be screened based on the busy coefficient.
[0088] Preferably, in one embodiment of the present invention, the method for screening receiving devices includes:
[0089] Based on the above analysis, it can be known that the smaller the busy coefficient is, the more idle the transceiver device is, and the higher the possibility of it being a receiving device is. Therefore, for any normal device, among all the next-hop transceiver devices of the normal device, the next-hop transceiver device with the smallest busy coefficient is used as the receiving device.
[0090] At this point, for each normal device, the receiving device when forwarding its message data can be determined, and the busy coefficient of the receiving device is the lowest, which means that the message data can be responded to and processed faster, ensuring the overall transmission efficiency of information in the industrial LAN, while maintaining the operating stability of the industrial LAN.
[0091] In industrial production, the sending device transmits the collected data through the transmission channel. When the fixed route cannot be accessed, it is necessary to access the remaining transceiver devices as transmission nodes. The receiving device can be screened through step S3 in the above method. The transmission protocol is briefly described as follows:
[0092] (1) After the sending device converts the production data in the industrial production process into message data, it accesses the receiving device on the inherent transmission route. If the access is successful, the message data is received by the sending and receiving device and the message data is further transmitted.
[0093] (2) If the access fails, the sending device needs to transmit the message data to the shared channel and access the other receiving devices on the shared channel.
[0094] (3) Screening and accessing the transceiver devices that the sending device can access or has access rights to, and occupying the access resources of the accessed device.
[0095] (4) The accessed transceiver processes the access content according to the order of access request and processes the message data according to the access instruction content.
[0096] (5) Repeat the above steps until the collected data is transmitted to the target device.
[0097] (6) For devices that have not been successfully accessed on the inherent transmission route, the sending device must record and transmit the status of unsuccessful access while accessing the remaining receiving devices on the shared channel to remind the staff to handle it.
[0098] In summary, in an industrial LAN, each device can be used as both a sending device and a receiving device. Detailed message data sending and receiving records are an important basis for detecting abnormalities in network equipment. Therefore, the sending and receiving records of each device in the industrial LAN are obtained, including the number of times each transceiver sends and receives messages and the time node of each sending and receiving message data. Under normal circumstances, since the data frequency generated by industrial production is relatively stable, the frequency of each transceiver sending message data will also be relatively fixed. Therefore, the time change of each transceiver sending message data within a preset time period is analyzed, and the abnormal coefficient of each transceiver is calculated to screen out suspected abnormal devices. At this time, the suspected abnormal device indicates that the amount of received message data is abnormal or the device is abnormal, and further judgment is required. When a device in the industrial LAN has a problem, the network equipment will usually adjust automatically, that is, it will try to continue to transmit the message data through other paths, then the number of devices through which the message data passes will increase significantly. At the same time, if the sending device has an abnormality, it will send message data at a high frequency, resulting in high-frequency access to the next-hop transceiver device. Therefore, the number of transceivers through which the message data passes during the transmission process, the abnormality coefficient of the suspected abnormal device, and the number of times all the transceivers at the next hop of the suspected abnormal device receive the message data within a preset time period are analyzed to determine the abnormality degree value of the suspected abnormal device and distinguish the final abnormal device from the normal device. For the normal device, in order to ensure that the message data stored therein arrives at the destination in a timely and accurate manner, it is necessary to select a transceiver with a lower busyness as the receiving device from all the next-hop transceivers of the normal device. The determination of the busyness can be quantified by the number of times the transceiver receives the message data and the time required to process the message data, thereby determining the busyness coefficient. Finally, the receiving device is selected based on the busyness coefficient, which helps to optimize load balancing, reduce network congestion, and ensure the overall transmission efficiency of information in the industrial LAN, thereby realizing maintenance services for the industrial LAN.
[0099] The embodiment of the present invention also provides a message receiving and sending system based on the industrial Internet, please refer to Figure 5 The system block diagram shown includes: a data acquisition module 501, used to implement step S1 in the above method; an abnormality analysis module 502, used to implement step S2 in the above method; and a message data forwarding module 503, used to implement step S3 in the above method.
[0100] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the message transceiving system based on the industrial Internet and the message transceiving method embodiment based on the industrial Internet provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0101] See also Figure 6 , which shows a system structure diagram of a message transceiving system based on the industrial Internet provided by an embodiment of the present invention, including a processor 600, a memory 601, a bus 602 and a communication interface 603, wherein the processor 600, the communication interface 603 and the memory 601 are connected via the bus 602; wherein the memory 601 may include a high-speed random access memory, the bus 602 may be an ISA bus, a PCI bus or an EISA bus, etc., and the processor 600 may be an integrated circuit chip with signal processing capabilities; the memory 601 stores at least one instruction, at least one program, a code set or an instruction set, and when the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor, a step in a message transceiving method based on the industrial Internet is implemented.
[0102] The present invention also provides a computer-readable storage medium corresponding to the method provided in the above-mentioned embodiment. Figure 7 , the storage medium shown is a CD, on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the method provided in any of the aforementioned embodiments is executed.
[0103] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), read-only memory (ROM), and other optical and magnetic storage media, which are not listed here one by one.
[0104] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0105] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A message sending and receiving method based on industrial Internet, characterized in that: The method comprises: Obtaining the transceiver record of each transceiver device in the industrial local area network, wherein the transceiver record includes the number of transceivers of each transceiver device and the time of each reception and transmission of message data; Analyze the time variation of the message data sent by each transceiver within a preset time period, determine the abnormal coefficient, and thus screen suspected abnormal devices from all transceivers; during the message data transmission process, determine the abnormal degree value of each suspected abnormal device based on the number of transceivers through which the message data passes, the abnormal coefficient of each suspected abnormal device, and the number of times all the transceivers next to each suspected abnormal device receive the message data within the preset time period, so as to distinguish the final abnormal device from the normal device among all the suspected abnormal devices; For any normal device, within a preset time period, based on the time required for the next-hop transceiver device of the normal device to process the message data and the number of transceivers of each next-hop transceiver device, determine the busy coefficient of each next-hop transceiver device; based on the busy coefficient, select the receiving device from all the next-hop transceivers of the normal device; The analyzing the time variation of the message data sent by each transceiver within a preset time period, determining the abnormal coefficient, and thus screening suspected abnormal devices from all transceivers, includes: For any transceiver device, within a preset time period, the time interval between two adjacent message data transmissions is used as a duration factor; The value after normalizing the difference between the maximum duration factor and the mean of all duration factors is used as the abnormal coefficient of the transceiver device; The transceiver device whose abnormal coefficient is greater than the preset first abnormal threshold is regarded as the suspected abnormal device; The step of distinguishing final abnormal devices and normal devices from among all suspected abnormal devices includes: Determine the number of abnormal values based on the number of transceiver devices that all message data pass through on the transmission path within a preset time period; For any suspected abnormal device, the ratio between the number of times each next-hop transceiver device of the suspected abnormal device receives message data and the number of times the suspected abnormal device sends message data is used as the access factor of each next-hop transceiver device, and the variance of the access abnormality values of all next-hop transceiver devices of the suspected abnormal device is used as the access abnormality value; The value obtained by normalizing the product of the quantity abnormal value, the access abnormal value corresponding to the suspected abnormal device, and the abnormal coefficient is used as the abnormal degree value of the suspected abnormal device; The suspected abnormal device whose abnormality degree value is greater than or equal to the preset second abnormality threshold is regarded as the final abnormal device, and the suspected abnormal device whose abnormality degree value is less than the preset second abnormality threshold is regarded as the normal device.
2. According to the method for sending and receiving messages based on the industrial Internet according to claim 1, it is characterized in that: The method for obtaining the quantity abnormal value includes: The transmission path of each message data is obtained, and the ratio of the average value of the number of transceiver devices passing through the transmission path of all message data to the number of all transceiver devices in the industrial local area network is used as the quantity abnormal value.
3. According to a method for sending and receiving messages based on industrial Internet according to claim 1, it is characterized in that: The method for obtaining the busy coefficient includes: For any normal device, within a preset time period, based on the time required for the next-hop transceiver device of the normal device to process the message data, determine the weight of each next-hop transceiver device; The sum of the number of transceivers of all transceivers in the industrial LAN is taken as the total transceiver value, and the ratio of the sum of the number of transceivers of each next-hop transceiver to the total transceiver value is taken as the busy factor of each next-hop transceiver; The value obtained by normalizing the product of the weight of each next-hop transceiver device and the corresponding busy factor is used as the busy coefficient of each next-hop transceiver device.
4. According to the method for sending and receiving messages based on the industrial Internet as claimed in claim 3, it is characterized in that: The method for obtaining the weight includes: Calculate the difference between the receiving and sending time of each message data forwarded by each next-hop transceiver device of the normal device as the message data processing factor; A value obtained by normalizing the average of the message data processing factors of all message data forwarded by each next-hop transceiver device of the normal device is used as the weight of each next-hop transceiver device.
5. The method for sending and receiving messages based on the industrial Internet according to claim 1 is characterized in that: The method for screening receiving devices comprises: For any normal device, among all the next-hop transceiver devices of the normal device, the next-hop transceiver device with the smallest busy coefficient is used as the receiving device.
6. The method for sending and receiving messages based on the industrial Internet according to claim 1 is characterized in that: After the final abnormal device is screened out, the location of the final abnormal device is obtained and an alarm is issued.
7. A message transceiver system based on industrial Internet, characterized in that: It includes a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and when the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor, the steps of a message sending and receiving method based on the industrial Internet as described in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the message sending and receiving method based on the industrial Internet as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
TSN anomaly detection method and system
CN114978754A
Message transmission method and device based on industrial Internet, and readable storage medium
CN117896041A