Protocol message generation method and device, electronic equipment and computer program product
By generating the target message of the discovery stage of the Ethernet point-to-point protocol in the user terminal and replacing the user line information in the access device, the problem of user line information being used and tested without perception in the prior art is solved, and higher user security and testing efficiency are achieved.
Patent Information
- Application Number
- CN202510007263.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-02
AI Technical Summary
The existing technology cannot realize unconscious testing of users in scenarios such as troubleshooting and business testing, and there is a risk that user line information will be used to cause the account to be stolen.
The user line information is obtained through the user terminal, and the target message of the discovery stage of the Ethernet point-to-point protocol is generated. After the access device receives the message, the user line information is used to replace the user line information, and the device message is generated for information authentication.
It realizes that the target message does not need to be modified during the discovery stage generated by the user terminal, avoiding the risk of third-party devices intercepting user line information and using it, and improving the unconsciousness of the test and user security.
Smart Images

Figure CN119652980A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, electronic device, and computer program product for generating a protocol message. Background Art
[0002] With the increasing popularity of network construction based on IP technology and the continuous enrichment of user service types, the demand for more refined and flexible control capabilities for user service data is increasing. At present, OLT has become the main access device for broadband. Its upstream BRAS cannot or is difficult to obtain user port information from the Ethernet data packet of the PPPoE protocol, so it cannot perform unified authentication management on user ports and cannot effectively prevent user accounts from being stolen. Therefore, it is necessary to strengthen the identification of user ports (also known as user lines). In accordance with the requirements of the industry standard "Access Network Technical Requirements Broadband-User Access Line (Port) Identification" (YD / T 2275-2011), the mainstream uses PPPoE+ technology to realize the identification of user ports (also known as user lines), and implements accurate binding and traceability through radius, but the existing technology has great limitations.
[0003] 1) PPPoE+ is implemented on access devices (OLT, switches, etc.), and can correctly identify users under normal circumstances. However, during maintenance work such as faults and tests, when using personal terminals to perform dial-up tests on non-user access lines, it is necessary to modify the access devices at the test points, making the test very complicated.
[0004] 2) During automated simulation testing, the user's information in RADIUS needs to be modified, and the test cannot be implemented without the tested user's awareness.
[0005] 3) It does not consider how to handle the forged user line information on the access device.
[0006] Therefore, the existing solution requires the access device to identify PADI and PADR data by inserting the user line identification attribute field. In this mode, the access device is indispensable and must support PPPoE+, which is very inconvenient in scenarios such as troubleshooting and service testing. It is impossible to ensure that the tested user is unaware, and there is a risk of user line information being misused, resulting in theft of accounts.
[0007] With respect to the problem in the prior art that user line information is at risk of being misused, no effective solution has been proposed so far. Summary of the invention
[0008] The embodiments of the present invention provide a method, device, electronic device, and computer program product for generating a protocol message, so as to at least solve the technical problem in the prior art that user line information has the risk of being misused.
[0009] According to one aspect of an embodiment of the present invention, a method for generating a protocol message is provided, comprising: a user terminal obtains user line information of the user terminal; based on the user line information, a discovery phase target message of the Ethernet Point-to-Point Protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and the user line information is set in the Ethernet Point-to-Point Protocol label.
[0010] Optionally, based on the user line information, generating a discovery phase target message of the Ethernet Point-to-Point Protocol includes: generating a discovery phase preset message through the user terminal, wherein the discovery phase preset message includes at least: the net load field; adding the Ethernet Point-to-Point Protocol label to the net load field of the discovery phase preset message through the user terminal, wherein the Ethernet Point-to-Point Protocol label includes at least: a value field; and splicing the user line information at the back end of the value field of the Ethernet Point-to-Point Protocol label of the discovery phase preset message through the user terminal to obtain the discovery phase target message.
[0011] Optionally, based on the user line information, generating a discovery phase target message of the Ethernet Point-to-Point Protocol includes: based on the user line information, generating, by the user terminal, an active discovery initial message for broadcasting to a network server, wherein the active discovery initial message is the discovery phase target message.
[0012] Optionally, based on the user line information, generating a discovery phase message of the Ethernet Point-to-Point Protocol includes: receiving, through the user terminal, an active discovery proposal message returned by the network server in response to an active discovery initial message; and generating, through the user terminal, an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is the discovery phase target message.
[0013] Optionally, the user terminal obtains the user line information of the user terminal, including: identifying the terminal information of the user terminal, wherein the multiple information items in the terminal information include at least: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port and an optical network identifier of the optical network unit of the user terminal; arranging the multiple information items in the following order in sequence to obtain the user line information: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port and the optical network identifier.
[0014] Optionally, after generating a discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information, the method further includes: when the discovery phase target message is an active discovery proposal message, receiving, through the user terminal, an active discovery confirmation message returned by the network server, wherein the active discovery confirmation message includes at least: a session identifier; and generating, through the user terminal, the Point-to-Point Protocol session based on the session identifier in response to the active discovery confirmation message.
[0015] Optionally, after generating the point-to-point protocol session based on the session identifier through the user terminal in response to the active discovery confirmation message, the method further includes: obtaining user account information and password information through the user terminal; and initiating authentication of the user terminal through the point-to-point protocol session based on the user account information and the password information.
[0016] According to another aspect of an embodiment of the present invention, a method for generating a protocol message is also provided, comprising: receiving, through an access device, a discovery phase target message of an Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message comprises at least: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol label; using the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0017] Optionally, the device line information of the access device is used to replace the user line information in the discovery phase target message, and obtaining the discovery phase device message includes: obtaining a message replacement command through the user access port of the access device; in response to the message replacement command, obtaining the device line information of the access device, and using the device line information of the access device to replace the user line information in the discovery phase target message to obtain the discovery phase device message.
[0018] According to another aspect of an embodiment of the present invention, a device for generating a protocol message is also provided, including: an acquisition module, used to control a user terminal to obtain user line information of the user terminal; a generation module, used to generate a discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and the user line information is set in the Ethernet Point-to-Point Protocol label.
[0019] According to another aspect of an embodiment of the present invention, there is also provided a device for generating a protocol message, comprising: a receiving module, used to receive, through an access device, a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message comprises at least: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol label; a replacement module, used to replace the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0020] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for generating a protocol message through the computer program.
[0021] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which implement the steps of the above-mentioned method for generating a protocol message when executed by a processor.
[0022] In the above-mentioned embodiment of the present application, the user terminal obtains the user line information of the user terminal; based on the user line information, a discovery phase target message of the Ethernet point-to-point protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol tag is added to the net load field, and the user line information is set in the Ethernet point-to-point protocol tag, so that the user line information is directly added to the discovery phase target message generated by the user terminal, so that after the discovery phase target message is generated by the user terminal and before the discovery phase target message is transmitted to the access device of the Ethernet, there is no need to modify the discovery phase target message, thereby achieving the technical effect of preventing a third-party device from intercepting the user line information for misuse, thereby solving the technical problem of the risk of user line information being misused in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 A method for generating a protocol message according to an embodiment of the present invention is described below. Figure 1 ;
[0025] Figure 2is a schematic diagram of a traditional PPPoE+ protocol exchange process according to an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of a PPPoE frame structure according to an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of an active discovery termination message PADT according to an embodiment of the present invention;
[0028] Figure 5 A method for generating a protocol message according to an embodiment of the present invention is described below. Figure 2 ;
[0029] Figure 6 is a schematic diagram of a PPPoE+ protocol exchange process according to an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of a device for generating a protocol message according to an embodiment of the present invention Figure 1 ;
[0031] Figure 8 A schematic diagram of a device for generating a protocol message according to an embodiment of the present invention Figure 2 ;
[0032] Fig. 9 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0036] PPPoE: PPP over Ethernet, Ethernet Point-to-Point Protocol, is a network tunneling protocol that encapsulates Point-to-Point Protocol (PPP) in an Ethernet framework.
[0037] PPPoE+: PPPoE Intermediate Agent is an extension and enhancement of the traditional PPPoE (Point-to-Point Protocol over Ethernet). It is mainly used to implement connection authentication and data transmission between user terminals and broadband access servers in an Ethernet environment.
[0038] BRAS: Broadband Remote Access Server, which is responsible for authentication, authorization and accounting (AAA) of user access. It can verify the user's identity information, determine whether the user has the right to access the network, and allocate corresponding network resources and permissions to the user.
[0039] RADIUS: Remote Authentication Dial In User Service, the RADIUS server is responsible for authenticating the user's identity. When a user tries to connect to the network, the access device (such as BRAS) sends the user's authentication information to the RADIUS server.
[0040] OLT: Optical Line Terminal, OLT is mainly responsible for converting optical signals from the upper network into electrical signals, and distributing the signals to each ONU (Optical Network Unit) through the optical fiber distribution network.
[0041] PDA: Personal Digital Assistant, which can store large amounts of data and has certain office software functions.
[0042] PADI: PPPoE Active Discovery Initiation, PPPoE active discovery initial message, is the initial discovery message sent by the client (user-end device) when establishing a PPPoE connection on Ethernet.
[0043] PADR: PPPoE Active Discovery Request, PPPoE active discovery request message, is an important message in the process of establishing a PPPoE connection on Ethernet. When the client receives the PADO (PPPoE Active Discovery Offer) message responded by the access device, it selects one of the access devices and sends a PADR message to the access device to confirm the connection request.
[0044] According to an embodiment of the present invention, an embodiment of a method for generating a protocol message is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0045] Figure 1 A method for generating a protocol message according to an embodiment of the present invention is described below. Figure 1 ,like Figure 1 As shown, the method comprises the following steps:
[0046] Step S102, the user terminal obtains user line information of the user terminal;
[0047] Step S104, based on the user line information, generate a discovery phase target message of the Ethernet Point-to-Point Protocol, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and the Ethernet Point-to-Point Protocol tag is set with user line information.
[0048] In the above-mentioned embodiment of the present application, the user terminal obtains the user line information of the user terminal; based on the user line information, a discovery phase target message of the Ethernet point-to-point protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol tag is added to the net load field, and the user line information is set in the Ethernet point-to-point protocol tag, so that the user line information is directly added to the discovery phase target message generated by the user terminal, so that after the discovery phase target message is generated by the user terminal and before the discovery phase target message is transmitted to the access device of the Ethernet, there is no need to modify the discovery phase target message, thereby achieving the technical effect of preventing a third-party device from intercepting the user line information for misuse, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0049] In the above step S102, the user terminal may be a personal terminal, such as a communication terminal such as a personal computer PC or a handheld terminal PDA, for requesting access to the Ethernet based on the Ethernet Point-to-Point Protocol PPPoE.
[0050] It should be noted that PPPoE (Point-to-Point Protocol over Ethernet) does include two main stages: the Discovery Stage and the PPP Session Stage.
[0051] Optionally, the main purpose of the discovery stage is to locate an access device in the network and establish an initial connection for a PPPoE session.
[0052] Optionally, the access device may be a broadband remote access server BRAS.
[0053] Optionally, the Discovery Stage includes the following steps:
[0054] PADI (PPPoE Active Discovery Initiation): The user terminal broadcasts a PADI message to find available access devices.
[0055] PADO (PPPoE Active Discovery Offer): After receiving the PADI message, the access device will unicast a PADO message if it can provide the required service.
[0056] PADR (PPPoE Active Discovery Request): The user terminal selects one from multiple PADO messages that may be received and sends a PADR message to the selected access device to request to establish a session.
[0057] PADS (PPPoE Active Discovery Session-confirmation): After receiving the PADR message, the access device generates a unique session ID and sends the session ID to the user terminal through the PADS message to confirm the establishment of the session.
[0058] After completing these steps, the user terminal and the access device have established a PPPoE session and know the Ethernet address and session identifier of the other party.
[0059] Optionally, the PPP Session Stage is to perform a standard PPP process based on the PPPoE session established during the discovery phase. This stage includes the following steps:
[0060] LCP (Link Control Protocol) negotiation: Both parties establish, configure and detect data link connections through LCP negotiation. This includes negotiating working modes (such as single-link connection or multi-link connection), maximum receive unit (MRU) and other parameters.
[0061] Authentication stage: User authentication is performed through PAP (Password Authentication Protocol) or CHAP (Challenge Handshake Authentication Protocol) to verify the legitimacy of the username and password.
[0062] NCP (Network Control Protocol) negotiation: Negotiation is performed for different network layer protocols, such as IPCP (IP Control Protocol) used to configure the user's IP address and DNS server address.
[0063] After completing these PPP negotiations, both parties can transmit network layer data packets on the PPPoE session. If you need to end the PPPoE session, either party can send a PADT (PPPoE Active Discovery Terminate) message to terminate the session.
[0064] In summary, the above discovery stage (Discovery Stage) and point-to-point protocol session stage (PPP SessionStage) together constitute the complete workflow of the PPPoE protocol, allowing users to connect to the remote network via Ethernet and enjoy various network services.
[0065] Figure 2 Schematic diagram of a conventional PPPoE+ protocol exchange process according to an embodiment of the present invention. Figure 2 As shown in the figure, PPPoE+ (PPPoE Intermediate Agent) is an extension and enhancement of the traditional PPPoE (Point-to-Point Protocol over Ethernet), and is mainly used to implement connection authentication and data transmission between user terminals and broadband access servers in an Ethernet environment. In the PPPoE+ protocol exchange process, a PPPoE intermediate agent / agent (PPPoE Intermediate Agent / Agent) is added between the user terminal Client and the broadband remote access server BRAS, so that the active discovery initial message PADI and the active discovery request message PADR sent by the user terminal Client to the broadband remote access server BRAS can be intercepted, and the user line information uPortID is inserted into the active discovery initial message PADI and the active discovery request message PADR.
[0066] However, the user line information uPortID in the target message (such as PADI or PADR) in the discovery phase is added by a proxy server (such as a PPPoE intermediate agent / agent), so the user line information uPortID is also provided by the proxy server. Furthermore, since the security of the proxy server cannot be controlled, the user line information uPortID provided by the proxy server is at risk of being counterfeit.
[0067] In the above step S104, the discovery phase target message can be a PPPoE frame, and the PPPoE frame exists as the payload of the Ethernet frame. When an Ethernet frame is a PPPoE frame, its type / length field (Len / Type field) should be 0x8863 (indicating the discovery phase of PPPoE) or 0x8864 (indicating the session phase of PPPoE, that is, the PPP session phase).
[0068] Figure 3 Schematic diagram of a PPPoE frame structure according to an embodiment of the present invention. Figure 3As shown in the figure, the PPPoE frame contains fields such as version number (Ver), type (Type), code (Code), session ID (Session-ID, also known as session identifier), length (Length) and net load (Payload). The Payload field has different formats in different stages. For example, in the discovery stage, some tags (such as Ethernet point-to-point protocol tags) will be filled in the Payload; in the session stage, the Payload carries the PPP message.
[0069] Optionally, the target message in the discovery phase includes: an active discovery initial message PADI and an active discovery request message PADR.
[0070] Optionally, the message structure of PADI includes: an Ethernet Header and a PPPoE Header (PoE Header).
[0071] Optionally, the Ethernet header includes at least: a destination MAC address (stination MAC Address), such as a broadcast address 0xffffffffffff; a source MAC address (Source MAC Address), such as a client's MAC address; and a type / length (Type / Length), such as "0x0886" indicating the PPPoE protocol.
[0072] Optionally, the PPPoE header includes at least: version (Ver), such as "0x1" indicating PPPoE version 1; type (Type): such as "0x1" indicating PPPoE in combination with the Ver field; code (Code): such as "0x09" indicating a PADI message; session identifier (Session ID): such as the discovery phase session ID is 0, i.e. "0x0000"; length (Length): indicating the length of the subsequent Payload (excluding Ethernet and PPPoE headers); payload field (Payload).
[0073] Optionally, the payload field (Payload) includes: a service name tag (Service-Name TAG) and a Point-to-Point Protocol over Ethernet tag, ie, a PPPoE tag (PPPoE Tag).
[0074] Optionally, the service name tag includes: tag type (Tag Type): such as 0x0101; tag length (TagLength): the length of the subsequent Value field; value field (Value): such as a character string of the service name (usually an ASCII-encoded character string).
[0075] Optionally, the Ethernet point-to-point protocol tag includes: tag type (Tag Type): such as 0x0105; tag length (Tag Length): such as 0x0004 (assuming that the Value field is 4 bytes); value field (Value): such as "0x000DE9" + user line information, where the user line information should follow 0x000DE9 immediately, and the specific value is filled in according to the actual situation.
[0076] Optionally, the message structure of PADR is similar to the message structure of PADI, and will not be described in detail here.
[0077] As an optional embodiment, generating a discovery phase target message of the Ethernet Point-to-Point Protocol based on user line information includes: generating a discovery phase preset message through a user terminal, wherein the discovery phase preset message includes at least: a net load field; adding an Ethernet Point-to-Point Protocol label to the net load field of the discovery phase preset message through the user terminal, wherein the Ethernet Point-to-Point Protocol label includes at least: a value field; and splicing the user line information at the back end of the value field of the Ethernet Point-to-Point Protocol label of the discovery phase preset message through the user terminal to obtain a discovery phase target message.
[0078] In the above-mentioned embodiment of the present application, the user terminal can generate a preset message for the discovery phase, and an Ethernet point-to-point protocol tag can be added to the net load field part of the preset message for the discovery phase, and the Ethernet point-to-point protocol tag has at least a value field. Furthermore, when generating the preset message for the discovery phase, the user line information of the user terminal can be directly spliced at the back end of the value field of the Ethernet point-to-point protocol tag in the preset message for the discovery phase, thereby realizing the generation of the preset message for the discovery phase.
[0079] Optionally, the preset messages in the discovery phase include: an active discovery initial message PADI and an active discovery request message PADR.
[0080] As an optional embodiment, generating a discovery phase target message of the Ethernet Point-to-Point Protocol based on user line information includes: based on the user line information, generating an active discovery initial message for broadcasting to a network server through a user terminal, wherein the active discovery initial message is a discovery phase target message.
[0081] In the above-mentioned embodiment of the present application, when the generated discovery phase target message is the discovery phase initial message PADI with added user line information, the discovery phase target message can be broadcast in the Ethernet in the original manner of the discovery phase initial message PADI to find available access devices, thereby realizing the application of the discovery phase initial message PADI with added user line information.
[0082] As an optional embodiment, generating a discovery phase message of the Ethernet Point-to-Point Protocol based on user line information includes: receiving, through a user terminal, an active discovery proposal message returned by a network server in response to an active discovery initial message; and generating, through the user terminal, an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is a discovery phase target message.
[0083] In the above-mentioned embodiment of the present application, the network server may be an access device in the Ethernet or a management device of the access device. The network server may generate an active discovery proposal message PADO in response to an active discovery initial message and select at least one access device in the Ethernet that can provide access to the user terminal. Then, the user terminal may generate an active discovery request message PADR with added user line information in response to the active discovery proposal message PADO, thereby realizing the application of the active discovery request message PADR with added user line information.
[0084] As an optional embodiment, the user terminal obtains the user line information of the user terminal, including: identifying the terminal information of the user terminal, wherein the multiple information items in the terminal information include at least: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port of the user terminal and an optical network identifier of the optical network unit; arranging the multiple information items in the following order to obtain the user line information: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port and an optical network identifier.
[0085] In the above-mentioned embodiment of the present application, the user line information is generated based on multiple information items in the terminal information of the user terminal, which are arranged in a specific order. Therefore, by acquiring the terminal information of the user terminal, then extracting each information item in the terminal information, and filling the extracted information items into a specific order, the user line information can be obtained, thereby realizing the generation of the user line information.
[0086] Optionally, the PPPoE+ data format adopted by the user line information is as follows: “AccessNodeIdentifier / ANI_rack / ANI_frame / ANI_slot / ANI_subslot / ANI_port / ONU_ID”.
[0087] For example, according to multiple information items in the terminal information, the constructed user line information may be: “DeviceName / rack / frame / slot / subslot / port / 0000000000001A2B3C4D5E6F EP”.
[0088] As an optional embodiment, after generating a discovery phase target message of the Ethernet Point-to-Point Protocol based on user line information, the method also includes: when the discovery phase target message is an active discovery proposal message, receiving an active discovery confirmation message returned by the network server through the user terminal, wherein the active discovery confirmation message includes at least: a session identifier; and generating a Point-to-Point Protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0089] In the above-mentioned embodiment of the present application, when the target message in the discovery phase is an active discovery proposal message PADR, the active discovery confirmation message PADS returned by the network server to the user terminal in response to the active discovery proposal message PADR carries a session identifier, and then the user terminal, in response to the active discovery confirmation message PADS, can establish and generate a point-to-point protocol session, i.e., a PPP session, based on the session identifier SESSION_ID carried in the active discovery confirmation message PADS.
[0090] As an optional embodiment, after generating a point-to-point protocol session based on a session identifier through a user terminal in response to an active discovery confirmation message, the method also includes: obtaining user account information and password information through the user terminal; and initiating authentication of the user terminal through the point-to-point protocol session based on the user account information and password information.
[0091] In the above-mentioned embodiments of the present application, when establishing a point-to-point protocol session (i.e., a PPP session), authentication can be performed through PAP or CHAP based on the user account information and password information obtained from the user terminal, and a PPP session can be established if the authentication is qualified, thereby authenticating the user terminal through PAP or CHAP, and preventing the user line information of the user terminal from being misused.
[0092] Optionally, after the PPP session is established, the session can be terminated through an active discovery termination message PADT.
[0093] Figure 4 is a schematic diagram of an active discovery termination message PADT according to an embodiment of the present invention, such as Figure 4 As shown, the field value of the code (CODE) is: "0×a7", and the field value of the session identifier (SESSION-ID) is: the SESSION-ID of the PPPoE+ session to be terminated, which is used for dial-up termination.
[0094] Figure 5 A method for generating a protocol message according to an embodiment of the present invention is described below. Figure 2 ,like Figure 5 As shown, the method comprises the following steps:
[0095] Step S502, receiving, through the access device, a discovery phase target message of the Ethernet Point-to-Point Protocol sent by the user terminal, wherein the discovery phase target message at least includes: a payload field, an Ethernet Point-to-Point Protocol tag is added to the payload field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag;
[0096] Step S504, using the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication.
[0097] In the above-mentioned embodiment of the present application, an access device is used to receive a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; the device line information of the access device is used to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication, so that after receiving the discovery phase target message sent by the user terminal, the access device uses the device line information of the access device to replace the user line information in the discovery phase target message, thereby achieving a technical effect of preventing the user line information from being counterfeited, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0098] In the above step S502, the access device may be a broadband remote access server BRAS.
[0099] As an optional embodiment, the device line information of the access device is used to replace the user line information in the target message of the discovery phase, and the device message of the discovery phase is obtained, including: obtaining a message replacement command through the user access port of the access device; in response to the message replacement command, obtaining the device line information of the access device, and using the device line information of the access device to replace the user line information in the target message of the discovery phase, so as to obtain the device message of the discovery phase.
[0100] In the above-mentioned embodiment of the present application, the user access port is the command input port of the access device. After the message replacement command is input into the user access port, the access device can use the device line information of the access device itself to replace the user line information carried in the target message of the discovery phase according to the message replacement command, thereby converting the target message of the discovery phase into the device message of the discovery phase, thereby realizing the determination of the message of the discovery phase.
[0101] Optionally, after obtaining the device message in the discovery phase, the method further includes: the device message in the discovery phase can be transmitted to a remote user dial-in authentication system RADIUS through a broadband remote access server BRAS for information matching.
[0102] Optionally, the message replacement command may be: “PPPoe intermediate-agent informationpolicy replace”.
[0103] The present invention also provides a preferred embodiment, which provides a method for realizing PPPoE+ dial-up Internet access and preventing fraudulent use on a personal terminal, mainly comprising: obtaining user line information, user account information and password information; constructing PADI messages and PADR messages according to the user line information, user account information and password information through the user terminal, and conducting a PPP session based on the negotiated PPP session connection parameters to realize direct dial-up Internet access.
[0104] This application constructs PADI messages and PADR messages directly through user terminals according to user lines, user account information, and password information, without the need for access equipment support, which can reduce the complexity of troubleshooting, testing, etc. and reduce manpower expenditures; secondly, the test can be performed through automation, and has no impact on the tested users during the test process, so the tested users can be unaware of it.
[0105] The technical solution provided in this application strips the PPPoE+ user line information transmitted from the user end through a broadband access device, re-inserts the PPPoE+ user line information generated by this device, and then transmits it to RADIUS through BRAS for information matching, thereby preventing the user line information of PPPoE+ from being stolen and improving user security.
[0106] Figure 6 Schematic diagram of a PPPoE+ protocol exchange process according to an embodiment of the present invention. Figure 6 As shown, a method for implementing PPPoE+ dial-up Internet access on a personal terminal and preventing fraudulent use mainly includes: PPPoE+ information input and acquisition module, PPPoE+ discovery phase module, PPPoE+ session phase module, PPPOE+ data transmission module, PPPOE+ session termination module, and a fraudulent use method, wherein the PPPoE+ information input and acquisition module, the PPPoE+ discovery phase module, the PPPoE+ session phase module, and the PPPOE+ data transmission module are installed on the personal terminal in the form of dial-up software.
[0107] Step 1. The PPPoE+ information input and acquisition module provides an input method for inputting and acquiring user line information, user account information, and password information. User account information and password information are used for PAP or CHAP authentication; user line information is used for the PPPoE+ discovery phase module to construct PPPoE+ data packets. The PPPoE+ data format is as follows: AccessNodeIdentifier / ANI_rack / ANI_frame / ANI_slot / ANI_subslot / ANI_port / ONU_ID.
[0108] Optionally, a character string of user line information in the following format is constructed according to the input information for backup: DeviceName / rack / frame / slot / subslot / port / 0000000000001A2B3C4D5E6F EP.
[0109] Step 2: PPPoE+ discovery phase module, using the information provided by the PPPoE+ information input and acquisition module (such as user line information).
[0110] A PADI is constructed at the user terminal, in which the destination address of the packet is 0×ffffffffffff, the CODE field value is 0×09, the SESSION-ID field value is 0×0000, the tag type field value is 0×0101, and a PPPoE tag (0×0105) is added, and the Value field of the PPPoE tag uses 0x000DE9 + the user line information of step 1.
[0111] Similarly, in the PADR information of the user terminal, the field value of CODE is 0×19, the field value of SESSION_ID is 0×0000, the PPPoE tag is added, and the user line information is filled in. The PPPoE+ data packet with added user line information is used to complete the discovery phase action of PADI-PADO-PADR-PADS, and SESSION_ID is written with the session identification number returned by PADS.
[0112] Step 3: The PPPoE+ session phase module conducts a PPP session according to the PPP session connection parameters negotiated in the discovery phase.
[0113] Optionally, all Ethernet frames are unicast. The SESSION-ID of the PPPoE+ session is based on the SESSION_ID of the PADS in the discovery phase, and the session communication is carried out. In the initiated PPP authentication, the PPPoE frame structure uses the user account information and password information obtained in step 2 to authenticate with the server through the PAP or CHAP protocol, completes the LCP transmission process, and completes the NCP transmission process of IP address allocation and MTU / MRU negotiation.
[0114] Optionally, the PPPOE+ data transmission module mainly utilizes a network interface driver to encapsulate data packets in Ethernet frames, transmits them on the network through network hardware, and decapsulates received Ethernet frames.
[0115] Optionally, the PPPOE+ session termination module is mainly used to terminate the PPPoE+ session, construct a PADT data packet, set the CODE field value to 0×a7, and the SESSION-ID field value to the SESSION-ID of the PPPoE+ session to be terminated, for dial-up termination.
[0116] Step 4: The user end adds access devices that support PPPoE+ through the above solution or through non-compliant methods, adds counterfeit PPPoE+ user line information, and transmits it to the broadband access device. To achieve the purpose of anti-counterfeiting, the broadband access device needs to strip the PPPoE+ user line information transmitted by the user end, re-insert the PPPoE+ user line information generated by the device, and then transmit it to RADIUS through BRAS for information matching to achieve the anti-counterfeiting function. Taking Huawei broadband access equipment as an example, execute the command "pppoe intermediate-agent information policy replace" on the user access port to replace the field format and content of the original PPPoE message information field.
[0117] The technical solution provided by the present application changes the PPPoE+ implementation method from intercepting the protocol message in the PPPoE discovery phase in the access device and inserting the user port information uplink to directly adding the user port information when constructing the PADI and PADR messages. This is more convenient and flexible, does not require the support of the access device, and the personal terminal can directly use PPPoE+ to implement dial-up Internet access, reducing the complexity of troubleshooting, testing, etc. and reducing manpower expenditure. The test can be performed automatically and has no impact on the tested user during the test, so that the tested user is unaware of it. In addition, the access device strips the PPPoE+ user line information transmitted from the user end and re-inserts the PPPoE+ user line information generated by the device to implement anti-counterfeiting work and improve user security.
[0118] According to an embodiment of the present invention, an embodiment of a device for generating a protocol message is also provided. It should be noted that the device for generating a protocol message can be used to execute the method for generating a protocol message in an embodiment of the present invention, and the method for generating a protocol message in an embodiment of the present invention can be executed in the device for generating a protocol message.
[0119] Figure 7 A schematic diagram of a device for generating a protocol message according to an embodiment of the present invention Figure 1 ,like Figure 7 As shown, the device may include: an acquisition module 72, used to control the user terminal to obtain the user line information of the user terminal; a generation module 74, used to generate a discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and the Ethernet Point-to-Point Protocol label is set with the user line information.
[0120] It should be noted that the acquisition module 72 in this embodiment can be used to execute step S102 in the embodiment of the present application, and the generation module 74 in this embodiment can be used to execute step S104 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0121] In the above-mentioned embodiment of the present application, the user terminal obtains the user line information of the user terminal; based on the user line information, a discovery phase target message of the Ethernet point-to-point protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol tag is added to the net load field, and the user line information is set in the Ethernet point-to-point protocol tag, so that the user line information is directly added to the discovery phase target message generated by the user terminal, so that after the discovery phase target message is generated by the user terminal and before the discovery phase target message is transmitted to the access device of the Ethernet, there is no need to modify the discovery phase target message, thereby achieving the technical effect of preventing a third-party device from intercepting the user line information for misuse, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0122] As an optional embodiment, the generation module includes: a generation unit, which is used to generate a discovery phase preset message through a user terminal, wherein the discovery phase preset message includes at least: a net load field; an adding unit, which is used to add an Ethernet point-to-point protocol label to the net load field of the discovery phase preset message through the user terminal, wherein the Ethernet point-to-point protocol label includes at least: a value field; a splicing unit, which is used to splice user line information at the back end of the value field of the Ethernet point-to-point protocol label of the discovery phase preset message through the user terminal to obtain a discovery phase target message.
[0123] As an optional embodiment, the generation module includes: a broadcast unit, which is used to generate an active discovery initial message for broadcasting to a network server through a user terminal based on user line information, wherein the active discovery initial message is a discovery phase target message.
[0124] As an optional embodiment, the generation module includes: a receiving unit, used to receive, through a user terminal, an active discovery proposal message returned by a network server in response to an active discovery initial message; a generation unit, used to generate, through a user terminal, an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is a discovery phase target message.
[0125] As an optional embodiment, the acquisition module includes: an identification unit, used to identify terminal information of a user terminal, wherein the multiple information items in the terminal information include at least: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port of the user terminal and an optical network identifier of the optical network unit; an arrangement unit, used to arrange the multiple information items in the following order to obtain user line information: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port and an optical network identifier.
[0126] As an optional embodiment, the device also includes: a receiving submodule, which is used to generate a discovery phase target message of the Ethernet point-to-point protocol based on user line information, and when the discovery phase target message is an active discovery proposal message, receive an active discovery confirmation message returned by the network server through the user terminal, wherein the active discovery confirmation message includes at least: a session identifier; and a generating submodule, which is used to generate a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0127] As an optional embodiment, the device also includes: an acquisition sub-module, which is used to obtain user account information and password information through the user terminal after generating a point-to-point protocol session based on a session identifier in response to an active discovery confirmation message through the user terminal; and an authentication sub-module, which is used to initiate authentication of the user terminal based on the user account information and password information through the point-to-point protocol session.
[0128] Figure 8 A schematic diagram of a device for generating a protocol message according to an embodiment of the present invention Figure 2 ,like Figure 8As shown, the device may include: a receiving module 82, used to receive a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal through an access device, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; a replacement module 84, used to use the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication.
[0129] It should be noted that the receiving module 82 in this embodiment can be used to execute step S602 in the embodiment of the present application, and the replacing module 84 in this embodiment can be used to execute step S604 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0130] In the above-mentioned embodiment of the present application, an access device is used to receive a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; the device line information of the access device is used to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication, so that after receiving the discovery phase target message sent by the user terminal, the access device uses the device line information of the access device to replace the user line information in the discovery phase target message, thereby achieving a technical effect of preventing the user line information from being counterfeited, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0131] As an optional embodiment, the replacement part module includes: an acquisition unit, used to obtain a message replacement command through a user access port of an access device; a replacement unit, used to obtain device line information of the access device in response to the message replacement command, and use the device line information of the access device to replace the user line information in the target message of the discovery phase, so as to obtain the device message of the discovery phase.
[0132] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0133] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0134] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for generating a protocol message: the user terminal obtains the user line information of the user terminal; based on the user line information, generates a discovery phase target message of the Ethernet point-to-point protocol, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol tag is added to the net load field, and the user line information is set in the Ethernet point-to-point protocol tag.
[0135] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for generating a protocol message: receiving, through an access device, a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; using the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication.
[0136] Fig. 9 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Fig. 9 As shown, the computer terminal 90 may include: one or more (only one is shown in the figure) processors 92 , and a memory 94 .
[0137] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for generating the protocol message in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the method for generating the protocol message described above is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 90 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0138] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: the user terminal obtains the user line information of the user terminal; based on the user line information, a discovery phase target message of the Ethernet point-to-point protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol tag is added to the net load field, and the user line information is set in the Ethernet point-to-point protocol tag.
[0139] Optionally, the processor may also execute the program code of the following steps: generating a discovery phase preset message through a user terminal, wherein the discovery phase preset message includes at least: a net load field; adding an Ethernet point-to-point protocol tag to the net load field of the discovery phase preset message through the user terminal, wherein the Ethernet point-to-point protocol tag includes at least: a value field; and splicing user line information at the back end of the value field of the Ethernet point-to-point protocol tag of the discovery phase preset message through the user terminal to obtain a discovery phase target message.
[0140] Optionally, the processor may also execute the program code of the following steps: based on the user line information, generating, through the user terminal, an active discovery initial message for broadcasting to the network server, wherein the active discovery initial message is a discovery phase target message.
[0141] Optionally, the processor may also execute the program code of the following steps: receiving, through a user terminal, an active discovery proposal message returned by a network server in response to an active discovery initial message; and generating, through a user terminal, an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is a discovery phase target message.
[0142] Optionally, the processor may also execute the program code of the following steps: identifying the terminal information of the user terminal, wherein the multiple information items in the terminal information include at least: an access node identifier, rack, frame, slot, sub-slot, access port and an optical network identifier of the optical network unit of the user terminal; arranging the multiple information items in the following order to obtain the user line information: access node identifier, rack, frame, slot, sub-slot, access port and optical network identifier.
[0143] Optionally, the processor may also execute the program code of the following steps: when the target message in the discovery phase is an active discovery proposal message, receiving an active discovery confirmation message returned by the network server through the user terminal, wherein the active discovery confirmation message includes at least: a session identifier; and generating a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0144] Optionally, the processor may also execute program codes of the following steps: obtaining user account information and password information through the user terminal; initiating authentication of the user terminal based on the user account information and password information through a point-to-point protocol session.
[0145] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: receiving the discovery phase target message of the Ethernet Point-to-Point Protocol sent by the user terminal through the access device, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and the user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; using the device line information of the access device to replace the user line information in the discovery phase target message to obtain the discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication.
[0146] Optionally, the processor may also execute the program code of the following steps: obtaining a message replacement command through a user access port of an access device; obtaining device line information of the access device in response to the message replacement command, and using the device line information of the access device to replace the user line information in a target message of the discovery phase, thereby obtaining a device message of the discovery phase.
[0147] It can be understood by those skilled in the art that Fig. 9 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig. 9 The structure of the electronic device is not limited. For example, the computer terminal 90 may also include Fig. 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig. 9 Different configurations shown.
[0148] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0149] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the method for generating a protocol message provided in the embodiment.
[0150] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0151] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: the user terminal obtains the user line information of the user terminal; based on the user line information, generates a discovery phase target message of the Ethernet Point-to-Point Protocol, wherein the discovery phase target message includes at least: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and the user line information is set in the Ethernet Point-to-Point Protocol tag.
[0152] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for performing the following steps: generating a discovery phase preset message through a user terminal, wherein the discovery phase preset message includes at least: a net load field; adding an Ethernet point-to-point protocol tag to the net load field of the discovery phase preset message through the user terminal, wherein the Ethernet point-to-point protocol tag includes at least: a value field; and splicing user line information at the back end of the value field of the Ethernet point-to-point protocol tag of the discovery phase preset message through the user terminal to obtain a discovery phase target message.
[0153] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: based on user line information, generating an active discovery initial message for broadcasting to a network server through a user terminal, wherein the active discovery initial message is a discovery phase target message.
[0154] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: receiving, through a user terminal, an active discovery proposal message returned by a network server in response to an active discovery initial message; and generating, through the user terminal, an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is a discovery phase target message.
[0155] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: identifying terminal information of a user terminal, wherein the multiple information items in the terminal information include at least: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port of the user terminal, and an optical network identifier of an optical network unit; arranging the multiple information items in the following order to obtain user line information: an access node identifier, a rack, a frame, a slot, a sub-slot, an access port, and an optical network identifier.
[0156] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: when the target message in the discovery phase is an active discovery proposal message, receiving an active discovery confirmation message returned by the network server through the user terminal, wherein the active discovery confirmation message includes at least: a session identifier; and generating a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0157] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining user account information and password information through the user terminal; initiating authentication of the user terminal based on the user account information and password information through a point-to-point protocol session.
[0158] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: receiving, through an access device, a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message includes at least: a net payload field, an Ethernet Point-to-Point Protocol tag added to the net payload field, and user line information of the user terminal added to the value field of the Ethernet Point-to-Point Protocol tag; using the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0159] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining a message replacement command through a user access port of an access device; obtaining device line information of the access device in response to the message replacement command, and using the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message.
[0160] The embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the method for generating a protocol message provided in the above embodiment are implemented.
[0161] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0162] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0165] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0167] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a protocol message, characterized in that: include: The user terminal obtains the user line information of the user terminal; Based on the user line information, a discovery phase target message of the Ethernet Point-to-Point Protocol is generated, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol tag is added to the net load field, and the user line information is set in the Ethernet Point-to-Point Protocol tag.
2. The method according to claim 1, characterized in that Based on the user line information, generating a discovery phase target message of the Ethernet point-to-point protocol includes: Generate a discovery phase preset message through the user terminal, wherein the discovery phase preset message at least includes: the payload field; By means of the user terminal, the Ethernet point-to-point protocol tag is added in the net load field of the message preset in the discovery phase, wherein the Ethernet point-to-point protocol tag at least includes: a value field; The user line information is spliced at the back end of the value field of the Ethernet Point-to-Point Protocol tag of the message preset in the discovery phase through the user terminal to obtain the discovery phase target message.
3. The method according to claim 1, characterized in that Based on the user line information, generating a discovery phase target message of the Ethernet point-to-point protocol includes: Based on the user line information, an active discovery initial message for broadcasting to a network server is generated by the user terminal, wherein the active discovery initial message is the discovery phase target message.
4. The method according to claim 1, characterized in that: Generating a discovery phase message of the Ethernet Point-to-Point Protocol based on the user line information includes: Receiving, by the user terminal, an active discovery proposal message returned by the network server in response to the active discovery initial message; An active discovery request message is generated by the user terminal in response to the active discovery proposal message, wherein the active discovery request message is the discovery phase target message.
5. The method according to any one of claims 1 to 4, characterized in that The user terminal obtaining the user line information of the user terminal includes: Identify terminal information of the user terminal, wherein the plurality of information items in the terminal information include at least: an access node identifier, a rack, a frame, a slot, a subslot, an access port, and an optical network identifier of an optical network unit of the user terminal; The user line information is obtained by sequentially arranging the plurality of information items in the following order: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
6. The method according to claim 1, characterized in that After generating a discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information, the method further includes: In the case where the target message in the discovery phase is an active discovery proposal message, an active discovery confirmation message returned by the network server is received through the user terminal, wherein the active discovery confirmation message at least includes: a session identifier; The point-to-point protocol session is generated according to the session identifier by the user terminal in response to the active discovery confirmation message.
7. The method according to claim 6, characterized in that After generating the point-to-point protocol session according to the session identifier by the user terminal in response to the active discovery confirmation message, the method further includes: Obtaining user account information and password information through the user terminal; Through the point-to-point protocol session, authentication of the user terminal is initiated based on the user account information and the password information.
8. A method for generating a protocol message, characterized in that: include: Receiving, through an access device, a discovery phase target message of the Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol label; The device line information of the access device is used to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
9. The method according to claim 8, characterized in that Using the device line information of the access device to replace the user line information in the target message of the discovery phase, the device message of the discovery phase includes: Obtaining a message replacement command through a user access port of the access device; In response to the message replacement command, the device line information of the access device is acquired, and the device line information of the access device is used to replace the user line information in the discovery phase target message to obtain the discovery phase device message.
10. A device for generating a protocol message, characterized in that: include: An acquisition module, used for controlling a user terminal to acquire user line information of the user terminal; A generation module is used to generate a discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information, wherein the discovery phase target message at least includes: a net load field, an Ethernet Point-to-Point Protocol label is added to the net load field, and the Ethernet Point-to-Point Protocol label is set with the user line information.
11. A device for generating a protocol message, characterized in that: include: A receiving module, configured to receive, through an access device, a discovery phase target message of an Ethernet point-to-point protocol sent by a user terminal, wherein the discovery phase target message at least includes: a net load field, an Ethernet point-to-point protocol label is added to the net load field, and user line information of the user terminal is added to a value field of the Ethernet point-to-point protocol label; A replacement module is used to use the device line information of the access device to replace the user line information in the discovery phase target message to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
12. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the method for generating a protocol message according to any one of claims 1 to 9 through the computer program.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method for generating a protocol message according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Device and method for transmitting network element protocol messages in optical network equipment
CN103200467A
Processing method, device and system of point to point protocol over Ethernet
CN104125191A
Method for supporting asymmetrie digital subscriber line access in embedded operating system
CN1482806A
A PPPoE protocol message transfer method
CN1972238A
Techniques for encapsulating point to point protocol (PPP) over Ethernet frames
US20060239298A1