Dual-SIM Dual-Standby Routing Algorithm Based on PPP Coding and Decoding Recombination Mechanism

By adopting a dual-slot dual-pass routing algorithm based on PPP codec and reorganization mechanism in the field of low-voltage centralized meter reading technology, the problem of communication interruption of a single network in extreme weather is solved, and dual-slot dual-pass support and dynamic routing is realized, which improves the reliability of the terminal link and reduces the operation and maintenance workload.

CN117440438BActive Publication Date: 2025-06-20BEIJING HUITONG JINCAI INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311288634.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2025-06-20
Estimated Expiration
2043-10-07

AI Technical Summary

Technical Problem

A single network has the risk of communication interruption in extreme weather conditions, and the network communication quality between operators in different regions has its advantages and disadvantages, resulting in additional labor investment and overhead.

Method used

The dual-scroll dual-pass routing algorithm based on PPP encoding, codec and reorganization mechanism is adopted to realize the dynamic routing of dual-scroll dual-pass support and communication TCP links. The algorithm includes PPP decoding mechanism, dual-card channel dialing and maintenance mechanism, packet routing mechanism and PPP encoding and reorganization mechanism.

Benefits of technology

Without modifying the existing acquisition terminal business logic, it is necessary to improve the reliability and robustness of the terminal link, reduce the on-site operation and maintenance workload, and has good economic and management benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117440438B_ABST
    Figure CN117440438B_ABST
Patent Text Reader

Abstract

The present invention discloses a dual-SIM dual-standby routing algorithm based on a PPP encoding, decoding and recombination mechanism, including a PPP decoding mechanism, a dual-SIM channel dialing and maintenance mechanism, a data packet routing mechanism, a PPP encoding and recombination mechanism, etc. The dual-SIM dual-standby routing algorithm based on the PPP encoding, decoding and recombination mechanism of the present invention can support dual-SIM dual-standby without modifying the existing service logic of the acquisition terminal, and realize dynamic routing selection of communication TCP links. Through the design of the present invention, the reliability and robustness of the terminal link can be effectively improved, the on-site operation and maintenance workload can be reduced, and good economic and management benefits can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of low-voltage centralized meter reading, and specifically relates to a dual-card dual-communication routing algorithm based on a PPP encoding, decoding and recombination mechanism. Background Art

[0002] With the development of digital power grid technology, the requirements for the quality of remote communication by power equipment are also getting higher and higher. Since the quality of remote communication is directly related to the distance and deployment density of signal towers, due to the differences in the investment of resources of each operator, the network communication quality among operators in different regions has its own advantages and disadvantages. This basic situation determines that the remote communication mode of a single network is bound to bring some additional manual input and expenses.

[0003] On the other hand, there is also a risk of communication interruption in a single network under extreme weather conditions. Therefore, the access mode of a single network operator can no longer meet the needs of the current digital development of the power grid. Summary of the Invention

[0004] In order to solve the above problems, the present invention provides a dual-card dual-communication routing algorithm based on a PPP encoding, decoding and recombination mechanism, including a PPP decoding mechanism, a dual-card channel dialing and maintenance mechanism, a data packet routing mechanism, a PPP encoding and recombination mechanism, etc., for implementing the dual-card dual-communication technology of the external protocol stack mode under the "Power User Electricity Information Collection System Communication Protocol Part 3: Collection Terminal Remote Communication Module Interface Protocol" of Q / GDW 1376.3-2013 and the "Communication Protocol for Electricity Information Collection System Part 3: Collection Terminal Remote Communication Module Interface" of Q / GDW 10376.3-2019;

[0005] The dual-card dual-communication routing algorithm of the present invention based on the PPP encoding, decoding and recombination mechanism can realize dual-card dual-communication support without modifying the existing service logic of the collection terminal, and realize the dynamic routing selection of communication TCP links. Through the design of the present invention, the reliability and robustness of the terminal link can be effectively improved, the on-site operation and maintenance workload can be reduced, and good economic benefits and management benefits can be obtained.

[0006] The present invention is realized through the following technical solutions: a dual-card dual-communication routing algorithm based on a PPP encoding, decoding and recombination mechanism, specifically including the following steps:

[0007] S1. After receiving a data packet from a physical receiving port (abstract interface, covering interfaces such as TTL service serial ports and USB), label the data with a source label (S label), and execute the next step;

[0008] S2. A PPP (Point-to-Point Protocol) data decoder parses the received data packet and labels it with a data type label (T label), and executes the next step;

[0009] S3. Classify and process according to the data type tag (T tag). If it is a data packet related to a dialing request (T tag is LCP / PAP / CHAP / NCP), then execute S4. If it is a data packet for link communication (T tag is ICMP / IPv4 / IPv6), then execute S9;

[0010] S4. Perform step-by-step processing according to the T tag of the data packet. If the data packet type is LCP, then execute S5. If the data packet type is PAP, then execute S6. If the data packet type is CHAP, then execute S7. If the data packet type is NCP, then execute S8;

[0011] S5. Check the authentication method of the LCP request. If it is PAP, then continue to wait for subsequent messages and execute S6. If it is not PAP, then send an LCP message to negotiate for the collection terminal side to use the PAP authentication method and continue to wait;

[0012] S6. Push the user and passwd parameters in the PAP message into the dual-card channel maintenance unit for trial dialing. Respond to the PAP message according to the dialing result (if either channel of the dual card dials successfully, then respond with PAP Authenticate-Ack, otherwise respond with PAP Authenticate-Nak) to the collection terminal side, and execute S8;

[0013] S7. For all CHAP authentication initiated by the terminal, reply with Authenticate-Nak, and negotiate with LCP to require PAP authentication and continue to wait;

[0014] S8. The dual-card channel maintenance unit responds to the NCP negotiation data packet to allocate a virtual IP address for the terminal, and establish a NAT (Network Address Translation) mechanism for it, establish the routable forwarding ability for all data packets, wait and enter S9;

[0015] S9. The data packet router makes step-by-step processing according to the T tag of the data packet. If the data packet type is ICMP, then execute S10. If the data packet type is IPv4 / IPv6, then execute S11;

[0016] S10. The data packet router simultaneously initiates dual-card ICMP requests, and directly encapsulates and responds to the data packets of the first responder to the terminal;

[0017] S11. Analyze the IPv4 / IPv6 data packet. If the type is TCP, then execute S12. Otherwise, respond with ICMP unreadchable;

[0018] S12. Start the dual - SIM TCP three - way handshake connection establishment process. If any connection of the dual - SIM cards is successfully established, then bind the TCP connection with a faster response and the terminal's current TCP request to the routing table in the packet router. If both connections of the dual - SIM cards fail, then reply with ICMP unreadchable to the terminal.

[0019] As a preferred technical solution, the physical receiving ports in S1 are:

[0020] The TTL service serial port and USB, including the CMUX serial port multiplexing and virtual com virtual ports established on this physical interface. The above ports not only cover the basic service data transmission interfaces declared in the "Q / GDW 1376.3 - 2013 Communication Protocol for Power User Electricity Information Acquisition System - Part 3: Interface Protocol for Remote Communication Module of Acquisition Terminal" and "Q / GDW 10376.3 - 2019 Communication Protocol for Electricity Information Acquisition System - Part 3: Interface Protocol for Remote Communication Module of Acquisition Terminal" of the State Grid Corporation, but also even compatible with the non - standard protocols implemented by some 09 / 13 terminals, which can meet the applications of different types of terminals on - site and have a wide range of applications.

[0021] As a preferred technical solution, the data type label (T - label) in S2 is:

[0022] The Protocol Field (the 3rd and 4th bytes of the data frame) in the PPP protocol data frame refers to the data type contained in the data field within the PPP data frame.

[0023] As a preferred technical solution, the data type label in S3 is:

[0024] The LCP label with a data type of 0xC021, the PAP label with a data type of 0xC023, the CHAP label with a data type of 0xC223, the NCP label with a data types of 0x802I / 0x8023, the ICMP label with a data type of 0x0023, the IPv4 label with a data type of 0x0021, the IPv6 label with a data type of 0x0057.

[0025] As a preferred technical solution, in S5, the terminal initiates PAP authentication through LCP negotiation to obtain user / passwd, which is used for the dual - SIM channel maintenance unit to concurrently start the dialing process at the operator's side (depending on the operator's configuration, the actual backend authentication may be PAP or CHAP).

[0026] As a preferred technical solution, in S6, reply to the terminal request according to the dual - SIM dialing result. If any card dials successfully, reply that the authentication is passed.

[0027] As a preferred technical solution, typical virtual IP addresses in S8 are: 192.168.X.X, 172.X.X.X, 10.X.X.X.

[0028] As a preferred technical solution, the process of S10 initiating an ICMP request includes:

[0029] The data packet router simultaneously initiates a dual-card ICMP request. Since ICMP does not have the transaction session characteristic like TCP, each packet of data is directly replied with the best choice.

[0030] As a preferred technical solution, the process of establishing TCP three-way handshake in S12 includes:

[0031] If the type of the initiated TCP data packet is the first handshake SYNC data, then start a dual-card TCP connection. If any one of the dual-card connections is successfully established, then bind the TCP connection with the faster response on the SIM card side and the terminal's current TCP request in the data packet router to the routing table, and close the other TCP connection; the binding policy is to use the terminal-side ipaddr / port and the target master station ip addr / port as indexes, and the TCP connection established on the SIM card side as the target.

[0032] If the type of the initiated TCP data packet is other data, check whether there is a corresponding record in the routing binding table. If there is a record, then route and forward the data packet to the TCP connection of the corresponding card. If there is no record, then reply that the TCP connection has been disconnected.

[0033] The beneficial effects of the present invention are as follows: By adopting the dual-card and dual-connection routing algorithm based on the PPP encoding, decoding and recombination mechanism of the present invention, it is possible to support dual-card and dual-connection without modifying the existing service logic of the acquisition terminal, and realize the dynamic routing selection of communication TCP connections. Through the design of the present invention, the reliability and robustness of the terminal link can be effectively improved, the on-site operation and maintenance workload can be reduced, and good economic and management benefits are achieved. Description of the Drawings

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0035] Figure 1 It is a flowchart of a dual-card and dual-connection routing algorithm based on the PPP encoding, decoding and recombination mechanism of the present invention. Detailed Embodiments

[0036] All features disclosed in this specification, or steps in all methods or processes disclosed, except for mutually exclusive features and / or steps, can be combined in any manner.

[0037] Any feature disclosed in this specification (including any additional claims, abstract, and drawings), unless specifically stated, can be replaced by other equivalent or similar-purpose alternative features. That is, unless specifically stated, each feature is only an example of a series of equivalent or similar features.

[0038] As Figure 1 shown, a dual-SIM dual-standby routing algorithm based on the PPP encoding / decoding and recombination mechanism of the present invention includes the following steps:

[0039] S1. After receiving a data packet from a physical receiving port (abstract interface, covering interfaces such as TTL service serial ports and USB), attach a source label (S label) to the data and proceed to the next step;

[0040] S2. A PPP (Point-to-Point Protocol) data decoder parses the received data packet and attaches a data type label (T label), and proceeds to the next step;

[0041] S3. Perform classification processing according to the data type label (T label). If it is a data packet related to a dialing request (T label is LCP / PAP / CHAP / NCP), execute S4. If it is a data packet for link communication (T label is ICMP / IPv4 / IPv6), execute S9;

[0042] S4. Perform step-by-step processing according to the T label of the data packet. If the data packet type is LCP, execute S5. If the data packet type is PAP, execute S6. If the data packet type is CHAP, execute S7. If the data packet type is NCP, execute S8;

[0043] S5. Check the authentication method requested by the LCP. If it is PAP, continue to wait for subsequent messages and execute S6. If it is not PAP, send an LCP message to negotiate for the collection terminal side to use the PAP authentication method and continue to wait;

[0044] S6. Push the user and passwd parameters in the PAP message into the dual-SIM channel maintenance unit for trial dialing, and respond to the PAP message according to the dialing result (if either channel of the dual-SIM dials successfully, respond with PAP Authenticate-Ack, otherwise respond with PAP Authenticate-Nak) to the collection terminal side, and execute S8;

[0045] S7. For all CHAP authentications initiated by the terminal, reply with Authenticate-Nak, and negotiate with the LCP to require the use of PAP authentication and continue to wait;

[0046] S8. The dual - card channel maintenance unit responds to the NCP negotiation data packet, assigns a virtual IP address to the terminal, establishes a NAT (Network Address Translation) mechanism, establishes the routable and forwardable ability for all data packets, waits, and enters S9;

[0047] S9. The data packet router makes step - by - step processing according to the T - tag of the data packet. If the data packet type is ICMP, then S10 is executed; if the data packet type is IPv4 / IPv6, then S11 is executed;

[0048] S10. The data packet router simultaneously initiates dual - card ICMP requests, and directly encapsulates and responds to the data packet of the first responder to reply to the terminal;

[0049] S11. Parse the IPv4 / IPv6 data packet. If the type is TCP, then S12 is executed; otherwise, respond with ICMP unreadchable;

[0050] S12. Start the dual - card TCP three - way handshake to establish a connection process. If any one of the dual - card connections is successfully established, then bind the faster - responding TCP connection and the terminal's current TCP request to the routing table in the data packet router; if both dual - card connections fail, then respond to the terminal with ICMP unreadchable.

[0051] In this embodiment, the physical receiving ports in S1 are:

[0052] The TTL service serial port and USB, including the CMUX serial port multiplexing and virtual com virtual ports established on this physical interface. The above ports not only cover the basic service data transmission interfaces declared in the "Q / GDW 1376.3 - 2013 Power User Electricity Information Acquisition System Communication Protocol Part 3: Acquisition Terminal Remote Communication Module Interface Protocol" and "Q / GDW 10376.3 - 2019 Electricity Information Acquisition System Communication Protocol Part 3: Acquisition Terminal Remote Communication Module Interface" of the State Grid Corporation, but also are even compatible with the non - standard protocols implemented by some 09 / 13 terminals, can meet the applications of different types of terminals on - site, and have a wide range of applications.

[0053] In this embodiment, the data type tag (T - tag) in S2 is:

[0054] The Protocol Field (the 3rd and 4th bytes of the data frame) in the PPP protocol data frame refers to the data type contained in the data field within the PPP data frame.

[0055] In this embodiment, the data type tag in S3 is:

[0056] LCP tags with data type 0xC021, PAP tags with data type 0xC023, CHAP tags with data type 0xC223, NCP tags with data type 0x8021 / 0x8023, ICMP tags with data type 0x0023, IPv4 tags with data type 0x0021, IPv6 tags with data type 0x0057.

[0057] In this embodiment, in S5, the terminal initiates PAP authentication through LCP negotiation request to obtain user / passwd, so that the dual-SIM channel maintenance unit can concurrently start the dialing process at the operator's side (according to the operator's configuration, the actual backend authentication may be PAP or CHAP).

[0058] In this embodiment, in S6, the terminal request is replied according to the dual-SIM dialing result, and any successful dialing of a SIM card means that the authentication is passed.

[0059] In this embodiment, typical virtual IP addresses in S8 are: 192.168.X.X, 172.X.X.X, 10.X.X.X.

[0060] In this embodiment, the process of initiating an ICMP request in S10 includes:

[0061] The packet router simultaneously initiates dual-SIM ICMP requests. Since ICMP does not have the transaction session characteristic like TCP, each packet of data is directly replied with the best choice.

[0062] In this embodiment, the process of establishing TCP three-way handshake in S12 includes:

[0063] If the type of the initiated TCP packet is the first handshake SYNC data, then the dual-SIM TCP connection is started. If any one of the dual-SIM connections is successfully established, then the TCP connection with the faster reply on the SIM card side is bound to the routing table in the packet router with the terminal's current TCP request, and the other TCP connection is closed; the binding policy is to use the terminal-side ipaddr / port and the target master station ip addr / port as indexes, and the established TCP connection on the SIM card side as the target.

[0064] If the type of the initiated TCP packet is other data, check whether there is a corresponding record in the routing binding table. If there is a record, then route and forward the packet to the TCP connection of the corresponding SIM card. If there is no record, then reply that the TCP connection has been disconnected.

[0065] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be thought of without creative work should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope defined by the claims.

Claims

1. A dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism, characterized in that Specifically, it includes the following steps: S1. After receiving a data packet from a physical receiving port, add a source label to the data and proceed to the next step; S2. A PPP data decoder parses the received data packet and adds a data type label, and then proceeds to the next step; S3. Perform classification processing according to the data type label. If it is a data packet related to a dial-up request, that is, when the T label is LCP / PAP / CHAP / NCP, then execute S4. If it is a data packet for link communication, that is, when the T label is ICMP / IPv4 / IPv6, then execute S9; S4. Perform step-by-step processing according to the T label of the data packet. If the data packet type is LCP, then execute S5. If the data packet type is PAP, then execute S6. If the data packet type is CHAP, then execute S7. If the data packet type is NCP, then execute S8; S5. Check the authentication method of the LCP request. If it is PAP, then continue to wait for subsequent messages and execute S6. If it is not PAP, then send an LCP message to negotiate for the collection terminal side to use the PAP authentication method and continue to wait; S6. Push the user and passwd parameters in the PAP message into the dual-card channel maintenance unit for trial dialing, and reply to the PAP message to the collection terminal side according to the dialing result. If either channel of the dual card dials successfully, then reply PAP Authenticate-Ack. Otherwise, reply PAP Authenticate-Nak, and execute S8; S7. For all CHAP authentication initiated by the terminal, reply Authenticate-Nak, and require the LCP negotiation to use PAP authentication and continue to wait; S8. The dual-card channel maintenance unit replies to the NCP negotiation data packet to allocate a virtual IP address for the terminal, and establish a NAT mechanism for it, establish the routable forwarding ability for all data packets, wait and enter S9; S9. The data packet router performs step-by-step processing according to the T label of the data packet. If the data packet type is ICMP, then execute S10. If the data packet type is IPv4 / IPv6, then execute S11; S10. The data packet router simultaneously initiates dual-card ICMP requests, and directly encapsulates and replies to the data packet of the first responder to the terminal; S11. Parse the IPv4 / IPv6 data packet. If the type is TCP, then execute S12. Otherwise, reply ICMPunreadchable; S12. Start the dual-card TCP three-way handshake to establish a connection process. If any one of the dual cards successfully establishes a connection, then bind the faster TCP connection replied to the terminal's current TCP request to the routing table in the data packet router. If both dual cards fail to establish, then reply ICMP unreadchable to the terminal.

2. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: The physical receiving port in S1 is: TTL service serial port and USB, including CMUX serial port multiplexing and virtual com virtual port established on this physical interface.

3. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: The data type label in S2, the T label is: Protocol Field in the PPP protocol data frame, the 3rd and 4th bytes of the data frame, referring to the data type contained in the data field within the PPP data frame.

4. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: The data type label in S3 is: LCP tags with data type 0xC021, PAP tags with data type 0xC023, CHAP tags with data type 0xC223, NCP tags with data type 0x8021 / 0x8023, ICMP tags with data type 0x0023, IPv4 tags with data type 0x0021, IPv6 tags with data type 0x0057.

5. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: In S5, the terminal is requested to initiate PAP authentication through LCP negotiation to obtain user / passwd, so that the dual - SIM channel maintenance unit can concurrently start the dialing process at the operator side. According to the operator configuration, the actual backend authentication may be PAP or CHAP.

6. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: In S6, the terminal request is answered according to the dual - SIM dialing result. If any card dials successfully, the authentication is answered as passed.

7. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: Typical virtual IP addresses in S8 are: 192.168.X.X, 172.X.X.X, 10.X.X.X.

8. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: The process of initiating an ICMP request in S10 includes: The packet router simultaneously initiates dual - SIM ICMP requests. Since ICMP does not have the transaction session characteristic like TCP, each packet of data is directly answered with the best choice.

9. The dual-SIM and dual-standby routing algorithm based on the PPP encoding, decoding, and recombination mechanism according to claim 1, characterized in that: The process of establishing TCP three - way handshake in S12 includes: If the type of the initiated TCP packet is the first - handshake SYNC data, then the dual - SIM TCP connection is started. If any one of the dual - SIM connections is successfully established, then the TCP connection with the faster response on the SIM - card side is bound to the routing table in the packet router with the terminal's current TCP request, and the other TCP connection is closed; the binding strategy is to use the terminal - side ip addr / port + the target master - station ip addr / port as the index, and the TCP connection already established on the SIM - card side as the target. If the type of the initiated TCP packet is other data, check whether there is a corresponding record in the routing binding table. If there is a record, forward the packet to the TCP connection of the corresponding card; if there is no record, answer that the TCP connection has been disconnected.

Citation Information

Patent Citations

  • Method for selecting IPv4-IPv6 protocol translation module, apparatus and terminal thereof

    CN102255976A

  • Method for achieving double-stack protocol bridge dialing

    CN103457823A