Request message processing method and device
By configuring multiple independent server nodes on the server and using pre-convened communication protocols for point-to-point communication, the network bandwidth waste and latency problems between the client and the server are solved, and communication and operation efficiency are improved.
Patent Information
- Application Number
- CN202010214463.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-24
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-03-24
AI Technical Summary
In the prior art, the implementation solution of service endpoint-to-point control has problems with network bandwidth waste and latency, especially when the server nodes communicate between the client and the server, resulting in system instability and inefficiency.
By configuring multiple server nodes on the server, each node has an independent communication identity and communication environment, using a pre-convened communication protocol to receive request messages from the client, and parsing and executing operations on the target server node, realizing point-to-point communication .
It reduces network bandwidth waste and latency, improves communication efficiency and operational execution efficiency between clients and servers, and solves the problems of network bandwidth waste and latency in the prior art.
Smart Images

Figure CN113452728B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and in particular, to a method and device for processing a request message. Background Art
[0002] In the prior art, in the implementation scheme of point-to-point control of service endpoints, the first implementation scheme is to generate a continuous writing thread on the corresponding server to a common storage medium when reading logs remotely, and the client reads the writing thread. However, the continuous writing thread needs to be guaranteed to be normal, which will cause technical problems such as pointer position and data update that may cause system instability.
[0003] The second implementation scheme is that when the remote task is executed, the control end writes the control command to the central storage medium, and the corresponding controlled end periodically checks and executes the task corresponding to the control command. However, this scheme still has the following disadvantages: the controlled end needs to have a resident process to continuously obtain the control command, and there are problems of unnecessary waste of network bandwidth and delay. Specifically, the interval for obtaining the control command is long and the performance loss is small, but the corresponding delay is large; the interval for obtaining the control command is short and the delay is small, but the performance loss is large.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method and device for processing a request message, so as to at least solve the technical problems of network bandwidth waste and network delay when a client communicates with a server node on a server side in the prior art.
[0006] According to one aspect of an embodiment of the present application, a method for processing a request message is provided, comprising: receiving a request message from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by a server and the client, and a plurality of server nodes on the server are respectively configured with mutually independent communication identifiers, and information carried in the request message comprises: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and parsing and executing the target operation on the server node to be accessed corresponding to the target communication identifier.
[0007] According to another aspect of an embodiment of the present application, a method for processing a request message is also provided, including: configuring a request message based on a communication protocol pre-agreed upon by a server and a client, wherein a plurality of server nodes are created on the server, and each of the plurality of server nodes is configured with a mutually independent communication identifier and an independent current communication environment, wherein the current communication environment is determined by the pre-agreed communication protocol, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and sending the request message to the server node to be accessed.
[0008] According to another aspect of an embodiment of the present application, a request message processing device is also provided, including: a receiving module, used to receive a request message from a client under a current communication environment, wherein the above-mentioned current communication environment is determined by a communication protocol pre-agreed upon by the server and the above-mentioned client, and multiple server nodes on the above-mentioned server are respectively configured with mutually independent communication identifiers, and the information carried in the above-mentioned request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the above-mentioned server node to be accessed; a processing module, used to parse and execute the above-mentioned target operation on the server node to be accessed corresponding to the above-mentioned target communication identifier.
[0009] According to another aspect of an embodiment of the present application, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the request message processing methods.
[0010] According to another aspect of an embodiment of the present application, a request message processing device is also provided, including: a processor; and a memory, connected to the above-mentioned processor, for providing the above-mentioned processor with instructions for processing the following processing steps: receiving a request message from a client in a current communication environment, wherein the above-mentioned current communication environment is determined by a communication protocol pre-agreed upon by the server and the above-mentioned client, and multiple server nodes on the above-mentioned server are respectively configured with mutually independent communication identifiers, and the information carried in the above-mentioned request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the above-mentioned server node to be accessed; parsing and executing the above-mentioned target operation on the server node to be accessed corresponding to the above-mentioned target communication identifier.
[0011] In an embodiment of the present application, in a current communication environment, a request message from a client is received, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and the target operation is parsed and executed on the server node to be accessed corresponding to the target communication identifier.
[0012] Through the embodiments of the present application, the purpose of reducing network bandwidth waste and network delay when the client communicates with the server node on the server side is achieved, thereby achieving the technical effect of improving the communication efficiency between the client and the server, and the operation execution efficiency of the server, and further solving the technical problem of network bandwidth waste and network delay when the client communicates with the server node on the server side in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0014] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing a request message according to an embodiment of the present application;
[0015] Figure 2 is a flowchart of a method for processing a request message according to an embodiment of the present application;
[0016] Figure 3 is a structural diagram of an optional request message processing system according to an embodiment of the present application;
[0017] Figure 4 is a schematic diagram of an operation result of an optional log query operation according to an embodiment of the present application;
[0018] Figure 5 is a schematic diagram of an optional log display content according to an embodiment of the present application;
[0019] Figure 6 is a flowchart of another method for processing a request message according to an embodiment of the present application;
[0020] Figure 7 is a structural diagram of a request message processing device according to an embodiment of the present application;
[0021] Figure 8is a structural diagram of a request message processing device according to an embodiment of the present application;
[0022] Fig. 9 is a structural diagram of a request message processing device according to an embodiment of the present application;
[0023] Fig.10 It is a structural block diagram of another computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0027] Application Programming Interface (API): A set of predefined functions that aims to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism.
[0028] Request-Response Protocol (HTTP): The HTTP protocol usually runs on top of TCP. It specifies what kind of request messages the client may send to the server and what kind of response messages it may get. The headers of the request and response messages are given in ASCII code; the message content has a MIME-like format.
[0029] Example 1
[0030] According to an embodiment of the present application, an embodiment of a method for processing a request message is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] The method embodiment provided in Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing a request message is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0032] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0033] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the () method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the vulnerability detection method of the above-mentioned application. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0036] Under the above operating environment, this application provides Figure 2 The processing method of the request message shown. As an optional embodiment, the demand background of the processing method of the request message provided in the embodiment of the present application is that in the process of implementing the algorithm platform, there needs to be a mechanism that allows the WEB layer control end to communicate with a node machine and execute remote commands. Among them, the project of the algorithm platform aims to establish a one-stop platform for scenario-based algorithm management, algorithm operation, and model management for the algorithm team in various scenarios of DC Brain, solve the pain points currently encountered by the algorithm team, improve efficiency and output quality, and realize the rapid and stable application of algorithms to the business.
[0037] The development background of this algorithm platform is that the log reading, thread termination, version query, etc. of a certain node task of this algorithm platform all require point-to-point communication with the server; the application scenario of this algorithm platform: when the Tiansuan platform single-point task is remotely executed, point-to-point process invocation is required; when the task is terminated or retried, point-to-point process termination or retry is required. When you need to view the process information, the log is continuously output, and you need to go directly to the corresponding node server to obtain the corresponding content, which also requires point-to-point operation.
[0038] Figure 2 is a flowchart of a method for processing a request message according to an embodiment of the present application, such as Figure 2 As shown, the method for processing the request message includes the following steps:
[0039] Step S202, receiving a request message from the client in the current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed between the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed;
[0040] Step S204, parsing and executing the target operation on the to-be-accessed server node corresponding to the target communication identifier.
[0041] In an embodiment of the present application, a request message is received from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and the target operation is parsed and executed on the server node to be accessed corresponding to the target communication identifier.
[0042] Through the embodiments of the present application, the purpose of reducing network bandwidth waste and network delay when the client communicates with the server node on the server side is achieved, thereby achieving the technical effect of improving the communication efficiency between the client and the server, and the operation execution efficiency of the server, and further solving the technical problem of network bandwidth waste and network delay when the client communicates with the server node on the server side in the prior art.
[0043] It should be noted that the executor of the above method embodiment can be the server. In the embodiment of the present application, before receiving the request information from the client, the server can construct a communication environment for each server node among the multiple server nodes created on the server in advance according to the communication protocol pre-agreed between the server and the client.
[0044] Optionally, the communication protocol pre-agreed between the above-mentioned server and the client is the HTTP protocol. It should be noted that if point-to-point communication between the server and the client is required, the server and the client must first have a unified communication protocol, as well as the client's ability to send commands and the server's ability to receive and process commands. The HTTP protocol is a relatively fast implementation method and will make the component more lightweight.
[0045] like Figure 3 As shown, the request message processing method provided in the embodiment of the present application can be implemented in a request message processing system, which mainly includes: a client 300 (i.e., an external control end, a client control end), a server 320 (i.e., a controlled end, a command executor) and a communication component 340.
[0046] Specifically, since each of the multiple server nodes is configured with a mutually independent communication identifier; after building a communication environment for each server node; the information carried in the request message from the client received by the server includes: the target communication identifier of the server node to be accessed and the target operation to be performed on the above-mentioned server node to be accessed.
[0047] Furthermore, after receiving the request message from the client, the target operation can be parsed and executed on the server node to be accessed corresponding to the target communication identifier according to the target communication identifier of the server node to be accessed carried in the request message.
[0048] In an optional embodiment, before receiving the request message from the client, the method further includes:
[0049] Step S302: access a communication component to each of the multiple server nodes.
[0050] The communication component encapsulates an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol. The interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation.
[0051] Step S304: construct the current communication environment through the interface component, the parsing component and the execution component.
[0052] Optionally, the communication component may be a point-to-point actuator component, by connecting the communication component to each of the multiple server nodes in the server end, such as Figure 3 As shown, the communication component 340 encapsulates an interface component, a parsing component and an execution component for point-to-point communication configured based on the above-mentioned pre-agreed communication protocol, and the above-mentioned current communication environment is constructed through the above-mentioned interface component, parsing component and execution component.
[0053] Optionally, the interface component encapsulated in the above-mentioned communication component may be an HTTP server constructor, the above-mentioned parsing component may be an abstract command parser, and the above-mentioned execution component may be an abstract executor.
[0054] Optionally, the communication component is a plug-and-play component that is common to all server nodes. The communication component is transparent to users and easy to use. Users do not need to pay attention to how the underlying layer is implemented, but only need to focus on their own business.
[0055] In an optional embodiment, before receiving the request message from the client, the method further includes:
[0056] Step S402, constructing an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol on each of the plurality of server nodes, wherein the interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation;
[0057] Step S404: determining the current communication environment through the interface component, the parsing component and the execution component.
[0058] Optionally, in an embodiment of the present application, it is also possible to construct an interface component, a parsing component and an execution component for point-to-point communication based on the above-mentioned pre-agreed communication protocol configuration on each server node among the above-mentioned multiple server nodes, and then construct the above-mentioned current communication environment through the above-mentioned interface component, the above-mentioned parsing component and the above-mentioned execution component.
[0059] Optional, such as Figure 3 As shown, the interface component on the above-mentioned server node to be accessed can be an HTTP API interface, which is used to receive the above-mentioned request message; the parsing component on the above-mentioned server node to be accessed can be a command parser, which is used to parse the above-mentioned request message to obtain the above-mentioned target operation; the execution component on the above-mentioned server node to be accessed can be an executor, which is used to execute the above-mentioned target operation.
[0060] In an optional embodiment, receiving the request message from the client includes:
[0061] Step S502: Based on the target communication identifier, the interface component on the server node to be accessed is called to receive the request message from the client.
[0062] As an optional embodiment, the client calls the interface component on the server node to be accessed based on the target communication identifier, receives the request message from the client; uses the parsing component on the server node to be accessed to parse the request message to obtain the target operation on the server node to be accessed; and uses the execution component on the server node to be accessed to execute the target operation.
[0063] In an optional embodiment, parsing and executing the target operation on the server node to be accessed includes:
[0064] Step S602, using the parsing component on the server node to be accessed to parse the request message to obtain the target operation;
[0065] Step S604: Utilize the execution component on the server node to be accessed to execute the target operation.
[0066] Optionally, in an embodiment of the present application, since an HTTP server has been encapsulated in the communication component, after the server accesses the communication component, the server starts and automatically builds a local HTTP server based on the abstract command executor and abstract command parser encapsulated in the communication component, so as to receive request information and execute target operations, thereby completing the operation of constructing a communication environment.
[0067] In addition, multiple server nodes created on the server can independently create local HTTP servers, and the HTTP servers can all come with built-in HTTP API interfaces.
[0068] As an optional embodiment, the embodiment of the present application can perform a log query operation on the server in batches, and the operation result of the log query operation can be but is not limited to the following: Figure 4 As shown, it should be noted that if a user needs to read a log of a server with an IP of 10.0.0.1, he can use something like http: / / 10.0.0.1:8719 / control.exec?act=log&file=application.log&page=1 to read the log information. In addition, the embodiment of the present application can also display the log of a specific server, and the log display content can be but is not limited to the following: Figure 5 shown.
[0069] Through the above-mentioned embodiments of the present application, the creation and operation of each server node among multiple server nodes on the server side can be quickly realized without paying too much attention to the internal mechanism. In addition, the components on the server node to be accessed can be reused, and the client access is convenient. There is no need to rely on the corresponding dependency package, and only the corresponding HTTP API interface needs to be directly assembled.
[0070] Under the above operating environment, this application provides Figure 6 The request message processing method shown. Figure 6 is a flowchart of another method for processing a request message according to an embodiment of the present application, such as Figure 6 As shown, the method for processing the request message includes the following steps:
[0071] Step S702: configuring a request message based on a communication protocol pre-agreed between the server and the client.
[0072] Step S704: Send the request message to the server node to be accessed.
[0073] In an embodiment of the present application, a request message is received from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and the target operation is parsed and executed on the server node to be accessed corresponding to the target communication identifier.
[0074] Through the embodiments of the present application, the purpose of reducing network bandwidth waste and network delay when the client communicates with the server node on the server side is achieved, thereby achieving the technical effect of improving the communication efficiency between the client and the server, and the operation execution efficiency of the server, and further solving the technical problem of network bandwidth waste and network delay when the client communicates with the server node on the server side in the prior art.
[0075] It should be noted that the execution subject of the above method embodiment may be a client, which may configure a request message based on a communication protocol pre-agreed between the server and the client, and send the configured request message to the above server node to be accessed.
[0076] Specifically, multiple server nodes are created on the above-mentioned server end, and each of the above-mentioned multiple server nodes is configured with a mutually independent communication identifier and an independent current communication environment. The above-mentioned current communication environment is determined by the above-mentioned pre-agreed communication protocol. The information carried in the above-mentioned request message includes: the target communication identifier of the server node to be accessed and the target operation to be performed on the above-mentioned server node to be accessed.
[0077] As an optional embodiment, before receiving the request information from the client, the server may construct a communication environment for each of the multiple server nodes created on the server according to the communication protocol pre-agreed between the server and the client.
[0078] Specifically, since each of the multiple server nodes is configured with a mutually independent communication identifier; after building a communication environment for each server node; the information carried in the request message from the client received by the server includes: the target communication identifier of the server node to be accessed and the target operation to be performed on the above-mentioned server node to be accessed.
[0079] Furthermore, after receiving the request message from the client, the target operation can be parsed and executed on the server node to be accessed corresponding to the target communication identifier according to the target communication identifier of the server node to be accessed carried in the request message.
[0080] In an optional embodiment, configuring the request message based on the pre-agreed communication protocol includes:
[0081] Step S802, determining the communication format of the request message based on the pre-agreed communication protocol;
[0082] Step S804: configuring the request message according to the communication format and the target communication identifier to call the interface component on the server node to be accessed to receive the request message.
[0083] As an optional embodiment, the above-mentioned client can determine the communication format of the request information based on a predetermined communication protocol, and configure the request information according to the communication format and the target communication identifier of the server node to be accessed, and call the interface component of the interface component used for point-to-point communication on the server node to be accessed to receive the above-mentioned request information.
[0084] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above methods of each embodiment of the present application.
[0086] Example 2
[0087] According to an embodiment of the present application, a device embodiment for implementing the above-mentioned request message processing method is also provided. Figure 7 is a structural diagram of a request message processing device according to an embodiment of the present application, such as Figure 7 As shown, the device includes: a receiving module 70 and a processing module 72, wherein:
[0088] The receiving module 70 is used to receive a request message from the client under the current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and the multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; the processing module 72 is used to parse and execute the target operation on the server node to be accessed corresponding to the target communication identifier.
[0089] It should be noted that the receiving module 70 and the processing module 72 correspond to steps S202 to S204 in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0090] According to an embodiment of the present application, another device embodiment for implementing the above-mentioned request message processing method is also provided. Figure 8 is a structural diagram of a request message processing device according to an embodiment of the present application, such as Figure 8 As shown, the device includes: a configuration module 80 and a communication module 82, wherein:
[0091] Configuration module 80, used to configure request messages based on a communication protocol pre-agreed between a server and a client, wherein a plurality of server nodes are created on the server, each of the plurality of server nodes is configured with a mutually independent communication identifier and an independent current communication environment, the current communication environment being determined by the pre-agreed communication protocol, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; communication module 82, used to send the request message to the server node to be accessed.
[0092] It should be noted that the configuration module 80 and the communication module 82 correspond to steps S702 to S704 in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0093] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0094] Example 3
[0095] According to an embodiment of the present application, an embodiment of a request message processing device is also provided. The request message processing device may be any computing device in a computing device group. Fig. 9 is a structural diagram of a request message processing device according to an embodiment of the present application, such as Fig. 9 As shown, the request message processing device includes: a processor 900 and a memory 902, wherein:
[0096] Processor 900; and memory 902, connected to the processor 900, for providing instructions for the processor to process the following processing steps: receiving a request message from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and the multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; parsing and executing the target operation on the server node to be accessed corresponding to the target communication identifier.
[0097] In an embodiment of the present application, a request message is received from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and the target operation is parsed and executed on the server node to be accessed corresponding to the target communication identifier.
[0098] Through the embodiments of the present application, the purpose of reducing network bandwidth waste and network delay when the client communicates with the server node on the server side is achieved, thereby achieving the technical effect of improving the communication efficiency between the client and the server, and the operation execution efficiency of the server, and further solving the technical problem of network bandwidth waste and network delay when the client communicates with the server node on the server side in the prior art.
[0099] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0100] Example 4
[0101] According to an embodiment of the present application, an embodiment of a computer terminal is also provided, and the computer terminal can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above-mentioned computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0102] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0103] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for processing a request message: receiving a request message from a client in a current communication environment, wherein the above-mentioned current communication environment is determined by a communication protocol pre-agreed upon by the server and the above-mentioned client, and the multiple server nodes on the above-mentioned server are respectively configured with independent communication identifiers, and the information carried in the above-mentioned request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the above-mentioned server node to be accessed; parsing and executing the above-mentioned target operation on the server node to be accessed corresponding to the above-mentioned target communication identifier.
[0104] Optionally, Fig.10 is a structural block diagram of another computer terminal according to an embodiment of the present application, such as Fig.10 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 1002 , a memory 1004 , and a peripheral interface 1006 .
[0105] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the security vulnerability detection method and device in the embodiment of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned detection method of system vulnerability attacks. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0106] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: receiving a request message from the client in the current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and the multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; parsing and executing the target operation on the server node to be accessed corresponding to the target communication identifier.
[0107] Optionally, the processor may also execute program code for the following steps: accessing a communication component on each of the multiple server nodes, wherein the communication component encapsulates an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation; constructing the current communication environment through the interface component, the parsing component and the execution component.
[0108] Optionally, the processor may also execute program code for the following steps: constructing an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol on each of the multiple server nodes, wherein the interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation; and determining the current communication environment through the interface component, the parsing component and the execution component.
[0109] Optionally, the processor may also execute program code of the following steps: based on the target communication identifier, calling an interface component on the server node to be accessed to receive the request message from the client.
[0110] Optionally, the processor may also execute program codes of the following steps: utilizing a parsing component on the server node to be accessed to parse the request message to obtain the target operation; utilizing an execution component on the server node to be accessed to execute the target operation.
[0111] Optionally, the processor may also execute the program code of the following steps: configuring a request message based on a communication protocol pre-agreed between the server and the client, wherein a plurality of server nodes are created on the server, each of the plurality of server nodes is configured with a mutually independent communication identifier and an independent current communication environment, the current communication environment being determined by the pre-agreed communication protocol, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and sending the request message to the server node to be accessed.
[0112] Optionally, the processor may also execute program code of the following steps: determining the communication format of the request message based on the pre-agreed communication protocol; configuring the request message according to the communication format and the target communication identifier to call the interface component on the server node to be accessed to receive the request message.
[0113] In an embodiment of the present application, a request message is received from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; and the target operation is parsed and executed on the server node to be accessed corresponding to the target communication identifier.
[0114] Through the embodiments of the present application, the purpose of reducing network bandwidth waste and network delay when the client communicates with the server node on the server side is achieved, thereby achieving the technical effect of improving the communication efficiency between the client and the server, and the operation execution efficiency of the server, and further solving the technical problem of network bandwidth waste and network delay when the client communicates with the server node on the server side in the prior art.
[0115] It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.10 It does not limit the structure of the above electronic device. For example, the computer terminal may also include Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations are shown.
[0116] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0117] Example 5
[0118] According to an embodiment of the present application, an embodiment of a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for processing the request message provided in the above embodiment.
[0119] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0120] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: receiving a request message from a client in a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed upon by the server and the client, and multiple server nodes on the server are respectively configured with independent communication identifiers, and the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed; parsing and executing the target operation on the server node to be accessed corresponding to the target communication identifier.
[0121] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: accessing a communication component on each of the multiple server nodes, wherein the communication component encapsulates an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation; constructing the current communication environment through the interface component, the parsing component and the execution component.
[0122] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: constructing an interface component, a parsing component and an execution component for point-to-point communication configured based on the above-mentioned pre-agreed communication protocol on each of the above-mentioned multiple server nodes, wherein the above-mentioned interface component is used to receive the above-mentioned request message, the above-mentioned parsing component is used to parse the above-mentioned request message to obtain the above-mentioned target operation, and the above-mentioned execution component is used to execute the above-mentioned target operation; the above-mentioned current communication environment is determined through the above-mentioned interface component, the above-mentioned parsing component and the above-mentioned execution component.
[0123] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: based on the target communication identifier, calling an interface component on the server node to be accessed to receive the request message from the client.
[0124] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: using the parsing component on the server node to be accessed to parse the request message to obtain the target operation; using the execution component on the server node to be accessed to execute the target operation.
[0125] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: configuring a request message based on a communication protocol pre-agreed between the server and the client, wherein multiple server nodes are created on the above-mentioned server, and each of the above-mentioned multiple server nodes is configured with a mutually independent communication identifier and an independent current communication environment, and the above-mentioned current communication environment is determined by the above-mentioned pre-agreed communication protocol, and the information carried in the above-mentioned request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the above-mentioned server node to be accessed; and sending the above-mentioned request message to the above-mentioned server node to be accessed.
[0126] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining the communication format of the above-mentioned request message based on the above-mentioned pre-agreed communication protocol; configuring the above-mentioned request message according to the above-mentioned communication format and the above-mentioned target communication identifier to call the interface component on the above-mentioned server node to be accessed to receive the above-mentioned request message.
[0127] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0128] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0130] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0132] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0133] The above are only preferred implementations of the present application. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing a request message, It is characterized in that include: In a current communication environment, a request message from a client is received, wherein the current communication environment is determined by a communication protocol pre-agreed between a server and the client, a plurality of server nodes on the server are respectively configured with mutually independent communication identifiers, and the information carried in the request message includes: a target communication identifier of a server node to be accessed and a target operation to be performed on the server node to be accessed, and each of the plurality of server nodes is configured with an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component, the parsing component and the execution component are used to construct the current communication environment, and the parsing component is used to parse the request message to obtain the target operation; Parsing and executing the target operation on the to-be-accessed server node corresponding to the target communication identifier; Wherein, receiving the request message from the client includes: calling an interface component on the server node to be accessed based on the target communication identifier to receive the request message from the client.
2. The method according to claim 1, It is characterized in that Before receiving the request message from the client, the method further includes: A communication component is connected to each of the multiple server nodes, wherein the communication component encapsulates an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component is used to receive the request message, and the execution component is used to execute the target operation.
3. The method according to claim 1, It is characterized in that Before receiving the request message from the client, the method further includes: An interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol are constructed on each of the multiple server nodes, wherein the interface component is used to receive the request message, the parsing component is used to parse the request message to obtain the target operation, and the execution component is used to execute the target operation.
4. The method according to claim 2 or 3, It is characterized in that Parsing and executing the target operation on the server node to be accessed includes: Utilizing the parsing component on the server node to be accessed to parse the request message to obtain the target operation; The target operation is executed by using the execution component on the server node to be accessed.
5. A method for processing a request message, It is characterized in that include: A request message is configured based on a communication protocol pre-agreed between a server and a client, wherein a plurality of server nodes are created on the server, each of the plurality of server nodes is configured with a mutually independent communication identifier and an independent communication environment, the communication environment is determined by the pre-agreed communication protocol, the information carried in the request message includes: a target communication identifier of the server node to be accessed and a target operation to be performed on the server node to be accessed, each of the plurality of server nodes is configured with an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component, the parsing component and the execution component are used to construct the communication environment, the request message from the client is received by calling the interface component on the server node to be accessed based on the target communication identifier, and the parsing component is used to parse the request message to obtain the target operation; The request message is sent to the server node to be accessed.
6. The method according to claim 5, It is characterized in that Configuring the request message based on the pre-agreed communication protocol includes: Determining a communication format of the request message based on the pre-agreed communication protocol; The request message is configured according to the communication format and the target communication identifier to call the interface component on the server node to be accessed to receive the request message.
7. A request message processing device, It is characterized in that include: A receiving module, used for receiving a request message from a client under a current communication environment, wherein the current communication environment is determined by a communication protocol pre-agreed between a server and the client, a plurality of server nodes on the server are respectively configured with mutually independent communication identifiers, the information carried in the request message includes: a target communication identifier of a server node to be accessed and a target operation to be performed on the server node to be accessed, each of the plurality of server nodes is configured with an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component, the parsing component and the execution component are used to construct the current communication environment, and the parsing component is used to parse the request message to obtain the target operation; A processing module, used for parsing and executing the target operation on the to-be-accessed server node corresponding to the target communication identifier; The receiving module is further used to call the interface component on the server node to be accessed to receive the request message from the client based on the target communication identifier.
8. A storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the request message processing method according to any one of claims 1 to 7.
9. A request message processing device, It is characterized in that include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: In a current communication environment, a request message from a client is received, wherein the current communication environment is determined by a communication protocol pre-agreed between a server and the client, a plurality of server nodes on the server are respectively configured with mutually independent communication identifiers, and the information carried in the request message includes: a target communication identifier of a server node to be accessed and a target operation to be performed on the server node to be accessed, and each of the plurality of server nodes is configured with an interface component, a parsing component and an execution component for point-to-point communication configured based on the pre-agreed communication protocol, the interface component, the parsing component and the execution component are used to construct the current communication environment, and the parsing component is used to parse the request message to obtain the target operation; Parse and execute the target operation on the server node to be accessed corresponding to the target communication identifier Wherein, receiving the request message from the client includes: calling an interface component on the server node to be accessed based on the target communication identifier to receive the request message from the client.
