Service access method, device, system, equipment, storage medium and program product

The first server obtains the public routes and service ports matching the service address information, which solves the problem of security risks of service access between devices in the local area network, and realizes the secure service acquisition without ports.

CN119629251APending Publication Date: 2025-03-14JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411823493.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In a local area network, service access between devices requires open ports, resulting in security risks, especially in anonymous and unknown network environments, devices are vulnerable to attacks.

Method used

Through the first server as a bridge, a public route and service port matching the service address information is obtained, and a service provider is then obtained, and a service request is sent to it to obtain service data. This method does not require the service provider to open the port, and the service requesting side cannot access the port of the service provider at will.

Benefits of technology

It effectively avoids malicious attacks caused by the service requesting side being able to access open service ports at will, and improves the security of service acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629251A_ABST
    Figure CN119629251A_ABST
Patent Text Reader

Abstract

The invention provides a service access method, device and system, electronic equipment, a computer readable storage medium and a computer program product, and relates to the technical field of computers. The method comprises the following steps: in response to obtaining a first service request comprising service address information, obtaining a first public route and a first service port matched with the service address information; obtaining a first service provider mapped by the first public route and the first service port; sending a second service request comprising the service address information to the first service providing end; and receiving service data from the first service provider. According to the method, the service acquisition security can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a service access method, device, system, electronic device, and computer-readable storage medium. Background Art

[0002] Currently, in a local area network, in order for devices to access each other, the accessed device needs to open a service port. However, opening a port will lead to security risks in the process of obtaining services. In many scenarios, such as a public network environment, the devices connected to the network are anonymous and unknown, and the accessed devices are easily attacked. Even in an office network or a home network, opening a port is unsafe. Once a device in the local area network is attacked, other devices in the local area network will also be threatened. Summary of the invention

[0003] The embodiments of the present disclosure provide a service access method, device, system, electronic device, computer-readable storage medium, and computer program product, which can improve the security of service acquisition.

[0004] In a first aspect, an embodiment of the present disclosure proposes a service access method, comprising: in response to obtaining a first service request including service address information, obtaining a first public route and a first service port that match the service address information; obtaining a first service provider that matches the first public route and the first service port; sending a second service request including the service address information to the first service provider; and receiving service data from the first service provider.

[0005] In a possible implementation, the service address information includes a primary address and a secondary address. The above-mentioned acquisition of the first public route and the first service port that match the service address information includes: acquiring the first public route that matches the primary address and the first service port that matches the secondary address. The above-mentioned acquisition of the first service provider mapped to the first public route and the first service port includes: based on the registration information including the mapping relationship between the public route, the service port and the service provider, obtaining the first service provider mapped to the first public route and the first service port.

[0006] In one possible implementation, the method provided in the first aspect also includes: receiving a message requesting to establish a connection from the first service provider, and establishing a connection with the first service provider; receiving a registration request from the first service provider, the registration request including a first service port and a first public route; establishing registration information including a mapping relationship between the first public route, the first service port and the first service provider.

[0007] In a possible implementation, the method provided in the first aspect further includes: parsing the first service request using the first protocol to obtain header information and service address information of the first service request. The sending of the second service request including the service address information to the first service provider includes: encapsulating the header information and the service address information into a plurality of sub-data packets using the second protocol; and sending the plurality of sub-data packets to the first service provider respectively. The receiving of the service data from the first service provider includes: receiving a plurality of service sub-data from the first service provider respectively. The plurality of service sub-data are parsed using the second protocol to obtain the service data.

[0008] In the second aspect, an embodiment of the present disclosure proposes a service access method, including: receiving a second service request from a first server, the second service request including service address information; obtaining a first service port matching the service address information from a local service port; obtaining service data based on the first service port; and sending the service data to the first server.

[0009] In a possible implementation, the service address information includes a primary address and a secondary address. The obtaining of the first service port matching the service address information from the local service port includes: obtaining the first service port matching the secondary address from the local service port.

[0010] In a possible implementation, the method provided in the second aspect also includes: in response to obtaining a startup operation of the service tool, sending a message requesting to establish a connection to the first server and establishing a connection with the first server; sending a registration request to the first server, the registration request including a first service port and a first public route.

[0011] In a possible implementation, the receiving of the second service request from the first server includes: receiving multiple sub-data packets from the first server respectively. Parsing the multiple sub-data packets respectively using the second protocol to obtain header information and service address information. Sending the service data to the first server includes: encapsulating the service data into multiple service sub-data using the second protocol. Sending the multiple service sub-data to the first server respectively based on the header information.

[0012] In a third aspect, an embodiment of the present disclosure provides a service access device, including: a first acquisition module, configured to obtain a first public route and a first service port that match the service address information in response to obtaining a first service request including service address information. A second acquisition module, configured to obtain a first service provider mapped to the first public route and the first service port. A first sending module, configured to send a second service request including service address information to the first service provider. A first receiving module, configured to receive service data from the first service provider.

[0013] In a possible implementation, the service address information includes a primary address and a secondary address. The first acquisition module is further configured to acquire a first public route matching the primary address and a first service port matching the secondary address. The second acquisition module is further configured to obtain the first service provider mapped to the first public route and the first service port based on registration information including a mapping relationship between the public route, the service port, and the service provider.

[0014] In a possible implementation, the device provided in the third aspect further includes: a second receiving module, configured to receive a message from the first service provider requesting to establish a connection, and establish a connection with the first service provider. A third receiving module, configured to receive a registration request from the first service provider, the registration request including the first service port and the first public route. A registration module, configured to establish registration information including a mapping relationship between the first public route, the first service port, and the first service provider.

[0015] In a possible implementation, the device provided by the third aspect also includes: a third acquisition module, configured to parse the first service request using the first protocol to obtain header information and service address information of the first service request. An encapsulation module, configured to encapsulate the header information and service address information into multiple sub-data packets using the second protocol. The first sending module is further configured to send multiple sub-data packets to the first service provider respectively. The first receiving module is further configured to receive multiple service sub-data from the first service provider respectively. The parsing module is configured to parse the multiple service sub-data using the second protocol to obtain service data.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a service access device, comprising: a first receiving module, configured to receive a second service request from a first server, the second service request including service address information; a first obtaining module, configured to obtain a first service port matching the service address information from a local service port; a second obtaining module, configured to obtain service data based on the first service port; and a first sending module, configured to send service data to the first server.

[0017] In a possible implementation, the service address information includes a primary address and a secondary address. The first acquisition module is further configured to acquire a first service port matching the secondary address from the local service port.

[0018] In a possible implementation, the apparatus provided in the fourth aspect further includes: a second sending module, configured to, in response to a startup operation of obtaining a service tool, send a message requesting to establish a connection to the first server, and establish a connection with the first server. A third sending module, configured to send a registration request to the first server, the registration request including the first service port and the first public route.

[0019] In a possible implementation, the apparatus provided in the fourth aspect further includes: a first receiving module, further configured to receive multiple sub-data packets from the first server respectively. A parsing module, configured to parse the multiple sub-data packets respectively using the second protocol to obtain header information and service address information. An encapsulation module, configured to encapsulate the service data into multiple service sub-data using the second protocol. A first sending module, further configured to send the multiple service sub-data to the first server respectively based on the header information.

[0020] In a fifth aspect, an embodiment of the present disclosure provides a service access system, comprising: a first server and a service provider. The first server is configured to implement the method described in any implementation of the first aspect. The service provider is configured to implement the method described in any implementation of the second aspect. Alternatively, the service access system includes a device described in any implementation of the third aspect and a device described in any implementation of the fourth aspect.

[0021] In a possible implementation, the service access system provided in the fifth aspect may further include a service request end configured to send a first service request to the first server and receive service data from the service request end.

[0022] In a sixth aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any implementation manner in the first aspect when executing.

[0023] In a seventh aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the method described in any implementation manner in the first aspect when executed.

[0024] In an eighth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the method described in any implementation manner in the first aspect.

[0025] In the solution provided by the embodiment of the present disclosure, the first server serves as a bridge for the service request end to obtain services from the service provider end. The first server obtains the first public route and the first service port that match the requested service address information to obtain the first service provider end that needs to be accessed, and the first server sends a second service request including the service address information to the first service provider end to obtain service data. The first service provider end does not need to open a port, and the service request end cannot arbitrarily access the service port of the service provider end. Malicious attacks caused by the service request end being able to arbitrarily access the open service port can be avoided, and the security of service acquisition can be improved.

[0026] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0028] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;

[0029] Figure 2 A flow chart of a service access method provided by an embodiment of the present disclosure;

[0030] Figure 3 A flowchart of another service access method provided by an embodiment of the present disclosure;

[0031] Figure 4a A schematic diagram of a scenario provided for an embodiment of the present disclosure;

[0032] Figure 4b Another schematic diagram of a scenario provided for an embodiment of the present disclosure;

[0033] Figure 5 A flowchart of another service access method provided by an embodiment of the present disclosure;

[0034] Figure 6 A flowchart of another service access method provided by an embodiment of the present disclosure;

[0035] Figure 7 A structural block diagram of a service access device provided in an embodiment of the present disclosure;

[0036] Figure 8 A structural block diagram of a service access device provided in an embodiment of the present disclosure;

[0037] Fig. 9A schematic diagram of the structure of an electronic device suitable for executing a service access method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.

[0039] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0040] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the service access method, apparatus, system, electronic device, and computer-readable storage medium of the present disclosure can be applied.

[0041] like Figure 1 As shown, the system architecture 100 may include a service request end 101, a first server 102, and a service provider 103, and the service request end 101 may be optional. The service request end 101, the first server 102, and the service provider 105 may be connected via a network, and the network may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0042] The user can use the service request end 101 to interact with the service provider end 103 through the first server 102 to receive or send messages, etc. The service request end 101, the first server 102 and the service provider end 103 can be installed with various applications for realizing information communication between the two, such as service applications, instant messaging applications, etc.

[0043] The service request end 101, the first server 102 and the service provider 103 can be hardware or software. When the service request end 101 is hardware, it can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when the service request end 101 is software, it can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited here. When the first server 102 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited here. When the service provider 103 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server, and can also have a display screen; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited here.

[0044] The first server 102 can provide various services through various built-in applications. The first server 102 can achieve the following effects: in response to obtaining a first service request including service address information, obtaining a first public route and a first service port that match the service address information; obtaining a first service provider mapped to the first public route and the first service port; sending a second service request including service address information to the first service provider; and receiving service data from the first service provider.

[0045] It should be understood that Figure 1 The number of the service request end, the first server and the service provider in the embodiment is only illustrative, and the number may be one or more. According to the implementation requirements, there may be any number of service request ends, the first server and the service provider.

[0046] Please refer to Figure 2 , Figure 2 A flowchart of a service access method provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:

[0047] Step 201: In response to obtaining a first service request, a first public route and a first service port matching the service address information are obtained.

[0048] Exemplarily, the first service request includes service address information. After receiving the service address information, the execution subject (such as the first server) obtains the first public route and the first service port that match the service address information.

[0049] Optionally, the first service request may come from a service request end, and the service address information may include the address or path information of the requested service.

[0050] Step 202: Obtain a first service provider mapped to a first public route and a first service port.

[0051] Exemplarily, the execution subject obtains the first service provider to which the first public route and the first service port are mapped at the same time, and obtains the service provider (such as the first service provider) corresponding to the requested service.

[0052] Step 203: Send a second service request to the first service provider.

[0053] Exemplarily, the second service request includes service address information.

[0054] For example, after obtaining the service provider corresponding to the requested service, the first server sends a second service request to the service provider to request service data corresponding to the service address information.

[0055] Step 204: Receive service data from the first service provider.

[0056] In some embodiments, the method provided by the embodiments of the present disclosure may further include: the first server sends service data to the service request end. Correspondingly, the service request end receives the service data from the first server.

[0057] In the solution provided by the embodiment of the present disclosure, the first server serves as a bridge for the service request end to obtain services from the service provider end. The first server obtains the first public route and the first service port that match the requested service address information to obtain the first service provider end that needs to be accessed, and the first server sends a second service request including the service address information to the first service provider end to obtain service data. The first service provider end does not need to open a port, and the service request end cannot arbitrarily access the service port of the service provider end. Malicious attacks caused by the service request end being able to arbitrarily access the open service port can be avoided, and the security of service acquisition can be improved.

[0058] Please refer to Figure 3 , Figure 3 A flowchart of another service access method provided by an embodiment of the present disclosure, wherein process 300 includes the following steps:

[0059] Step 301: In response to obtaining a first service request, the first server obtains a first public route and a first service port that match the service address information.

[0060] Step 302: Obtain a first service provider mapped to a first public route and a first service port.

[0061] The implementation of step 301-step 302 can refer to the above-mentioned step 201-step 202, which will not be repeated here.

[0062] Combination Figure 4a , the service request end 401a sends a first service request to the first server 402a, and the first server 402a receives the first service request from the service request end 401a. The first service request may indicate the requested service, for example, the service address information includes an address of / clientA / data.txt, indicating the path or address of the file to be obtained, and the requested service is to obtain the file.

[0063] Step 303: The first server sends a second service request to the first service provider. Correspondingly, the first service provider receives the second service request from the first server.

[0064] Exemplarily, the second service request includes service address information.

[0065] For example, after obtaining the service provider corresponding to the requested service, the first server sends a second service request to the service provider to request service data corresponding to the service address information.

[0066] Combination Figure 4a , the first server 402a sends a second service request to the transceiver of the first service provider 403a through the transceiver, and the transceiver of the first service provider 403a receives the second service request. Optionally, the registrar is used to register the service provider. The registration scheme can refer to the following Figure 6 The method provided.

[0067] Step 304: The first service provider obtains a first service port matching the service address information from the local service port.

[0068] In this embodiment, the number of service ports included in the local service port of the first service provider may be one or more. The first service provider obtains the first service port that matches the service address information from the local service port, finds the service port corresponding to the requested service (such as the first service port), and obtains the service port number.

[0069] Step 305: The first service provider obtains service data based on the first service port.

[0070] In this embodiment, the first service provider obtains service data corresponding to the service requested by the service requester through the first service port.

[0071] Combination Figure 4a, the transceiver of the service tool of the first service provider 403a sends a service request to the business server (Biz Server) of the local machine corresponding to the first service port, for example, requesting to access the file data.txt. After receiving the service request, the business server obtains the processing result (such as service data). The service tool can be software on the first service provider 403a, including a transceiver. The service tool can be used to connect to the business server to complete information exchange, as well as user configuration related functions, for example, the user can configure the service in the service tool.

[0072] Step 306: The first service provider sends service data to the first server. Correspondingly, the first server receives the service data from the first service provider.

[0073] In some embodiments, the method provided by the embodiments of the present disclosure may further include: the first server sends service data to the service request end. Correspondingly, the service request end receives the service data from the first server.

[0074] Combination Figure 4a , the business server sends the service data to the transceiver of the service tool, the transceiver of the service tool sends the service data to the first server 402a, and the first server 402a sends the service data to the service request end 401a.

[0075] In the solution provided by the embodiment of the present disclosure, the first server serves as a bridge for the service request end to obtain services from the service provider end. The first service provider end does not need to open a port, and the service request end cannot arbitrarily access the service port of the service provider end. This can avoid malicious attacks caused by the service request end being able to arbitrarily access the open service port, and can improve the security of service acquisition.

[0076] In some embodiments, the service address information includes a primary address and a secondary address. For example, the service address information includes / clientA / data.txt, where / clientA / is the primary address and / data.txt is the secondary address.

[0077] Optionally, in the above step 201, the first server obtains the first public route and the first service port that match the service address information, which may include: the first server obtains the first public route that matches the primary address and the first service port that matches the secondary address. In the above step 202, the first service provider end mapped with the first public route and the first service port may be obtained based on the registration information including the mapping relationship between the public route, the service port and the service provider end, the first service provider end mapped with the first public route and the first service port is obtained.

[0078] In this embodiment, the first server stores registration information, which includes a mapping relationship between a public route, a service port, and a service provider. The first server can obtain the first service provider corresponding to the primary address and the secondary address based on the mapping relationship between the public route, the service port, and the service provider. For example, the first public route matching the primary address and the first service port matching the secondary address are first obtained, and then the first service provider mapped with the first public route and the first service port is obtained. In this way, the first service provider corresponding to the requested service can be obtained based on the registration information without opening the port, and secure access can be achieved, and the access operation is simple and easy to implement.

[0079] Optionally, the above step 304, in which the first service provider obtains the first service port matching the service address information from the local service port, may include: the first service provider obtains the first service port matching the secondary address from the local service port.

[0080] For example, the first service provider obtains the first service port that matches the secondary address from the local service port, so that the service port corresponding to the requested service can be obtained.

[0081] In some embodiments, the above step 203 may include the following steps a to e.

[0082] Step a: The first server parses the first service request to obtain header information and service address information of the first service request.

[0083] For example, the header information may include, but is not limited to, one or more of the following: encoding method, content type, user credentials, and cache time.

[0084] Combination Figure 4b , the first server 402b uses the first protocol to parse the first service request to obtain the header information and service address information of the first service request. Optionally, before parsing, the first server 402b receives the first service request, which may first pass through a buffer layer to prevent high concurrency from causing thread jamming, and then parse the first service request through the buffer layer to obtain the header information and service address information. Optionally, before parsing, the first server 402b receives the first service request from the service request end 401b.

[0085] Step b: The first server encapsulates the header information and the service address information into a data packet.

[0086] Combination Figure 4b The first server 402b uses the second protocol to encapsulate the header information and the service address information into a data packet.

[0087] Step c: The first server sends a second service request to the first service provider. Correspondingly, the first service provider receives the second service request from the first server.

[0088] Exemplarily, the second service request includes a data packet.

[0089] Combination Figure 4b , the first server 402b sends a second service request including a data packet to the first service provider 403b.

[0090] Step d: The first service provider parses the data packet to obtain header information and service address information.

[0091] Combination Figure 4b The first service provider 403b uses the second protocol to parse the data packet to obtain header information and service address information.

[0092] Step e: The first service provider obtains a first service port that matches the service address information from a local service port, and obtains service data based on the first service port.

[0093] Combination Figure 4b The first service provider 403b uses the third protocol to encapsulate the header information and the service request content (for example, the requested service, such as accessing a file), sends a service request to the business server corresponding to the first service port, obtains the service data from the business server, and then uses the third protocol to parse the service data.

[0094] Step f: The first service provider sends service data to the first server based on the header information.

[0095] Combination Figure 4b The first service provider 403b encapsulates the service data using the second protocol, and sends the encapsulated service data to the first server 402b based on the header information.

[0096] Please refer to Figure 5 , Figure 5 A flowchart of another service access method provided by an embodiment of the present disclosure, wherein process 500 includes the following steps:

[0097] Step 501: The first server parses the first service request using the first protocol to obtain header information and service address information of the first service request.

[0098] The specific implementation of the above step 501 can refer to the specific implementation of the above step a, which will not be repeated here.

[0099] Step 502: The first server uses the second protocol to encapsulate the header information and the service address information into a plurality of sub-data packets.

[0100] For example, the second protocol may include a segmented transmission protocol, such as a segmented compression transmission protocol based on the Transmission Control Protocol (TCP).

[0101] Step 503: The first server sends a plurality of sub-data packets to the first service provider, and the first service provider receives the plurality of sub-data packets from the first server.

[0102] For example, the first server sends data packets to the first service provider at a sub-data packet granularity to ensure efficient data transmission.

[0103] Exemplarily, the above step 203 may include the above steps 502 to 503.

[0104] Step 504: The first service provider uses the second protocol to parse the multiple sub-data packets respectively to obtain header information and service address information.

[0105] For example, the first service provider uses a fragmented transmission protocol to parse each sub-data packet to obtain header information and service address information.

[0106] Step 505: The first service provider obtains a first service port that matches the service address information from the local service port, and obtains service data based on the first service port.

[0107] The specific implementation of the above step 505 can refer to the specific implementation of the above step e, which will not be repeated here.

[0108] Step 506: The first service provider uses the second protocol to encapsulate the service data into a plurality of service sub-data.

[0109] Step 507: The first service provider sends multiple service sub-data to the first server based on the header information. Correspondingly, the first server receives multiple service sub-data from the first service provider.

[0110] For example, the first service provider sends service data to the first server at the service sub-data granularity to ensure efficient data transmission.

[0111] Step 508: The first server uses the second protocol to parse the multiple service sub-data to obtain service data.

[0112] In the solution provided by the embodiment of the present disclosure, when data is transmitted between the first server and the service provider, a fragmentation compression method is adopted to compress the data in frames, which can avoid time-consuming compression accumulation and head-of-line blocking, thereby improving transmission efficiency and reducing network time consumption.

[0113] Please refer to Figure 6 , Figure 6 A flowchart of another service access method provided by an embodiment of the present disclosure, wherein process 600 includes the following steps:

[0114] Step 601: In response to the startup operation of obtaining the service tool, the first service provider sends a message requesting to establish a connection to the first server and establishes a connection with the first server. Correspondingly, the first server receives the message requesting to establish a connection from the first service provider and establishes a connection with the first service provider.

[0115] Exemplarily, the startup operation of the service tool may be an operation in which a user starts the service tool, the first service provider starts the service tool, and sends a message to the first server requesting to establish a connection. For example, the connection established between the first service provider and the first server may include a TCP long connection, which can achieve reliable and stable communication.

[0116] Step 602: The first service provider sends a registration request to the first server. Correspondingly, the first server receives the registration request from the first service provider.

[0117] Exemplarily, the registration request includes a first service port and a first public route.

[0118] For example, the first service provider can obtain the first service port and the first public route, for example, by the user setting up the proxy local service operation in the service tool, and obtaining the first service port and the first public route. The user specifies the first service port and the first public route. The first service port can be used to interact with the local service (business server) and can also be used for registration. The first public route can be used for registration. For example, the first public route is / clientA / .

[0119] Step 603: The first server establishes registration information including a mapping relationship between the first public route, the first service port, and the first service provider.

[0120] Exemplarily, the first server receives the registration request, establishes a mapping relationship between the first public route, the first service port and the first service provider, and completes the registration of the first service provider. Optionally, the number of service providers registered with the first server may be one or more.

[0121] In the solution provided by the embodiment of the present disclosure, each service provider is linked through the first server, and the service provider is registered with the first server, so that the service requester can access the service provider through the first server. The service provider does not need to open a port, and security can be guaranteed.

[0122] Further references Figure 7As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a service access device. The device embodiment corresponds to the above method embodiment, and the device can be specifically applied to various electronic devices.

[0123] like Figure 7 As shown, the service access device 700 of this embodiment may include: a first acquisition module 701, a second acquisition module 702, a first sending module 703 and a first receiving module 704. Among them, the first acquisition module 701 is configured to obtain a first public route and a first service port that match the service address information in response to obtaining a first service request including service address information. The second acquisition module 702 is configured to obtain a first service provider mapped to the first public route and the first service port. The first sending module 703 is configured to send a second service request including service address information to the first service provider. The first receiving module 704 is configured to receive service data from the first service provider.

[0124] In this embodiment, in the service access device 700, the specific processing of the first acquisition module 701, the second acquisition module 702, the first sending module 703 and the first receiving module 704 and the technical effects brought about by them can refer to the relevant descriptions of the above method embodiments respectively, and will not be repeated here.

[0125] In a possible implementation, the service address information includes a primary address and a secondary address. The first acquisition module 701 is further configured to acquire a first public route matching the primary address and a first service port matching the secondary address. The second acquisition module 702 is further configured to obtain the first service provider end mapped with the first public route and the first service port based on the registration information including the mapping relationship between the public route, the service port and the service provider end.

[0126] In a possible implementation, the service access device 700 further includes: a second receiving module configured to receive a message from the first service provider requesting to establish a connection, and establish a connection with the first service provider. A third receiving module configured to receive a registration request from the first service provider, the registration request including the first service port and the first public route. A registration module configured to establish registration information including a mapping relationship between the first public route, the first service port, and the first service provider.

[0127] In a possible implementation, the service access device 700 further includes: a third acquisition module, configured to parse the first service request using the first protocol to obtain header information and service address information of the first service request. An encapsulation module, configured to encapsulate the header information and service address information into multiple sub-data packets using the second protocol. The first sending module 703 is further configured to send multiple sub-data packets to the first service provider respectively. The first receiving module 704 is further configured to receive multiple service sub-data from the first service provider respectively. The parsing module is configured to parse the multiple service sub-data using the second protocol to obtain service data.

[0128] Further references Figure 8 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a service access device. The device embodiment corresponds to the above method embodiment, and the device can be specifically applied to various electronic devices.

[0129] like Figure 8 As shown, the service access device 800 of this embodiment may include: a first receiving module 801, a first acquisition module 802, a second acquisition module 803 and a first sending module 804. Among them, in the fourth aspect, the embodiment of the present disclosure provides a service access device, including: a first receiving module 801, configured to receive a second service request from a first server, the second service request including service address information. The first acquisition module 802 is configured to obtain a first service port that matches the service address information from a local service port. The second acquisition module 803 is configured to obtain service data based on the first service port. The first sending module 804 is configured to send service data to the first server.

[0130] In a possible implementation, the service address information includes a primary address and a secondary address. The service access device 800 further includes: a first acquisition module 802, further configured to acquire a first service port matching the secondary address from the local service port.

[0131] In a possible implementation, the service access device 800 further includes: a second sending module configured to, in response to the startup operation of obtaining the service tool, send a message requesting to establish a connection to the first server and establish a connection with the first server. A third sending module configured to send a registration request to the first server, the registration request including the first service port and the first public route.

[0132] In a possible implementation, the service access device 800 further includes: a first receiving module 801, further configured to receive multiple sub-data packets from the first server respectively. A parsing module, configured to parse the multiple sub-data packets respectively using the second protocol to obtain header information and service address information. An encapsulation module, configured to encapsulate the service data into multiple service sub-data using the second protocol. A first sending module 804, further configured to send the multiple service sub-data to the first server respectively based on the header information.

[0133] According to an embodiment of the present disclosure, the present disclosure further provides a service access system, including: a first server and a service provider. The first server is configured to implement the method performed by the first server described in any implementation of the above method embodiment. The service provider is configured to implement the method performed by the service provider described in any implementation of the above method embodiment. Alternatively, the service access system includes: Figure 7 The device described in any implementation manner and Figure 8 The device described in any one of the implementation methods.

[0134] In a possible implementation, the service access system may further include a service request end configured to send a first service request to the first server and receive service data from the service request end.

[0135] This embodiment exists as a device embodiment corresponding to the above method embodiment. The technical effects brought about by the embodiments involving the device provided by this embodiment can be referred to the corresponding relevant descriptions in the above method embodiment respectively, and will not be repeated here.

[0136] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the method described in any of the above embodiments can be implemented when the at least one processor executes.

[0137] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.

[0138] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.

[0139] Fig. 9A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0140] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0141] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0142] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the service access method. For example, in some embodiments, the service access method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the service access method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the service access method in any other appropriate manner (e.g., by means of firmware).

[0143] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0144] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0145] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0146] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0147] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0148] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services. The server may also be a server of a distributed system, or a server combined with a blockchain.

[0149] According to the technical solution of the embodiment of the present disclosure, the first server serves as a bridge for the service request end to obtain services from the service provider end. The first server obtains the first public route and the first service port that match the requested service address information to obtain the first service provider end that needs to be accessed, and the first server sends a second service request including the service address information to the first service provider end to obtain service data. The first service provider end does not need to open the port, and the service request end cannot arbitrarily access the service port of the service provider end. Malicious attacks caused by the service request end being able to arbitrarily access the open service port can be avoided, and the security of service acquisition can be improved.

[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0151] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A service access method, comprising: In response to obtaining a first service request including service address information, acquiring a first public route and a first service port matching the service address information; Obtain a first service provider end for mapping the first public route and the first service port; Sending a second service request including the service address information to the first service provider; Receive service data from the first service provider.

2. The method according to claim 1, wherein: The service address information includes a primary address and a secondary address; The obtaining of the first public route and the first service port matching the service address information includes: obtaining the first public route matching the primary address and the first service port matching the secondary address; The obtaining of the first service provider mapped to the first public route and the first service port includes: obtaining the first service provider mapped to the first public route and the first service port based on registration information including a mapping relationship between a public route, a service port and a service provider.

3. The method according to claim 1 or 2, further comprising: receiving a message from the first service provider requesting to establish a connection, and establishing a connection with the first service provider; receiving a registration request from the first service provider, the registration request including the first service port and the first public route; Registration information including a mapping relationship between the first public route, the first service port and the first service provider is established.

4. The method according to claim 1 or 2, further comprising: Parsing the first service request using a first protocol to obtain header information of the first service request and the service address information; The sending of the second service request including the service address information to the first service provider includes: encapsulating the header information and the service address information into a plurality of sub-data packets using a second protocol; and sending the plurality of sub-data packets to the first service provider respectively; The receiving of the service data from the first service provider includes: receiving a plurality of service sub-data from the first service provider respectively; and parsing the plurality of service sub-data using a second protocol to obtain the service data.

5. A service access method, comprising: receiving a second service request from the first server, wherein the second service request includes service address information; Obtaining a first service port matching the service address information from the local service ports; Based on the first service port, obtaining service data; The service data is sent to the first server.

6. The method according to claim 5, wherein: The service address information includes a primary address and a secondary address; obtaining a first service port matching the service address information from a local service port includes: obtaining a first service port matching the secondary address from the local service port.

7. A service access device, comprising: A first acquisition module is configured to, in response to obtaining a first service request including service address information, acquire a first public route and a first service port matching the service address information; Acquire a first service provider that matches the first public route and the first service port; A first sending module is configured to send a second service request including the service address information to the first service provider; The first receiving module is configured to receive service data from the first service provider.

8. A service access device, comprising: A first receiving module is configured to receive a second service request from the first server, wherein the second service request includes service address information; A first acquisition module is configured to obtain a first service port matching the service address information from a local service port; A second acquisition module is configured to acquire service data based on the first service port; The first sending module is configured to send the service data to the first server.

9. A service access system, comprising: A first server and a service provider; The first server is configured to execute the method according to any one of claims 1 to 4; The service provider is configured to execute the method according to claim 5 or 6.

10. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the service access method described in any one of claims 1 to 4, or claim 5 or 6.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the service access method described in any one of claims 1 to 4, or claim 5 or 6.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the service access method according to any one of claims 1 to 4, or claim 5 or 6.