CN113726570B - Network port configuration method, device and system - Google Patents

Network port configuration method, device and system Download PDF

Info

Publication number
CN113726570B
CN113726570B CN202111002071.1A CN202111002071A CN113726570B CN 113726570 B CN113726570 B CN 113726570B CN 202111002071 A CN202111002071 A CN 202111002071A CN 113726570 B CN113726570 B CN 113726570B
Authority
CN
China
Prior art keywords
network port
protocol
information
entry pointer
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111002071.1A
Other languages
Chinese (zh)
Other versions
CN113726570A (en
Inventor
承维
江国进
马建新
胡俊
彭立
张晓冬
张春雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Techenergy Co Ltd
Original Assignee
China Techenergy Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Techenergy Co Ltd filed Critical China Techenergy Co Ltd
Priority to CN202111002071.1A priority Critical patent/CN113726570B/en
Publication of CN113726570A publication Critical patent/CN113726570A/en
Application granted granted Critical
Publication of CN113726570B publication Critical patent/CN113726570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network port configuration method, a device and a system, wherein in the running process of a gateway, after network port configuration information is obtained, a protocol entry pointer of a network port and parameters of the network port stored in a network port information table are updated, so that the updated network port information table stores the protocol entry pointer and parameters stored based on the current network port configuration information, and the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, thereby realizing the reconfiguration of communication protocols of all network ports in the gateway under the condition that the gateway is online, avoiding the process that the network is turned off and the power is re-electrified when the communication protocol is updated, and improving user experience.

Description

Network port configuration method, device and system
Technical Field
The application relates to the field of nuclear power DCS, in particular to a network port configuration method, device and system.
Background
The Level1 non-security system gateway is important equipment in the nuclear power DCS system, and has the main function of completing data communication between the DCS system and a third party system.
The implementation modes of the Level1 gateways of different manufacturers are different, and the Level1 gateways have only one interface for communication with a third party, and more than one interface can simultaneously communicate with a plurality of different third party systems, but the gateways need to be configured before operation, parameters and protocols of all communication network ports are configured, the configuration cannot be changed, if the configuration is to be changed, the Level1 gateway equipment needs to be electrified again after reconfiguration, so that inconvenience is brought to user operation.
Disclosure of Invention
In view of this, the application provides a method, a device and a system for configuring a network port, which have the following specific schemes:
a network port configuration method is applied to a network port configuration system and comprises the following steps:
In the running process of the gateway, network port configuration information is obtained, and a network port information structure is determined;
updating a protocol entry pointer of each network port in a network port information table to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway;
And creating a protocol communication task for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication task through each network port.
Further, the creating a protocol communication task for each network port based on the updated protocol task entry pointer in the network port information table includes:
Traversing each network port information in the network port information table, and determining whether each network port in the network port information table is configured with a protocol;
If the network port is determined to be configured with a protocol, a communication protocol task is created for the network port based on a protocol task entry pointer corresponding to the network port in the updated network port information table.
Further, the updating the protocol entry pointer of each network port in the network port information table to a protocol task entry pointer matched with the specified protocol in the network port configuration information based on the network port configuration information includes:
when determining that the protocol communication task of at least one network port in the preset gateway is stopped, clearing a protocol entry pointer of the at least one network port in the network port information table;
and when the network port configuration information is obtained, writing a protocol task entry pointer matched with a specified protocol in the network port configuration information into the network port information table.
Further, the updating the protocol entry pointer of each network port in the network port information table to a protocol task entry pointer matched with the specified protocol in the network port configuration information based on the network port configuration information includes:
when the network port configuration information is obtained, the protocol entry pointer of each network port in the network port information table is switched from the protocol task entry pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the protocol specified in the network port configuration information.
Further, the method further comprises the following steps:
and sending the identification information of the network port to a protocol communication task to be executed by the network port, so that the protocol communication task can acquire the parameters of the network port based on the identification information.
Further, the sending the identification information of the network port to the protocol communication task to be executed by the network port includes:
Setting the identification information of the network port as an entry of an entry function of a specified protocol in the network port configuration information, wherein the protocol entry pointer is an entry pointer of the entry function of the specified protocol in the network port configuration information.
A portal configuration system, comprising:
The acquisition unit is used for acquiring the network port configuration information and determining the network port information structure in the gateway operation process;
The updating unit is used for updating the protocol entry pointer of each network port in the network port information table into a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating the parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing the parameters of at least one network port and the protocol entry pointer of a preset gateway;
The creation unit is used for creating a protocol communication task for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication task through each network port.
Further, the updating unit is configured to:
When determining that the protocol communication task of at least one network port in the preset gateway is stopped, clearing a protocol entry pointer of the at least one network port in the network port information table; and when the network port configuration information is obtained, writing a protocol task entry pointer matched with a specified protocol in the network port configuration information into the network port information table.
A portal configuration device, comprising:
The processor is used for obtaining the network port configuration information and determining the network port information structure in the gateway operation process; updating a protocol entry pointer of each network port in a network port information table to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway; creating a protocol communication task for each network port based on the updated function pointer in the network port information table so as to execute the protocol communication task through each network port;
and the memory is used for storing a program for executing the processing procedure by the processor.
A readable storage medium for storing at least one set of instructions;
The set of instructions is for a method to be invoked and at least to perform a portal configuration as in any of the above.
According to the network port configuration method, device and system disclosed by the application, network port configuration information is obtained in the gateway operation process, the network port information structure is determined, the protocol entry pointer of each network port in the network port information table is updated to be a protocol task entry pointer matched with a specified protocol in the network port configuration information based on the network port configuration information, the network port parameters are updated according to the network port configuration information, the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway, and protocol communication tasks are created for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication tasks through each network port. According to the method and the device, after the network port configuration information is obtained in the gateway operation process, the protocol entry pointer of the network port and the parameters of the network port stored in the network port information table are updated, so that the updated network port information table stores the protocol entry pointer and the parameters stored based on the current network port configuration information, the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, the communication protocol of each network port in the gateway can be reconfigured under the condition that the gateway is online, the process that the network is turned off and the network is electrified again when the communication protocol is updated is avoided, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a network port configuration method disclosed in an embodiment of the present application;
fig. 2 is a schematic diagram of a network port information structure according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for configuring a portal according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a network port configuration system according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of a network port configuration device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The application discloses a network port configuration method, which is applied to a network port configuration system, wherein a flow chart is shown in fig. 1 and comprises the following steps:
step S11, in the running process of the gateway, network port configuration information is obtained, and a network port information structure is determined;
step S12, updating a protocol entry pointer of each network port in the network port information table into a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway;
And step S13, creating a protocol communication task for each network port based on the protocol task entry pointer in the updated network port information table so as to execute the protocol communication task through each network port.
The distributed control system (Distributed Control System, DCS) is a multi-stage computer system which is composed of a process control stage and a process monitoring stage and takes a communication network as a link, integrates the technologies of computer, communication, display, control and the like, and has the basic ideas of distributed control, centralized operation, hierarchical management, flexible configuration and convenient configuration.
The Level1 refers to a subsystem formed by a main controller MPU, an IO module, a communication module, a power module and the like, a Level1 layer gateway on a system network and other equipment, wherein the Level1 gateway is a gateway positioned in the Level1 layer of the nuclear power DCS, supports algorithm configuration, downloading and equipment redundancy, and mainly completes the protocol conversion and data communication functions of the DCS system and a third party system.
The third party systems are very different in types of communication protocols, and besides industry standard protocols, the third party systems also have a plurality of custom protocols. In addition, the implementation schemes of the Level1 gateways of different manufacturers are different, only one interface for communication between some Level1 gateways and a third party is provided, and when the system runs, the system can only communicate with a specific third party system, and if the system needs to communicate with a plurality of different third party systems, a plurality of Level1 gateway devices are usually required to be configured in the DCS system, for example: modbus gateway, UDP gateway, etc.; some Level1 gateways can communicate with a plurality of different third party systems simultaneously through more than one interface for communication with the third party, but the gateways need to be configured before operation, parameters and protocols of various communication interfaces are configured, and the configuration cannot be changed once gateway equipment is operated, for example: the connection relation between the Level1 gateway network port and the third party system is changed, the gateway network port 1 is connected with the third party A, the gateway network port 2 is connected with the third party B, if the connection is modified to be that the gateway network port 1 is connected with the third party B, the gateway network port 2 is connected with the third party A, the Level1 gateway equipment needs to be powered on again after reconfiguration, and inconvenience is brought to user operation.
In order to solve the problem, in the scheme, each physical port of the Level1 gateway is logically and uniformly modeled, namely, a port information structure is determined, and a port management task is created to uniformly manage, namely, when each port of the gateway needs to be reconfigured, the port management task updates a port information table storing information related to each port, so that the reconfiguration of the port is realized under the condition of online through calling information in the port information table, wherein the port management task is a port configuration system, and can update a protocol entry pointer and parameters of the port in the operation process of the gateway.
Specifically, the network port configuration information is obtained, that is, what kind of configuration needs to be performed on each network port in the Level1 gateway, for example: modifying a communication protocol of a network port, changing protocol parameters, changing protocol communication points and the like.
After the configuration information is obtained, initializing the network port information table, namely updating the protocol entry pointer of each network port in the network port information table.
The portal information table may be a structure array or a linked list formed by portal information structures, in which the portal information structures of the respective portals in the Level1 gateway are stored, and the portal information structure (NETPORT _info struct) includes parameters and a protocol entry pointer, as shown in fig. 2.
The parameters in the network port information structure at least comprise: the network port enumeration value, the network port equipment name, the network port equipment number, the protocol name used by the network port, the local network port IP, the sending period, the receiving timeout time, the sending buffer, the receiving buffer and other information, the parameters in the network port information structure are logic abstractions of the network port, no matter whether the protocol of the network port changes, the parameter values of the network port can be different according to different protocols, but the parameter types of the network port cannot change, only some protocols can not use all parameters, the parameters are not initialized, and the parameters support all protocols; the protocol entry pointer in the portal information structure is a function pointer pointing to the protocol entry function.
Therefore, when the network port information table is initialized, the protocol entry pointer of each network port in the network port information table is initialized and updated, so that the protocol entry pointer of each network port is updated to be a protocol task entry pointer matched with a specified protocol in the obtained network port configuration information.
After updating the protocol entry pointer of each network port in the network port information table, creating a protocol communication task through the network port, and executing the created protocol communication task. When the network port executes the communication task, the network port is actually based on the updated protocol task entry pointer of the network port in the network port information table to execute the protocol matched with the network port by each network port.
In the nuclear power DCS field, when the network ports perform the execution of protocol communication tasks, each network port in the Level1 gateway can simultaneously and respectively execute the corresponding communication tasks, the communication tasks can be the same or different, and the used communication protocols can be the same or different, and all the network ports in the Level1 gateway are not affected by each other.
In the scheme, an engineer station on-line downloading mode, namely a protocol on-line configuration mode, is adopted, the Level1 gateway after downloading can operate according to new configuration, the Level1 gateway is always on line in a DCS (distributed control system) in the process, communication with a Level2 server is not affected, self-diagnosis functions and the like are not affected, and the device is not required to be powered up again after power failure, so that the device is very suitable for different field application scenes. The engineer station is mainly used for the offline tools of configuration, maintenance and offline analysis of the whole system.
In the network port configuration method disclosed by the embodiment, network port configuration information is obtained in the running process of a gateway, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, parameters of the network port are updated according to the network port configuration information, the network port information table is at least used for storing parameters and the protocol entry pointer of at least one network port of a preset gateway, and protocol communication tasks are created for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication tasks through each network port. According to the method and the device, after the network port configuration information is obtained in the gateway operation process, the protocol entry pointer of the network port and the parameters of the network port stored in the network port information table are updated, so that the updated network port information table stores the protocol entry pointer and the parameters stored based on the current network port configuration information, the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, the communication protocol of each network port in the gateway can be reconfigured under the condition that the gateway is online, the process that the network is turned off and the network is electrified again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration method, a flow chart of which is shown in fig. 3, comprising the following steps:
step S31, in the running process of the gateway, network port configuration information is obtained, and a network port information structure is determined;
Step S32, updating a protocol entry pointer of each network port in the network port information table into a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway;
Step S33, traversing each network port information in the network port information table, and determining whether each network port in the network port information table is configured with a protocol;
Step S34, if the network port is determined to be configured with the protocol, a communication protocol task is created for the network port based on a protocol task entry pointer corresponding to the network port in the updated network port information table.
After initializing and updating each network port in the network port information table through the network port configuration information, traversing the information of each network port in the network port information table is needed to determine which network ports in the network port information table are configured with protocols and which network ports are not configured with protocols, wherein the network ports are configured with protocols to indicate that the network ports configured with protocols need to execute communication protocol tasks in the current downloading scene, and the network ports not configured with protocols do not need to execute communication protocol tasks in the current downloading scene.
Specifically, the judgment is performed from the first portal in the portal information table, for example: determining whether the network port 1 is configured with a protocol, if the network port 1 is configured with the protocol, creating a communication task of the network port 1; then determining whether the network port 2 is configured with a protocol, if the network port 2 is configured with the protocol, creating a communication task of the network port 2; and determining whether the network port 3 is configured with a protocol, if the network port 3 is not configured with the protocol, directly determining whether the subsequent network port 4 is configured with the protocol without creating a communication task for the network port 3, and ending when the last network port is traversed.
Further, the identification information of the network port is sent to a protocol communication task to be executed by the network port, so that the protocol communication task can obtain parameters of the network port based on the identification information.
The network port identification information may be a network port number, the network port number is used as an input parameter of a protocol communication task to be transmitted to a protocol communication task corresponding to the network port, and the protocol communication task can search the network port information table through the network port number, so that relevant communication parameters of the network port are obtained.
Specifically, the identification information of the network port is set as an entry of an entry function of a designated task in the network port configuration information, wherein the protocol entry pointer is a protocol task entry pointer of the entry function of the designated protocol in the network port configuration information.
The protocol communication task is provided with an entry function, the entry function is a main function of the protocol communication task, the main function is provided with an entry parameter, the identification information of the network port, namely the network port number, is set as the entry parameter of the main function, and when the protocol communication task is executed, the information of the corresponding network port in the network port information table can be searched based on the entry parameter, so that the execution of the protocol communication task is realized by utilizing the network port.
Further, updating the protocol entry pointer of each network port in the network port information table to a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, including:
When determining that the protocol communication task of at least one network port in the preset gateway stops, clearing a protocol entry pointer of the at least one network port in the network port information table, and writing the protocol task entry pointer matched with the specified protocol in the network port configuration information into the network port information table when obtaining the network port configuration information.
The gateway is preset, namely the Level1 gateway, and the network port information table can be cleaned as long as the protocol communication task of one network port in the Level1 gateway is stopped, and network port resources are recovered, namely the protocol entry pointer of the network port in the network port information table is cleaned, so that the network port does not have a corresponding communication protocol. Only after the configuration information of the network port is obtained, a protocol task entry pointer matched with a protocol appointed by each network port in the network port configuration information is written into the network port information table, namely, a new communication task is allocated for each network port in the network port information table, so that online modification of the network port and the protocol is realized, in the process, the Level1 gateway does not need to be powered off, in the modification process of the network port and the protocol, the communication between the Level1 gateway and the Level2 server is not interrupted, and the state of the Level1 gateway can be monitored through a Level2 operator station in the process.
The obtaining of the network port configuration information may be that after the protocol communication tasks of each network port in the Level1 gateway are stopped, the protocol entry pointer of each network port can be cleared and updated.
In addition, it may be: when the network port configuration information is obtained, the protocol entry pointer of each network port in the network port information table is switched from the function pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the protocol specified in the network port configuration information.
That is, after the protocol communication task of each network port is stopped, the protocol entry pointer in the network port information table is not cleared, but the old protocol entry pointer is directly replaced by the new protocol entry pointer when the network ports are required to be reconfigured, so that the network port information table is updated.
In addition, in the scheme, different network ports are supported to operate different protocols simultaneously, and different network ports are also supported to operate the same protocol. If a new protocol is to be added in the gateway, only a protocol code needs to be developed, and a protocol main function entry is hung in a network port information table to uniformly accept the uniform management of network port management tasks, so that the original architecture is not influenced, the operation of adding and deleting communication protocols is simple, and the expandability is improved.
In the network port configuration method disclosed by the embodiment, network port configuration information is obtained in the running process of a gateway, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, parameters of the network port are updated according to the network port configuration information, the network port information table is at least used for storing parameters and the protocol entry pointer of at least one network port of a preset gateway, and protocol communication tasks are created for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication tasks through each network port. According to the method and the device, after the network port configuration information is obtained in the gateway operation process, the protocol entry pointer of the network port and the parameters of the network port stored in the network port information table are updated, so that the updated network port information table stores the protocol entry pointer and the parameters stored based on the current network port configuration information, the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, the communication protocol of each network port in the gateway can be reconfigured under the condition that the gateway is online, the process that the network is turned off and the network is electrified again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration system, the structure schematic diagram of which is shown in fig. 4, comprising:
An obtaining unit 41, an updating unit 42 and a creating unit 43.
The obtaining unit 41 is configured to obtain the network port configuration information and determine a network port information structure during the gateway operation process;
The updating unit 42 is configured to update the protocol entry pointer of each portal in the portal information table to a protocol task entry pointer matched with the protocol specified in the portal configuration information based on the portal configuration information, and update the parameters of the portal according to the portal configuration information, where the portal information table is at least used to store at least the parameters of at least one portal and the protocol entry pointer of the preset gateway;
the creation unit 43 is configured to create a protocol communication task for each portal based on the protocol task entry pointer in the updated portal information table, so as to perform execution of the protocol communication task through each portal.
The distributed control system (Distributed Control System, DCS) is a multi-stage computer system which is composed of a process control stage and a process monitoring stage and takes a communication network as a link, integrates the technologies of computer, communication, display, control and the like, and has the basic ideas of distributed control, centralized operation, hierarchical management, flexible configuration and convenient configuration.
The Level1 refers to a subsystem formed by a main controller MPU, an IO module, a communication module, a power module and the like, a Level1 layer gateway on a system network and other equipment, wherein the Level1 gateway is a gateway positioned in the Level1 layer of the nuclear power DCS, supports algorithm configuration, downloading and equipment redundancy, and mainly completes the protocol conversion and data communication functions of the DCS system and a third party system.
The third party systems are very different in types of communication protocols, and besides industry standard protocols, the third party systems also have a plurality of custom protocols. In addition, the implementation schemes of the Level1 gateways of different manufacturers are different, only one interface for communication between some Level1 gateways and a third party is provided, and when the system runs, the system can only communicate with a specific third party system, and if the system needs to communicate with a plurality of different third party systems, a plurality of Level1 gateway devices are usually required to be configured in the DCS system, for example: modbus gateway, UDP gateway, etc.; some Level1 gateways can communicate with a plurality of different third party systems simultaneously through more than one interface for communication with the third party, but the gateways need to be configured before operation, parameters and protocols of various communication interfaces are configured, and the configuration cannot be changed once gateway equipment is operated, for example: the connection relation between the Level1 gateway network port and the third party system is changed, the gateway network port 1 is connected with the third party A, the gateway network port 2 is connected with the third party B, if the connection is modified to be that the gateway network port 1 is connected with the third party B, the gateway network port 2 is connected with the third party A, the Level1 gateway equipment needs to be powered on again after reconfiguration, and inconvenience is brought to user operation.
In order to solve the problem, in the scheme, each physical port of the Level1 gateway is logically and uniformly modeled, namely, a port information structure is determined, and a port management task is created to uniformly manage, namely, when each port of the gateway needs to be reconfigured, the port management task updates a port information table storing information related to each port, so that the reconfiguration of the port is realized under the condition of online through calling information in the port information table, wherein the port management task is a port configuration system, and can update a protocol entry pointer and parameters of the port in the operation process of the gateway.
Specifically, the network port configuration information is obtained, that is, what kind of configuration needs to be performed on each network port in the Level1 gateway, for example: modifying a communication protocol of a network port, changing protocol parameters, changing protocol communication points and the like.
After the configuration information is obtained, initializing the network port information table, namely updating the protocol entry pointer of each network port in the network port information table.
The portal information table may be a structure array or a linked list formed by portal information structures, in which the portal information structures of the respective portals in the Level1 gateway are stored, and the portal information structure (NETPORT _info struct) includes parameters and a protocol entry pointer, as shown in fig. 2.
The parameters in the network port information structure at least comprise: the network port enumeration value, the network port equipment name, the network port equipment number, the protocol name used by the network port, the local network port IP, the sending period, the receiving timeout time, the sending buffer, the receiving buffer and other information, the parameters in the network port information structure are logic abstractions of the network port, no matter whether the protocol of the network port changes, the parameter values of the network port can be different according to different protocols, but the parameter types of the network port cannot change, only some protocols can not use all parameters, the parameters are not initialized, and the parameters support all protocols; the protocol entry pointer in the portal information structure is a function pointer pointing to the protocol entry function.
Therefore, when the network port information table is initialized, the protocol entry pointer of each network port in the network port information table is initialized and updated, so that the protocol entry pointer of each network port is updated to be a protocol task entry pointer matched with a specified protocol in the obtained network port configuration information.
After updating the protocol entry pointer of each network port in the network port information table, creating a protocol communication task through the network port, and executing the created protocol communication task. When the network port executes the communication task, the network port is actually based on the updated protocol task entry pointer of the network port in the network port information table to execute the protocol matched with the network port by each network port.
In the nuclear power DCS field, when the network ports perform the execution of protocol communication tasks, each network port in the Level1 gateway can simultaneously and respectively execute the corresponding communication tasks, the communication tasks can be the same or different, and the used communication protocols can be the same or different, and all the network ports in the Level1 gateway are not affected by each other.
In the scheme, an engineer station on-line downloading mode, namely a protocol on-line configuration mode, is adopted, the Level1 gateway after downloading can operate according to new configuration, the Level1 gateway is always on line in a DCS (distributed control system) in the process, communication with a Level2 server is not affected, self-diagnosis functions and the like are not affected, and the device is not required to be powered up again after power failure, so that the device is very suitable for different field application scenes. The engineer station is mainly used for the offline tools of configuration, maintenance and offline analysis of the whole system.
Further, the creation unit is specifically configured to: traversing each network port information in the network port information table, and determining whether each network port in the network port information table is configured with a protocol; if the network port is determined to be configured with the protocol, a communication protocol task is established for the network port based on a protocol task entry pointer corresponding to the network port in the updated network port information table.
After initializing and updating each network port in the network port information table through the network port configuration information, traversing the information of each network port in the network port information table is needed to determine which network ports in the network port information table are configured with protocols and which network ports are not configured with protocols, wherein the network ports are configured with protocols to indicate that the network ports configured with protocols need to execute communication protocol tasks in the current downloading scene, and the network ports not configured with protocols do not need to execute communication protocol tasks in the current downloading scene.
Specifically, the judgment is performed from the first portal in the portal information table, for example: determining whether the network port 1 is configured with a protocol, if the network port 1 is configured with the protocol, creating a communication task of the network port 1; then determining whether the network port 2 is configured with a protocol, if the network port 2 is configured with the protocol, creating a communication task of the network port 2; and determining whether the network port 3 is configured with a protocol, if the network port 3 is not configured with the protocol, directly determining whether the subsequent network port 4 is configured with the protocol without creating a communication task for the network port 3, and ending when the last network port is traversed.
Further, the identification information of the network port is sent to a protocol communication task to be executed by the network port, so that the protocol communication task can obtain parameters of the network port based on the identification information.
The network port identification information may be a network port number, the network port number is used as an input parameter of a protocol communication task to be transmitted to a protocol communication task corresponding to the network port, and the protocol communication task can search the network port information table through the network port number, so that relevant communication parameters of the network port are obtained.
Specifically, the identification information of the network port is set as an entry of an entry function of a designated task in the network port configuration information, wherein the protocol entry pointer is a protocol task entry pointer of the entry function of the designated protocol in the network port configuration information.
The protocol communication task is provided with an entry function, the entry function is a main function of the protocol communication task, the main function is provided with an entry parameter, the identification information of the network port, namely the network port number, is set as the entry parameter of the main function, and when the protocol communication task is executed, the information of the corresponding network port in the network port information table can be searched based on the entry parameter, so that the execution of the protocol communication task is realized by utilizing the network port.
Further, updating the protocol entry pointer of each network port in the network port information table to a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, including:
When determining that the protocol communication task of at least one network port in the preset gateway stops, clearing a protocol entry pointer of the at least one network port in the network port information table, and writing the protocol task entry pointer matched with the specified protocol in the network port configuration information into the network port information table when obtaining the network port configuration information.
The gateway is preset, namely the Level1 gateway, and the network port information table can be cleaned as long as the protocol communication task of one network port in the Level1 gateway is stopped, and network port resources are recovered, namely the protocol entry pointer of the network port in the network port information table is cleaned, so that the network port does not have a corresponding communication protocol. Only after the configuration information of the network port is obtained, a protocol task entry pointer matched with a protocol appointed by each network port in the network port configuration information is written into the network port information table, namely, a new communication task is allocated for each network port in the network port information table, so that online modification of the network port and the protocol is realized, in the process, the Level1 gateway does not need to be powered off, in the modification process of the network port and the protocol, the communication between the Level1 gateway and the Level2 server is not interrupted, and the state of the Level1 gateway can be monitored through a Level2 operator station in the process.
The obtaining of the network port configuration information may be that after the protocol communication tasks of each network port in the Level1 gateway are stopped, the protocol entry pointer of each network port can be cleared and updated.
In addition, it may be: when the network port configuration information is obtained, the protocol entry pointer of each network port in the network port information table is switched from the function pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the protocol specified in the network port configuration information.
That is, after the protocol communication task of each network port is stopped, the protocol entry pointer in the network port information table is not cleared, but the old protocol entry pointer is directly replaced by the new protocol entry pointer when the network ports are required to be reconfigured, so that the network port information table is updated.
In addition, in the scheme, different network ports are supported to operate different protocols simultaneously, and different network ports are also supported to operate the same protocol. If a new protocol is to be added in the gateway, only a protocol code needs to be developed, and a protocol main function entry is hung in a network port information table to uniformly accept the uniform management of network port management tasks, so that the original architecture is not influenced, the operation of adding and deleting communication protocols is simple, and the expandability is improved.
In the network port configuration system disclosed by the embodiment, network port configuration information is obtained in the running process of a gateway, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, parameters of the network port are updated according to the network port configuration information, the network port information table is at least used for storing parameters and the protocol entry pointer of at least one network port of a preset gateway, and protocol communication tasks are created for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication tasks through each network port. According to the method and the device, after the network port configuration information is obtained in the gateway operation process, the protocol entry pointer of the network port and the parameters of the network port stored in the network port information table are updated, so that the updated network port information table stores the protocol entry pointer and the parameters stored based on the current network port configuration information, the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, the communication protocol of each network port in the gateway can be reconfigured under the condition that the gateway is online, the process that the network is turned off and the network is electrified again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration device, the structure schematic diagram of which is shown in fig. 5, comprising:
a processor 51 and a memory 52.
The processor 51 is configured to obtain the network port configuration information and determine a network port information structure during the gateway operation process; updating a protocol entry pointer of each network port in the network port information table to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing at least one network port parameter and protocol entry pointer of a preset gateway; creating a protocol communication task for each network port based on the protocol task entry pointer in the updated network port information table so as to execute the protocol communication task through each network port;
The memory 52 is used to store programs for the processor to perform the above-described processing procedures.
The network port configuration device disclosed in the present embodiment is implemented based on the network port configuration method disclosed in the foregoing embodiment, and will not be described herein.
In the network port configuration device disclosed by the embodiment, network port configuration information is obtained in the running process of a gateway, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, parameters of the network port are updated according to the network port configuration information, the network port information table is at least used for storing parameters and the protocol entry pointer of at least one network port of a preset gateway, and protocol communication tasks are created for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication tasks through each network port. According to the method and the device, after the network port configuration information is obtained in the gateway operation process, the protocol entry pointer of the network port and the parameters of the network port stored in the network port information table are updated, so that the updated network port information table stores the protocol entry pointer and the parameters stored based on the current network port configuration information, the protocol communication task can be conveniently executed based on the network port after the network port information table is updated, the communication protocol of each network port in the gateway can be reconfigured under the condition that the gateway is online, the process that the network is turned off and the network is electrified again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, the computer program is loaded and executed by a processor, and each step of the network port configuration method is implemented, and the specific implementation process can refer to the description of the corresponding part of the above embodiment, which is not repeated.
The application also proposes a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the method provided in various optional implementations of the above-mentioned network port configuration method aspect or the network port configuration device aspect, and the specific implementation process may refer to the description of the above-mentioned corresponding embodiment, which is not repeated.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The network port configuration method is applied to a network port configuration system and is characterized by comprising the following steps of:
in the running process of the gateway, network port configuration information is obtained, and the network port information structure is determined by logically and uniformly modeling each physical network port of the gateway;
Updating a protocol entry pointer of each network port in a network port information table to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is a structure array or a linked list formed by the network port information structures, wherein network port information structures of all network ports in a preset gateway are stored, and the network port information structures comprise parameters and protocol entry pointers;
And creating a protocol communication task for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication task through each network port.
2. The method of claim 1, wherein the creating a protocol communication task for each portal based on the updated protocol task entry pointer in the portal information table comprises:
Traversing each network port information in the network port information table, and determining whether each network port in the network port information table is configured with a protocol;
If the network port is determined to be configured with a protocol, a communication protocol task is created for the network port based on a protocol task entry pointer corresponding to the network port in the updated network port information table.
3. The method according to claim 1, wherein updating the protocol entry pointer of each portal in the portal information table to a protocol task entry pointer matching with the protocol specified in the portal configuration information based on the portal configuration information comprises:
when determining that the protocol communication task of at least one network port in the preset gateway is stopped, clearing a protocol entry pointer of the at least one network port in the network port information table;
and when the network port configuration information is obtained, writing a protocol task entry pointer matched with a specified protocol in the network port configuration information into the network port information table.
4. The method according to claim 1, wherein updating the protocol entry pointer of each portal in the portal information table to a protocol task entry pointer matching with the protocol specified in the portal configuration information based on the portal configuration information comprises:
when the network port configuration information is obtained, the protocol entry pointer of each network port in the network port information table is switched from the protocol task entry pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the protocol specified in the network port configuration information.
5. The method as recited in claim 1, further comprising:
and sending the identification information of the network port to a protocol communication task to be executed by the network port, so that the protocol communication task can acquire the parameters of the network port based on the identification information.
6. The method according to claim 5, wherein the sending the identification information of the portal to the protocol communication task to be performed by the portal includes:
Setting the identification information of the network port as an entry of an entry function of a specified protocol in the network port configuration information, wherein the protocol entry pointer is an entry pointer of the entry function of the specified protocol in the network port configuration information.
7. A portal configuration system, comprising:
The acquisition unit is used for acquiring the network port configuration information in the running process of the gateway, and determining the network port information structure by logically and uniformly modeling each physical network port of the gateway;
The updating unit is used for updating the protocol entry pointer of each network port in the network port information table into a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating the parameters of the network port according to the network port configuration information, wherein the network port information table is a structure array or a linked list formed by the network port information structures, wherein the network port information structures of all network ports in the preset gateway are stored, and the network port information structures comprise the parameters and the protocol entry pointer;
The creation unit is used for creating a protocol communication task for each network port based on the updated protocol task entry pointer in the network port information table so as to execute the protocol communication task through each network port.
8. The system of claim 7, wherein the update unit is configured to:
When determining that the protocol communication task of at least one network port in the preset gateway is stopped, clearing a protocol entry pointer of the at least one network port in the network port information table; and when the network port configuration information is obtained, writing a protocol task entry pointer matched with a specified protocol in the network port configuration information into the network port information table.
9. A portal configuring apparatus, characterized by comprising:
The processor is used for obtaining the network port configuration information in the running process of the gateway, and determining the network port information structure by logically and uniformly modeling each physical network port of the gateway; updating a protocol entry pointer of each network port in a network port information table to be a protocol task entry pointer matched with a protocol specified in the network port configuration information based on the network port configuration information, and updating parameters of the network port according to the network port configuration information, wherein the network port information table is a structure array or a linked list formed by the network port information structures, wherein network port information structures of all network ports in a preset gateway are stored, and the network port information structures comprise parameters and protocol entry pointers; creating a protocol communication task for each network port based on the updated function pointer in the network port information table so as to execute the protocol communication task through each network port;
and the memory is used for storing a program for executing the processing procedure by the processor.
10. A readable storage medium for storing at least one set of instructions;
The set of instructions being for being invoked and at least performing a method of portal configuration as claimed in any one of the preceding claims 1-6.
CN202111002071.1A 2021-08-30 2021-08-30 Network port configuration method, device and system Active CN113726570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111002071.1A CN113726570B (en) 2021-08-30 2021-08-30 Network port configuration method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111002071.1A CN113726570B (en) 2021-08-30 2021-08-30 Network port configuration method, device and system

Publications (2)

Publication Number Publication Date
CN113726570A CN113726570A (en) 2021-11-30
CN113726570B true CN113726570B (en) 2024-05-31

Family

ID=78678890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111002071.1A Active CN113726570B (en) 2021-08-30 2021-08-30 Network port configuration method, device and system

Country Status (1)

Country Link
CN (1) CN113726570B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114155683B (en) * 2021-12-03 2023-08-18 四川九州电子科技股份有限公司 Disaster early warning system and method based on gateway equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537417A (en) * 1993-01-29 1996-07-16 International Business Machines Corporation Kernel socket structure for concurrent multiple protocol access
US6591304B1 (en) * 1999-06-21 2003-07-08 Cisco Technology, Inc. Dynamic, scaleable attribute filtering in a multi-protocol compatible network access environment
CN102761538A (en) * 2012-04-27 2012-10-31 南大傲拓科技江苏有限公司 Design management method for communication shared field applied to various communication interface gateways
CN105282019A (en) * 2014-12-29 2016-01-27 中国科学院沈阳自动化研究所 Service-based data gateway configurable method and system
CN109842656A (en) * 2017-11-28 2019-06-04 厦门雅迅网络股份有限公司 Car networking method of servicing, the car networking gateway system of the compatible multi-protocols of intelligence
CN110430110A (en) * 2019-08-12 2019-11-08 北京和利时系统工程有限公司 A kind of field bus gateway and its method for converting protocol
CN111030998A (en) * 2019-11-15 2020-04-17 中国人民解放军战略支援部队信息工程大学 Configurable protocol analysis method and system
CN111343184A (en) * 2020-02-27 2020-06-26 北京广利核系统工程有限公司 Communication protocol verification method and device
US10708394B1 (en) * 2020-02-18 2020-07-07 Goldman Sachs & Co. LLC Dynamically configurable network gateway

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020174244A1 (en) * 2001-05-18 2002-11-21 Telgen Corporation System and method for coordinating, distributing and processing of data
US8089889B2 (en) * 2004-11-18 2012-01-03 International Business Machines Corporation Adapter port configuration
WO2014076732A1 (en) * 2012-11-13 2014-05-22 Hitachi, Ltd. Storage apparatus, network interface apparatus, and storage control method
US20170072876A1 (en) * 2015-09-14 2017-03-16 Broadcom Corporation Hardware-Accelerated Protocol Conversion in an Automotive Gateway Controller

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537417A (en) * 1993-01-29 1996-07-16 International Business Machines Corporation Kernel socket structure for concurrent multiple protocol access
US6591304B1 (en) * 1999-06-21 2003-07-08 Cisco Technology, Inc. Dynamic, scaleable attribute filtering in a multi-protocol compatible network access environment
CN102761538A (en) * 2012-04-27 2012-10-31 南大傲拓科技江苏有限公司 Design management method for communication shared field applied to various communication interface gateways
CN105282019A (en) * 2014-12-29 2016-01-27 中国科学院沈阳自动化研究所 Service-based data gateway configurable method and system
CN109842656A (en) * 2017-11-28 2019-06-04 厦门雅迅网络股份有限公司 Car networking method of servicing, the car networking gateway system of the compatible multi-protocols of intelligence
CN110430110A (en) * 2019-08-12 2019-11-08 北京和利时系统工程有限公司 A kind of field bus gateway and its method for converting protocol
CN111030998A (en) * 2019-11-15 2020-04-17 中国人民解放军战略支援部队信息工程大学 Configurable protocol analysis method and system
US10708394B1 (en) * 2020-02-18 2020-07-07 Goldman Sachs & Co. LLC Dynamically configurable network gateway
CN111343184A (en) * 2020-02-27 2020-06-26 北京广利核系统工程有限公司 Communication protocol verification method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
影响安全级网络通信协议确定性的关键要素分析;孙王强;尹宝娟;周小波;龙威;赵云飞;;自动化博览(第01期);全文 *

Also Published As

Publication number Publication date
CN113726570A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN109634733A (en) Task scheduling and managing method, device and operation management server
US20040059813A1 (en) Methods and apparatus for configuration change management in communications networks
US10700924B2 (en) Remote line integration
CN104683190A (en) Webmaster managed network simulation system and webmaster managed network simulation method
CN113726570B (en) Network port configuration method, device and system
CN112034732B (en) Semi-physical satellite simulation system and simulation method
CN110601883A (en) Cloud configuration method, system, storage medium and terminal of edge gateway
CN115913872A (en) Server monitoring operation and maintenance method, device, equipment and medium
US11165745B2 (en) Control system, controller, and control method
US8478977B1 (en) Secure auto-migration program
CN114650223A (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN114020400A (en) NoVNC-based remote virtual simulation method, system, device and medium
US20100217423A1 (en) Method for Providing Functions in an Industrial Automation System, Control Program and Industrial Automation System
CN114064485A (en) Software testing method, system, computer equipment and readable storage medium
JP4366576B2 (en) Programmable controller equipment
RU2815598C1 (en) Method of creating robotic systems
CN114866412B (en) Data acquisition method, system, device and storage medium
US12003594B2 (en) Systems and methods for network discovery in a multi-layer operational technology network
WO2019244327A1 (en) Management device, management method, and program
CN109995587B (en) Communication method and simulation system
WO2006011271A1 (en) Field bus system
CN115967869A (en) Parameter acquisition method, device, equipment and storage medium
JP2004070772A (en) Engineering support device and program
CN116016577A (en) Service access gateway method and system based on Internet
CN116996384A (en) Method and system for collecting and processing data based on edge

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant