A method and system for fast forwarding industrial protocol instructions

By dynamically selecting and adjusting instruction forwarding paths in industrial systems, the problem of sessions affected in the prior art is solved, precise management and fault tolerance at the instruction level are realized, and the reliability of data transmission and system stability are improved.

CN119697099BActive Publication Date: 2025-06-24BEIJING HUIERTE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510193080.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-24
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

The prior art bundled management of the entire session and instructions in industrial systems, resulting in the impact of the entire session when certain instructions are blocked, and the lack of precise forwarding management at the instruction level and flexible fault tolerance mechanisms are not possible to cope with emergencies in complex network environments.

Method used

By obtaining the information of the session to be forwarded, the instruction table entry is generated, combined with the analysis rules of industrial protocols and network status evaluation, the instruction forwarding paths are dynamically selected and adjusted, and the instruction level is precise management and fault tolerance are achieved.

Benefits of technology

It improves the reliability of data transmission and the fault tolerance of the system, ensures smooth transmission of instructions when the network is unstable, and improves the stability of industrial control systems in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697099B_ABST
    Figure CN119697099B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of communication data management, and discloses a method and system for fast forwarding based on industrial protocol instructions. The method includes: obtaining session information to be forwarded, and generating a number of instruction entries based on the session information to be forwarded. Obtaining the parsing rules of each industrial protocol, and determining each forwarding path of the instruction entry according to the instruction entry and the parsing rules. According to the network status evaluation of each forwarding path, determining the main forwarding path of the instruction entry, and determining each forwarding path except the main forwarding path as an alternative forwarding path. Obtaining the forwarding status of the main forwarding path for the instruction entry, and determining whether to use the alternative forwarding path to forward the instruction entry according to the forwarding status. By dynamically evaluating the network status of each forwarding path and combining factors such as the number of forwarding times and load, the present invention can intelligently select the optimal main forwarding path and alternative path, so as to ensure that instructions can still be efficiently and reliably transmitted when the network environment is unstable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of communication data management, and more particularly, to a method and system for fast forwarding industrial protocol instructions. Background Art

[0002] With the continuous development of industrial automation systems, communication based on industrial protocols plays a crucial role in modern production processes. Industrial protocols, such as Modbus, OPC, Profibus, etc., are widely used for data transmission and control between devices. To ensure the real-time performance and stability of production systems, the transmission of instructions must be efficient and reliable. However, in traditional industrial systems, the transmission of instructions usually relies on static path selection and session management methods, and there is a risk that the entire session will be discarded due to the blocking or loss of a certain instruction. This not only affects the accuracy of data transmission but may also lead to failures or delays in industrial control systems.

[0003] To solve this problem, the prior art has adopted the method of bundling the entire session and instructions together, failing to achieve precise management at the instruction level. Especially when some instructions in the session are blocked due to network problems or other factors, the entire session will be affected. This static session management method fails to provide a flexible fault tolerance mechanism, resulting in the inability to effectively handle emergencies in complex network environments. And how to achieve precise forwarding management at the instruction level and ensure that instructions can be smoothly transmitted in an unstable network environment is a technical problem that needs to be solved urgently.

[0004] Therefore, there is an urgent need to invent a communication management system for industrial system instruction transmission to solve the problems of the prior art that bundling the entire session and instructions for management results in the entire session being affected when some instructions are blocked, lacking precise forwarding management at the instruction level and a flexible fault tolerance mechanism, and being unable to handle emergencies in complex network environments. Summary of the Invention

[0005] In view of this, the present invention proposes a method and system for fast forwarding industrial protocol instructions, aiming to solve the problems of the prior art that bundling the entire session and instructions for management results in the entire session being affected when some instructions are blocked, lacking precise forwarding management at the instruction level and a flexible fault tolerance mechanism, and being unable to handle emergencies in complex network environments.

[0006] The present invention proposes a method for fast forwarding industrial protocol instructions, including:

[0007] Obtaining the session information to be forwarded, and generating a number of instruction entries based on the session information to be forwarded;

[0008] Obtain the parsing rules of each industrial protocol, and determine each forwarding path of the instruction entry according to the instruction entry and the parsing rules;

[0009] According to the network status evaluation of each forwarding path, determine the main forwarding path of the instruction entry, and determine each forwarding path except the main forwarding path as an alternative forwarding path;

[0010] Obtain the forwarding status of the main forwarding path for the instruction entry, and determine whether to use an alternative forwarding path to forward the instruction entry according to the forwarding status.

[0011] Further, when generating a number of instruction entries based on the session information to be forwarded, it includes:

[0012] Extract the instruction information in the session information to be forwarded;

[0013] Obtain the context features of the session information to be forwarded, and correct the instruction information according to the context features;

[0014] Obtain the timestamps of the corrected instruction information in the session information to be forwarded, generate a hash table for each instruction information according to the timestamps, and generate the instruction entry based on the hash table.

[0015] Further, when obtaining the parsing rules of each industrial protocol and determining each forwarding path of the instruction entry according to the instruction entry and the parsing rules, it includes:

[0016] Parse the instruction entry according to the parsing rules of each industrial protocol;

[0017] Obtain the parsing results after parsing each industrial protocol, and obtain the distance metric between the parsing results;

[0018] Perform K-value clustering on the parsing results according to the distance metric, and determine the forwarding path of the instruction entry according to the clustering result.

[0019] Further, when determining the forwarding path of the instruction entry according to the clustering result, it includes:

[0020] Obtain the parsing results after clustering, where:

[0021] If the number of parsing results is equal to 1, determine that the communication paths of each industrial protocol are all the forwarding paths of the instruction entry;

[0022] If the number of the parsing results is greater than 1, obtain the clustering numbers when clustering each parsing result, and arrange them in descending order according to each of the clustering numbers. According to the parsing result ranked first, the communication path of the industrial protocol corresponding thereto is the forwarding path of the instruction entry.

[0023] Further, the parsing result is specifically: the execution status, target device, and execution parameters of the instruction in the instruction entry.

[0024] Further, when determining the main forwarding path of the instruction entry according to the network status evaluation of each of the forwarding paths, it includes:

[0025] Obtain the real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate of each of the forwarding paths;

[0026] Determine the network status score of the forwarding path according to the real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate:

[0027] ;

[0028] Wherein, S is the network status score of the forwarding path, n is the total number of evaluation parameters, wi is the weight coefficient of the i-th evaluation parameter, ai is the exponential adjustment factor of the i-th evaluation parameter, ri is the exponential adjustment factor of the i-th preset evaluation parameter, β is the regularization factor, fi is the normalization and non-linear function of the xi-th parameter, and xi is the actual value of the i-th evaluation parameter. Among them, the evaluation parameters are real-time delay, real-time bandwidth, packet loss rate in a preset time period, or historical transmission error rate;

[0029] Sort the network status scores of each of the forwarding paths in ascending order, and determine the main forwarding path of the instruction entry as the forwarding path corresponding to the network status score ranked first.

[0030] Further, when determining each of the forwarding paths except the main forwarding path as an alternative forwarding path, it includes:

[0031] Obtain the mean value among the network status scores of each of the forwarding paths except the main forwarding path, and determine it as the preset network status score;

[0032] Determine whether the forwarding path is the alternative forwarding path according to the relationship between the network status score and the preset network status score:

[0033] When the network status score is greater than or equal to the preset network status score, determine that the forwarding path is the alternative forwarding path;

[0034] When the network status score is less than the preset network status score, it is determined that the forwarding path is not the alternative forwarding path.

[0035] Further, when determining whether to use the alternative forwarding path to forward the instruction entry according to the forwarding status, it includes:

[0036] Obtain the forwarding times of the forwarding status, and determine whether to use the alternative forwarding path to forward the instruction entry according to the comparison between the forwarding times and the pre-configured preset forwarding times:

[0037] When the forwarding times are less than or equal to the preset forwarding times, it is determined not to use the alternative forwarding path to forward the instruction entry;

[0038] When the forwarding times are greater than the preset forwarding times, it is determined to use the alternative forwarding path to forward the instruction entry.

[0039] Further, when using the alternative forwarding path to forward the instruction entry, it includes:

[0040] Obtain the real-time load of each of the alternative forwarding paths;

[0041] Sort the real-time loads in ascending order, and forward the instruction entry based on the alternative forwarding path corresponding to the first in the real-time load sorting.

[0042] Compared with the prior art, the beneficial effects of the present invention are as follows: By precisely managing the session information to be forwarded and the instruction entries, and combining the parsing rules of industrial protocols and network status evaluation, the dynamic selection and adjustment of the instruction forwarding path are realized. By separating the session information from the instruction entries, fine-grained management can be carried out at the instruction level, avoiding the situation where the entire session is lost due to the blocking of a single instruction. This precise forwarding mechanism at the instruction level greatly improves the reliability of data transmission and the fault tolerance of the system. In addition, based on the real-time network status evaluation, the main forwarding path and the alternative path can be flexibly selected. Under normal circumstances, the main forwarding path will undertake the forwarding task of the instruction, but when there are problems with the network status of the main path (such as delay, packet loss, etc.), the availability of the alternative path will be automatically evaluated and switched. This dynamic adjustment mechanism ensures the smooth transmission of the instruction, reduces the transmission interruption caused by network fluctuations, and thus improves the stability of the industrial control system in a complex and dynamic network environment. Finally, by obtaining the parsing rules of each industrial protocol, instructions in different protocol formats can be accurately parsed and processed, thereby ensuring the correct forwarding of the instructions. At the same time, the path can be evaluated according to factors such as the real-time delay, bandwidth, and packet loss rate of the network, and multiple evaluation parameters are comprehensively considered to ensure the selection of the optimal forwarding path and improve the overall transmission efficiency.

[0043] On the other hand, the present application also provides a system for fast forwarding industrial protocol instructions, including:

[0044] An acquisition module, configured to acquire session information to be forwarded and generate a number of instruction entries based on the session information to be forwarded;

[0045] A processing module, electrically connected to the acquisition module, configured to acquire parsing rules of each industrial protocol, and determine each forwarding path of the instruction entry according to the instruction entry and the parsing rules; the processing module is further configured to determine the main forwarding path of the instruction entry according to the network status evaluation of each forwarding path, and determine each forwarding path except the main forwarding path as an alternative forwarding path;

[0046] A central control module, electrically connected to the processing module, configured to acquire the forwarding status of the main forwarding path for the instruction entry, and determine whether to use an alternative forwarding path to forward the instruction entry according to the forwarding status.

[0047] It can be understood that the method and system for fast forwarding industrial protocol instructions in the above embodiments of the present invention have the same beneficial effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0049] Figure 1 is a flowchart of a method for fast forwarding industrial protocol instructions provided by an embodiment of the present invention;

[0050] Figure 2 is a functional block diagram of a system for fast forwarding industrial protocol instructions provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other. Hereinafter, the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.

[0052] As Figure 1 shown, in some embodiments of the present application, this embodiment provides a method for fast forwarding based on industrial protocol instructions, including:

[0053] Step S100, obtain the session information to be forwarded, and generate a number of instruction entries based on the session information to be forwarded.

[0054] Specifically, when generating a number of instruction entries based on the session information to be forwarded, it includes: extracting the instruction information in the session information to be forwarded. Obtain the context features of the session information to be forwarded, and correct the instruction information according to the context features. Obtain the timestamp of each corrected instruction information in the session information to be forwarded, generate a hash table of each instruction information according to the timestamp, and generate instruction entries based on the hash table.

[0055] It can be understood that by obtaining the instruction information in the session to be forwarded. The session to be forwarded usually contains multiple instructions, and each instruction may have different execution parameters, status, and associated network path and other information. By extracting the instruction data from the session information, corresponding entries can be created separately for each instruction for subsequent precise management and forwarding. Secondly, on the basis of extracting the instruction information, it is also necessary to consider the context features of the session information to be forwarded. Context features refer to the dynamic information related to the session, such as factors like time, environmental status, protocol type, etc. According to these context features, the extracted instruction information can be corrected. For example, some instructions may be affected by network latency or bandwidth limitations, and the parameters or execution order of these instructions can be adjusted according to the context to ensure the correctness and efficient execution of the instructions. Next, each corrected instruction information is identified by a timestamp. The timestamp, as part of the instruction information, can be used to mark the generation or reception time of the instruction and provide a time sequence reference in the subsequent instruction forwarding process. Through the timestamp, the relationship between different instructions can be managed and synchronized, ensuring that the order of the instructions will not be affected by network or system latency and ensuring that the instructions are transmitted in the correct time sequence. Then, based on the timestamp, a hash table of the instruction information is generated. As an efficient data structure, the hash table can quickly store and retrieve instruction information according to the unique identifier of the instruction information (such as the timestamp). By mapping the corrected instruction information to the hash table, it can be ensured that each instruction entry has a unique identifier, thus avoiding the risk of instruction conflict or information loss. The structure of the hash table makes the search and update of instructions more efficient, improving the speed and reliability of the system for processing instructions. Finally, based on the hash table, instruction entries are generated. The instruction entries not only contain the basic information of the instructions (such as identifiers, execution status, parameters, etc.), but also are closely associated with the session information and its context features. Through the instruction entries, the forwarding path, execution status, and processing order of each instruction can be precisely controlled.

[0056] It can be seen that by extracting instruction information, each instruction can be independently managed to ensure accurate tracking and processing of each instruction. In this way, each instruction can be independently scheduled and managed, improving the flexibility and controllability of instruction transmission and avoiding the complexity and potential risks brought by bundling multiple instructions together. Secondly, the context features of the session information to be forwarded are also considered, and the instruction information is corrected according to these features. The context features include dynamic information such as time, network status, and protocol type, which may affect the execution manner or priority of the instruction. By correcting the instruction according to the context features, it can more flexibly adapt to different environmental conditions and ensure the correctness and efficient execution of the instruction. This dynamic adjustment can reduce instruction errors or delays caused by external factors. In addition, the corrected instruction information is managed in combination with timestamps. As an important time identifier, the timestamp can accurately track the generation and transmission timing of each instruction. Through the timestamp, it can be ensured that the instructions are processed in the correct order, avoiding execution errors or conflicts caused by the disorder of instruction transmission order. The application of the timestamp further improves the accuracy and timeliness of instruction management. Especially when dealing with multiple concurrent instructions, it can effectively coordinate the execution order between instructions. Then, a hash table of instruction information is generated according to the timestamp. The hash table is an efficient data structure that can quickly store and search according to the unique identifier of the instruction (such as the timestamp). The application of the hash table ensures that the instruction information can be quickly accessed and processed, reducing the search complexity and response time of the system. Through the hash table, a large number of instructions can be efficiently managed, and the independence and accuracy of each instruction can be ensured. Finally, by generating instruction table entries based on the hash table, the status, execution parameters, associated network paths, and other information of each instruction can be accurately managed. The generation of instruction table entries makes the instruction forwarding process more controllable and flexible, and the system can select the most appropriate forwarding path according to the characteristics of the instruction and the network conditions.

[0057] Step S200: Obtain the parsing rules of each industrial protocol, and determine each forwarding path of the instruction table entry according to the instruction table entry and the parsing rules.

[0058] Specifically, when obtaining the parsing rules of each industrial protocol and determining each forwarding path of the instruction table entry according to the instruction table entry and the parsing rules, it includes: parsing the instruction table entry according to the parsing rules of each industrial protocol. Obtain the parsing results after parsing each industrial protocol, and obtain the distance metric between each parsing result. Perform K-value clustering on each parsing result according to the distance metric, and determine the forwarding path of the instruction table entry according to the clustering result.

[0059] Specifically, when determining the forwarding path of the instruction entry according to the clustering result, it includes: obtaining the parsed result after clustering, where: if the number of parsed results is equal to 1, then it is determined that the communication paths of each industrial protocol are the forwarding paths of the instruction entry. If the number of parsed results is greater than 1, then obtain the clustering numbers when each parsed result is clustered, and arrange them in reverse order according to each clustering number. According to the parsed result ranked first in the arrangement, the communication path of the corresponding industrial protocol is the forwarding path of the instruction entry.

[0060] Specifically, the parsed result is specifically: the execution status, target device, and execution parameters of the instruction in the instruction entry.

[0061] It can be understood that by obtaining the parsing rules of each industrial protocol, the instruction entry is parsed. The parsing rules define how to extract and understand instruction information according to different industrial protocols, helping the system understand key information such as the content, status, and target device of the instruction. This process ensures that multiple industrial protocols can be processed, adapting to complex protocol environments, thus ensuring the correct transmission of instructions. Then, the parsed instruction entry generates a parsed result, and the distance metric between each parsed result is calculated. The distance metric is used to judge the similarity between each parsed result through a certain metric standard (such as Euclidean distance, Manhattan distance, etc.). According to the distance metric, the system can evaluate the similarity degree of different parsed results, providing a basis for subsequent clustering processing. This metric method effectively improves the processing efficiency of instructions, ensuring more accurate classification and analysis of instructions. After obtaining the distance metric of the parsed result, these parsed results are grouped through the K - value clustering algorithm. The K - value clustering algorithm is a commonly used unsupervised learning method that divides the parsed results into different clusters according to their similarity. Each cluster represents a group of similar parsed results, and can effectively find the most suitable forwarding path when processing the same type of instructions. The application of the clustering method can handle various complex instruction patterns and network situations. Based on the clustering result, the forwarding path of the instruction is determined according to the size and order of each cluster. If the number of parsed results is equal to 1, the forwarding path of the instruction entry will be the communication path corresponding to this unique parsed result. If the number of parsed results is greater than 1, they will be sorted according to the cluster size, and the largest cluster is selected as the forwarding path of the instruction. This method of arranging in reverse order according to the clustering number ensures that the most suitable path is preferentially selected, improving the efficiency and reliability of instruction forwarding. Finally, the parsed result in the instruction entry includes information such as the execution status, target device, and execution parameters of the instruction. The execution status reflects the current progress of the instruction or whether it has been completed, the target device indicates the final execution location of the instruction, and the execution parameters detail the specific requirements for instruction execution.

[0062] It can be seen that by parsing the instruction table entries according to the parsing rules, data of different protocols can be uniformly processed, which enables compatibility with multiple industrial protocols, ensures the correct parsing and efficient transmission of instructions. Secondly, based on the distance metric between parsing results, the similarity between different instructions can be evaluated, and instructions with similar properties can be grouped into one group through K-value clustering. Through this clustering process, the relationship between instructions can be better understood, so that when determining the forwarding path, the most appropriate path can be preferentially selected, improving the efficiency and reliability of forwarding. In addition, the clustering process avoids the inefficiency caused by overly detailed path selection for instructions. Thirdly, when the number of parsing results is 1, the communication paths of all protocols can be automatically determined as the forwarding paths of the instructions, which provides a quick path selection method for handling instruction forwarding in simple scenarios. In this case, unnecessary path evaluation is avoided, computing resources are saved, the response speed is improved, and it is ensured that everything proceeds smoothly according to the predetermined rules in simple situations. When the number of parsing results is greater than 1, they are sorted in reverse order according to the number of clusters to ensure that the optimal parsing results are preferentially used as the forwarding paths. This method helps to optimize the instruction forwarding path selection through sorting, and preferentially selects the path with the best network state in the case of multiple options, ensuring the efficient and accurate transmission of instructions. This dynamic adjustment mechanism significantly improves the flexibility of the system in dealing with instruction forwarding in complex network environments. Finally, through detailed parsing results, such as the extraction of instruction execution status, target device, and execution parameters, the execution background and requirements of each instruction can be comprehensively understood to ensure the correct forwarding of instructions. In this way, not only the accuracy of the forwarding path is improved, but also errors or delays caused by unclear execution information can be avoided during the instruction execution process, making the overall system more intelligent and capable of handling various complex situations.

[0063] Step S300: Determine the main forwarding path of the instruction table entry according to the network state evaluation of each forwarding path, and determine the forwarding paths other than the main forwarding path as alternative forwarding paths.

[0064] Specifically, when determining the main forwarding path of the instruction table entry according to the network state evaluation of each forwarding path, it includes: obtaining the real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate of each forwarding path. According to the real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate, determine the network state score of the forwarding path:

[0065] 。

[0066] Among them, S is the network status score of the forwarding path, n is the total number of evaluation parameters, wi is the weight coefficient of the i-th evaluation parameter, ai is the exponential adjustment factor of the i-th evaluation parameter, ri is the exponential adjustment factor of the i-th preset evaluation parameter, β is the regularization factor, fi is the normalization and non-linear function of the xi-th parameter, and xi is the actual value of the i-th evaluation parameter. The evaluation parameters are real-time delay, real-time bandwidth, packet loss rate in a preset period, or historical transmission error rate. Sort the network status scores of each forwarding path in ascending order, and determine the main forwarding path of the instruction entry as the forwarding path corresponding to the first sorted network status score.

[0067] Specifically, when determining each forwarding path other than the main forwarding path as an alternative forwarding path, it includes: obtaining the mean value between the network status scores of each forwarding path other than the main forwarding path and determining it as the preset network status score. According to the relationship between the network status score and the preset network status score, determine whether the forwarding path is an alternative forwarding path: when the network status score is greater than or equal to the preset network status score, then determine that the forwarding path is an alternative forwarding path. When the network status score is less than the preset network status score, then determine that the forwarding path is not an alternative forwarding path.

[0068] It is understandable that by comprehensively evaluating the network status of the forwarding paths, each forwarding path is scored using multiple metrics such as real-time latency, real-time bandwidth, packet loss rate, and historical transmission error rate. These evaluation parameters can reflect the stability, reliability, and transmission efficiency of the paths, thus providing a quantitative basis for subsequent path selection. By using multiple parameters for weighted summation and adjustment, the paths can be dynamically evaluated according to the characteristics of different paths, making the scoring system more accurate and comprehensive. Secondly, an exponential adjustment factor and a weight coefficient are introduced in the evaluation process. These factors assign weights and adjust different evaluation parameters, taking into account the relative importance of each parameter to the path status. For example, real-time latency and bandwidth may be more critical than the historical transmission error rate, so higher weight coefficients can be assigned to these parameters. At the same time, the application of the exponential adjustment factor can perform non-linear adjustment on the parameters, further improving the accuracy of the scoring system, avoiding over-reliance on a single parameter, and thus ensuring the comprehensiveness of path selection. Thirdly, by sorting the scores of multiple forwarding paths, the path with the best status can be quickly identified as the main forwarding path. The mechanism of network status score sorting ensures that the selection of the main forwarding path has the greatest possible stability and reliability. This dynamic sorting method not only reduces human intervention in the selection process but also can flexibly adjust the forwarding path according to the real-time changes of the network status, improving the response speed and adaptability of forwarding. For the selection of alternative forwarding paths, the average value of the network status scores of the paths other than the main path is calculated and used as the preset network status score. This calculation method of the average value ensures that the selection of alternative paths can follow certain criteria and does not blindly select paths with lower scores. At the same time, only when the score of the alternative path reaches or exceeds this preset standard will it be recognized as an available path. This setting ensures the effectiveness and reliability of the alternative path and avoids the selection of unstable or poor paths. Finally, through the above scoring and comparison mechanism, the network status changes can be flexibly responded to, and the main forwarding path and alternative paths can be dynamically determined. This path selection method based on the scoring system not only improves the efficiency and accuracy of path selection but also ensures that the instructions can be quickly and reliably forwarded in a complex network environment.

[0069] It can be seen that through multi-dimensional network state evaluation, a comprehensive score is assigned to each forwarding path, making path selection more systematic and scientific. By using indicators such as real-time delay, real-time bandwidth, packet loss rate, and historical transmission error rate to calculate the network state score of the path, the network performance can be comprehensively reflected, avoiding the excessive influence of a single factor on path selection. This multi-dimensional evaluation method can consider the stability, reliability, and transmission efficiency of the path from multiple perspectives, so as to more accurately select the optimal forwarding path. Secondly, by introducing adjustment means such as weight coefficients, exponential adjustment factors, and normalized non-linear functions, the score can be flexibly adapted to each evaluation parameter according to different network environments and requirements. These technical measures effectively avoid the deviation or over-reliance on a single parameter, and can dynamically adjust the scoring criteria according to the actual network conditions, improving the adaptability and flexibility to different network environments. For example, for certain specific scenarios or applications, delay may be more critical, while in other scenarios, bandwidth may be dominant, and it can be automatically optimized according to these changes. Further, by sorting the network state scores of the forwarding paths and selecting the path with the highest score as the main forwarding path, it can ensure that the transmission of data instructions can preferentially pass through the best path. The automation of this process reduces the need for manual intervention, improving the decision-making efficiency and accuracy. More importantly, this mechanism not only ensures the preference of the main path, but also provides data support for path selection based on objective evaluation, rather than relying solely on experience or static rules. Finally, when determining the alternative forwarding paths, by calculating the average value of the network state scores of each path and comparing it with the preset network state score, the path selection criteria are further refined. This dynamically adjusted method enables the screening of alternative paths according to the real-time network state, ensuring the stability and reliability of the alternative paths. When the network state fluctuates, the alternative paths can be used as quick alternatives to ensure that data transmission is not interrupted, improving the fault tolerance and redundancy design of the system.

[0070] Step S400: Obtain the forwarding status of the instruction entry for the main forwarding path, and determine whether to use an alternative forwarding path to forward the instruction entry according to the forwarding status.

[0071] Specifically, when determining whether to use an alternative forwarding path to forward the instruction entry according to the forwarding status, it includes: obtaining the number of forwarding times of the forwarding status, and determining whether to use an alternative forwarding path to forward the instruction entry based on the comparison between the number of forwarding times and the preset number of forwarding times configured in advance: when the number of forwarding times is less than or equal to the preset number of forwarding times, it is determined not to use an alternative forwarding path to forward the instruction entry. When the number of forwarding times is greater than the preset number of forwarding times, it is determined to use an alternative forwarding path to forward the instruction entry.

[0072] Specifically, when forwarding instruction entries using alternative forwarding paths, it includes: obtaining the real-time load of each alternative forwarding path. Sorting the real-time loads in ascending order, and forwarding the instruction entries based on the alternative forwarding path corresponding to the one with the first real-time load in the sorting.

[0073] It can be understood that by comparing the number of forwarding times with the preset number of forwarding times, it is possible to flexibly determine whether to enable alternative forwarding paths. When the network status is unstable or there are problems such as delays, the main forwarding path may not be able to successfully complete the instruction transmission. By setting the preset number of forwarding times, when the number of forwarding times of a certain forwarding path exceeds the preset value, it will automatically switch to the alternative path for forwarding, thus ensuring the reliable transmission of instructions. This not only improves the reliability of instruction transmission but also reduces the retransmission due to network fluctuations. Secondly, by introducing an evaluation mechanism for real-time load, it is possible to select the path with the lightest current load for instruction forwarding according to the load conditions of each alternative path. This effectively avoids the overuse of paths with heavy loads, thereby reducing network congestion and delays. Through this real-time load optimization, a more accurate selection is made among multiple alternative paths, enabling instructions to be transmitted through the path with the best network conditions, improving the overall utilization efficiency of network resources. Further, the mechanism of real-time load sorting and selecting the optimal alternative path ensures that even in the presence of multiple alternative paths, the instruction transmission can still maintain the best transmission performance. This refined path selection strategy significantly improves the speed of instruction forwarding and avoids additional delays or failures on alternative paths. By real-time monitoring the load conditions of each path, adjustments can be made in a timely manner when network congestion or resource shortages occur, reducing the risk of instruction transmission interruption. In addition, by dynamically adjusting the use of alternative paths, this method enhances the elasticity and fault tolerance of the network system. Even if unforeseen problems or performance degradation occur in the main forwarding path, it can quickly switch to the most appropriate alternative path to ensure that the instructions can continue to be transmitted. This reduces the impact of network failures on the business.

[0074] In the above embodiments, by precisely managing the session information to be forwarded and the instruction entries, and combining the parsing rules of industrial protocols and network status evaluation, the dynamic selection and adjustment of the instruction forwarding path are achieved. By separating the session information from the instruction entries, fine-grained management can be carried out at the instruction level, avoiding the situation where the entire session is lost due to the blocking of a single instruction. This precise forwarding mechanism at the instruction level greatly improves the reliability of data transmission and the fault tolerance of the system. In addition, based on real-time network status evaluation, the main forwarding path and alternative paths can be flexibly selected. Under normal circumstances, the main forwarding path will undertake the forwarding task of the instruction, but when there are problems with the network status of the main path (such as delay, packet loss, etc.), the availability of the alternative paths will be automatically evaluated and switched. This dynamic adjustment mechanism ensures the smooth transmission of the instruction, reduces the transmission interruption caused by network fluctuations, and thus improves the stability of the industrial control system in a complex and dynamic network environment. Finally, by obtaining the parsing rules of each industrial protocol, the instructions in different protocol formats can be accurately parsed and processed, thereby ensuring the correct forwarding of the instructions. At the same time, the path can also be evaluated according to factors such as the real-time delay, bandwidth, and packet loss rate of the network, and multiple evaluation parameters are comprehensively considered to ensure the selection of the optimal forwarding path and improve the overall transmission efficiency.

[0075] In another preferred manner based on the above embodiments, as Figure 2 shown, this embodiment provides a system for fast forwarding industrial protocol instructions, including: an acquisition module, a processing module, and a central control module.

[0076] Specifically, the acquisition module is configured to acquire the session information to be forwarded and generate a number of instruction entries based on the session information to be forwarded. The processing module is electrically connected to the acquisition module. The processing module is configured to acquire the parsing rules of each industrial protocol, and determine the forwarding paths of the instruction entries according to the instruction entries and the parsing rules. The processing module is further configured to determine the main forwarding path of the instruction entry according to the network status evaluation of each forwarding path, and determine the forwarding paths other than the main forwarding path as alternative forwarding paths. The central control module is electrically connected to the processing module. The central control module is configured to acquire the forwarding status of the instruction entry by the main forwarding path, and determine whether to use an alternative forwarding path to forward the instruction entry according to the forwarding status.

[0077] It can be understood that the method and system for fast forwarding industrial protocol instructions in the above embodiments of the present invention have the same beneficial effects and will not be elaborated herein.

[0078] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0079] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0080] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: still, the specific implementation manners of the present invention can be modified or equivalently replaced, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.

Claims

1. A method for fast forwarding of industrial protocol instructions, characterized in that: include: Acquire the session information to be forwarded, and generate a plurality of instruction table entries based on the session information to be forwarded; Obtaining parsing rules for each industrial protocol, and determining each forwarding path of the instruction table item according to the instruction table item and the parsing rules; Determine the main forwarding path of the instruction table entry according to the network status evaluation of each forwarding path, and determine each forwarding path except the main forwarding path as an alternative forwarding path; Acquire the forwarding state of the instruction table entry of the primary forwarding path, and determine whether to use the alternative forwarding path to forward the instruction table entry according to the forwarding state; When a plurality of instruction table entries are generated based on the session information to be forwarded, the method includes: Extracting instruction information from the session information to be forwarded; Acquire context features of the to-be-forwarded session information, and modify the instruction information according to the context features; Obtaining the timestamp of each of the modified instruction information located in the session information to be forwarded, generating a hash table of each of the instruction information according to the timestamp, and generating the instruction table entry based on the hash table; Acquiring the parsing rules of each industrial protocol and determining each forwarding path of the instruction table item according to the instruction table item and the parsing rules includes: Parsing the instruction table items according to the parsing rules of each of the industrial protocols; Obtaining parsing results of each of the industrial protocols after parsing, and obtaining distance metrics between each of the parsing results; Performing K-value clustering on each of the analysis results according to the distance metric, and determining a forwarding path of the instruction table entry according to the clustering result; Determining the forwarding path of the instruction table entry according to the clustering result includes: Obtain the analysis result after the clustering, where: If the number of the parsing results is equal to 1, it is determined that the communication paths of the industrial protocols are all forwarding paths of the instruction table items; If the number of analysis results is greater than 1, the cluster number of each analysis result is obtained, and the results are arranged in reverse order according to the cluster numbers, and the communication path of the industrial protocol corresponding to the first analysis result is determined as the forwarding path of the instruction table item.

2. The method for fast forwarding based on industrial protocol instructions according to claim 1, characterized in that: The analysis result specifically includes: the execution status, target device and execution parameters of the instruction in the instruction table entry.

3. The method for fast forwarding based on industrial protocol instructions according to claim 1, characterized in that: Determining the main forwarding path of the instruction table entry according to the network status evaluation of each forwarding path includes: Obtaining the real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate of each forwarding path; Determine the network status score of the forwarding path according to the real-time delay, real-time bandwidth, packet loss rate in a preset period, and historical transmission error rate: ; Wherein, S is the network status score of the forwarding path, n is the total number of evaluation parameters, wi is the weight coefficient of the ith evaluation parameter, ai is the exponential adjustment factor of the ith evaluation parameter, ri is the exponential adjustment factor of the ith preset evaluation parameter, β is the regularization factor, fi is the standardized and nonlinear function of the xith parameter, xi is the actual value of the ith evaluation parameter, wherein i is the evaluation parameter, and the evaluation parameter includes real-time delay, real-time bandwidth, packet loss rate in a preset time period, and historical transmission error rate; The network status scores of the forwarding paths are sorted in positive order, and the forwarding path corresponding to the first network status score is determined as the main forwarding path of the instruction table entry.

4. The method for fast forwarding based on industrial protocol instructions as claimed in claim 3, characterized in that: When each forwarding path except the main forwarding path is determined as a candidate forwarding path, it includes: Obtaining an average value of network status scores of the forwarding paths except the main forwarding path, and determining the average value as a preset network status score; Determining whether the forwarding path is the candidate forwarding path according to the relationship between the network status score and the preset network status score: When the network status score is greater than or equal to the preset network status score, determining the forwarding path as the candidate forwarding path; When the network status score is less than the preset network status score, it is determined that the forwarding path is not the candidate forwarding path.

5. The method for fast forwarding based on industrial protocol instructions according to claim 1, characterized in that: Determining whether to use an alternative forwarding path to forward the instruction entry according to the forwarding state includes: Obtaining the forwarding number of the forwarding state, and determining whether to use an alternative forwarding path to forward the instruction table entry according to a relationship between the forwarding number and a pre-configured preset forwarding number: When the forwarding number is less than or equal to the preset forwarding number, determining not to select the alternative forwarding path to forward the instruction table entry; When the forwarding number is greater than the preset forwarding number, it is determined to select an alternative forwarding path to forward the instruction table entry.

6. The method for fast forwarding based on industrial protocol instructions as claimed in claim 5, characterized in that: When selecting an alternative forwarding path to forward the instruction table entry, it includes: Obtaining the real-time load of each of the candidate forwarding paths; The real-time loads are sorted in positive order, and the instruction table entry is forwarded based on the candidate forwarding path first corresponding to the real-time load sorting.

7. A system based on fast forwarding of industrial protocol instructions, adopting a method based on fast forwarding of industrial protocol instructions as described in any one of claims 1 to 6, characterized in that: include: an acquisition module, configured to acquire the session information to be forwarded, and generate a plurality of instruction table entries based on the session information to be forwarded; a processing module, electrically connected to the acquisition module, the processing module being configured to acquire parsing rules of each industrial protocol, and determine each forwarding path of the instruction table item according to the instruction table item and the parsing rules; the processing module is further configured to determine a main forwarding path of the instruction table item according to a network status evaluation of each forwarding path, and determine each forwarding path except the main forwarding path as an alternative forwarding path; The central control module is electrically connected to the processing module, and is configured to obtain the forwarding status of the instruction table entry of the main forwarding path, and determine whether to use the alternative forwarding path to forward the instruction table entry according to the forwarding status.

Citation Information

Patent Citations

  • Network load balancing method and device based on link and equipment states

    CN116232977A