WO2023217187A1 - 服务响应方法、装置、设备及存储介质 - Google Patents
服务响应方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2023217187A1 WO2023217187A1 PCT/CN2023/093269 CN2023093269W WO2023217187A1 WO 2023217187 A1 WO2023217187 A1 WO 2023217187A1 CN 2023093269 W CN2023093269 W CN 2023093269W WO 2023217187 A1 WO2023217187 A1 WO 2023217187A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service
- socket
- target
- client
- request message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Definitions
- the embodiments of the present disclosure relate to communication technology, for example, to a service response method, device, equipment and storage medium.
- different servers may detect different ports.
- the client requests services from the server, it will first negotiate the port with the server, and then actually establish a connection based on the negotiated port, that is, the client establishes a connection with the negotiated port.
- the above method of requesting services may cause the server negotiated by the client to be different from the server actually established.
- the client negotiates a port with server A
- the negotiated port is Port a
- load balancing scheduling allows the client to actually establish a connection with server B.
- the ports detected by each server may be inconsistent.
- server B does not detect port a, causing the client to fail to establish a connection.
- the related technology has the following technical problems: In the scenario of a server cluster scheduled by load balancing, the ports detected by each server may be different. If the server actually established with the client does not detect the port of the server negotiated with the client, This causes the client service request to fail.
- the present disclosure provides a service response method, device, equipment and storage medium to solve the problem that in the scenario of a load balancing scheduled server cluster, the server actually connected to the client does not detect the port of the server negotiated with the client. Technical issues causing client service requests to fail.
- embodiments of the present disclosure provide a service response method, including:
- the service request message is sent to the target service response process through the target socket.
- embodiments of the present disclosure also provide a service response device, including:
- the client request module is configured to determine, based on the service request message, the target client corresponding to the requesting client in response to detecting through the socket detection mechanism a service request message initiated by the requesting client through the preset service port. terminal identification information;
- a socket determination module configured to determine the target socket corresponding to the service request message according to the target client identification information and a pre-established service data file, wherein the service data file is used to store the connected Correspondence between the client identification information of the connected client of the service response process and the socket of the service response process to which the connected client is connected;
- the request response module is configured to send the service request message to the target service response process through the target socket.
- embodiments of the present disclosure also provide an electronic device, where the electronic device includes:
- a storage device arranged to store at least one program
- the at least one processor When the at least one program is executed by the at least one processor, the at least one processor is caused to implement the service response method as described in any embodiment of the present disclosure.
- embodiments of the present disclosure also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform a service response as described in any embodiment of the present disclosure. method.
- Figure 1 is a schematic flow chart of a service response method provided by an embodiment of the present disclosure
- Figure 2 is a schematic flow chart of another service response method provided by an embodiment of the present disclosure.
- Figure 3A is a schematic flow chart of another service response method provided by an embodiment of the present disclosure.
- Figure 3B is a working schematic diagram of an application layer NSS architecture provided by an embodiment of the present disclosure.
- Figure 4A is a schematic flowchart of another service response method provided by an embodiment of the present disclosure.
- Figure 4B is a schematic process diagram of a service response method provided by an embodiment of the present disclosure.
- Figure 5 is a schematic structural diagram of a service response device provided by an embodiment of the present disclosure.
- FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
- the term “include” and its variations are open-ended, ie, “including but not limited to.”
- the term “based on” means “based at least in part on.”
- the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
- a prompt message is sent to the user to clearly remind the user that the operation requested will require the acquisition and use of the user's personal information. Therefore, users can autonomously choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that perform the operations of the technical solution of the present disclosure based on the prompt information.
- the method of sending prompt information to the user may be, for example, a pop-up window, and the prompt information may be presented in the form of text in the pop-up window.
- the pop-up window can also contain a selection control for the user to choose "agree” or "disagree” to provide personal information to the electronic device.
- Figure 1 is a schematic flow chart of a service response method provided by an embodiment of the present disclosure.
- the embodiment of the present disclosure is suitable for detecting a preset service port through a socket detection mechanism and obtaining services initiated by each client through the preset service port. request message, determine the target service response process corresponding to the service request message, and respond to the service request message through the target service response process.
- the method can be executed by a service response device, and the device can be implemented through software and/or Or implemented in the form of hardware.
- it can be implemented through electronic equipment.
- the electronic equipment can be a mobile terminal, a personal computer (Personal Computer, PC) or a server.
- PC Personal Computer
- the method includes:
- the target client identification information corresponding to the requesting client is determined based on the service request message.
- the socket detection mechanism may be a mechanism in which at least one socket in the server corresponding to the preset service port detects the preset service port to detect service request messages sent by each requesting client through the preset service port. .
- the preset service port may be a port for the requesting client to allow the requesting client to request business services from the server.
- the requesting client may send a service request message to the preset service port to request the preset service port.
- the preset service ports corresponding to different business services may be different.
- the default service port corresponding to requesting live broadcast data is port_a
- the default service port corresponding to requesting web page update data is port_b.
- the identification information corresponding to the requesting client can be determined based on the service request message. That is, the target client identification information.
- the service request message can be parsed, and identification information that uniquely describes the requesting client can be parsed from the service request message and used as the target client identification information. For example, if the service request message is an HTTP/3 (HyperText Transfer Protocol/3) message, you can directly extract from the HTTP3 protocol message that can be used to describe the identity information of the requesting client. Target client identification information.
- HTTP/3 HyperText Transfer Protocol/3
- the target client identification information used to describe the identity information of the requesting client can also be calculated based on the information in the service request message.
- the service request message carries the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address and transport layer protocol of the service response process; based on the service request message
- the document determines the target client identification information corresponding to the requesting client, including: based on the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address and transport of the service response process layer protocol to generate target client identification information corresponding to the requesting client.
- the protocol port of the requesting client can be the source port of the service request message; the Internet Protocol address of the requesting client can be the source IP (Internet Protocol, Internet Protocol) address of the service request message; the protocol of the service response process The port may be the destination port of the service request message; the Internet Protocol address of the service response process may be the destination IP address of the service request message.
- the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process and the transport layer protocol can be used as the service request report.
- the five-tuple information of the document is generated, and the target client identification information corresponding to the requesting client is generated based on the five-tuple information.
- the target client identification information can be generated based on the five-tuple information in the message. In this way, unique identification information describing the business service requested by the target client can be obtained, thereby facilitating the determination of a process that responds to the client's service request based on the unique identification information.
- a target client corresponding to the requesting client is generated based on the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process, and the transport layer protocol.
- the identification information may be: calculating the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process and the transport layer protocol according to a preset hash algorithm , using the calculated hash value as the target client identification information corresponding to the requesting client.
- the preset hash algorithm may be a hash algorithm such as MD5 (MD5 Message-Digest Algorithm, MD5 message digest algorithm), SHA (Secure Hash Algorithm, secure hash algorithm), etc.
- the preset hash algorithm can be used to calculate a hash value that meets the preset length based on the given five-tuple information, that is, the hash value.
- the hash value calculated by the preset hash algorithm is unique, and different five-tuple information corresponds to different hash values. Therefore, a preset hash algorithm can be used to calculate the five-tuple information to obtain target client identification information that conforms to the preset length.
- the preset length may be 32 bits, which is not limited in this embodiment of the disclosure. Calculating the target client identification information through a hash algorithm can ensure that the target client identification information is unique, and can obtain fixed-length target client identification information, reducing the storage overhead required for the target client identification information.
- the service data file records the client identification information of the connected client that has connected to the service response process, and the socket of the service response process to which the connected client is connected.
- the service response process may be a process in the server used to respond to the client's business service, that is, a process that processes the client's service request message. For each service response process, a corresponding socket can be set.
- the target client identification information For example, after obtaining the target client identification information, you can query whether the target client identification information exists in the service data file. If it exists, it means that the requesting client is a connected client that has connected to the service response process. end, you can use the socket corresponding to the target client identification information in the service data file as the target socket corresponding to the service request message to request the service through the service response process that was last connected to the requesting client. The message is processed.
- the target client identification information does not exist in the service data file, it can mean that the requesting client is an unconnected client that has not connected to the service response process.
- the target socket that conforms to the protocol corresponding to the service request message may be determined from at least one socket monitoring the preset service port according to the protocol corresponding to the service request message.
- the target client identification information does not exist in the service data file, you can also determine the estimated processing overhead corresponding to the service request message, and monitor the destination of the preset service port based on the estimated processing overhead.
- the service corresponding to one less socket responds to the load information of the process and determines the target socket in at least one socket. For example, according to the load balancing scheduling principle of each service response process in the server, through the load information of the service response process corresponding to at least one socket, and the expected processing overhead of processing the service request message, in each service response process Determine the target service response process, and use the socket corresponding to the target service response process as the target socket.
- the target service response process can also be determined in the service response process based on the priority of the service response process corresponding to the socket and the load information of the service response process. , use the socket corresponding to the target service response process as the target socket.
- the service request message can be sent to the target service response process corresponding to the target socket through the target socket, so that the The target service response process processes the service request message, that is, responds to the client's service request.
- the technical solution of the embodiment of the present disclosure detects the service request message initiated by the requesting client through the preset service port through the socket detection mechanism, determines the target client identification information corresponding to the requesting client according to the service request message, and then determines the target client identification information corresponding to the requesting client according to the service request message.
- the target client identification information is determined to correspond to the service request message in the pre-established service data file that stores the client identification information of the connected client and the socket of the service response process connected by the connected client.
- the target socket the service request message is sent to the target service response process according to the target socket, so that after obtaining the service request by detecting the preset service port, the corresponding socket is selected through the target client identification information.
- the process that processes the service request message is selected through the socket, and the process that responds to the service request is accurately determined, and the response to the client's service request based on the detection of the preset service port is realized, solving the problem of load balancing scheduling.
- the technical problem of client service request failure caused by the server actually established with the client not detecting the port of the server negotiated with the client can be guaranteed in the scenario of server cluster with load balancing scheduling. Respond effectively to client service requests.
- this method does not rely on server clusters for load balancing scheduling, and can also be applied to various servers, with scalability and Strong portability.
- FIG. 2 is a schematic flow chart of another service response method provided by an embodiment of the present disclosure.
- the target socket corresponding to the service request message is determined according to the target client identification information and the pre-established service data file. Including: if the target client identification information is not found based on the pre-established service data file or the socket of the service response process corresponding to the target client identification information is not found, then at least one socket of the preset service port is detected based on The default socket option of the word determines the target socket corresponding to the service request message.
- the method includes:
- socket detection mechanism detects the service request message initiated by the requesting client through the preset service port, determine the target client identification information corresponding to the requesting client based on the service request message.
- the target client identification information is not found based on the pre-established service data file or the socket of the service response process corresponding to the target client identification information is not found, detect at least one socket of the preset service port.
- the default socket option of the word determines the target socket corresponding to the service request message.
- the preset socket options may include at least one of the socket's service protocol, process category, process priority, load and other attribute information.
- each socket has its corresponding default socket option.
- at least one socket of the preset service port can be detected. Select the target socket from the word's default socket options.
- the target client identification information is not found in the service data file, or the socket of the service response process corresponding to the target client identification information is not found, it can be determined that the requesting client is establishing a connection for the first time.
- client For a client that establishes a connection for the first time, for example, the target socket corresponding to the service request message is determined according to the preset socket option of at least one socket of the preset service port, which may be: based on the detection
- the load information and process priority in the default socket option of at least one socket of the default service port are determined in detecting at least one socket of the default service port. Target socket.
- the preset socket option includes a process flag bit.
- the process flag bit is used to reflect the correspondence between the socket and the service response process; at least one socket of the preset service port is detected.
- the preset socket option of the socket determines the target socket corresponding to the service request message, including: based on detecting the process flag bit of the at least one socket of the preset service port, determining the target socket corresponding to the service request message. The corresponding target socket.
- the process flag bit can be used to determine the process type of the service response process corresponding to the socket.
- the service response process can include the old service response process used to connect to the service resources before the service version update and the old service response process used to connect to the service The new service response process of the service resource after version update. That is, the process flag bit can be used to distinguish whether the service response process corresponding to the socket is an old service response process or a new service response process.
- smooth upgrade refers to the hot update of the server version without stopping the service.
- the existing connection is continuous and can serve the outside world normally.
- the client's service request can be processed through the old service response process and the new service response process respectively.
- At least one socket of the preset service port can be detected based on the detection.
- the process flag bit of the socket determine the socket corresponding to the new service response process in the at least one socket, and use the socket corresponding to the new service response process as the target socket to pass the target socket Send the service request message to the new service response process for processing.
- the process that responds to the service request message is determined based on the process flag bit of the socket, thereby achieving accurate determination of the process that responds to the service request message and ensuring response to the client's service request.
- determining the target socket corresponding to the service request message based on detecting the process flag bit of at least one socket of the preset service port may be: based on detecting the process flag of at least one socket of the preset service port.
- the process flag bit of one missing socket is determined to determine the socket corresponding to the new service response process as the candidate socket; the target socket corresponding to the service request message is determined based on the candidate socket.
- process flag bit when the process flag bit is 1, it means that the service response process corresponding to the socket with the process flag bit is the old service response process; when the process flag bit is 0, it means that the service response process corresponding to the socket with the process flag bit is the new service response process. Service response process.
- the socket corresponding to the new service response process can be determined as a candidate socket among all the sockets that detect the preset service port. Determine the target socket among the candidate sockets based on the load, priority, or service agreement of the candidate socket. In this way, the old service response process or the new service response process that responds to the client's service request message is determined.
- the client can be updated by the connection service version when first requesting the server. The process of the service resource is processed, and when the server is not requested for the first time, the process of connecting the service resource before the service version is updated is processed, ensuring an effective response to the client's service request under the smooth upgrade of the server RTS.
- the target service response process after sending the service request message to the target service response process through the target socket, it also includes: storing the target client identification information corresponding to the requesting client and the target socket in the service data file. .
- the requesting client after processing the service request message of the requesting client, the requesting client can be regarded as a connected client of the connected service response process. Therefore, the target client identification information and the target socket association corresponding to the requesting client can be stored in the service data file, so that when the service request message of the requesting client is subsequently obtained, the information stored in the service data file can be The target client identification information corresponding to the requesting client determines the target socket.
- the situation is described if the target client identification information is not found in the service data file or the socket of the service response process corresponding to the target client identification information is not found.
- it also includes: if the socket of the service response process corresponding to the target client identification information is found based on the pre-established service data file, then the found socket corresponding to the target client identification information is The socket of the service response process is used as the target socket corresponding to the service request message.
- the socket of the service response process corresponding to the target client identification information is found in the service data file, it is determined that the requesting client is not the client connecting for the first time. Based on this, the found one can be compared with the target client
- the socket of the service response process corresponding to the identification information is used as the target socket to continue processing the service request message of the requesting client through the service response process corresponding to the target socket. In this way, it is possible to continue to respond to a client that has responded to a service request through the process of historically responding to the client's service request.
- the technical solution of the embodiment of the present disclosure is that when the target client identification information or the socket of the service response process corresponding to the target client identification information is not found in the pre-established service file data, at least one of the preset service ports is detected based on the detection.
- the default socket option of a socket determines the target socket corresponding to the service request message to accurately determine the process that first responds to the client's service request and ensure that the client's service request can be effectively responded to. .
- Figure 3A is a schematic flowchart of another service response method provided by an embodiment of the present disclosure.
- it also includes: when receiving an update instruction for updating the service version of the service resource, using the service of the currently connected service resource.
- the response process is used as the parent process, and a child process is created to connect to the updated service resource.
- the parent process is used as the old service response process, and the child process is used as the new service response process.
- the method includes:
- the update instruction may be sent by the cloud or the management server. For example, when the cloud or the management server detects the existence of a new version, it generates an update instruction and sends it to the server. Alternatively, update instructions can be automatically generated when the user triggers the version update control.
- the server receives the update instruction, it indicates that the server needs to update the service version to update the client-oriented service resources; at this time, the service response of the currently connected service resource can be processed.
- Process as the parent process that is, the old service response process, and create a child process for connecting to the updated service resources, that is, the new service response process.
- the child process can inherit the data segment, user stack, address space, shared memory and other information of the parent process.
- the server creates a new service response process
- the new service response process can be created and at the same time, the socket corresponding to each service response process can be added. Default socket options.
- it also includes: adding a preset socket option to at least one socket corresponding to the old service response process for detecting the preset service port, so as to distinguish between the old service response process and the new service response process. Correspondence between the at least one socket and/or correspondence between the at least one socket and the message type of the service request message.
- preset socket options may be added for the sockets corresponding to the old service response process and the sockets corresponding to the new service response process. If the default socket option includes a process flag bit, the service response process corresponding to each socket can be distinguished as an old service response process or a new service response process. If the default socket option includes a protocol flag bit, the service protocol corresponding to each socket can be distinguished, that is, the message types of the service request messages that the socket can handle can be distinguished.
- the connection between the old service response process and the new service response process and the at least one socket can be achieved. Differentiation of the correspondence relationship, and the distinction between the correspondence relationship between the socket and the message type of the service request message can also be realized, so that when the service request message is obtained, the determination can be made based on the preset socket options. Out the corresponding target socket.
- an application layer NSS (Next generation Streaming Server) architecture can be deployed in the server, and a corresponding default socket can be set for at least one socket that detects the default service port through the application layer NSS architecture.
- interface options Exemplarily, as shown in Figure 3B, a working schematic diagram of an application layer NSS architecture is shown. Among them, first, the application layer NSS architecture is started, and the server performs NSS smooth upgrade; the NSS architecture is initialized, traverses the addresses being detected, determines at least one socket that detects the preset service port, and checks the socket corresponding to the parent process.
- the process flag bit in the option is assigned a preset mark, or the protocol flag bit in the preset socket option of the at least one socket is assigned a value according to the service protocol of the at least one socket to set the Default socket options for at least one socket.
- the socket detection mechanism detects the service request message initiated by the requesting client through the preset service port, determine the target client identification information corresponding to the requesting client based on the service request message.
- the target client identification information is not found based on the pre-established service data file or the socket of the service response process corresponding to the target client identification information is not found, detect at least one socket of the preset service port.
- the process flag bit of the word is used to determine the socket corresponding to the new service response process as the candidate socket, and the target socket corresponding to the service request message is determined based on the candidate socket.
- any candidate socket can be used as the target socket.
- the target socket corresponding to the service request message can also be determined among each candidate socket according to a preset polling mechanism.
- the preset polling mechanism may be to sequentially determine the target socket corresponding to the current service request message according to the order in the preset sequence list of sockets corresponding to each new service response process. .
- the process of processing the service request message sent by the current requesting client can be determined through the above method.
- Smooth upgrade refers to the hot update of the server version without stopping the service.
- the existing connection is continuous and can serve the outside world normally.
- Smooth upgrade is generally a method in which the server starts a child process in the parent process and shuts down the parent process after a period of time.
- the child process represents the new version.
- the smooth upgrade of the RTS protocol currently adopts dual-port mode, that is, the child process and the parent process detect different ports respectively.
- the client will first negotiate the port with the server.
- the negotiation result will be the sub-process port, and the client will establish a connection with the sub-process port.
- the server negotiated by the client may be different from the server actually established, and the ports detected by each server may also be different. It may cause the client to fail to establish a connection, causing the client's RTS protocol service request to fail. Therefore, in order to solve this problem, the service response method provided by each embodiment of the present disclosure can be used to detect the preset service port and obtain the service request message of the RTS protocol sent by the client. Each server obtains the service request message by detecting the preset service port. After sending the service request message to the client, the target client identification information is determined.
- the process identification bit of at least one socket can be used to determine the target client identification information.
- the socket corresponding to the new service response process is used to hand over the service request message to the new service response process for processing, thereby realizing the determination of the process for processing the service request message, thereby realizing the response to the client's service request, and solving the problem in
- Each server in the server cluster detects different ports, causing the client's RTS protocol smooth upgrade service request to fail.
- the technical solution of the embodiment of the present disclosure is that when receiving an update instruction for updating the service version of the service resource, the service response process currently connected to the service resource is used as the parent process, that is, the old service response process, and creates a service response process for updating the service version of the service resource.
- the sub-process connected to the updated service resource that is, the new service response process, realizes the determination of the new service response process and the old service response process.
- the new service response process and the old service response process can be realized. , respectively respond to clients that request services for the first time and clients that do not request services for the first time.
- Figure 4A is a schematic flowchart of another service response method provided by an embodiment of the present disclosure.
- the default socket option also includes a protocol flag bit, and the protocol flag bit is used to reflect the socket and service Correspondence between the message types of the request message; determine the target socket corresponding to the service request message according to the detection of the default socket option of at least one socket of the preset service port, including: according to the detection Preset the protocol flag bit of the at least one socket of the service port, determine the socket corresponding to the message type corresponding to the service request message as a candidate socket; determine the service request message according to the candidate socket The corresponding target socket.
- the method includes:
- the target client identification information is not found based on the pre-established service data file or the socket of the service response process corresponding to the target client identification information is not found, detect at least one socket of the preset service port.
- the protocol flag bit of the word determines the socket corresponding to the message type corresponding to the service request message as the candidate socket, and determines the target socket corresponding to the service request message based on the candidate socket.
- the protocol flag bit may be a flag bit used to describe the service protocol of the socket. For example, if the service protocol of the socket is the RTS protocol, the protocol flag bit may be 1; if the service protocol of the socket is the HTTP/3 protocol, the protocol flag bit may be 2, etc.
- this embodiment can detect at least one socket of the preset service port when the target client identification information or the socket of the service response process corresponding to the target client identification information is not found according to the service data file.
- the protocol flag bit of the word is used to determine the socket corresponding to the message type of the service request message in the at least one socket, that is, the socket whose service protocol is consistent with the message type is determined, and the socket is determined. as a candidate socket.
- any socket among the candidate sockets can be used as the target socket.
- the candidate socket corresponding to the new service response process can be determined as the target socket according to the process flag bit of the candidate socket. It can be understood that if there are multiple candidate sockets corresponding to the new service response process, any one of the candidate sockets can be used as the target socket, and the candidate socket with the smallest load can also be used as the target socket. pick up words.
- the client can be requested to serve the first request.
- the client is a client, based on detecting the process flag bit and protocol flag bit of at least one socket of the preset service port, a new service response that satisfies the message type of the service request message is determined in the at least one socket.
- the socket corresponding to the process is implemented based on the process flag bit. Accurate determination of socket and protocol flags.
- the five-tuple information can be extracted from the IP header and UDP (User Datagram Protocol) header of the RTS message, and then based on the five-tuple information Calculate the 32-bit ID (that is, the target client identification information), and query in the MAP (that is, the service data file) based on the target client identification information to see whether the ID is in the MAP. If the ID is in the MAP, the service request message is sent to the socket corresponding to the ID (that is, the target socket). If the ID is not in the MAP, all sockets bound to the preset service port are traversed. The default socket option of the socket, find the process flag bit to represent the new service response process, and the protocol flag bit represents the socket of the RTS protocol, send the service request message to the socket, and combine the ID with the socket The association is stored in MAP.
- UDP User Datagram Protocol
- the technical solution of the embodiment of the present disclosure is that when the target client identification information is not found based on the pre-established service data file or the socket of the service response process corresponding to the target client identification information is not found, the preset service is detected based on The protocol flag bit of at least one socket of the port determines the socket corresponding to the message type corresponding to the service request message as a candidate socket, and determines the target socket corresponding to the service request message based on the candidate socket.
- the word realizes the accurate determination of the process that responds to the client's service request for the first time based on the process flag bit, ensuring that the client's service request can be effectively responded to.
- Figure 5 is a schematic structural diagram of a service response device provided by an embodiment of the present disclosure. As shown in Figure 5, the device includes: a client request module 510, a socket determination module 520, and a request response module 530.
- the client request module 510 is configured to determine a target corresponding to the requesting client based on the service request message when a service request message initiated by the requesting client through the preset service port is detected through the socket detection mechanism.
- Client identification information
- the socket determination module 520 is configured to determine the socket based on the target client identification information and the pre-established service.
- the service data file determines the target socket corresponding to the service request message, wherein the service data file is used to store the client identification information of the connected client of the connected service response process and the socket of the connected service response process. Correspondence between interfaces;
- the request response module 530 is configured to send the service request message to the target service response process through the target socket.
- this embodiment can also provide a kernel module.
- the service response device is integrated in the kernel module.
- the kernel module can transfer the service request message sent by the client to the correct service response process through the service response device.
- the technical solution provided by the embodiment of the present disclosure detects the service request message initiated by the requesting client through the preset service port through the socket detection mechanism, and determines the target client identification information corresponding to the requesting client according to the service request message. Then, according to the target client identification information, in the pre-established service data file corresponding to the client identification information of the connected client and the socket of the service response process connected by the connected client, the service request report is determined. The target socket corresponding to the file is sent to the target service response process according to the target socket. After obtaining the service request by detecting the preset service port, the corresponding socket is selected through the target client identification information.
- the service request message carries the protocol port of the requesting client, the Internet protocol address of the requesting client, the protocol port of the service response process, The Internet Protocol address and transport layer protocol of the service response process;
- the client request module 510 includes an identification determination unit, and the identification determination unit is configured to respond to the request The protocol port of the client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process and the transport layer protocol generate a target corresponding to the requesting client.
- Client identification information is configured to respond to the request The protocol port of the client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process and the transport layer protocol generate a target corresponding to the requesting client.
- the identification determination unit is configured to: determine the protocol port of the requesting client and the Internet connection of the requesting client according to a preset hash algorithm.
- the interconnection protocol address, the protocol port of the service response process, the Internet protocol address of the service response process and the transport layer protocol are calculated, and the calculated hash value is used as the target client identification information corresponding to the requesting client.
- the socket determination module 520 includes a first socket determination unit, and the first socket determination unit is set to if Based on the pre-established service data file, the target client identification information is not found or the socket of the service response process corresponding to the target client identification information is not found, then at least one of the preset service ports is detected based on The default socket option of a socket determines the target socket corresponding to the service request message.
- the preset socket option includes a process flag bit, and the process flag bit is used to reflect the relationship between the socket and the service response process.
- the corresponding relationship; the first socket determination unit is also configured to determine the target socket corresponding to the service request message based on detecting the process flag bit of at least one socket of the preset service port. .
- the service response process includes an old service response process for connecting to service resources before the service version is updated and an old service response process for connecting to after the service version is updated.
- the new service response process of the service resource; the first socket determination unit is also configured to determine the process corresponding to the new service response based on detecting the process flag bit of the at least one socket of the preset service port.
- the socket corresponding to the process is used as an alternative socket; the target socket corresponding to the service request message is determined according to the alternative socket.
- the device further includes a process creation module.
- the process creation module is configured to when a service for updating service resources is received.
- the version update instruction is issued, use the service response process currently connected to the service resource as the parent process, create a child process for connecting to the updated service resource, use the parent process as the old service response process, and use the child process as the old service response process. Respond to the process as a new service.
- the process creation module is also configured to be at least one corresponding to the old service response process for detecting the preset service port. Adding a preset socket option to a socket to distinguish the corresponding relationship between the old service response process and the new service response process and the at least one socket and/or the at least one socket and the service The correspondence between the message types of the request message.
- the preset socket option also includes a protocol flag bit, and the protocol flag bit is used to reflect the socket and the service request.
- the socket determination module 520 includes a second socket determination unit, the second determination unit is configured to detect at least one socket of the preset service port The protocol flag bit of the socket determines the socket corresponding to the message type corresponding to the service request message as the candidate socket; determines the target socket corresponding to the service request message according to the candidate socket. pick up words.
- the socket determination module is also configured to combine the target client identification information corresponding to the requesting client and the target socket.
- the interface correspondence is stored in the service data file.
- the socket determination module is also configured to find the corresponding target client identification information based on the pre-established service data file. If the socket of the service response process is found, the found socket of the service response process corresponding to the target client identification information is used as the target socket corresponding to the service request message.
- the service response device provided by the embodiment of the present disclosure can execute the service response method provided by any embodiment of the present disclosure, and has corresponding functional modules for executing the method.
- FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
- Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), PAD (tablet computers), portable multimedia players (Portable Media Player , PMP), mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (Television, TV), desktop computers, etc.
- PDA Personal Digital Assistant
- PAD tablet computers
- PMP portable multimedia players
- mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals)
- fixed terminals such as digital televisions (Television, TV), desktop computers, etc.
- the electronic device shown in FIG. 6 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
- the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may process data according to a program stored in a read-only memory (Read-Only Memory, ROM) 602 or from a storage device. 608 loads the program in the random access memory (Random Access Memory, RAM) 603 to perform various appropriate actions and processing. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored.
- the processing device 601, ROM 602 and RAM 603 are connected to each other via a bus 604.
- An input/output (I/O) interface 605 is also connected to bus 604.
- input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 607 such as a speaker, a vibrator, etc.; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609.
- Communication device 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data.
- FIG. 6 illustrates electronic device 600 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
- embodiments of the present disclosure include a computer program product that includes A computer program contained on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
- the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602.
- the processing device 601 When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.
- Embodiments of the present disclosure provide a computer storage medium on which a computer program is stored.
- the program is executed by a processor, the service response method provided by the above embodiments is implemented.
- the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
- the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
- Computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable read-only memory (EPROM (Erasable Programmable Read-Only Memory) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or the above Any suitable combination.
- a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
- a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can be sent, propagated, or transmitted A program for use by or in connection with an instruction execution system, apparatus, or device.
- Program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
- the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
- Communications e.g., communications network
- Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
- LANs Local Area Networks
- WANs Wide Area Networks
- the Internet e.g., the Internet
- end-to-end networks e.g., ad hoc end-to-end networks
- the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
- the above-mentioned computer-readable medium carries at least one program.
- the electronic device executes the above-mentioned at least one program.
- the computer-readable medium carries at least one program.
- the electronic device detects a service request report initiated by the requesting client through the preset service port through the socket detection mechanism.
- Target socket wherein the client identification information of the connected client of the connected service response process in the service data file is stored correspondingly with the socket of the service response process connected to the connected client; through the target The socket sends the service request message to the target service response process.
- Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C” or similar programming languages.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on the user's computer.
- Executed on a remote computer or entirely on a remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
- LAN local area network
- WAN wide area network
- Internet service provider such as an Internet service provider through Internet connection
- each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
- each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
- the units involved in the embodiments of the present disclosure can be implemented in software or hardware.
- the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
- the first acquisition unit can also be described as "the unit that acquires at least two Internet Protocol addresses.”
- exemplary types of hardware logic components include: field programmable gate array (Field Programmable Gate Array, FPGA), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), application specific standard product (Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
- a machine-readable medium may be a tangible medium that may contain or be stored for use by or in connection with an instruction execution system, apparatus, or device program used.
- the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- CD-ROM portable compact disk read-only memory
- magnetic storage device or any suitable combination of the above.
- Example 1 provides a service response method, including:
- the service request message is sent to the target service response process through the target socket.
- Example 2 provides a service response method, which further includes:
- the service request message carries the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address and the transport layer protocol of the service response process;
- Determining the target client identification information corresponding to the requesting client based on the service request message includes:
- a link is generated with the requesting client.
- the target client identification information corresponding to the client.
- Example 3 provides a service response method, which further includes:
- the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address of the service response process and the transport layer protocol are generated and described.
- Request the target client identification information corresponding to the client including:
- the protocol port of the requesting client, the Internet Protocol address of the requesting client, the protocol port of the service response process, the Internet Protocol address and the transport layer protocol of the service response process are calculated according to the preset hash algorithm, and the The calculated hash value is used as the target client identification information corresponding to the requesting client.
- Example 4 provides a service response method, which further includes:
- determining the target socket corresponding to the service request message based on the target client identification information and a pre-established service data file includes:
- the preset socket option of at least one socket determines the target socket corresponding to the service request message.
- Example 5 provides a service response method, which further includes:
- the preset socket options include a process flag bit, and the process flag bit is used to reflect the corresponding relationship between the socket and the service response process;
- Determining the target socket corresponding to the service request message based on detecting the preset socket option of at least one socket of the preset service port includes:
- the target socket corresponding to the service request message is determined based on detecting the process flag bit of the at least one socket of the preset service port.
- Example 6 provides a service response method, which Law, also includes:
- the service response process includes an old service response process used to connect to service resources before the service version is updated and a new service response process used to connect to service resources after the service version is updated;
- Determining the target socket corresponding to the service request message based on detecting the process flag bit of the at least one socket of the preset service port includes:
- Example 7 provides a service response method, which further includes:
- Optional also includes:
- the service response process currently connected to the service resource is used as the parent process, a child process for connecting to the updated service resource is created, and the parent process is used as the parent process.
- the old service response process uses the child process as the new service response process.
- Example 8 provides a service response method, which further includes:
- Optional also includes:
- Example 9 provides a service response method, which further includes:
- the preset socket option also includes a protocol flag bit, which is used to reflect the correspondence between the socket and the message type of the service request message;
- Example 10 provides a service response method, which method further includes:
- the method further includes:
- Target client identification information corresponding to the requesting client and the target socket are correspondingly stored in the service data file.
- Example 11 provides a service response method, which further includes:
- Optional also includes:
- the found socket of the service response process corresponding to the target client identification information is As the target socket corresponding to the service request message.
- Example 12 provides a service response device, which includes:
- the client request module is configured to determine the target client corresponding to the requesting client based on the service request message when a service request message initiated by the requesting client through the preset service port is detected through the socket detection mechanism. terminal identification information;
- a socket determination module configured to determine the target socket corresponding to the service request message according to the target client identification information and a pre-established service data file, wherein the service data file is used to store the connected The correspondence between the client identification information of the connected client of the service response process and the socket of the connected service response process;
- the request response module is configured to send the service request message to the target through the target socket. Standard service response process.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
Claims (14)
- 一种服务响应方法,包括:响应于通过套接字检测机制检测到请求客户端通过预设服务端口发起的服务请求报文,基于所述服务请求报文确定与所述请求客户端对应的目标客户端标识信息;根据所述目标客户端标识信息与预先建立的服务数据文件确定与所述服务请求报文对应的目标套接字,其中,所述服务数据文件中已连接服务响应进程的已连接客户端的客户端标识信息与所述已连接客户端连接的服务响应进程的套接字对应存储;通过所述目标套接字将所述服务请求报文发送至目标服务响应进程。
- 根据权利要求1所述的服务响应方法,其中,所述服务请求报文携带有请求客户端的协议端口、请求客户端的网际互连协议地址、服务响应进程的协议端口、服务响应进程的网际互连协议地址和传输层协议;所述基于所述服务请求报文确定与所述请求客户端对应的目标客户端标识信息,包括:根据所述请求客户端的协议端口、所述请求客户端的网际互连协议地址、所述服务响应进程的协议端口、所述服务响应进程的网际互连协议地址和传输层协议,生成与所述请求客户端对应的目标客户端标识信息。
- 根据权利要求2所述的服务响应方法,其中,所述根据所述请求客户端的协议端口、所述请求客户端的网际互连协议地址、服务响应进程的协议端口、服务响应进程的网际互连协议地址和传输层协议,生成与所述请求客户端对应的目标客户端标识信息,包括:根据预设哈希算法对所述请求客户端的协议端口、所述请求客户端的网际互连协议地址、服务响应进程的协议端口、服务响应进程的网际互连协议地址和传输层协议进行计算,将计算出的哈希值作为与所述请求客户端对应的目标客户端标识信息。
- 根据权利要求1所述的服务响应方法,其中,所述根据所述目标客户端 标识信息与预先建立的服务数据文件确定与所述服务请求报文对应的目标套接字,包括:响应于基于预先建立的服务数据文件未查找到所述目标客户端标识信息或者未查找到与所述目标客户端标识信息对应的服务响应进程的套接字,根据检测所述预设服务端口的至少一个套接字的预设套接字选项,确定与所述服务请求报文对应的目标套接字。
- 根据权利要求4所述的服务响应方法,其中,所述预设套接字选项包括进程标志位,所述进程标志位用于反映套接字与服务响应进程之间的对应关系;所述根据检测所述预设服务端口的至少一个套接字的预设套接字选项,确定与所述服务请求报文对应的目标套接字,包括:根据检测所述预设服务端口的所述至少一个套接字的进程标志位,确定与所述服务请求报文对应的目标套接字。
- 根据权利要求5所述的服务响应方法,其中,所述服务响应进程包括用于连接服务版本更新前的服务资源的旧服务响应进程和用于连接服务版本更新后的服务资源的新服务响应进程;所述根据检测所述预设服务端口的所述至少一个套接字的进程标志位,确定与所述服务请求报文对应的目标套接字,包括:根据检测所述预设服务端口的所述至少一个套接字的进程标志位,确定出与所述新服务响应进程对应的套接字作为备选套接字;根据所述备选套接字确定与所述服务请求报文对应的目标套接字。
- 根据权利要求6所述的服务响应方法,还包括:响应于接收到用于更新服务资源的服务版本的更新指令,以当前连接所述服务资源的服务响应进程作为父进程,创建用于连接更新后的服务资源的子进程,将所述父进程作为旧服务响应进程,将所述子进程作为新服务响应进程。
- 根据权利要求7所述的服务响应方法,还包括:为与所述旧服务响应进程对应的用于检测所述预设服务端口的至少一个套 接字添加预设套接字选项,以区分以下至少之一:旧服务响应进程和新服务响应进程与所述至少一个套接字之间的对应关系;所述至少一个套接字与所述服务请求报文的报文类型之间的对应关系。
- 根据权利要求4所述的服务响应方法,其中,所述预设套接字选项还包括协议标志位,所述协议标志位用于反映套接字与所述服务请求报文的报文类型之间的对应关系;所述根据检测所述预设服务端口的至少一个套接字的预设套接字选项,确定与所述服务请求报文对应的目标套接字,包括:根据检测所述预设服务端口的所述至少一个套接字的协议标志位,确定与所述服务请求报文对应的报文类型对应的套接字作为候选套接字;根据所述候选套接字确定与所述服务请求报文对应的目标套接字。
- 根据权利要求4所述的服务响应方法,在所述通过所述目标套接字将所述服务请求报文发送至目标服务响应进程之后,还包括:将与所述请求客户端对应的目标客户端标识信息和所述目标套接字对应存储于所述服务数据文件中。
- 根据权利要求4所述的服务响应方法,还包括:响应于基于预先建立的服务数据文件查找到与所述目标客户端标识信息对应的服务响应进程的套接字,将查找到的与所述目标客户端标识信息对应的服务响应进程的套接字作为与所述服务请求报文对应的目标套接字。
- 一种服务响应装置,包括:客户端请求模块,设置为响应于通过套接字检测机制检测到请求客户端通过预设服务端口发起的服务请求报文,基于所述服务请求报文确定与所述请求客户端对应的目标客户端标识信息;套接字确定模块,设置为根据所述目标客户端标识信息与预先建立的服务数据文件确定与所述服务请求报文对应的目标套接字,其中,所述服务数据文件用于存储已连接服务响应进程的已连接客户端的客户端标识信息与其连接的 服务响应进程的套接字之间的对应关系;请求响应模块,设置为通过所述目标套接字将所述服务请求报文发送至目标服务响应进程。
- 一种电子设备,包括:至少一个处理器;存储装置,设置为存储至少一个程序,当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-11中任一所述的服务响应方法。
- 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-11中任一所述的服务响应方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/839,635 US20250168239A1 (en) | 2022-05-11 | 2023-05-10 | Service response method and apparatus, device, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210513481.0 | 2022-05-11 | ||
| CN202210513481.0A CN114938395B (zh) | 2022-05-11 | 2022-05-11 | 服务响应方法、装置、设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023217187A1 true WO2023217187A1 (zh) | 2023-11-16 |
Family
ID=82865289
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/093269 Ceased WO2023217187A1 (zh) | 2022-05-11 | 2023-05-10 | 服务响应方法、装置、设备及存储介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250168239A1 (zh) |
| CN (1) | CN114938395B (zh) |
| WO (1) | WO2023217187A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114938395B (zh) * | 2022-05-11 | 2024-08-02 | 北京字节跳动网络技术有限公司 | 服务响应方法、装置、设备及存储介质 |
| CN115767684B (zh) * | 2022-11-09 | 2023-09-08 | 深圳金信诺高新技术股份有限公司 | 数据传输方法、装置、设备及介质 |
| CN119182805B (zh) * | 2024-09-05 | 2025-10-10 | 重庆赛力斯凤凰智创科技有限公司 | 车机以太网诊断方法、装置、电子设备及存储介质 |
| CN119854148B (zh) * | 2024-12-26 | 2025-10-31 | 中国联合网络通信集团有限公司 | 服务发现方法、装置、设备及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105553977A (zh) * | 2015-12-15 | 2016-05-04 | 网易(杭州)网络有限公司 | 请求消息的处理、发送方法及装置 |
| US20200296141A1 (en) * | 2019-03-14 | 2020-09-17 | T-Mobile Usa, Inc. | Secure and transparent transport of application level protocols to non-ip data delivery communication channels |
| CN113132356A (zh) * | 2021-03-23 | 2021-07-16 | 网宿科技股份有限公司 | Udp报文的分发方法、设备及存储介质 |
| CN114079653A (zh) * | 2021-11-17 | 2022-02-22 | 北京字节跳动网络技术有限公司 | 一种通信方法、装置、计算机设备和存储介质 |
| CN114416149A (zh) * | 2022-01-04 | 2022-04-29 | 北京金山云网络技术有限公司 | 一种服务的处理方法、装置及设备 |
| CN114938395A (zh) * | 2022-05-11 | 2022-08-23 | 北京字节跳动网络技术有限公司 | 服务响应方法、装置、设备及存储介质 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100344122C (zh) * | 2003-04-22 | 2007-10-17 | 华为技术有限公司 | 一种实现从指定端口发送数据报类型报文的方法 |
| KR101005093B1 (ko) * | 2008-07-15 | 2011-01-04 | 인터리젠 주식회사 | 클라이언트 식별 방법 및 장치 |
| SG2014008932A (en) * | 2014-02-06 | 2015-09-29 | Mastercard Asia Pacific Pte Ltd | A method and a corresponding proxy server, system, computer-readable storage medium and computer program |
| US10637906B2 (en) * | 2017-10-31 | 2020-04-28 | Cisco Technology, Inc. | Dynamic socket QoS settings for web service connections |
| US11329959B2 (en) * | 2018-12-21 | 2022-05-10 | Fortinet, Inc. | Virtual routing and forwarding (VRF)-aware socket |
| CN110413420B (zh) * | 2019-01-23 | 2024-01-30 | 腾讯科技(深圳)有限公司 | 数据传输方法、装置、终端及存储介质 |
| CN110677392B (zh) * | 2019-09-12 | 2022-03-15 | 视联动力信息技术股份有限公司 | 一种视频数据传输方法和装置 |
| CN114448929B (zh) * | 2022-04-08 | 2022-06-21 | 统信软件技术有限公司 | 数据链路转接方法、装置和系统,以及计算设备 |
-
2022
- 2022-05-11 CN CN202210513481.0A patent/CN114938395B/zh active Active
-
2023
- 2023-05-10 WO PCT/CN2023/093269 patent/WO2023217187A1/zh not_active Ceased
- 2023-05-10 US US18/839,635 patent/US20250168239A1/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105553977A (zh) * | 2015-12-15 | 2016-05-04 | 网易(杭州)网络有限公司 | 请求消息的处理、发送方法及装置 |
| US20200296141A1 (en) * | 2019-03-14 | 2020-09-17 | T-Mobile Usa, Inc. | Secure and transparent transport of application level protocols to non-ip data delivery communication channels |
| CN113132356A (zh) * | 2021-03-23 | 2021-07-16 | 网宿科技股份有限公司 | Udp报文的分发方法、设备及存储介质 |
| CN114079653A (zh) * | 2021-11-17 | 2022-02-22 | 北京字节跳动网络技术有限公司 | 一种通信方法、装置、计算机设备和存储介质 |
| CN114416149A (zh) * | 2022-01-04 | 2022-04-29 | 北京金山云网络技术有限公司 | 一种服务的处理方法、装置及设备 |
| CN114938395A (zh) * | 2022-05-11 | 2022-08-23 | 北京字节跳动网络技术有限公司 | 服务响应方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114938395A (zh) | 2022-08-23 |
| CN114938395B (zh) | 2024-08-02 |
| US20250168239A1 (en) | 2025-05-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023217187A1 (zh) | 服务响应方法、装置、设备及存储介质 | |
| CN113259479B (zh) | 一种数据处理方法以及设备 | |
| KR20150013860A (ko) | 클라이언트 없는 클라우드 컴퓨팅 | |
| CN111414208A (zh) | 应用程序的启动方法、装置及设备 | |
| CN118140211A (zh) | 硬件加速器服务聚合 | |
| CN111510466A (zh) | 客户端的数据更新方法、装置、电子设备及可读介质 | |
| CN116389599A (zh) | 网关服务请求的处理、云原生网关系统的管理方法及装置 | |
| CN114338574A (zh) | 一种即时通讯方法、管理节点及系统 | |
| CN117062185A (zh) | 联邦学习节点发现、注册方法及装置、存储介质及设备 | |
| CN113765867A (zh) | 一种数据传输方法、装置、设备及存储介质 | |
| US11057242B2 (en) | Address system | |
| CN118611952A (zh) | 网络访问方法、装置、设备和存储介质 | |
| US9292358B2 (en) | Remotely retrieving information from consumer devices | |
| CN109309583B (zh) | 基于分布式系统的信息获取方法、装置、电子设备和介质 | |
| US20200252485A1 (en) | Accelerating isochronous endpoints of redirected usb devices | |
| CN114726618A (zh) | Vpn隧道建立方法、电子设备和计算机可读存储介质 | |
| WO2023246480A1 (zh) | 一种身份认证方法、装置、设备、介质及产品 | |
| CN116032995B (zh) | 数据通信方法及装置、电子设备和计算机可读存储介质 | |
| CN114444064B (zh) | 账号处理方法、装置、电子设备和计算机可读介质 | |
| WO2022001530A1 (zh) | 建立管道的方法及装置 | |
| CN120151015B (zh) | 面向大模型任务的网络安全访问方法、装置、设备及介质 | |
| CN114866466B (zh) | 设备通信方法、装置、电子设备及可读存储介质 | |
| US12200050B2 (en) | Data resource storage method and apparatus, data resource query method and apparatus, and electronic device | |
| CN118264762B (zh) | 智能业务的gpu集群调度方法、系统与设备 | |
| CN121664869A (zh) | 终端跨机业务处理方法及相关设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23802956 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18839635 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWP | Wipo information: published in national office |
Ref document number: 18839635 Country of ref document: US |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04-03-2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23802956 Country of ref document: EP Kind code of ref document: A1 |