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

Network port configuration method, device and system Download PDF

Info

Publication number
CN113726570A
CN113726570A CN202111002071.1A CN202111002071A CN113726570A CN 113726570 A CN113726570 A CN 113726570A CN 202111002071 A CN202111002071 A CN 202111002071A CN 113726570 A CN113726570 A CN 113726570A
Authority
CN
China
Prior art keywords
network port
protocol
entry pointer
task
information table
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.)
Pending
Application number
CN202111002071.1A
Other languages
Chinese (zh)
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/CN113726570A/en
Publication of CN113726570A publication Critical patent/CN113726570A/en
Pending legal-status Critical Current

Links

Images

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

Abstract

The application discloses a method, a device and a system for network port configuration, wherein in the running process of a gateway, after network port configuration information is obtained, a protocol entry pointer and a network port parameter of a network port stored in a network port information table are updated, so that the protocol entry pointer and the parameter stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on again when the communication protocol is updated is avoided, and the user experience is improved.

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
A Level1 non-security Level system gateway is an important device in a nuclear power DCS, and the main function of the gateway is to complete data communication between the DCS and a third-party system.
The implementation modes of Level1 gateways of different manufacturers are different, some Level1 gateways have only one or more interfaces for communicating with a third party and can communicate with a plurality of different third party systems simultaneously, but the gateways need to be configured before running, configure parameters and protocols of all communication network ports and cannot be changed after configuration is finished, and if the gateways need to be changed, the Level1 gateway equipment needs to be powered on again after reconfiguration, so that inconvenience is brought to user operation.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, and a system for configuring a network port, and the specific scheme is as follows:
a network port configuration method is applied to a network port configuration system and comprises the following steps:
in the gateway operation process, obtaining network port configuration information and determining a network port information structure;
updating a protocol entry pointer of each network port in a network port information table to a protocol task entry pointer matched with a specified protocol 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 the parameters and the protocol entry pointer of at least one network port of a preset gateway;
and establishing a protocol communication task for each internet access based on the updated protocol task entry pointer in the internet access information table so as to execute the protocol communication task through each internet access.
Further, the creating a protocol communication task for each portal based on the updated protocol task entry pointer in the portal 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;
and if the network port is determined to be configured with a protocol, establishing a communication protocol task 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, based on the portal configuration information, the protocol entry pointer of each portal in the portal information table to be a protocol task entry pointer matched with a specified protocol in the portal configuration information includes:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, a protocol entry pointer of the at least one network port in the network port information table is cleared;
and when the network port configuration information is obtained, writing a protocol task entry pointer which specifies protocol matching in the network port configuration information into the network port information table.
Further, the updating, based on the portal configuration information, the protocol entry pointer of each portal in the portal information table to be a protocol task entry pointer matched with a specified protocol in the portal configuration information includes:
and when the network port configuration information is obtained, switching the protocol entry pointer of each network port in the network port information table from the protocol task entry pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the specified protocol in the network port configuration information.
Further, the method also 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 obtain the parameters of the network port based on the identification information.
Further, the sending the identification information of the internet access to the protocol communication task to be executed by the internet access includes:
and setting the identification information of the internet access as the entry parameter of the entry function of the specified protocol in the internet access configuration information, wherein the protocol entry pointer is the entry pointer of the entry function of the specified protocol in the internet access configuration information.
A portal configuration system comprising:
the gateway comprises an obtaining unit, a judging unit and a judging unit, wherein the obtaining unit is used for obtaining network port configuration information and determining a network port information structure in the running process of the gateway;
an updating unit, configured to update a protocol entry pointer of each portal in a portal information table to a protocol task entry pointer matched with a specified protocol in the portal configuration information based on the portal configuration information, and update parameters of the portal according to the portal configuration information, where the portal information table is at least used to store parameters of at least one portal and protocol entry pointers of a preset gateway;
and the creating unit is used for creating a protocol communication task for each internet access based on the updated protocol task entry pointer in the internet access information table so as to execute the protocol communication task through each internet access.
Further, the update unit is configured to:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, a protocol entry pointer of the at least one network port in the network port information table is cleared; and when the network port configuration information is obtained, writing a protocol task entry pointer which specifies protocol matching in the network port configuration information into the network port information table.
A portal configuration apparatus comprising:
the processor is used for acquiring 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 a protocol task entry pointer matched with a specified protocol 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 the parameters and the protocol entry pointer of at least one network port of a preset gateway; establishing a protocol communication task for each internet access based on the updated function pointer in the internet access information table so as to execute the protocol communication task through each internet access;
and the memory is used for storing the program of the processor for executing the processing procedure.
A readable storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least the method of portal configuration as any one of the above.
According to the technical scheme, in the gateway operation process, the network port configuration information is obtained, the network port information structure is determined, the protocol entry pointer of each network port in the network port information table is updated to the protocol task entry pointer matched with the specified protocol in the network port configuration information based on the network port configuration information, the 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 the parameters of at least one network port of the preset gateway and the protocol entry pointer, and the protocol communication task is established for each network port based on the protocol task entry pointer in the updated network port information table, so that the protocol communication task can be executed through each network port. According to the scheme, in the running process of the gateway, after the network port configuration information is obtained, 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 protocol entry pointer and the parameters stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on 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 present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
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 an internet access information structure disclosed in an embodiment of the present application;
fig. 3 is a flowchart of a network port configuration method disclosed in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an internet access configuration system disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network port configuration device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application discloses a network port configuration method, which is applied to a network port configuration system, and the flow chart is shown in fig. 1, and comprises the following steps:
step S11, in the gateway operation process, obtaining the network port configuration information and determining the network port information structure;
step S12, updating the protocol entry pointer of each network port in the network port information table to the protocol task entry pointer matched with the specified protocol 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 and the protocol entry pointer of at least one network port of the preset gateway;
step S13, creating a protocol communication task for each portal based on the protocol task entry pointer in the updated portal information table, so as to execute the protocol communication task through each portal.
A Distributed Control System (DCS) is a multi-stage computer System consisting of a process Control stage and a process monitoring stage and using a communication network as a link, which integrates the technologies of computers, communication, display, Control and the like, and has the basic ideas of Distributed Control, centralized operation, hierarchical management, flexible configuration and convenient configuration.
Level1 refers to a subsystem formed by a main controller MPU, an IO module, a communication module, a power module and the like, and devices such as a Level1 layer gateway on a system network, wherein the Level1 gateway is a gateway located at a Level1 layer in a nuclear power DCS, supports algorithm configuration, and is installed and supported with device redundancy, and mainly completes the functions of protocol conversion and data communication between the DCS system and a third-party system.
The third-party systems are various in types and different in communication protocols, and besides the industrial standard protocol, the third-party systems also have a plurality of self-defined protocols. In addition, the Level1 gateways of different manufacturers have different implementation schemes, and some Level1 gateways have only one communication interface with a third party, and can only communicate with a specific third party system during operation, and adopt a specific communication protocol, 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 have more than one interface for communication with third-party, and can communicate with a plurality of different third-party systems at the same time, but such gateways need to be configured before operation, configure parameters and protocols of each communication network port, and such configuration is not changeable once the gateway device is operated, such as: the connection relation between the Level1 gateway internet access and a third party system is changed, the gateway internet access 1 is connected with a third party A, the gateway internet access 2 is connected with a third party B, if the connection between the gateway internet access 1 and the third party B is modified, the gateway internet access 2 is connected with the third party A, the Level1 gateway equipment needs to be powered on again after reconfiguration, and therefore inconvenience is brought to user operation.
In order to solve the problem, in the scheme, each physical network port of a Level1 gateway is modeled logically and uniformly, namely, a network port information structure is determined, and a network port management task is created for uniform management, namely, when each network port of the gateway needs to be reconfigured, the network port management task updates a network port information table in which relevant information of each network port is stored, so that the reconfiguration of the network port under the online condition is realized by calling the information in the network port information table, wherein the network port management task is a network port configuration system which can update a protocol entry pointer and parameters of the network port in the running process of the gateway.
Specifically, the portal configuration information is obtained, that is, what configuration needs to be performed on each portal in the Level1 gateway, for example: modifying the communication protocol of the internet access, changing the protocol parameters, changing the protocol communication point and the like.
After the configuration information is obtained, the network port information table is initialized, namely the protocol entry pointer of each network port in the network port information table is updated.
The network port information table may be a structure array or a linked list composed of network port information structures, in which the network port information structures of each network port in the Level1 gateway are stored, and the network port information structure (network _ INFO structure) includes parameters and a protocol entry pointer, as shown in fig. 2.
Wherein, the parameters in the network port information structure at least comprise: the parameters in the network port information structure are logical abstractions to the network port, and no matter whether the protocol of the network port changes, the parameter values of the network port are different along with the difference of the protocol, but the parameter types of the network port cannot change, only some protocols may not use all parameters, and the parameters are not used, but are not initialized, but the parameters support all the protocols; the protocol entry pointer in the portal information structure is a function pointer to a protocol entry function.
Therefore, when the portal information table is initialized, it is practical to initialize and update the protocol entry pointer of each portal in the portal information table, so as to update the protocol entry pointer of each portal to the protocol task entry pointer matching the specified protocol in the obtained portal configuration information.
After the protocol entry pointer of each network port in the network port information table is updated, a protocol communication task is established through the network port, and the established protocol communication task is executed. When the network port executes the communication task, the network port actually implements the execution of the protocol matched with the network port by each network port based on the protocol task entry pointer of the network port updated in the network port information table.
In the field of nuclear power DCS, when network ports carry out protocol communication tasks, each network port in a Level1 gateway can simultaneously and respectively carry out corresponding communication tasks, the communication tasks can be the same or different, the used communication protocols can be the same or different, and the network ports in the Level1 gateway are not influenced by each other.
In the scheme, an engineer station online downloading mode, namely a protocol online configuration mode, is adopted, the downloaded Level1 gateway can operate according to new configuration, the Level1 gateway is always online in the DCS system in the process, the communication with the Level2 server and the self-diagnosis function are not affected, the power is not required to be re-powered on after power failure, and the characteristic is greatly suitable for different field application scenes. The engineer station is mainly used as an off-line tool for configuration, maintenance and off-line analysis of the whole system.
In the network port configuration method disclosed in this embodiment, in the gateway operation process, network port configuration information is obtained, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to a protocol task entry pointer matched with a specified protocol in the network port configuration information based on the network port configuration information, and 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 of at least one network port of a preset gateway and the protocol entry pointer, and a protocol communication task is created for each network port based on the protocol task entry pointer in the updated network port information table, so that the protocol communication task is executed through each network port. According to the scheme, in the running process of the gateway, after the network port configuration information is obtained, 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 protocol entry pointer and the parameters stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration method, a flowchart of which is shown in fig. 3, and the method includes:
step S31, in the gateway operation process, obtaining the network port configuration information and determining the network port information structure;
step S32, updating the protocol entry pointer of each network port in the network port information table to the protocol task entry pointer matched with the specified protocol 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 and the protocol entry pointer of at least one network port of the 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 it is determined that the network port is configured with the protocol, creating a communication protocol task for the network port based on the 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 information of each network port in the network port information table 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 the protocols and indicate that the network ports configured with the protocols need to execute communication protocol tasks in the current downloading scene, and the network ports not configured with the protocols do not need to execute the communication protocol tasks in the current downloading scene.
Specifically, the determination is performed from the first portal in the portal information table, such as: determining whether the internet access 1 is configured with a protocol, and if the internet access 1 is configured with the protocol, establishing a communication task of the internet access 1; then determining whether the internet access 2 is configured with a protocol, and if the internet access 2 is configured with the protocol, establishing a communication task of the internet access 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 establishing a communication task for the network port 3, and ending the process until the last network port is traversed.
Further, the identification information of the internet access is sent to the protocol communication task to be executed by the internet access, so that the protocol communication task can obtain the parameters of the internet access based on the identification information.
The identification information of the network port can be a network port number, the network port number is used as an access parameter of a protocol communication task and is transmitted to the protocol communication task corresponding to the network port, and the protocol communication task can search a network port information table through the network port number so as to obtain the relevant communication parameters of the network port.
Specifically, the identification information of the internet access is set as the entry parameter of the entry function of the specified task in the internet access configuration information, wherein the protocol entry pointer is the protocol task entry pointer of the entry function of the specified protocol in the internet access configuration information.
The protocol communication task is provided with an entry function which is a main function of the protocol communication task, the main function has entry parameters, identification information of a network port, namely a network port number, is set as the entry parameters of the main function, and information of the corresponding network port in a network port information table can be found based on the entry parameters when the protocol communication task is executed, so that the protocol communication task is executed by utilizing the network port.
Further, updating the protocol entry pointer of each network port in the network port information table to the protocol task entry pointer matched with the specified protocol in the network port configuration information based on the network port configuration information, including:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, the protocol entry pointer of the at least one network port in the network port information table is cleared, and when the network port configuration information is obtained, the protocol task entry pointer which is specified to be matched with the protocol in the network port configuration information is written into the network port information table.
The preset gateway, namely the Level1 gateway, can clear the network port information table as long as the protocol communication task of one network port in the Level1 gateway stops, and recover the network port resources, namely, clear the protocol entry pointer of the network port in the network port information table, so that the network port has no corresponding communication protocol. Only after the configuration information of the network port is obtained, a protocol task entry pointer matched with a protocol specified by each network port in the configuration information of the network port is written into the network port information table, namely, a new communication task is distributed to each network port in the network port information table, so that the online modification of the network port and the protocol is realized, in the process, a Level1 gateway does not need to be powered off, in the modification process of the network port and the protocol, the communication between a Level1 gateway and a Level2 server is not interrupted, and in the process, the state of the Level1 gateway can be monitored through a Level2 operator station.
The network port configuration information may be obtained by clearing and updating the protocol entry pointer of each network port only after the protocol communication task of each network port in the Level1 gateway is stopped.
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 specified protocol 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 when each network port needs to be reconfigured, the old protocol entry pointer is directly replaced by the new protocol entry pointer, thereby realizing the update of the network port information table.
In addition, in the scheme, different network ports are supported to simultaneously operate different protocols, and different network ports are also supported to operate the same protocol. If a new protocol is added in the gateway, only protocol codes need to be developed, a protocol main function inlet is hung in the network port information table, unified management of network port management tasks is received in a unified mode, the original framework is not affected, operation of the adding and deleting communication protocols is simple, and expandability is improved.
In the network port configuration method disclosed in this embodiment, in the gateway operation process, network port configuration information is obtained, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to a protocol task entry pointer matched with a specified protocol in the network port configuration information based on the network port configuration information, and 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 of at least one network port of a preset gateway and the protocol entry pointer, and a protocol communication task is created for each network port based on the protocol task entry pointer in the updated network port information table, so that the protocol communication task is executed through each network port. According to the scheme, in the running process of the gateway, after the network port configuration information is obtained, 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 protocol entry pointer and the parameters stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration system, a schematic structural diagram of which is shown in fig. 4, and the system includes:
an obtaining unit 41, an updating unit 42 and a creating unit 43.
The obtaining unit 41 is configured to obtain, during the gateway operation process, network port configuration information and determine a network port information structure;
the updating unit 42 is configured to update the protocol entry pointer of each port in the port information table to a protocol task entry pointer matched with a specified protocol in the port configuration information based on the port configuration information, and update the parameters of the port according to the port configuration information, where the port information table is at least used to store the parameters and the protocol entry pointer of at least one port of a preset gateway;
the creating 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.
A Distributed Control System (DCS) is a multi-stage computer System consisting of a process Control stage and a process monitoring stage and using a communication network as a link, which integrates the technologies of computers, communication, display, Control and the like, and has the basic ideas of Distributed Control, centralized operation, hierarchical management, flexible configuration and convenient configuration.
Level1 refers to a subsystem formed by a main controller MPU, an IO module, a communication module, a power module and the like, and devices such as a Level1 layer gateway on a system network, wherein the Level1 gateway is a gateway located at a Level1 layer in a nuclear power DCS, supports algorithm configuration, and is installed and supported with device redundancy, and mainly completes the functions of protocol conversion and data communication between the DCS system and a third-party system.
The third-party systems are various in types and different in communication protocols, and besides the industrial standard protocol, the third-party systems also have a plurality of self-defined protocols. In addition, the Level1 gateways of different manufacturers have different implementation schemes, and some Level1 gateways have only one communication interface with a third party, and can only communicate with a specific third party system during operation, and adopt a specific communication protocol, 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 have more than one interface for communication with third-party, and can communicate with a plurality of different third-party systems at the same time, but such gateways need to be configured before operation, configure parameters and protocols of each communication network port, and such configuration is not changeable once the gateway device is operated, such as: the connection relation between the Level1 gateway internet access and a third party system is changed, the gateway internet access 1 is connected with a third party A, the gateway internet access 2 is connected with a third party B, if the connection between the gateway internet access 1 and the third party B is modified, the gateway internet access 2 is connected with the third party A, the Level1 gateway equipment needs to be powered on again after reconfiguration, and therefore inconvenience is brought to user operation.
In order to solve the problem, in the scheme, each physical network port of a Level1 gateway is modeled logically and uniformly, namely, a network port information structure is determined, and a network port management task is created for uniform management, namely, when each network port of the gateway needs to be reconfigured, the network port management task updates a network port information table in which relevant information of each network port is stored, so that the reconfiguration of the network port under the online condition is realized by calling the information in the network port information table, wherein the network port management task is a network port configuration system which can update a protocol entry pointer and parameters of the network port in the running process of the gateway.
Specifically, the portal configuration information is obtained, that is, what configuration needs to be performed on each portal in the Level1 gateway, for example: modifying the communication protocol of the internet access, changing the protocol parameters, changing the protocol communication point and the like.
After the configuration information is obtained, the network port information table is initialized, namely the protocol entry pointer of each network port in the network port information table is updated.
The network port information table may be a structure array or a linked list composed of network port information structures, in which the network port information structures of each network port in the Level1 gateway are stored, and the network port information structure (network _ INFO structure) includes parameters and a protocol entry pointer, as shown in fig. 2.
Wherein, the parameters in the network port information structure at least comprise: the parameters in the network port information structure are logical abstractions to the network port, and no matter whether the protocol of the network port changes, the parameter values of the network port are different along with the difference of the protocol, but the parameter types of the network port cannot change, only some protocols may not use all parameters, and the parameters are not used, but are not initialized, but the parameters support all the protocols; the protocol entry pointer in the portal information structure is a function pointer to a protocol entry function.
Therefore, when the portal information table is initialized, it is practical to initialize and update the protocol entry pointer of each portal in the portal information table, so as to update the protocol entry pointer of each portal to the protocol task entry pointer matching the specified protocol in the obtained portal configuration information.
After the protocol entry pointer of each network port in the network port information table is updated, a protocol communication task is established through the network port, and the established protocol communication task is executed. When the network port executes the communication task, the network port actually implements the execution of the protocol matched with the network port by each network port based on the protocol task entry pointer of the network port updated in the network port information table.
In the field of nuclear power DCS, when network ports carry out protocol communication tasks, each network port in a Level1 gateway can simultaneously and respectively carry out corresponding communication tasks, the communication tasks can be the same or different, the used communication protocols can be the same or different, and the network ports in the Level1 gateway are not influenced by each other.
In the scheme, an engineer station online downloading mode, namely a protocol online configuration mode, is adopted, the downloaded Level1 gateway can operate according to new configuration, the Level1 gateway is always online in the DCS system in the process, the communication with the Level2 server and the self-diagnosis function are not affected, the power is not required to be re-powered on after power failure, and the characteristic is greatly suitable for different field application scenes. The engineer station is mainly used as an off-line tool for configuration, maintenance and off-line analysis of the whole system.
Further, the creating 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; and if the network port is determined to be configured with the protocol, establishing a communication protocol task 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 information of each network port in the network port information table 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 the protocols and indicate that the network ports configured with the protocols need to execute communication protocol tasks in the current downloading scene, and the network ports not configured with the protocols do not need to execute the communication protocol tasks in the current downloading scene.
Specifically, the determination is performed from the first portal in the portal information table, such as: determining whether the internet access 1 is configured with a protocol, and if the internet access 1 is configured with the protocol, establishing a communication task of the internet access 1; then determining whether the internet access 2 is configured with a protocol, and if the internet access 2 is configured with the protocol, establishing a communication task of the internet access 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 establishing a communication task for the network port 3, and ending the process until the last network port is traversed.
Further, the identification information of the internet access is sent to the protocol communication task to be executed by the internet access, so that the protocol communication task can obtain the parameters of the internet access based on the identification information.
The identification information of the network port can be a network port number, the network port number is used as an access parameter of a protocol communication task and is transmitted to the protocol communication task corresponding to the network port, and the protocol communication task can search a network port information table through the network port number so as to obtain the relevant communication parameters of the network port.
Specifically, the identification information of the internet access is set as the entry parameter of the entry function of the specified task in the internet access configuration information, wherein the protocol entry pointer is the protocol task entry pointer of the entry function of the specified protocol in the internet access configuration information.
The protocol communication task is provided with an entry function which is a main function of the protocol communication task, the main function has entry parameters, identification information of a network port, namely a network port number, is set as the entry parameters of the main function, and information of the corresponding network port in a network port information table can be found based on the entry parameters when the protocol communication task is executed, so that the protocol communication task is executed by utilizing the network port.
Further, updating the protocol entry pointer of each network port in the network port information table to the protocol task entry pointer matched with the specified protocol in the network port configuration information based on the network port configuration information, including:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, the protocol entry pointer of the at least one network port in the network port information table is cleared, and when the network port configuration information is obtained, the protocol task entry pointer which is specified to be matched with the protocol in the network port configuration information is written into the network port information table.
The preset gateway, namely the Level1 gateway, can clear the network port information table as long as the protocol communication task of one network port in the Level1 gateway stops, and recover the network port resources, namely, clear the protocol entry pointer of the network port in the network port information table, so that the network port has no corresponding communication protocol. Only after the configuration information of the network port is obtained, a protocol task entry pointer matched with a protocol specified by each network port in the configuration information of the network port is written into the network port information table, namely, a new communication task is distributed to each network port in the network port information table, so that the online modification of the network port and the protocol is realized, in the process, a Level1 gateway does not need to be powered off, in the modification process of the network port and the protocol, the communication between a Level1 gateway and a Level2 server is not interrupted, and in the process, the state of the Level1 gateway can be monitored through a Level2 operator station.
The network port configuration information may be obtained by clearing and updating the protocol entry pointer of each network port only after the protocol communication task of each network port in the Level1 gateway is stopped.
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 specified protocol 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 when each network port needs to be reconfigured, the old protocol entry pointer is directly replaced by the new protocol entry pointer, thereby realizing the update of the network port information table.
In addition, in the scheme, different network ports are supported to simultaneously operate different protocols, and different network ports are also supported to operate the same protocol. If a new protocol is added in the gateway, only protocol codes need to be developed, a protocol main function inlet is hung in the network port information table, unified management of network port management tasks is received in a unified mode, the original framework is not affected, operation of the adding and deleting communication protocols is simple, and expandability is improved.
In the network port configuration system disclosed in this embodiment, in the gateway operation process, network port configuration information is obtained, a network port information structure is determined, a protocol entry pointer of each network port in a network port information table is updated to a protocol task entry pointer matched with a specified protocol in the network port configuration information based on the network port configuration information, and 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 of at least one network port of a preset gateway and the protocol entry pointer, and a protocol communication task is created for each network port based on the protocol task entry pointer in the updated network port information table, so that the protocol communication task is executed through each network port. According to the scheme, in the running process of the gateway, after the network port configuration information is obtained, 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 protocol entry pointer and the parameters stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment discloses a network port configuration device, a schematic structural diagram of which is shown in fig. 5, and the network port configuration device includes:
a processor 51 and a memory 52.
The processor 51 is configured to obtain network port configuration information and determine a network port information structure in the gateway operation process; updating the protocol entry pointer of each network port in the network port information table into a protocol task entry pointer matched with a specified protocol 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; establishing a protocol communication task for each network port based on a 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 this embodiment is implemented based on the network port configuration method disclosed in the above embodiment, and details are not described here.
The network port configuration device disclosed in this embodiment obtains network port configuration information during a gateway operation process, determines a network port information structure, updates a protocol entry pointer of each network port in a network port information table to a protocol task entry pointer matched with a specified protocol in the network port configuration information based on the network port configuration information, and updates parameters of the network port according to the network port configuration information, wherein the network port information table is at least used for storing parameters of at least one network port of a preset gateway and the protocol entry pointer, and creates 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. According to the scheme, in the running process of the gateway, after the network port configuration information is obtained, 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 protocol entry pointer and the parameters stored based on the current network port configuration information are stored in the updated network port information table, a protocol communication task can be 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 online condition of the gateway, the process that the gateway needs to be powered off and then powered on again when the communication protocol is updated is avoided, and the user experience is improved.
The embodiment of the present application further provides a readable storage medium, where a computer program is stored, and the computer program is loaded and executed by a processor to implement each step of the foregoing network port configuration method, where a specific implementation process may refer to descriptions of corresponding parts in the foregoing embodiment, and details are not described in this embodiment.
The present 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 instruction from the computer-readable storage medium, and executes the computer instruction, so that the electronic device executes the method provided in the various optional implementation manners in the aspect of the network port configuration method or the aspect of the network port configuration apparatus.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 components and steps have been described above generally in terms of their functionality in order to clearly illustrate this 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 implementation. 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. A software module may reside 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. A network port configuration method is applied to a network port configuration system and is characterized by comprising the following steps:
in the gateway operation process, obtaining network port configuration information and determining a network port information structure;
updating a protocol entry pointer of each network port in a network port information table to a protocol task entry pointer matched with a specified protocol 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 the parameters and the protocol entry pointer of at least one network port of a preset gateway;
and establishing a protocol communication task for each internet access based on the updated protocol task entry pointer in the internet access information table so as to execute the protocol communication task through each internet access.
2. The method according to 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;
and if the network port is determined to be configured with a protocol, establishing a communication protocol task 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 of claim 1, wherein the updating the protocol entry pointer of each portal in the portal information table to the protocol task entry pointer matching the protocol specified in the portal configuration information based on the portal configuration information comprises:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, a protocol entry pointer of the at least one network port in the network port information table is cleared;
and when the network port configuration information is obtained, writing a protocol task entry pointer which specifies protocol matching in the network port configuration information into the network port information table.
4. The method of claim 1, wherein the updating the protocol entry pointer of each portal in the portal information table to the protocol task entry pointer matching the protocol specified in the portal configuration information based on the portal configuration information comprises:
and when the network port configuration information is obtained, switching the protocol entry pointer of each network port in the network port information table from the protocol task entry pointer corresponding to the stopped protocol communication task to the protocol task entry pointer matched with the specified protocol in the network port configuration information.
5. The method of 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 obtain 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 executed by the portal comprises:
and setting the identification information of the internet access as the entry parameter of the entry function of the specified protocol in the internet access configuration information, wherein the protocol entry pointer is the entry pointer of the entry function of the specified protocol in the internet access configuration information.
7. An internet access configuration system, comprising:
the gateway comprises an obtaining unit, a judging unit and a judging unit, wherein the obtaining unit is used for obtaining network port configuration information and determining a network port information structure in the running process of the gateway;
an updating unit, configured to update a protocol entry pointer of each portal in a portal information table to a protocol task entry pointer matched with a specified protocol in the portal configuration information based on the portal configuration information, and update parameters of the portal according to the portal configuration information, where the portal information table is at least used to store parameters of at least one portal and protocol entry pointers of a preset gateway;
and the creating unit is used for creating a protocol communication task for each internet access based on the updated protocol task entry pointer in the internet access information table so as to execute the protocol communication task through each internet access.
8. The system of claim 7, wherein the update unit is configured to:
when the protocol communication task of at least one network port in the preset gateway is determined to stop, a protocol entry pointer of the at least one network port in the network port information table is cleared; and when the network port configuration information is obtained, writing a protocol task entry pointer which specifies protocol matching in the network port configuration information into the network port information table.
9. An internet access configuration device, comprising:
the processor is used for acquiring 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 a protocol task entry pointer matched with a specified protocol 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 the parameters and the protocol entry pointer of at least one network port of a preset gateway; establishing a protocol communication task for each internet access based on the updated function pointer in the internet access information table so as to execute the protocol communication task through each internet access;
and the memory is used for storing the program of the processor for executing the processing procedure.
10. A readable storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least the method of portal configuration as any one of the above.
CN202111002071.1A 2021-08-30 2021-08-30 Network port configuration method, device and system Pending CN113726570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111002071.1A CN113726570A (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 CN113726570A (en) 2021-08-30 2021-08-30 Network port configuration method, device and system

Publications (1)

Publication Number Publication Date
CN113726570A true CN113726570A (en) 2021-11-30

Family

ID=78678890

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113726570A (en)

Cited By (1)

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

Citations (13)

* 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
US20020174244A1 (en) * 2001-05-18 2002-11-21 Telgen Corporation System and method for coordinating, distributing and processing of data
US6591304B1 (en) * 1999-06-21 2003-07-08 Cisco Technology, Inc. Dynamic, scaleable attribute filtering in a multi-protocol compatible network access environment
US20060165116A1 (en) * 2004-11-18 2006-07-27 Bayus Mark S Apparatus, system, and method for adapter port configuration
CN102761538A (en) * 2012-04-27 2012-10-31 南大傲拓科技江苏有限公司 Design management method for communication shared field applied to various communication interface gateways
US20140136648A1 (en) * 2012-11-13 2014-05-15 Hitachi, Ltd. Storage apparatus, network interface apparatus, and storage control method
CN105282019A (en) * 2014-12-29 2016-01-27 中国科学院沈阳自动化研究所 Service-based data gateway configurable method and system
US20170072876A1 (en) * 2015-09-14 2017-03-16 Broadcom Corporation Hardware-Accelerated Protocol Conversion in an Automotive Gateway Controller
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

Patent Citations (13)

* 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
US20020174244A1 (en) * 2001-05-18 2002-11-21 Telgen Corporation System and method for coordinating, distributing and processing of data
US20060165116A1 (en) * 2004-11-18 2006-07-27 Bayus Mark S Apparatus, system, and method for adapter port configuration
CN102761538A (en) * 2012-04-27 2012-10-31 南大傲拓科技江苏有限公司 Design management method for communication shared field applied to various communication interface gateways
US20140136648A1 (en) * 2012-11-13 2014-05-15 Hitachi, Ltd. Storage apparatus, network interface apparatus, and storage control method
CN105282019A (en) * 2014-12-29 2016-01-27 中国科学院沈阳自动化研究所 Service-based data gateway configurable method and system
US20170072876A1 (en) * 2015-09-14 2017-03-16 Broadcom Corporation Hardware-Accelerated Protocol Conversion in an Automotive Gateway Controller
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
孙王强;尹宝娟;周小波;龙威;赵云飞;: "影响安全级网络通信协议确定性的关键要素分析", 自动化博览, no. 01 *

Cited By (2)

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

Similar Documents

Publication Publication Date Title
US8904074B2 (en) Method and apparatus for distributing configuration files in a distributed control system
CN109547306B (en) Intelligent household equipment management method and system, intelligent gateway and server
JP2007164764A (en) Embedding controller and device with data to facilitate up-to-date control and configuration information
JP2004005693A (en) Method and apparatus for correcting device remotely monitored by monitoring system
US10412041B2 (en) Internet protocol (IP) addressing using an industrial control program
CN108733403B (en) BIOS setting method and device
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
CN113726570A (en) Network port configuration method, device and system
CN106130932A (en) network switch system and operation method thereof
CN107566513B (en) Test equipment DOS environmental data acquisition method and system
CN108616391A (en) Method and system for upgrading equipment firmware at server side
CN106791124A (en) The brush machine method and brush machine device of mobile terminal
CN114020400A (en) NoVNC-based remote virtual simulation method, system, device and medium
CN112104576B (en) Resident flow table storage and calibration method of SDN switch
EP3561741A1 (en) Method and apparatus for optimised remote management of programmable logic controllers
CN106411574B (en) Management control method and device
CN112039708A (en) Network equipment operation and maintenance method
CN112083971A (en) Component processing method, device and storage medium
CN111343010B (en) Method and equipment for configuring storage IP network port
CN113867754A (en) Firmware maintenance method, system, equipment and medium
CN113259468A (en) Network equipment configuration method and device
CN209784814U (en) Programmable Logic Controller (PLC) system
CN112910963A (en) Method and system for cross-domain data interaction between local area network and Internet of water treatment equipment
CN108965026A (en) Device updating method, machine set system and unit upgrade-system

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