CN108881521B - Network ID configuration method, device, electronic equipment and storage medium - Google Patents

Network ID configuration method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108881521B
CN108881521B CN201811024402.XA CN201811024402A CN108881521B CN 108881521 B CN108881521 B CN 108881521B CN 201811024402 A CN201811024402 A CN 201811024402A CN 108881521 B CN108881521 B CN 108881521B
Authority
CN
China
Prior art keywords
network
configuration information
functional module
module
current
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
CN201811024402.XA
Other languages
Chinese (zh)
Other versions
CN108881521A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201811024402.XA priority Critical patent/CN108881521B/en
Publication of CN108881521A publication Critical patent/CN108881521A/en
Application granted granted Critical
Publication of CN108881521B publication Critical patent/CN108881521B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects

Abstract

The invention discloses a network ID configuration method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring fixed configuration information of a current functional module in equipment; obtaining variable configuration information of the current functional module; generating a network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in a current local area network. According to the embodiment of the invention, the network ID of the functional module is uniquely identified in the local area network through the fixed configuration information and the variable configuration information of the functional module, so that each functional module in the equipment can automatically acquire the network ID of the functional module, and further the IP address of each functional module can be quickly set in the equipment. And the network ID of the function module can be automatically modified by modifying the variable configuration information of the function module, so that IP address conflict is avoided.

Description

Network ID configuration method, device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to a network communication technology, in particular to a network ID configuration method, a device, electronic equipment and a storage medium.
Background
Along with the development of modern technology, the intelligent degree of banking and financial equipment is higher and higher, and more financial equipment replaces the role of teller. In the present banking website, with the increasing function of the financial device, the function modules in the device are also increasing, and for the requirement of high-speed transmission of multiple data, gigabit ethernet is generally used to connect each function module in the device, so as to form a local area network in the device. The local area network (Local Area Network, LAN) has a problem that a network ID (Identity) is required to be set, and the network ID is used to distinguish different devices or modules in the same local area network, and is a part of an IP (Internet Protocol, network protocol) address, and a manner of dynamically allocating an IP address by using DHCP (Dynamic Host Configuration Protocol ) widely used on PCs (Personal Computer, personal computers) is not suitable for industrial and financial devices, although convenience is provided, because IP conflicts and IP changes often exist, and there is a reliability risk.
Currently, each function module in the financial device will have a default IP, the IP of each function module may be the same, especially the function modules from different manufacturers, if the site of the network site has a fixed IP conflict due to the combination of some function modules, the IP is modified by the corresponding interface on the site. This approach is cumbersome to modify the IP and the rules are relatively arbitrary, possibly requiring re-modification of the IP if the functional module is replaced.
Disclosure of Invention
The invention provides a network ID configuration method, a device, electronic equipment and a storage medium, which enable each functional module in the equipment to automatically acquire the network ID belonging to the equipment, and automatically modify the network ID when the network IDs conflict, so as to avoid the situation that the functional modules cannot work normally due to IP address conflict.
In a first aspect, an embodiment of the present invention provides a network ID configuration method, including:
acquiring fixed configuration information of a current functional module in equipment, wherein the equipment comprises at least two functional modules;
obtaining variable configuration information of the current functional module;
generating a network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in a current local area network.
In a second aspect, an embodiment of the present invention further provides a network ID configuration device, which is applied to each functional module in the device, including:
the device comprises a fixed configuration information acquisition unit, a fixed configuration information acquisition unit and a fixed configuration information processing unit, wherein the fixed configuration information acquisition unit is used for acquiring fixed configuration information of a current functional module in the device, and the device comprises at least two functional modules;
A variable configuration information obtaining unit, configured to obtain variable configuration information of the current functional module;
and the network ID generation unit is used for generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in a current local area network.
In a third aspect, an embodiment of the present invention further provides a network ID configuration device, which is applied to each functional module in a device, including: the device comprises a dial circuit, a gating circuit and a processor;
the dial circuit is connected to the gating circuit and used for providing fixed configuration information of the function module;
the gating circuit is connected to the processor and used for reading the level value of a corresponding pin in the dial circuit according to the control signal of the processor;
the processor is used for acquiring fixed configuration information of the function module through the gating circuit and the dialing circuit, acquiring variable configuration information of the function module, and generating a network ID of the function module according to the fixed configuration information and the variable configuration information;
the network ID of the function module is used for uniquely identifying the function module in the local area network to which the function module belongs.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including: at least two functional modules, each functional module comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the network ID configuration method as described in any embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements a network ID configuration method according to any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the network ID of the functional module is obtained through the fixed configuration information and the variable configuration information of the functional module, so that each functional module in the equipment can automatically acquire the network ID of the functional module, and the IP address of each functional module can be quickly set in the equipment. And when the network IDs conflict, the network ID of the functional module can be automatically modified by modifying the variable configuration information of the functional module, so that the condition that the functional module cannot work normally due to IP address conflict is avoided.
Drawings
Fig. 1 is a flowchart of a network ID configuration method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a network ID configuration method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus according to a second embodiment of the present invention;
fig. 4 is a flowchart of a network ID configuration method according to a third embodiment of the present invention;
fig. 5 is a block diagram of a network ID configuration device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a network ID configuration device according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention;
fig. 8 is a circuit schematic diagram of a dialing circuit according to a sixth embodiment of the present invention;
FIG. 9 is a schematic circuit diagram of a gating circuit according to a seventh embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an eighth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
The network ID configuration scheme provided by the embodiment of the invention mainly configures different network IDs for each function module (i.e., each function module has its own processor) in the same local area network, for example, each function module in a financial device: a bank card reading module, an identity authentication module, a banknote receiving module and the like. The functional modules may be connected or disconnected according to the functions implemented by the functional modules. In the embodiment of the invention, the network ID of the functional module is a unique network identifier of the functional module in the local area network to which the functional module belongs, and the network ID comprises at least one byte and at most three bytes. The network ID may be used as part of the IP address to distinguish between different modules or devices, and may be used as the 4 th byte of the IP address, or may be used as the 3 rd byte and the 4 th byte of the IP address, etc. according to different IP address types. For example, the IP address of the functional module is 192.168.1.X, where x represents the network ID of the functional module. The embodiment of the invention can ensure that the network IDs of the functional modules are different by automatically configuring the network IDs of the different functional modules in the same local area network so as to avoid the IP address conflict of the functional modules and ensure that the functional modules in the same local area network have effective available IP addresses.
Example 1
Fig. 1 is a flowchart of a network ID configuration method according to an embodiment of the present invention, where the embodiment is applicable to a case of configuring network IDs for functional modules in the same lan, and particularly, a case of configuring different network IDs for different functional modules belonging to the same lan in a financial device, the method may be performed by a network ID configuration device, and the device may be implemented by software and/or hardware, and the device may be integrated in a processor of the functional modules. As shown in fig. 1, the method specifically includes the following steps:
step 110, obtaining fixed configuration information of a current functional module in equipment, wherein the equipment comprises at least two functional modules.
The device in the embodiment of the invention is a device comprising at least two mutually independent functional modules, wherein each functional module is provided with a processor and can independently realize the functions of the device, such as financial devices of a bank self-service deposit and withdrawal machine and the like.
The fixed configuration information is a part of the network ID of the functional module, each functional module has its own fixed configuration information, and the fixed configuration information is fixed for each functional module. The fixed configuration information may be set at the time of shipment of the functional module. Specifically, the fixed configuration information can be stored in the memory of the functional module in the form of binary data, and when the network ID of the functional module needs to be configured, the corresponding fixed configuration information can be directly read from the memory; the fixed configuration information may also be stored in a hardware circuit of the functional module, and when the network ID of the functional module needs to be configured, the corresponding fixed configuration information may be read through the hardware circuit.
A functional module may be provided with at least one fixed configuration information, at most three fixed configuration information. The number of the fixed configuration information of one functional module is equal to the number of bytes contained in the network ID, that is, each byte contained in the network ID corresponds to the fixed configuration information. For example, the network ID contains two bytes, and each byte corresponds to a fixed configuration information. For the same functional module, the fixed configuration information corresponding to different bytes of the network ID may be the same or different.
Considering that IP addresses of bytes 4 of 0 and 1 (e.g., 192.168.0.0 and 192.168.0.1) are generally of fixed use, such network IDs are not assigned to functional modules. The fixed configuration information may be a binary number with at least two bits, and the specific number of bits may be set according to the actual configuration requirement (such as the number of functional modules that need to be distinguished in the local area network), for example, if the fixed configuration information is a binary number with 6 bits, 64 functional modules may be distinguished, excluding 0 and 1 from being usable, and 62 different functional modules may be supported.
Step 120, obtaining variable configuration information of the current functional module.
Wherein the variable configuration information is a part of the network ID of the function module, and the variable configuration information is used for adjusting the network ID when the network ID conflicts. Preferably, the variable configuration information is a binary number of at least 2 bits to ensure redundancy in adjusting the network ID. The variable configuration information may use an initial default value when the network ID is initially generated, and may be modified to obtain a new network ID when a change in the network ID is required (e.g., a collision occurs in the network ID) to avoid the collision. Under the condition that the variable configuration information of each functional module adopts the same initial default value, the essence of the conflict of the network ID is that the fixed configuration information is the same, and the fixed configuration information of each functional module produced by the same manufacturer generally cannot have the conflict, so that the variable configuration information is generally not required to be modified to avoid the conflict when no special peripheral exists; if there are functional modules produced by different manufacturers in the same LAN, the network IDs may have conflicts, so that the network IDs can be updated by modifying the variable configuration information of the functional modules to avoid the conflicts.
The variable configuration information may be set at the time of shipment of the functional module. The initial default value of the variable configuration information can be stored in the memory of the functional module in the form of binary data, and when the network ID of the functional module needs to be configured, the corresponding variable configuration information can be directly read from the memory. In addition, the modification rule of the variable configuration information may also be stored in the memory of the functional module. The variable configuration information can be set by each functional module according to the same rule, namely, the initial default value and the modification rule of the variable configuration information of each functional module are the same.
The number of the variable configuration information used by one functional module is equal to the number of bytes contained in the network ID, for example, the network ID contains two bytes, and each byte respectively corresponds to one variable configuration information, and the initial value of the variable configuration information used by each byte is the same, and the modification rule is the same. For example, the fixed configuration information is a 6-bit binary number, excluding 0 and 1 from being available, 62 different functional modules can be supported, the variable configuration information is a 2-bit binary number, 4 different values can be changed, and the IP collision can be completely avoided by adding 2-bit variable configuration information to the 6-bit fixed configuration information.
And 130, generating a network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in a current local area network.
The current local area network refers to the local area network to which the current functional module belongs. The network ID of a functional module is used to uniquely identify the functional module within the local area network to which it belongs, so as to distinguish from other functional modules within the local area network.
In the embodiment of the invention, the relationship among the local area network, the equipment and the functional modules is described as follows: a local area network can be formed in a single device, and each functional module in the device belongs to the local area network; a plurality of devices within a certain geographical range may also together form a local area network to which each functional module within each device belongs.
Taking a financial device as an example, in an application scenario, a local area network is formed in each financial device of a banking website, that is, different financial devices belong to different local area networks, so that each functional module in the same financial device needs to be configured with different network IDs, while the network IDs of the functional modules belonging to different financial devices may be the same, because the functional modules do not belong to the same local area network, even if the network IDs are the same, the IP addresses are different, and no IP address collision occurs. For example, banking sites include financial devices A, B and C, and the function modules A1-A4 in the financial device a belong to the same local area network, and network IDs of the function modules A1-A4 need to be configured differently to ensure that IP addresses of the function modules A1-A4 formed based on the local area network identifiers and the network IDs are different; the network IDs of the function module A1 in the financial device a and the function module B1 in the financial device B may be the same, because the financial device a and the financial device B belong to different local area networks, and even if the network IDs are the same, the IP addresses constituting the function modules based on the local area network identifications and the network IDs are different.
In another application scenario, a plurality of or all financial devices at a banking website form a local area network together, so that each functional module of each financial device in the local area network needs to be configured with different network IDs to ensure that the IP addresses of the functional modules are different, and avoid IP address collision.
Optionally, generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information includes: and taking the fixed configuration information as the low order of the network ID, and taking the variable configuration information as the high order of the network ID to obtain the network ID of the current functional module. The variable configuration information is used as high order, so that modification is facilitated.
The network ID of the functional module is formed by the fixed configuration information and the variable configuration information together, and as described above, the network ID includes at least one byte.
If the network ID includes one byte, the fixed configuration information is regarded as the low order of the network ID, and the variable configuration information is regarded as the high order of the network ID, for example, the fixed configuration information is a 6-bit binary number (low 6 bits), and the variable configuration information is a 2-bit binary number (high 2 bits); as another example, the fixed configuration information is a 5-bit binary number (lower 5 bits) and the variable configuration information is a 3-bit binary number (upper 3 bits).
If the network ID includes two or three bytes, the fixed configuration information and the variable configuration information may be divided according to an overall number of bits, for example, taking two bytes as an example, a total of 16 bits of binary numbers, the variable configuration information being the upper 8 bits (i.e., the first byte) of the network ID, the fixed configuration information being the lower 8 bits (i.e., the second byte) of the network ID; as another example, the variable configuration information is the upper 4 bits of the network ID and the fixed configuration information is the lower 12 bits of the network ID. Alternatively, the fixed configuration information and the variable configuration information may be divided into a number of bits in each byte in units of bytes, that is, each byte includes the variable configuration information and the fixed configuration information, and the number of bits of the fixed configuration information and the variable configuration information in each byte may be the same or different, in which case, the fixed configuration information and the variable configuration information corresponding to each byte need to be obtained. For example, taking two bytes as an example, two fixed configuration information and two corresponding variable configuration information are obtained, one fixed configuration information and the corresponding variable configuration information are combined to obtain one byte, the two bytes together form a network ID, the fixed configuration information corresponding to the first byte is a 6-bit binary number (low 6 bits), the variable configuration information corresponding to the first byte is a 2-bit binary number (high 2 bits), the fixed configuration information corresponding to the second byte is also used as the low 6 bits of the byte, and the variable configuration information is used as the high 2 bits of the byte.
In addition, the function module also stores preset IP information (namely local area network identification), the preset IP information is used for uniquely identifying the local area network, and the preset IP information and the network ID jointly form an IP address of the function module. The preset IP information can be stored in the memory of the functional module, when the IP address of the functional module needs to be set, the corresponding preset IP information can be directly read from the memory, and the network ID of the functional module obtained through the method is combined to obtain the IP address of the functional module. The preset IP information includes at least one byte and at most three bytes, and may be specifically set by using a default value or according to actual requirements (for example, a bank requires a special network segment), for example, the preset IP information is 192.168.1, the network ID is 15, and then the IP address of the functional module is 192.168.1.15; for another example, if the preset IP information is 192.168 and the network ID is 1.15, the IP address of the functional module is 192.168.1.15.
Illustratively, the network ID is the 4 th byte of the IP address, i.e., the network ID is an 8-bit binary number, and when the network ID is configured, the fixed configuration information is the low order, the variable configuration information is the high order, and the network ID is obtained by combining, for example, the fixed configuration information is a 6-bit binary number 000110, the variable configuration information is a 2-bit binary number (initial default value of 00), and the network ID is obtained as an 8-bit binary number 00000110, which is converted into a decimal number of 6. For another example, the network ID is the 3 rd byte and the 4 th byte of the IP address, that is, the network ID is two 8-bit binary numbers, when the network ID is configured, two fixed configuration information (M1 is 00110, N1 is 00111) and two corresponding variable configuration information (M2 and N2 are all default to 000) are acquired, the combination of M1 and M2 results in the 3 rd byte being 00000110, the combination of N1 and N2 results in the 4 th byte being 00000111, and the two bytes together form the network ID, and the decimal representation is 6.7.
Each functional module needing to be configured with the network ID executes the process to obtain the network ID of each functional module. If the network IDs of the functional modules in the same local area network have conflicts, the network ID of the functional module can be updated by modifying the variable configuration information of the conflicting functional module so as to avoid the conflicts.
According to the technical scheme of the embodiment, the network ID of the functional module is obtained through the fixed configuration information and the variable configuration information of the functional module, so that each functional module in the equipment can automatically acquire the network ID of the functional module, and further the IP address of each functional module can be quickly set in the equipment. And when the network IDs conflict, the network ID of the functional module can be automatically modified by modifying the variable configuration information of the functional module, so that the condition that the functional module cannot work normally due to IP address conflict is avoided.
In addition, in the prior art, each functional module in the device is respectively provided with a BOOT program of the functional module, the BOOT program is used for guiding and upgrading the corresponding application program, the BOOT program of the functional module is written with the IP address (fixed) corresponding to the functional module in advance, and the application program with the corresponding function is networked and downloaded according to the IP address. In the embodiment of the invention, the IP address of the functional module does not need to be written in advance, so that each functional module in the same equipment can share a BOOT guide program, the function of the BOOT guide program is to acquire the network ID of the functional module through the fixed configuration information and the variable configuration information of the functional module, further the IP address of the functional module is obtained, and the application program of the corresponding function is upgraded according to the IP address. And each functional module in the same equipment shares one BOOT guide program, so that the software version is reduced, the software development is convenient, a plurality of BOOT guide programs are not required to be burnt when the functional modules are produced, and the material management cost is reduced.
On the basis of the above technical solution, optionally, after generating the network ID of the current functional module, the current functional module may be restarted to validate the IP address of the current functional module, where the IP address of the current functional module includes the network ID of the current functional module.
Example two
The present embodiment provides a method for processing a network ID collision based on the above embodiments. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated.
After generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, the method further comprises: receiving conflict indication information sent by an industrial control module in the equipment, wherein the conflict indication information is used for indicating that the network ID of the current functional module conflicts with the network IDs of other functional modules in the current local area network; and modifying the variable configuration information according to the conflict indication information and a preset rule to update the network ID of the current functional module.
Optionally, after generating the network ID of the current functional module or updating the network ID of the current functional module, the method further includes: restarting the current functional module to enable the IP address of the current functional module to be effective, wherein the IP address of the current functional module comprises the network ID of the current functional module.
Fig. 2 is a flowchart of a network ID configuration method according to a second embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step 210, obtaining fixed configuration information of a current functional module in the device.
Step 220, obtaining variable configuration information of the current functional module.
And step 230, generating a network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in the current local area network.
And 240, restarting the current functional module to enable the IP address of the current functional module to be effective.
Step 250, the industrial control module in the device determines whether the network ID of the current functional module conflicts with the network IDs of other modules in the current local area network, if so, step 260 is executed, and if not, step 270 is executed.
The industrial control module is positioned in the equipment and is a core control component of the equipment and is respectively connected with each functional module in the equipment so as to call different functional modules. Specifically, in the same LAN, the industrial control module may exchange data with each functional module through the switch module, as shown in fig. 3. After each functional module in the equipment determines the network ID, the network ID or the IP address is sent to the industrial control module so as to carry out conflict judgment.
For each functional module in the same local area network, the bytes in the IP address for identifying the local area network are the same, and the network IDs are different, so that whether the network IDs of the functional modules have conflicts is judged, and whether the IP addresses of the functional modules have conflicts can be known.
In step 260, the industrial control module sends conflict indication information to the current functional module, where the conflict indication information is used to indicate that the network ID of the current functional module conflicts with the network IDs of other functional modules in the current local area network. The current function module modifies its variable configuration information according to the conflict indication information and the preset rule to update its network ID.
The preset rule may be set according to actual situations, and preferably, the preset rule may be: and performing a 1-up operation on the variable configuration information. For example, the initial default value of the variable configuration information is 00, the fixed configuration information is 000010, i.e. the network ID is 2, and when the variable configuration information can be modified to 01 in the event of a collision, the modified network ID is 01000010, and the decimal value is 66, so that the collision is avoided.
Step 270, the current functional module works normally.
In the prior art, after a functional module is replaced by a functional module with a fixed IP and an IP modified, the replaced functional module is not available due to unclear IP. According to the technical scheme, the variable configuration information is modified according to the preset rule, the modification of the variable configuration information is tracked, even if the network ID is updated, the network ID corresponding to the functional module can be found through the preset rule, the IP address of the network ID can be further determined, the problem that the network of the functional module cannot be used is avoided, and the network ID corresponding to the functional module can be found smoothly in the subsequent maintenance. Illustratively, the variable configuration information is a 2-bit binary number, and for a replaced function module, the current network ID of the function module can be determined up to four times.
Example III
The present embodiment provides a specific implementation manner of obtaining fixed configuration information based on the above embodiments. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated. In this embodiment, the value of the corresponding pin in the dialing circuit in the current functional module can be sequentially read through the gating circuit in the current functional module, so as to obtain the fixed configuration information.
Specifically, obtaining fixed configuration information of a current functional module in the device includes: outputting a control signal to control a gating circuit in the current functional module to sequentially read the level value of a corresponding pin in a dial circuit in the current functional module according to the control signal; receiving the level value output by the gating circuit; and arranging the received level values in sequence to obtain the fixed configuration information.
Fig. 4 is a flowchart of a network ID configuration method according to a third embodiment of the present invention, as shown in fig. 4, the method includes the following steps:
and 410, outputting a control signal to control a gating circuit in the current functional module to sequentially read the level values of corresponding pins in a dial circuit in the current functional module according to the control signal.
Step 420, receiving a level value output by the gating circuit.
And 430, arranging the received level values in sequence to obtain the fixed configuration information of the current functional module.
In this embodiment, the fixed configuration information is stored by the level value of the pin of the dial circuit in the functional module. Different control signal values correspond to reading different pins, for example, the control signal value is 1, and then the level value of the pin with the number of 1 is read. Specifically, according to the corresponding relation between each pin and each bit value in the fixed configuration information, the level values of each pin can be sequentially arranged, so that the fixed configuration information is obtained.
Step 440, obtaining variable configuration information of the current functional module.
And step 450, generating a network ID of the current function module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current function module is used for uniquely identifying the current function module in a current local area network.
If the network ID comprises a byte, a dial circuit and a gating circuit are arranged in the functional module. If the network ID includes two bytes, according to the bit division manner of the fixed configuration information and the variable configuration information, a dial circuit (which stores the fixed configuration information) and a gating circuit may be set in the functional module, or two dial circuits (which stores two fixed configuration information corresponding to two bytes respectively) and a gating circuit may be set in the functional module. If the network ID includes three bytes, according to the bit division manner of the fixed configuration information and the variable configuration information, a dial circuit (which stores the fixed configuration information) and a gating circuit may be set in the functional module, or three dial circuits (which stores three fixed configuration information corresponding to the three bytes respectively) and a gating circuit may be set in the functional module.
According to the technical scheme, the fixed configuration information is stored through the level value of the pin of the dial circuit in the functional module, and the pin level value is read through the gating circuit, so that the fixed configuration information of the functional module is obtained in sequence, the method is simple, easy to realize and low in hardware cost.
Example IV
The present embodiment provides a network ID configuration device, which may be installed in a processor of each independent functional module in a device, where the independent functional modules belong to the same local area network, for example, a bank card reading module, an identity authentication module, and the like in a financial device. The device can implement the network ID configuration method described in the above embodiments, and configure a network ID for the functional module to which the device belongs. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated.
Fig. 5 is a block diagram of a network ID configuration device according to a fourth embodiment of the present invention, as shown in fig. 5, where the device includes:
a fixed configuration information obtaining unit 510, configured to obtain fixed configuration information of a current functional module in a device, where the device includes at least two functional modules;
a variable configuration information obtaining unit 520, configured to obtain variable configuration information of a current function module;
And a network ID generating unit 530, configured to generate a network ID of the current functional module according to the fixed configuration information and the variable configuration information, where the network ID of the current functional module is used to uniquely identify the current functional module in a current local area network.
Optionally, the apparatus further includes:
the information receiving unit is used for receiving conflict indication information sent by an industrial control module in the equipment after generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the conflict indication information is used for indicating that the network ID of the current functional module conflicts with the network IDs of other functional modules in the current local area network;
and the network ID updating unit is used for modifying the variable configuration information according to the conflict indication information and preset rules so as to update the network ID of the current functional module.
Optionally, the network ID updating unit is specifically configured to: and executing the 1 adding operation on the variable configuration information.
Optionally, the apparatus further includes: and the restarting unit is used for restarting the current functional module after generating the network ID of the current functional module or updating the network ID of the current functional module so as to enable the IP address of the current functional module to be effective, wherein the IP address of the current functional module comprises the network ID of the current functional module.
Optionally, the fixed configuration information acquiring unit 510 includes:
the signal output subunit is used for outputting a control signal to control the gating circuit in the current functional module to sequentially read the level value of the corresponding pin in the dialing circuit in the current functional module according to the control signal;
a level value receiving subunit, configured to receive a level value output by the gating circuit;
and the fixed configuration information acquisition subunit is used for sequentially arranging the received level values to obtain the fixed configuration information.
Optionally, the network ID generation unit 530 is specifically configured to: and taking the fixed configuration information as the low order of the network ID, and taking the variable configuration information as the high order of the network ID to obtain the network ID of the current functional module.
The network ID configuration device provided by the embodiment of the invention can execute the network ID configuration method provided by any embodiment of the invention, and has the corresponding functional units and beneficial effects of the execution method. Technical details not described in detail in this embodiment may refer to the network ID configuration method provided in any embodiment of the present invention.
Example five
The present embodiment provides a network ID configuration device, which may be installed in each independent functional module in a device, where the independent functional modules belong to the same local area network, for example, a bank card reading module, an identity authentication module, etc. in a financial device. The device can implement the network ID configuration method described in the above embodiments, and configure a network ID for the functional module to which the device belongs. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated.
Fig. 6 is a schematic structural diagram of a network ID configuration device according to a fifth embodiment of the present invention, as shown in fig. 6, where the device includes: a dial circuit 10, a gating circuit 20 and a processor 30.
The dial circuit 10 is connected to the strobe circuit 20 for providing fixed configuration information of the associated functional module. Wherein the dialing circuit 10 embodies different level values through different dialing positions.
The gating circuit 20 is connected to the processor 30 and is used for reading the level value of the corresponding pin in the dial circuit 10 according to the control signal of the processor 30.
The processor 30 is configured to obtain fixed configuration information of the function module through the gating circuit 20 and the dialing circuit 10, obtain variable configuration information of the function module, and generate a network ID of the function module according to the fixed configuration information and the variable configuration information. Wherein the network ID of the functional module is used to uniquely identify the functional module within the local area network to which the functional module belongs.
According to the technical scheme, the gating circuit and the dialing circuit are added in the functional module, the fixed configuration information of the functional module is stored through the level value of the pin of the dialing circuit, and the pin level value is read through the gating circuit, so that the fixed configuration information of the functional module is obtained in sequence, and the method is simple and easy to realize, and low in hardware cost. The network ID of the functional module is obtained through the fixed configuration information and the variable configuration information of the functional module, so that each functional module in the equipment can automatically acquire the network ID of the functional module, and the IP address of each functional module can be quickly set in the equipment. And when the network IDs conflict, the network ID of the functional module can be automatically modified by modifying the variable configuration information of the functional module, so that the condition that the functional module cannot work normally due to IP address conflict is avoided.
If the network ID comprises a byte, a dial circuit and a gating circuit are arranged in the functional module. If the network ID includes two bytes, according to the bit division manner of the fixed configuration information and the variable configuration information, a dial circuit (storing the fixed configuration information) and a gating circuit may be set in the functional module, or two dial circuits (respectively storing two fixed configuration information corresponding to the two bytes) and a gating circuit may be set in the functional module, where the gating circuit is respectively connected to the two dial circuits, and is configured to sequentially read the level values of corresponding pins in the two dial circuits according to the control signal of the processor. If the network ID includes three bytes, according to the bit division manner of the fixed configuration information and the variable configuration information, a dial circuit (which stores the fixed configuration information) and a gating circuit may be set in the functional module, or three dial circuits (which stores three fixed configuration information corresponding to the three bytes respectively) and a gating circuit may be set in the functional module, where the gating circuit is connected to the three dial circuits respectively, and is configured to sequentially read the level values of corresponding pins in the three dial circuits according to the control signal of the processor.
In one embodiment, referring to fig. 7 (fig. 7 illustrates the structure of processor 30 by taking function module 1 as an example), apparatus 100 includes N independent function modules, where each function module may be connected or disconnected according to the function implemented by each function module. The network ID configuration device shown in fig. 6 is installed in each functional module, and is used for configuring the network ID for the corresponding functional module. The processor 30 of each functional module within the device 100 is connected to an industrial control module 40 within the device 100. The processor 30 includes: a receiving unit 31 and a processing unit 32.
The receiving unit 31 is connected to the industrial control module 40, and is configured to receive conflict indication information sent by the industrial control module 40, where the conflict indication information is used to indicate that a network ID of a functional module to which the conflict indication information belongs conflicts with network IDs of other functional modules in the same local area network. And a processing unit 32, connected to the receiving unit 31 and the industrial control module 40, for modifying the variable configuration information according to the conflict indication information and a preset rule, so as to update the network ID of the function module to which the variable configuration information belongs.
After the processor 30 generates the network ID of the function module or after the processing unit 32 updates the network ID of the function module, the network ID is transmitted to the industrial control module 40, so that the industrial control module 40 determines whether the network ID conflicts with the network IDs of other function modules in the same local area network. In practical applications, the industrial control module 40 may also be connected to each functional module through a switch module, and perform data exchange. Specifically, the preset rule may be to perform a 1-up operation on the variable configuration information.
In the embodiment, the variable configuration information is modified according to the preset rule, the modification of the variable configuration information is tracked, and even if the network ID is updated, the network ID corresponding to the functional module can be found through the preset rule, so that the IP address of the functional module is determined, and the problem that the network of the functional module cannot be used is avoided. Illustratively, the variable configuration information is a 2-bit binary number, and for a replaced function module, the current network ID of the function module can be determined up to four times.
Optionally, the processor 30 may also control the function module to restart after generating the network ID of the function module to which the function module belongs or updating the network ID of the function module to which the function module belongs, so as to validate the IP address of the function module.
Example six
The present embodiment provides an implementation manner of a dial circuit based on the above embodiments. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated.
The dialing circuit 10 includes: the dial switch comprises at least two mutually independent keys, each key corresponds to two pins, the two pins are turned ON to an ON end, the two pins are turned ON to an OFF end, and the two pins are turned OFF. Each pin of the first side of the dial switch is grounded, each pin of the second side is connected to one end of a corresponding pull-up resistor and is correspondingly connected to a parallel data pin of the gating circuit, and the other end of each pull-up resistor is connected with a power supply voltage.
For example, if a certain key is disconnected, the key cannot be grounded, the circuit corresponding to the key does not form a loop, the voltage at the pin of the key connected to the gating circuit is the power supply voltage, and the voltage is represented as high level 1; if a certain key is closed, the circuit corresponding to the key forms a loop, the pull-up resistor is divided, the voltage of the pull-up resistor is the power supply voltage, the voltage of the pin of the key connected to the gating circuit is 0V, and the voltage is represented as low level 0.
The resistance of the pull-up resistor is an empirical value and can be selected according to actual conditions.
The number of keys included in the dial switch may be specifically determined according to the number of functional modules in the same lan, where the number of functional modules needs to be configured with a network ID, and the number of digits of fixed configuration information and variable configuration information in the network ID, for example, the network ID configuration needs generally not to exceed 8 functional modules, and the dial switch includes at least 3 keys that are independent of each other, because 3 binary numbers can distinguish 8 functional modules, that is, the fixed configuration information is set to be at least 3 binary numbers.
In addition, in the dial switch, a module version indication bit may be set, which is used to indicate version information of the function module to which the dial switch belongs, where the module version indication bit is at least one bit, or may be more bits. For example, with the development of technology and the increase of requirements for security, rapidity, etc. of functional modules, the same functional module may develop different versions, which may have different operating mechanisms, but the functions are the same, for example, a bank card reading module, which is used for reading a bank card, but the reading speeds of the bank card reading modules of different versions may be different. For the whole machine (i.e. the financial equipment to which the functional module belongs), the same functional module of different versions is not used at the same time, so the same network ID can be used by the same functional module of different versions, i.e. the setting of the dial position of the dial switch for providing the fixed configuration information in the same functional module of different versions can be the same. The device needs to identify that a specific version of a certain functional module is used, e.g. 00 for a first version, 01 for a second version, etc.
Referring to fig. 8, which is a schematic diagram of a dial circuit, fig. 8 takes an 8-bit dial switch (SW 1, including 8 keys, model number JS0408FP 4-R) as an example, wherein 6 keys represent fixed configuration information (num 1-num 6), 2 keys are used to indicate module version information (num 7 and num 8), 8 pins on the left side of the 8-bit dial switch are grounded, 8 pins on the right side (soc_id0 to soc_id5 and soc_sec6, soc_sec 7) are respectively connected to one end of a corresponding pull-up resistor (R1-R8) and correspond to parallel data pins (see D0-D7 of fig. 9) connected to a gating circuit, and the other end of each pull-up resistor is connected to a power supply voltage VCC. In FIG. 8, the power supply voltage is 3.3V, and the resistance of the pull-up resistors R1-R8 is 4.7kΩ.
Pins SOC_ID0 through SOC_ID5 are used for providing 6-bit fixed configuration information, and SOC_SEC6 and SOC_SEC7 are used for indicating module version information. Taking num1 as an example, if num1 is disconnected, the left side is not grounded, a circuit connected with num1 does not form a loop, the voltage of a pin soc_id0 (also called a sampling point) is 3.3V, and the voltage is represented as high level 1; if num1 is closed, the left side is grounded, the circuit connected with num1 forms a loop, the voltage of R1 is 3.3V, the voltage of the sampling point is 0V, and the voltage is represented as low level 0.
Example seven
The present embodiment provides one implementation of the gating circuit based on the above embodiments. The same or corresponding terms as those of the above embodiments are explained, and the present embodiment will not be repeated.
The gating circuit 20 includes: a gating chip, the gating chip comprising: a serial output pin, at least one address selection pin, and at least two parallel data pins.
The at least one address selection pin is respectively connected to at least one output pin of the processor. The address selection pin is used for receiving a control signal output by the output pin of the processor so as to read the level value of the corresponding parallel data pin according to the specific value of the control signal. For example, if the value of the control signal is 1, the level value of the parallel data pin with the number of 1 is read. The number of address selection pins may be determined according to the number of parallel data pins used, for example, 3 parallel data pins are used, the number of address selection pins may be 2, and reading of 3 parallel data pins may be indicated by any three values in control signals 00, 01, 10, 11, respectively.
At least two parallel data pins are connected in turn to corresponding pins on the second side of the dial switch. The number of parallel data pins used for gating the chip is the same as the number of keys in the dial circuit that provide fixed configuration information.
The serial output pin is connected to the serial input pin of the processor and is used for outputting the level value of the read parallel data pin to the serial input pin of the processor in sequence.
At least one output pin of the processor is used for outputting a control signal to the gating circuit; the serial input pin of the processor is used for receiving the level value output by the gating circuit so as to orderly arrange the received level value to obtain fixed configuration information.
The gating circuit can read the level values of at least two parallel data pins by using at least one address selection pin, and the function of the gating circuit can be understood as converting parallel data into serial data. And the fixed configuration information provided by the dial-up circuit is read through the gating circuit, so that the number of IO pins of the used functional module processor can be saved. For example, the processor can read the level value of the 4-bit dial switch by using two output pins and one serial input pin; if the strobe chip is not used, the processor needs to use 4 pins to read the level value of the 4-bit dial switch.
In addition, the strobe chip generally has the following pins: the ground pin is used for grounding, the power supply pin is used for connecting with power supply voltage, and the enabling pin is grounded to inhibit enabling. It should be noted that, if the strobe chip includes pins that are not needed in other embodiments of the present invention, any connection setting may not be performed on the pins, so as to avoid affecting the functions of the strobe chip in implementing the embodiments of the present invention.
Referring to fig. 9, which is a schematic diagram of the gating circuit, fig. 9 takes an 8-way gating chip (U1, model SN74HC151 PWR) as an example. The serial output pin (Y) of the strobe chip is connected to the serial input pin (ps_boot_id) of the processor through an impedance matching resistor (R9), where R9 is used to improve signal quality, and its resistance is typically an empirical value, for example, 33 Ω in fig. 9. The 3 address select pins (A, B and C) are connected to the 3 output pins (PS_BOOT_SELA, PS_BOOT_SELB and PS_BOOT_SELC) of the processor, respectively. The 8 parallel data pins (D0 to D7) are connected to soc_id0 to soc_id5 and soc_sec6, soc_sec7, respectively, in the dialing circuit shown in fig. 8. The ground pin (GND) is grounded. The power supply pin (VDD) is connected with a power supply voltage of 3.3V, the VDD is also grounded through a filter capacitor (C1), the C1 is used for filtering and decoupling, the influence of power supply fluctuation on a gating chip is reduced, the power supply quality is improved, and the value of the C1 in figure 9 is taken100nF. Output pin) The output of (c) is opposite to Y, and this pin is not used in this embodiment. Enable pin (+)>) Grounded to inhibit enabling.
Based on the gating circuit shown in fig. 9 and the dialing circuit shown in fig. 8, the processor outputs binary numbers through 3 output pins (ps_boot_sela, ps_boot_selb, and ps_boot_selc) to obtain different combination codes corresponding to different control signals to read corresponding level values in the dialing circuit through parallel data pins corresponding to the control signals. For example, the control signal given by the processor is 000, the corresponding data pin is D0, then Y is conducted with D0, the level value corresponding to D0 is read and output to the serial input pin (ps_boot_id) of the processor, thus, the processor sequentially gives 8 control signals, and can sequentially read 8 level values in the dial circuit, wherein the level values corresponding to D0-D5 are sequentially combined to obtain the fixed configuration information of the functional module, and the level values corresponding to D6 and D7 can indicate the version information of the module. Through the gating circuit shown in fig. 9, 4 IO pins of the processor can be expanded to be capable of identifying 8-bit dial data by using the 8-path gating chip, so that IO interfaces are saved.
If the network ID includes one byte, a dial circuit and a strobe circuit may be provided in the functional module.
If the network ID includes two bytes, two dial circuits (respectively storing two fixed configuration information corresponding to the two bytes) and a strobe circuit may be set in the functional module, parallel data pins of the strobe circuit are respectively connected to corresponding pins of the two dial circuits, and level values of corresponding pins in the two dial circuits are sequentially read according to a control signal of the processor. Taking the circuits shown in fig. 8 and 9 as examples, a dial switch SW2 is added, and the connection and the structure of the dial switch SW2 are similar to those of SW1, and are not repeated; when the pins A, B, C of the selector circuit sequentially give values of 0-5 for the first time, the pins Y sequentially read the level values of the corresponding pins of the dial switch SW1 to obtain fixed configuration information corresponding to the 1 st byte; when the pins A, B, C sequentially give the values of 0-5 for the second time, the pins Y sequentially read the level values of the corresponding pins of the dial switch SW2, and fixed configuration information corresponding to the 2 nd byte is obtained.
If the network ID comprises three bytes, three dial circuits (respectively storing three fixed configuration information corresponding to the three bytes) and a gating circuit are arranged in the functional module, parallel data pins of the gating circuit are respectively connected to corresponding pins of the three dial circuits, and level values of corresponding pins in the three dial circuits are sequentially read according to control signals of the processor. For specific implementation, reference may be made to the description above for the network ID including two bytes, which is not repeated here.
Example eight
The embodiment also provides an electronic device including at least two functional modules, the at least two functional modules being independent of each other, each functional module including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the network ID configuration method as described in any embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device according to an eighth embodiment of the present invention, and as shown in fig. 10, the electronic device 200 includes at least two functional modules, each of which includes: a processor 101 and a memory 102, and an input device 103 and/or an output device 104; the number of processors 101 in the electronic device may be one or more, one processor 101 being taken as an example in fig. 10; the processor 101, memory 102, input device 103, and output device 104 in the electronic device may be connected by a bus or other means, for example by a bus connection in fig. 10.
The memory 102 is a computer-readable storage medium, and may be used to store a software program, a computer-executable program, and modules, such as program instructions/modules corresponding to the network ID configuration method in the embodiment of the present invention (for example, the fixed configuration information acquisition unit 510, the variable configuration information acquisition unit 520, and the network ID generation unit 530 in the network ID configuration device). The processor 101 executes various functional applications of the electronic device and data processing by executing software programs, instructions, and modules stored in the memory 102, i.e., implements the network ID configuration method described above.
The memory 102 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 102 may further include memory located remotely from processor 101, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 103 may be used to receive input information (e.g., numbers or characters) or objects and to generate key signal inputs related to user settings and function control of the electronic device, such as a keyboard of an interactive module within the financial device, a card slot of a bank card reading module, etc. The output device 104 is used for outputting information or objects, such as a display screen of an interaction module in the financial device, a bill passageway of a bill collecting module, and the like.
Optionally, the electronic device may further include: the industrial control module is respectively connected to each functional module in the electronic equipment and is used for judging whether the network ID of the current functional module conflicts with the network IDs of other functional modules in the local area network to which the current functional module belongs, and sending conflict indication information to the current functional module under the condition of conflict.
Example nine
The ninth embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a network ID configuration method according to any embodiment of the present invention.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A network ID configuration method, comprising:
acquiring fixed configuration information of a current functional module in equipment, wherein the equipment comprises at least two functional modules;
obtaining variable configuration information of the current functional module;
generating a network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the network ID of the current functional module is used for uniquely identifying the current functional module in a current local area network;
after generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, the method further comprises:
Receiving conflict indication information sent by an industrial control module in the equipment, wherein the conflict indication information is used for indicating that the network ID of the current functional module conflicts with the network IDs of other functional modules in the current local area network;
modifying the variable configuration information according to the conflict indication information and a preset rule to update the network ID of the current functional module;
obtaining fixed configuration information of a current functional module in equipment comprises the following steps:
outputting a control signal to control a gating circuit in the current functional module to sequentially read the level value of a corresponding pin in a dial circuit in the current functional module according to the control signal;
receiving the level value output by the gating circuit;
the received level values are arranged in sequence to obtain the fixed configuration information;
generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, including:
and taking the fixed configuration information as the low order of the network ID, and taking the variable configuration information as the high order of the network ID to obtain the network ID of the current functional module.
2. The method according to claim 1, further comprising, after generating the network ID of the current functional module or updating the network ID of the current functional module:
Restarting the current functional module to enable the IP address of the current functional module to be effective, wherein the IP address of the current functional module comprises the network ID of the current functional module.
3. A network ID configuration apparatus applied to each functional module in a device, comprising:
the device comprises a fixed configuration information acquisition unit, a fixed configuration information acquisition unit and a fixed configuration information processing unit, wherein the fixed configuration information acquisition unit is used for acquiring fixed configuration information of a current functional module in the device, and the device comprises at least two functional modules;
a variable configuration information obtaining unit, configured to obtain variable configuration information of the current functional module;
a network ID generating unit, configured to generate a network ID of the current functional module according to the fixed configuration information and the variable configuration information, where the network ID of the current functional module is used to uniquely identify the current functional module in a current local area network;
the information receiving unit is used for receiving conflict indication information sent by an industrial control module in the equipment after generating the network ID of the current functional module according to the fixed configuration information and the variable configuration information, wherein the conflict indication information is used for indicating that the network ID of the current functional module conflicts with the network IDs of other functional modules in the current local area network;
A network ID updating unit, configured to modify the variable configuration information according to a preset rule according to the conflict indication information, so as to update a network ID of the current functional module;
the fixed configuration information acquisition unit includes:
the signal output subunit is used for outputting a control signal to control the gating circuit in the current functional module to sequentially read the level value of the corresponding pin in the dialing circuit in the current functional module according to the control signal;
a level value receiving subunit, configured to receive a level value output by the gating circuit;
a fixed configuration information obtaining subunit, configured to sequentially arrange the received level values to obtain the fixed configuration information;
the network ID generation unit is specifically configured to: and taking the fixed configuration information as the low order of the network ID, and taking the variable configuration information as the high order of the network ID to obtain the network ID of the current functional module.
4. A network ID configuration apparatus applied to each functional module in a device, comprising: the device comprises a dial circuit, a gating circuit and a processor;
the dial circuit is connected to the gating circuit and used for providing fixed configuration information of the function module;
The gating circuit is connected to the processor and used for reading the level value of a corresponding pin in the dial circuit according to the control signal of the processor;
the processor is used for acquiring fixed configuration information of the function module through the gating circuit and the dialing circuit, acquiring variable configuration information of the function module, and generating a network ID of the function module according to the fixed configuration information and the variable configuration information;
the network ID of the function module is used for uniquely identifying the function module in a local area network to which the function module belongs;
the processor is also connected to an industrial control module in the device, and the processor comprises:
the receiving unit is connected to the industrial control module and is used for receiving conflict indication information sent by the industrial control module, wherein the conflict indication information is used for indicating that the network ID of the function module to which the conflict indication information belongs conflicts with the network IDs of other function modules in the same local area network;
the processing unit is connected with the receiving unit and the industrial control module and is used for modifying the variable configuration information according to the conflict indication information and preset rules so as to update the network ID of the function module to which the variable configuration information belongs;
The gating circuit includes: a gating chip, the gating chip comprising: a serial output pin;
the serial output pin is connected to a serial input pin of the processor;
at least one output pin of the processor is used for outputting the control signal to the gating circuit;
the serial input pin of the processor is used for receiving the level value output by the gating circuit, so as to sequentially arrange the received level value to obtain the fixed configuration information;
the generating the network ID of the function module according to the fixed configuration information and the variable configuration information includes:
and taking the fixed configuration information as the low order of the network ID, and taking the variable configuration information as the high order of the network ID to obtain the network ID of the function module.
5. The apparatus of claim 4, wherein the dialing circuit comprises: the dial switch comprises at least two keys, each pin on the first side of the dial switch is grounded, each pin on the second side of the dial switch is respectively connected to one end of a corresponding pull-up resistor and correspondingly connected to a parallel data pin of the gating circuit, and the other end of each pull-up resistor is connected with a power supply voltage.
6. The apparatus of claim 5, wherein the gating chip further comprises: at least one address selection pin and at least two parallel data pins;
the at least one address selection pin is respectively connected to at least one output pin of the processor;
the at least two parallel data pins are connected in turn to corresponding pins of the second side of the dial switch.
7. An electronic device, comprising: at least two functional modules, each functional module comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the network ID configuration method of any of claims 1-2.
8. The electronic device of claim 7, wherein the electronic device further comprises:
and the industrial control module is respectively connected to each functional module in the electronic equipment and is used for judging whether the network ID of the current functional module conflicts with the network IDs of other functional modules in the local area network to which the current functional module belongs, and sending conflict indication information to the current functional module under the condition of conflict.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a network ID configuration method according to any of claims 1-2.
CN201811024402.XA 2018-09-04 2018-09-04 Network ID configuration method, device, electronic equipment and storage medium Active CN108881521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811024402.XA CN108881521B (en) 2018-09-04 2018-09-04 Network ID configuration method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811024402.XA CN108881521B (en) 2018-09-04 2018-09-04 Network ID configuration method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108881521A CN108881521A (en) 2018-11-23
CN108881521B true CN108881521B (en) 2024-04-02

Family

ID=64323354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811024402.XA Active CN108881521B (en) 2018-09-04 2018-09-04 Network ID configuration method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108881521B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294413B (en) * 2018-12-06 2022-07-22 航天信息股份有限公司 Method, device and readable medium for determining Internet Protocol (IP) address
CN109787822A (en) * 2019-01-07 2019-05-21 中国联合网络通信集团有限公司 A kind of networked asset identification method and device
CN113271326A (en) * 2020-02-17 2021-08-17 阿里巴巴集团控股有限公司 Network protocol address scheduling method and device and electronic equipment
CN113722007B (en) * 2021-08-24 2023-11-03 杭州迪普科技股份有限公司 Configuration method, device and system of VPN branch equipment
CN115174522A (en) * 2022-07-05 2022-10-11 易事特储能科技有限公司 Electronic equipment ID configuration method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754067A (en) * 2013-12-30 2015-07-01 北京大唐高鸿软件技术有限公司 Vehicle-mounted short-distance communication network based vehicle-mounted node IP address dynamic configuration method
CN105426222A (en) * 2015-12-18 2016-03-23 广州华多网络科技有限公司 Processing method, device and terminal for terminal application
WO2016134523A1 (en) * 2015-02-27 2016-09-01 深圳市迈斯云门禁网络科技有限公司 Networking device system and management method therefor
CN106027698A (en) * 2016-08-10 2016-10-12 中车青岛四方车辆研究所有限公司 Reconnection gateway and passenger information system comprising same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106401A1 (en) * 2007-10-22 2009-04-23 Inventec Corporation System and method for Intra Network Internet Protocol (IP) address modification by dual controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754067A (en) * 2013-12-30 2015-07-01 北京大唐高鸿软件技术有限公司 Vehicle-mounted short-distance communication network based vehicle-mounted node IP address dynamic configuration method
WO2016134523A1 (en) * 2015-02-27 2016-09-01 深圳市迈斯云门禁网络科技有限公司 Networking device system and management method therefor
CN105426222A (en) * 2015-12-18 2016-03-23 广州华多网络科技有限公司 Processing method, device and terminal for terminal application
CN106027698A (en) * 2016-08-10 2016-10-12 中车青岛四方车辆研究所有限公司 Reconnection gateway and passenger information system comprising same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Challenges and Research Directions for the Future Internetworking";Miguel Elias M. Campista等;《 IEEE Communications Surveys & Tutorials》;全文 *
"EPA在智能仪表中的应用研究";赵斌;《中国优秀硕士学位论文全文数据库》;全文 *

Also Published As

Publication number Publication date
CN108881521A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108881521B (en) Network ID configuration method, device, electronic equipment and storage medium
US20220200798A1 (en) Key code data burning method, device, terminal equipment and readable storage medium
CN112328440B (en) Hard disk physical position determining method and device
US20230014098A1 (en) Method and system for accelerating reading of information of field replace unit, device, and medium
CN107078806B (en) The programmed method and operating method and electric interfaces equipment of optical transceiver
CN110572365A (en) multi-protocol server management method, system, terminal device and storage medium
CN109451098A (en) FPGA accelerator card MAC Address configuration method, device and accelerator card
CN114003538A (en) Intelligent network card and identification method thereof
CN111294413A (en) Method, device and readable medium for determining Internet Protocol (IP) address
CN107145455B (en) Method for updating SMBIOS static information of whole system
EP3091435A1 (en) Resource management method and device for terminal system
CN110659165A (en) Multi-node server automatic testing method and device
US7689632B2 (en) Adaptive data dictionary language, extendable for a security system
CN111193818A (en) Method, system, equipment and medium for obtaining IP address
CN113687797B (en) Disk management method, system, storage medium and equipment
CN113568646B (en) Novel portable program upgrading method
US11750582B2 (en) Network apparatus controlling method and device
CN112231251B (en) Board card slot identification method and device, communication equipment and readable storage medium
CN104578418A (en) Configuration method and system of automatic power distribution equipment based on 101 protocols, and equipment
CN112685064B (en) Processing method and device for equipment identification, storage medium and electronic device
CN110704198A (en) Data operation method, device, storage medium and processor
CN102075991A (en) Base station activating method and device
CN111064816A (en) Linux system multipath equipment naming binding method and device
CN208723941U (en) Network ID configuration device and electronic equipment
CN113076273B (en) Component access method, device, electronic equipment, storage medium and program product

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