Communication method and device, storage medium and program product

By using CPE to determine the port number based on client information and utilizing a combination of internal service ports and direct ports, the problem of high CPE network security risks is resolved, achieving a balance between security and service diversity.

CN120602267APending Publication Date: 2025-09-05FIBOCOM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510885014.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Customer Premises Equipment (CPE) exposes many service ports, leading to high network security risks.

Method used

The CPE receives the port number in the client information and determines whether it is the same as the pre-agreed port number. If they are the same, the service is provided through the internal service port. If they are not the same, the service is provided through the direct port, realizing indirect interaction of ports to reduce security risks.

Benefits of technology

Through port number judgment and indirect interaction, the network security risk of CPE is reduced while meeting the client's various service requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602267A_ABST
    Figure CN120602267A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication method and device, a storage medium and a program product. The method is applied to customer premises equipment and comprises the steps that the customer premises equipment receives first information from a client through a first port, the first information comprises a port number of a second port, and the second port is a source port of the first information. Under the condition that the port number of the second port of the customer premises equipment is the same as the port number agreed by the customer premises equipment and the client, one or more internal service ports of the customer premises equipment are determined to provide services for the client; and under the condition that the port number of the second port is different from the port number agreed by the customer premises equipment and the client, the customer premises equipment determines that the first port provides service for the client. According to the method, the network security risk of the customer premises equipment can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication method, device, storage medium and program product. Background Art

[0002] Customer premises equipment (CPE), a type of home gateway, interacts directly with clients through service ports, providing them with various network services. Each service port corresponds to a specific service. For example, Hypertext Transfer Protocol (HTTP) port 80 provides web browsing services for clients, while Hypertext Transfer Protocol Secure (HTTPS) port 443 provides encrypted web browsing services.

[0003] However, the more service ports a CPE exposes, the greater its potential attack surface, leading to higher network security risks. Therefore, how to reduce the network security risks of CPE is an unresolved issue. Summary of the Invention

[0004] The embodiments of the present application provide a communication method, device, storage medium, and program product that can reduce network security risks of CPE.

[0005] In a first aspect, embodiments of the present application provide a communication method. The method includes: a CPE receiving first information from a client via a first port, the first information including a port number of a second port, the second port being the source port of the first information. If the port number of the second port is the same as the port number agreed upon between the CPE and the client, the CPE determines that one or more internal service ports of the CPE provide services to the client; if the port number of the second port is different from the port number agreed upon between the CPE and the client, the CPE determines that the first port provides services to the client.

[0006] It can be seen that in the embodiment of the present application, when the source port number of the first information (i.e., the port number of the second port) is the same as the port number agreed upon by the CPE and the client, the CPE determines that the internal service port of the CPE provides services to the client, which is conducive to the CPE forwarding the received information to the internal service port through the first port to achieve indirect interaction between the second port and the internal service port. Compared with the method of directly exposing multiple service ports by the CPE, the network security risk of the CPE can be reduced.

[0007] In addition, in an embodiment of the present application, the CPE can determine that the first port provides services to the client when the source port number of the first information (i.e., the port number of the second port) is different from the port number agreed upon by the CPE and the client, which is conducive to the CPE realizing multi-service carrying to meet different service requests of the client.

[0008] Optionally, ports provide services to clients, which can be understood as providing the required network services to clients through ports. For example, HTTP port 80 (referred to as port 80) provides web browsing services for clients, HTTPS port 443 (referred to as port 443) provides encrypted web browsing services for clients, Secure Shell (SSH) port 22 (referred to as port 22) provides remote server login or management services for clients, and File Transfer Protocol (FTP) port 21 (referred to as port 21) provides file upload and download services for clients.

[0009] In an optional implementation manner, the first information is used to request the CPE to establish a connection, that is, the first information may be request information for requesting the CPE to establish a connection.

[0010] In the above implementation, the CPE can determine whether the port number of the second port is the port number agreed upon by the CPE and the client based on the port number of the second port during the connection establishment phase with the client, so as to determine the port for providing services to the client, thereby facilitating the CPE to provide various services to the client based on the determined port.

[0011] In an optional embodiment, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the CPE may also perform the following operations: receiving first data from the client through the first port, the first data including first identification information for identifying the first data; determining a third port based on the first identification information, the third port being one of one or more internal service ports; and sending the first data to the third port through the first port.

[0012] In this embodiment, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the CPE receives the first data from the second port through the first port, and can further determine the target port (i.e., the third port) of the first data based on the first identification information, so that the first port forwards the first data to the third port, thereby facilitating the third port to provide services to the client.

[0013] In an optional implementation manner, the CPE may further perform the following operations: providing services to the client according to the third port and the first data.

[0014] In an optional implementation, when the second port number is different from the port number agreed upon by the CPE and the client, the CPE may also perform the following operations: receive second data from the client through the first port; and provide services to the client based on the first port and the second data.

[0015] In this embodiment, when the port number of the second port of the CPE is different from the port number agreed upon by the CPE and the client, the first port receives the second data from the second port and provides services to the client based on the first port and the second data. In this way, the first port can also provide services to the client to meet the client's service request.

[0016] In a second aspect, an embodiment of the present application provides a communication device, the device comprising: A communication module, configured to receive first information from a client, wherein the first information includes a port number of a second port, and the second port is a source port of the first information; a processing module, configured to, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, determine that one or more internal service ports of the CPE provide services to the client; The processing module is further configured to determine that the first port provides services for the client when the port number of the second port is different from the port number agreed upon by the CPE and the client.

[0017] In addition, in this aspect, other optional implementations of the communication device can refer to the relevant content of the first aspect above and will not be described in detail here.

[0018] In a third aspect, an embodiment of the present application provides a communication device, comprising a communication module, a power module, a storage module, and a chip, wherein: The power supply module is used to provide power to the communication device; The storage module is used to store data and instructions; The communication module is used for internal communication of the communication device, or for communication between the communication device and an external device; The chip is used to execute the method described in the first aspect above.

[0019] In a fourth aspect, the present application further provides a computer device, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0020] In a fifth aspect, the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for describing the embodiments. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without inventive work.

[0022] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application; Figure 2 A flow chart of a communication method provided in an embodiment of the present application; Figure 3 A flowchart of another communication method provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a communication device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a communication device provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0023] The purpose of this application, its features, and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and the accompanying text are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of this application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0024] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0025] It should be understood that the terms "comprising" and "including" indicate the presence of the described features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following", etc. used in this application may be interpreted as inclusive, or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and for another example, "A, B or C" or "A, B and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C". Exceptions to this definition will only occur when the combination of elements, functions, steps or operations are inherently mutually exclusive in some way.

[0026] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and they can be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0027] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0028] In the subsequent description, the use of suffixes such as "module", "component" or "unit" to represent elements is only for the purpose of facilitating the description of the present application and has no specific meaning. Therefore, "module", "component" or "unit" can be used interchangeably.

[0029] In order to better understand the communication method disclosed in the embodiment of the present application, the system architecture applicable to the embodiment of the present application is described.

[0030] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application. Figure 1 As shown, the communication system includes a client 101 and customer premises equipment (CPE) 102. The client 101 is used to initiate a request to the CPE and receive a response. The CPE 102, as a home gateway device, is used to receive the client's request and return a response.

[0031] The client in the embodiments of the present application may be a terminal device that communicates with the CPE. The terminal device may also be referred to as a terminal, and may refer to various forms of user equipment (UE), access terminal, remote terminal, mobile device, personal computer (PC), user terminal, wireless communication device, user agent, or user device. The terminal device may also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a fifth-generation mobile communication (5G) network, or a terminal device in a future-evolved public land mobile network (PLMN), etc., and the embodiments of the present application are not limited thereto.

[0032] The CPE in the embodiments of this application can be any device deployed on the user side to access the operator's network and provide various network services. The CPE can be a wireless router, a fourth-generation mobile communication (4G) CPE, a 5G CPE, a smart home gateway, etc., and the embodiments of this application are not limited to these.

[0033] In one approach, the CPE's multiple service ports interact directly with the client, providing it with various network services. However, the more service ports the CPE exposes, the greater its potential attack surface, posing a higher network security risk.

[0034] This application embodiment proposes a communication method, which is described from the perspective of CPE. Figure 2 , Figure 2 This is a flow chart of a communication method provided in an embodiment of the present application, which includes but is not limited to: S201. The CPE receives first information from the client through the first port.

[0035] The first port is a port directly exposed to the outside on the CPE, for example, the first port is a port directly exposed to the client on the CPE, and is used for direct interaction with the client. For example, the first port may be port 80.

[0036] The first information includes the port number of the second port, which is the source port of the first information. This helps the CPE determine whether the source port number of the first information (i.e., the port number of the second port) is the same as the port number agreed upon between the CPE and the client. This in turn helps the CPE determine the port providing services to the client and provide the required services to the client based on the determined port.

[0037] In a possible implementation, the CPE checks the port number of the second port.

[0038] Optionally, the CPE verifies the port number of the second port, including: verifying whether the port number of the second port is the same as the port number agreed upon between the CPE and the client. For example, if the port number agreed upon between the CPE and the client is 1024 and the port number of the second port is 1024, then the port number of the second port is the same as the port number agreed upon between the CPE and the client. For another example, if the port number agreed upon between the CPE and the client is 1024 and the port number of the second port is 1022, then the port number of the second port is different from the port number agreed upon between the CPE and the client.

[0039] The CPE and the client may agree on the port number before the client sends the first information, which is not limited in this embodiment of the present application.

[0040] In one possible implementation, the first information is used to request the CPE to establish a connection. That is, the first information may be request information for requesting the CPE to establish a connection. This approach facilitates the CPE, during the connection establishment phase with the client, to determine, based on the port number of the second port, whether the port number of the second port is the same as the port number agreed upon between the CPE and the client, thereby determining the port to provide services to the client. This facilitates the CPE to provide various services to the client based on the determined port.

[0041] S202. When the port number of the second port is the same as the port number agreed upon between the CPE and the client, the CPE determines that one or more internal service ports of the CPE provide services for the client.

[0042] The internal service port is a port on the CPE that is not directly exposed to the outside world. For example, the internal service port is a port on the CPE that is not directly exposed to the client. The internal service port can indirectly interact with the client through the first port. For example, the internal service port can be one or more of port 443, port 22, and port 21.

[0043] Optionally, one or more internal service ports of the CPE provide services to the client, which can be understood as: one or more internal service ports of the CPE provide the client with the required network services. Assuming that the internal service ports include port 443, port 22, and port 21, the CPE can provide encrypted web browsing services to the client through port 443, provide remote login to a server or management server through port 22, and provide file upload and download services to the client through port 21. The services provided to the client by ports 443, 22, and 21 are not limited to the above, and are not limited to these in the embodiments of the present application.

[0044] S203. When the port number of the second port is different from the port number agreed upon between the CPE and the client, the CPE determines that the first port provides services for the client.

[0045] Optionally, providing services to the client through the first port can be understood as providing the client with the required network services through the first port. Assuming the first port is port 80, the CPE can provide web browsing services to the client through port 80. The services provided to the client through port 80 are not limited to the above, and are not limited in this embodiment of the present application.

[0046] It can be seen that in the embodiment of the present application, the CPE can determine that the internal service port of the CPE provides services to the client when the source port number of the first information (i.e., the port number of the second port) is the same as the port number agreed upon by the CPE and the client, thereby facilitating the CPE to forward the received information to the internal service port through the first port to achieve indirect interaction between the second port and the internal service port. Compared with directly exposing multiple service ports, the network security risk of the CPE can be reduced.

[0047] In addition, in an embodiment of the present application, the CPE can determine that the first port provides services to the client when the source port number of the first information (i.e., the port number of the second port) is different from the port number agreed upon by the CPE and the client, which is conducive to the CPE realizing multi-service carrying to meet different service requests of the client.

[0048] See also Figure 3 , Figure 3 A flow chart of another communication method provided in an embodiment of the present application, which includes but is not limited to: S301. The client sends the first information.

[0049] Correspondingly, the CPE receives the first information through the first port.

[0050] The relevant contents of S301 can be found in the relevant description of S201 above, which will not be repeated here.

[0051] S302. The CPE verifies the port number of the second port.

[0052] The relevant contents of S302 can be found in the relevant description of S201 and will not be repeated here.

[0053] The CPE verifies the port number of the second port in the following situations: Case 1: The port number of the second port is the same as the port number agreed upon by the CPE and the client. Execute S303 to S308 below: S303. When the port number of the second port is the same as the port number agreed upon between the CPE and the client, the CPE determines that one or more internal service ports of the CPE provide services for the client.

[0054] The relevant contents of S303 can be found in the relevant description of S202 above, which will not be repeated here.

[0055] S304. The CPE sends information indicating that the verification is complete.

[0056] The information indicating that the verification is completed means that the CPE device has completed the verification between the port number of the second port and the port number agreed upon by the CPE and the client.

[0057] Accordingly, the client receives information indicating that the verification is complete, which facilitates the client to send data to the CPE based on the information to obtain services.

[0058] S305. The client sends the first data through the second port.

[0059] Correspondingly, the CPE receives the first data through the first port.

[0060] Optionally, the first data may be service request data from the client, that is, service request data sent by the client to the CPE. For example, the first data may be service request data requesting the CPE to enable the service corresponding to port 443. For another example, the first data may be service request data requesting the CPE to enable the service corresponding to port 22. For another example, the first data may be service request data requesting the CPE to enable the service corresponding to port 21. In this way, the CPE can parse the service request data and provide the required service to the client.

[0061] The first data includes first identification information for identifying the first data, and the first identification information is used to distinguish the type of the first data. For example, the CPE can distinguish whether the first data is https data, ssh data, or ftp data based on the first identification information.

[0062] It can be seen that when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the CPE receives the first data from the second port through the first port, which is beneficial for the CPE to further determine the receiving port of the first data based on the first identification information, so that the CPE forwards the first data to the corresponding receiving port through the first port to provide services to the client.

[0063] S306. The CPE determines the third port according to the first identification information.

[0064] The third port is one of one or more internal service ports, and is used to indirectly interact with the client and provide services to the client.

[0065] For example, the CPE determines that the third port is port 443 among the one or more internal service ports based on the first identification information indicating that the first data is https data. For another example, the CPE determines that the third port is port 22 among the one or more internal service ports based on the first identification information indicating that the first data is ssh data. For another example, the CPE determines that the third port is port 21 among the one or more internal service ports based on the first identification information indicating that the first data is ftp data.

[0066] It can be seen that the CPE can determine the third port from one or more internal service ports according to the first identification information, which is conducive to the CPE accurately providing the required service to the client according to the third port.

[0067] S307. The CPE sends the first data to the third port through the first port.

[0068] Correspondingly, the CPE receives the first data from the first port through the third port.

[0069] It can be seen that the CPE forwards the first data to the third port through the first port, which is conducive to isolating the third port from the second port, thereby reducing the network security risk of the CPE.

[0070] S308. The CPE provides services to the client based on the third port and the first data.

[0071] Optionally, the CPE provides services to the client based on the third port and the first data, which can be understood as: the CPE parses the first data through the service program of the third port, and provides services to the client through the service program of the third port based on the parsing result.

[0072] For example, the CPE parses https data through the service program on port 443 and, based on the parsing results, provides web page transmission services to the client through the service program on port 443. Another example is that the CPE parses ssh data through the service program on port 22 and, based on the parsing results, provides remote server login or management services to the client through the service program on port 22. Another example is that the CPE parses ftp data through the service program on port 21 and, based on the parsing results, provides file upload and download services to the client through the service program on port 21.

[0073] It can be seen that in case one, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the CPE receives the first data from the second port through the first port, and can further determine the target port (i.e., the third port) of the first data based on the first identification information, so that the first port can forward the first data to the third port, and provide services to the client based on the third port and the first data to meet the client's service request.

[0074] Case 2: If the port number of the second port is different from the port number agreed upon by the CPE and the client, execute S309 to S312 below: S309. If the port number of the second port is different from the port number agreed upon between the CPE and the client, the CPE determines that the first port provides services to the client.

[0075] The relevant contents of S309 can be found in the relevant description of S203 above, which will not be repeated here.

[0076] S310. The CPE sends information indicating that verification is complete.

[0077] Accordingly, the client receives information indicating that the verification is complete.

[0078] The relevant contents of S310 can be found in the relevant description of S304 above, which will not be repeated here.

[0079] S311. The client sends the second data through the second port.

[0080] Correspondingly, the CPE receives the second data through the first port.

[0081] Optionally, the second data may be service request data from the client, i.e., service request data sent by the client to the CPE. For example, the second data may be service request data requesting the CPE to enable a service corresponding to port 80. In this way, the CPE can parse the service request data and provide the required service to the client.

[0082] It can be seen that when the port number of the second port of the CPE is different from the port number agreed upon by the CPE and the client, the first port receives the second data from the second port, which is beneficial for the CPE to provide services to the client based on the first port and the second data.

[0083] S312. The CPE provides services to the client according to the first port and the second data.

[0084] Optionally, the CPE provides services to the client based on the first port and the second data. This can be understood as: the CPE parses the second data through the service program on the first port, and based on the parsing result, provides services to the client through the service program on the first port. For example, the CPE parses HTTP data through the service program on port 80, and based on the parsing result, provides web browsing services to the client through the service program on port 80.

[0085] It can be seen that in case 2, when the port number of the second port of the CPE is different from the port number agreed upon by the CPE and the client, after receiving data through the first port, there is no need to distinguish the data, but the first port can directly parse the data and provide services to the client.

[0086] In addition, the CPE receives the second data from the second port through the first port and provides services to the client according to the first port and the second data. In this way, the first port can also provide services to the client to meet the service request of the client.

[0087] S313. The client sends information indicating disconnection.

[0088] Accordingly, the CPE receives information indicating disconnection.

[0089] Optionally, the client sends a disconnection instruction based on its own circumstances. For example, if the client detects high energy consumption, it sends a disconnection instruction to the CPE to disconnect. For another example, if the client detects insufficient memory resources, it sends a disconnection instruction to the CPE to disconnect.

[0090] It can be seen that in the embodiment of the present application, the CPE receives data from the client through the first port and sends data to the internal service port, which can realize indirect interaction between the second port and the internal service port. Compared with the method of directly exposing multiple service ports, the network security risk of the CPE can be reduced.

[0091] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device includes at least a communication module 401 and a processing module 402, wherein: The communication module 401 is configured to receive first information from a client, where the first information includes a port number of a second port, and the second port is a source port of the first information; The processing module 402 is configured to determine that one or more internal service ports of the CPE provide services for the client when the port number of the second port is the same as the port number agreed upon by the CPE and the client; The processing module 402 is further configured to determine that the first port provides services for the client when the port number of the second port is different from the port number agreed upon by the CPE and the client.

[0092] In an optional implementation, the first information is used to request the CPE to establish a connection.

[0093] In an optional embodiment, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the communication module 401 is also used to receive first data from the client, and the first data includes first identification information for identifying the first data; the processing module 402 is also used to determine the third port based on the first identification information, and the third port is one of one or more internal service ports; the communication module 401 is also used to send the first data to the third port.

[0094] In an optional implementation, the processing module 402 is further configured to provide a service to the client according to the third port and the first data.

[0095] In an optional embodiment, when the port number of the second port is different from the port number agreed upon by the CPE and the client, the communication module 401 is also used to receive the second data from the client through the first port; the processing module 402 is also used to provide services to the client based on the first port and the second data.

[0096] The embodiments of the present application and the above-mentioned method embodiments are based on the same concept, and the technical effects they bring are also the same. For the specific principles, please refer to the description of the above-mentioned embodiments, which will not be repeated here.

[0097] See also Figure 5 , Figure 5 5 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device can execute the relevant steps of the terminal device in the aforementioned method embodiment, and the communication device includes: a communication module 501, a power module 502, a storage module 503 and a chip 504.

[0098] Among them, the power supply module 502 is used to provide power to the communication device; the storage module 503 is used to store data and instructions; the communication module 501 is used for internal communication of the communication device, or for the communication device to communicate with external devices; the chip 504 is used to execute the method executed by the terminal device in the above method embodiment.

[0099] The implementation of the communication device can refer to the relevant content of the above method embodiment and will not be described in detail here.

[0100] The embodiments of the present application and the above-mentioned method embodiments are based on the same concept, and the technical effects they bring are also the same. For the specific principles, please refer to the description of the above-mentioned method embodiments, which will not be repeated here.

[0101] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device includes at least a processor 601, a memory 603, and a user interface 602. The processor 601, the memory 603, and the user interface 602 are interconnected. The memory 603 is used to store a computer program, which includes program instructions, and the processor 601 is used to execute the program instructions.

[0102] The memory 603 may include a volatile memory, such as a random-access memory (RAM); the memory 603 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the memory 603 may also include a combination of the above types of memory.

[0103] Processor 601 may be a central processing unit (CPU). Processor 601 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or the like. The PLD may be a field-programmable gate array (FPGA), a generic array logic (GAL), or the like.

[0104] In an optional embodiment, the memory 603 is further used to store program instructions. The processor 601 can call the program instructions: the processor 601 is configured to call the program instructions and perform the following steps: receiving, via the first port, first information from the client, the first information including the port number of the second port, the source port of the first information being the second port; When the port number of the second port is the same as the port number agreed upon by the CPE and the client, determining that one or more internal service ports of the CPE provide services for the client; When the port number of the second port is different from the port number agreed upon by the CPE and the client, it is determined that the first port provides services for the client.

[0105] Optionally, the first information is used to request the CPE to establish a connection.

[0106] Optionally, when the port number of the second port is the same as the port number agreed upon by the CPE and the client, the processor 601 further performs the following steps: receiving first data from the client through the first port, the first data including first identification information for identifying the first data; determining a third port based on the first identification information, the third port being one of one or more internal service ports; and sending the first data to the third port through the first port.

[0107] Optionally, the processor 601 further performs the following steps: providing a service to the client according to the third port and the first data.

[0108] Optionally, when the port number of the second port is different from the port number agreed upon by the CPE and the client, the processor 601 further performs the following steps: receiving second data from the client through the first port; and providing services to the client based on the first port and the second data.

[0109] The embodiments of the present application and the above-mentioned method embodiments are based on the same concept, and the technical effects they bring are also the same. For the specific principles, please refer to the description of the above-mentioned embodiments, which will not be repeated here.

[0110] The present application also provides a computer-readable storage medium, on which a detection program is stored. When the detection program is executed by a processor, the steps of a calibration method in any of the above embodiments are implemented.

[0111] In the embodiments of the mobile terminal and computer-readable storage medium provided in this application, all technical features of the embodiments of the above-mentioned calibration method are included. The expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned method and will not be repeated here.

[0112] An embodiment of the present application further provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer executes the methods in the various possible implementation modes described above.

[0113] An embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to call and run the computer programs from the memory, so that a device equipped with the chip executes the methods in the various possible implementation modes as described above.

[0114] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0115] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0116] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0117] In this application, the same or similar terminology, technical solutions and / or application scenario descriptions are generally only described in detail the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, for the same or similar terminology, technical solutions and / or application scenario descriptions that are not described in detail later, you can refer to the previous relevant detailed descriptions.

[0118] In this application, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0119] The various technical features of the technical solution of this application can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as mentioned above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the method of each embodiment of the present application.

[0121] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. A computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, they fully or partially produce the processes or functions according to the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. Available media can include magnetic media (e.g., floppy disks, storage disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives).

[0122] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A communication method, characterized in that: The method is applied to customer premises equipment (CPE), and includes: Receiving first information from a client via a first port, wherein the first information includes a port number of a second port, and the second port is a source port of the first information; When the port number of the second port is the same as the port number agreed upon by the CPE and the client, determining that one or more internal service ports of the CPE provide services for the client; When the port number of the second port is different from the port number agreed upon by the CPE and the client, it is determined that the first port provides services for the client.

2. The method according to claim 1, characterized in that The first information is used to request the CPE to establish a connection.

3. The method according to claim 1 or 2, characterized in that In a case where the port number of the second port is the same as the port number agreed upon by the CPE and the client, the method further includes: receiving, via the first port, first data from the client, where the first data includes first identification information for identifying the first data; determining a third port according to the first identification information, where the third port is one of the one or more internal service ports; The first data is sent to the third port through the first port.

4. The method according to claim 3, characterized in that The method further comprises: Provide a service for the client according to the third port and the first data.

5. The method according to claim 1 or 2, characterized in that In a case where the port number of the second port is different from the port number agreed upon by the CPE and the client, the method further includes: receiving second data from the client via the first port; Provide services for the client according to the first port and the second data.

6. A communication device, characterized in that: The communication device includes a communication module, a power module, a storage module and a chip, wherein: The power supply module is used to provide power to the communication device; The storage module is used to store data and instructions; The communication module is used for internal communication of the communication device, or for communication between the communication device and an external device; The chip is used to execute the method according to any one of claims 1 to 5.

7. A computer device, characterized in that: The computer device includes: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed on a communication device, the communication device is caused to execute the method according to any one of claims 1 to 5.

9. A computer program product comprising instructions, characterized in that When the instruction is executed on the communication device, the method according to any one of claims 1 to 5 is implemented.