Service call request transmission method and device, storage medium and program product
By splitting service call requests in a serverless architecture and transmitting two parts of data independently, the problem of slow transmission of service call requests is solved, and faster data transmission and lower response delay are achieved.
Patent Information
- Application Number
- CN202510312151.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-17
AI Technical Summary
Under the serverless architecture, the transmission speed of service call requests is slow, resulting in system response delay and performance degradation.
By splitting service call requests between the service caller and the service provider, the first and second data are transmitted respectively, the first and second data are avoided from forwarding all service request data through the internal gateway module, thereby reducing the amount of data forwarding and speeding up the transmission speed.
By splitting and independently transmitting the two parts of the data requested by the service call request, the transmission speed of the service request data is significantly improved, and the system response delay and performance bottlenecks are reduced.
Smart Images

Figure CN120128592A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of serverless architectures, and particularly to a method, device, storage medium, and program product for transmitting service call requests. Background Art
[0002] With the rapid development of cloud computing technology, enterprises' demands for quickly responding to business needs, reducing operating costs, and improving system scalability are increasing day by day. The traditional multi-layer enterprise application system architecture has gradually been unable to meet such rapidly changing demands, especially in scenarios such as high concurrency, big data processing, and real-time response. Against this background, the serverless architecture has received extensive attention as a new cloud computing architecture model.
[0003] Currently, in the serverless architecture, an internal service call request is first forwarded by the service invoker to the internal gateway module. If there is an available service instance at this time, the internal gateway module needs to select an available service instance and forward the entire service call request to this available service instance; if there is no available service instance at this time, the internal gateway module needs to forward the service call request to the Activator. After receiving the service call request, the Activator sends a service instance cold start signal to the AutoScaler and then waits for the service instance to cold start. After the Activator detects that the service instance cold start is successful, it forwards the service call request to the just-cold-started service instance to achieve the transmission of the service call request.
[0004] However, in the above service call request transmission process, the forwarding speed of the service call request is relatively slow. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide a service call request transmission method, device, storage medium, and program product that can accelerate the transmission speed of service call requests.
[0006] In a first aspect, this application provides a method for transmitting service call requests, which is applied to the node where the service invoker is located. The method includes:
[0007] Split the initial service call request to obtain first data and second data; the first data includes a part of the data in the initial service call request, and the second data includes the other part of the data in the initial service call request;
[0008] Transmit the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located;
[0009] Store the second data and receive a transmission signal; the transmission signal includes a first identifier of the service provider.
[0010] In response to the transmission signal, transmit the second data to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located; wherein, the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
[0011] In a second aspect, the present application further provides a method for transmitting a service call request, which is applied to the node where the service provider is located. The method includes:
[0012] Obtain first data and send a transmission signal to the node where the service caller is located; the first data includes a part of the data obtained by splitting the initial service call request by the node where the service caller is located, the transmission signal includes a first identifier of the service provider, and the transmission signal is used to trigger the node where the service provider is located to transmit the stored second data.
[0013] Receive the second data and send the first data and the second data to the service provider; the second data includes another part of the data obtained by splitting the initial service call request by the node where the service caller is located.
[0014] In one embodiment, before sending the first data and the second data to the service provider, the method further includes:
[0015] Delete the additional data in the first data and restore the first data modified according to the preset modification policy, so as to restore the semantic information corresponding to the part of the data in the initial service call request.
[0016] In one embodiment, when both the data chunks of the first data and the data chunks of the second data are multiple, the receiving the second data and sending the first data and the second data to the service provider includes:
[0017] Send the data chunks of the restored first data to the service provider in sequence, receive the data chunks of the target data sent from the node where the service caller corresponding to the third identifier is located, and store the received data chunks of the target data to the second storage module of the node where the service provider is located in sequence; wherein, the target data includes the second data, or the target data includes the second data and the third data; the data chunks of the third data include the data chunks of another part of the data in the initial service call request that are not stored in the first storage module.
[0018] In the case where all data chunks of the first data have been sent to the service provider, the data chunks of the target data stored in the second storage module are sequentially sent to the service provider.
[0019] In one embodiment, the method further includes:
[0020] During the process of sequentially storing the received data chunks of the target data into the second storage module, if it is determined that the transmission process of the data chunks in the second storage module meets a second preset condition, the data chunks of the target data that have been received but not stored in the second storage module are directly sent to the service provider.
[0021] In one embodiment, the second preset condition includes: all data chunks of the target data stored in the second storage module have been sent to the service provider.
[0022] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0024] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0025] In the above service call request transmission method, device, storage medium, and program product, the initial service call request is segmented by the node where the service caller is located to obtain first data and second data, and then the first data is transmitted to the node where the service provider is located to send the first data to the service provider through the node where the service provider is located. And the second data is stored, a transmission signal including the first identifier of the service provider sent by the node where the service provider is located is received, and in response to the transmission signal, the second data is transmitted to the node where the service provider is located. The node where the service provider is located obtains the first data and the second data, and then sends the first data and the second data to the service provider in sequence. Since the two parts of service request data are transmitted through different paths in the embodiments of the present application, forwarding all service request data through the internal gateway module is avoided, the amount of data forwarded to the internal gateway module is reduced, and the transmission speed of service request data can be accelerated. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is an internal structure diagram of a computer device provided by an embodiment of the present application;
[0027] Figure 2 It is a schematic flowchart of a service call request transmission method provided by an embodiment of the present application;
[0028] Figure 3 It is a schematic diagram of a service call request transmission method provided by an embodiment of the present application;
[0029] Figure 4 It is a schematic flowchart of another service call request transmission method provided by an embodiment of the present application;
[0030] Figure 5 It is a schematic flowchart of a data sending method provided by an embodiment of the present application;
[0031] Figure 6 It is a schematic flowchart of a service call request transmission method inside a serverless cluster provided by an embodiment of the present application;
[0032] Figure 7 It is a schematic diagram of a service call request data splitting and transmission method provided by an embodiment of the present application. Detailed implementation manners
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] The service call request transmission method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Figure 1 It is an internal structure diagram of a computer device provided by an embodiment of the present application, and its internal structure diagram can be as Figure 1 shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a service call request transmission method.
[0035] Those skilled in the art can understand that Figure 1The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0036] In one embodiment, as Figure 2 shown, Figure 2 is a schematic flow diagram of a service call request transmission method provided by an embodiment of this application. This method can be applied to Figure 1 the computer device in, and this method includes the following steps:
[0037] S201, split the initial service call request to obtain first data and second data.
[0038] Among them, the first data includes a part of the data in the initial service call request, and the second data includes the other part of the data in the initial service call request.
[0039] In one embodiment, the node where the service invoker is located can split the data chunks of the initial service call request according to a preset splitting strategy to obtain the data chunks of the first data and the data chunks of the second data.
[0040] Exemplarily, the initial service call request can be split according to the following preset splitting strategy: Set a preset number of bytes according to requirements (let the preset number of bytes be N). If the number of bytes of the initial service call request is greater than N, then split the initial service call request according to the preset number of bytes, and use the data of the first N bytes in the initial service call request as the first data, and the other data except the first data as the second data; if the number of bytes of the initial service call request is not greater than N, then use the initial service call request as the first data.
[0041] It should be noted that the above splitting of the initial service call request according to the preset number of bytes is only a possible implementation manner, and does not limit that the initial service call request must be split according to the preset number of bytes. In actual applications, a suitable preset splitting strategy can be selected according to requirements to split the initial service call request.
[0042] Optionally, after the node where the service invoker is located receives the initial service call request and completes the splitting of the initial service call request, it is also necessary to determine the preset modification strategy corresponding to the application layer protocol, and then modify the first data according to the preset modification strategy.
[0043] In addition, after splitting the initial service call request to obtain the first data, the first data can be modified in the following way: additional data is inserted into the first data to obtain the new first data. The additional data includes the second identifier of the initial service call request and the third identifier of the node where the service caller is located. The second identifier is the unique identifier of the initial service request, and the third identifier is the identifier of the node where the service caller is located. The node where the service provider is located sends a transmission signal to the node where the service caller is located by parsing the meaning of the third identifier. That is to say, the node where the service provider is located can send a transmission signal to the node where the service caller is indicated by the third identifier.
[0044] S202. Transmit the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located.
[0045] In one embodiment, after splitting the initial service call request and modifying the first data, the modified first data will still be transmitted to the node where the service provider is located along the original path, so as to send the first data to the service provider through the node where the service provider is located, while the second data does not need to be forwarded to the internal gateway module and can be directly transmitted to the node where the service provider is located.
[0046] Optionally, the modified first data will still be transmitted to the node where the service provider is located along the original path, which includes: after obtaining the first data of the node where the service caller is located through the internal gateway module, the internal gateway module can detect whether there is an available service provider container in the serverless cluster. If there is an available service provider container in the serverless cluster, the internal gateway module directly forwards the first data to the node where the service provider corresponding to the available service provider container is located; if there is no available service provider container in the serverless cluster, the internal gateway forwards the first data to the Activator module. After receiving the first data, the Activator module sends a cold start signal to the AutoScaler module, and then waits for the service provider container to be successfully cold started. When the AutoScaler module detects that the service provider container is successfully cold started, it forwards the first data to the node where the service provider corresponding to the just cold started successfully service provider container is located.
[0047] S203. Store the second data and receive the transmission signal.
[0048] The transmission signal includes the first identifier of the service provider.
[0049] In one embodiment, the node where the service provider corresponding to the first identifier is located can sequentially obtain the data chunks of the first data from the internal gateway module, and send a transmission signal to the node where the service caller is located when starting to obtain the data chunks of the first data.
[0050] In the embodiment of the present application, after splitting the initial service call request to obtain the first data and the second data, the node where the service provider is located can obtain the first data through the internal gateway module. At this time, the node where the service caller is located has not received the transmission signal. Therefore, the data blocks of the second data can be sequentially stored in the first storage module of the node where the service caller is located, and the transmission signal is received until the transmission signal is received and then the data blocks of the second data are transmitted to the node where the service provider is located.
[0051] S204, in response to the transmission signal, transmit the second data to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located.
[0052] Among them, the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
[0053] In the embodiment of the present application, since before the node where the service caller is located receives the transmission signal, a part of the other part of the data in the initial service call request, that is, the data blocks of the second data, has been stored in the first storage module. Therefore, after the node where the service caller is located receives the transmission signal, the data blocks of the second data stored in the first storage module can be sequentially sent to the node where the service provider is located until the first preset condition is met, stop storing data in the first storage module, and sequentially send the data blocks of the third data in the other part of the data in the initial service call request that has not been stored in the first storage module to the node where the service provider is located through the node where the service caller is located.
[0054] Among them, the first preset condition is used to indicate that all the data blocks of the second data stored in the first storage module have been sent to the node where the service provider is located.
[0055] Exemplarily, the data blocks of the second data can be numbered, and then the data blocks of the second data are sequentially stored in the first storage module according to the numbers, and the first quantity of the data blocks of the second data that have been sent by the node where the service caller is located is recorded. After the node where the service caller is located receives the transmission signal, in response to the transmission signal, first, the data blocks of the second data stored in the first storage module are sequentially sent to the node where the service provider is located according to the numbers until the number of the last data block sent to the node where the service provider is located is equal to the first quantity, which is determined to meet the first preset condition. At this time, the storage of data blocks in the first storage module can be stopped, and the data blocks of the third data that have not been stored in the first storage module are directly sequentially sent to the node where the service provider is located. If when the first preset condition is met, all the other part of the data in the initial service call request has been sent to the node where the service provider is located, then there is no such third data.
[0056] It should be noted that, before the first preset condition is satisfied, the node where the service invoker is located still needs to store the data chunks of the second data in the first storage module until the first preset condition is satisfied and then stops storing the data chunks of the second data in the first storage module.
[0057] In one embodiment, the node where the service provider is located can receive the first data and the second data, and then send the received data to the service provider in the initial order of the initial service invocation request.
[0058] In the embodiment of the present application, the node where the service invoker is located splits the initial service invocation request to obtain the first data and the second data, and then transmits the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located. And store the second data, receive the transmission signal including the first identifier of the service provider sent by the node where the service provider is located, and in response to the transmission signal, transmit the second data to the node where the service provider is located. The node where the service provider is located obtains the first data and the second data, and then sends the first data and the second data to the service provider in order. Since the two parts of the service request data are transmitted through different paths in the embodiment of the present application, it is possible to avoid forwarding all the service request data through the internal gateway module, reduce the amount of data forwarded to the internal gateway module, and accelerate the transmission speed of the service request data.
[0059] For a clearer introduction of the embodiment of the present application, hereby in combination with Figure 3 an exemplary illustration is made, Figure 3 which is a schematic diagram of a service invocation request transmission method provided by the embodiment of the present application. As Figure 3As shown, the node where the service invoker is located can obtain an initial service call request, and then split and modify the initial service call request (modification means modifying the first data according to a preset modification policy and inserting additional data into the first data. In addition to the node where the service invoker is located, the first data can also be modified in the internal gateway module) to obtain data chunks of the first data and data chunks of the second data. Then, it starts to sequentially store the data chunks of the second data into the first storage module of the node where the service invoker is located. The internal gateway module can sequentially obtain the data chunks of the first data from the node where the service invoker is located. After the internal gateway module obtains the first data, it can modify the first data and send a transmission signal to the node where the service invoker is located (the transmission signal can also be sent to the node where the service invoker is located through the node where the service provider is located). The node where the service provider is located can sequentially obtain the data chunks of the first data from the internal gateway module or the Activator module and simultaneously send a transmission signal to the node where the service invoker is located. After the node where the service provider is located obtains the first data, it can also perform semantic modification on the first data to restore the semantic information of the first data in the initial service call request. After the node where the service invoker is located receives the transmission signal, it can, in response to the transmission signal, start to send the data chunks of the second data stored in the first storage module to the node where the service provider is located until a first preset condition is met, stop storing the data chunks of the second data into the first storage module, and sequentially send the data chunks of the third data that have not been stored in the first storage module to the node where the service provider is located through the node where the service invoker is located. In addition, the data chunks of the restored first data can be sequentially sent to the service provider through the node where the service provider is located. Before the data chunks of the first data are completely sent to the service provider, the data chunks of the target data can be received through the node where the service provider is located and start to store the received data chunks of the target data in the second storage module of the node where the service provider is located. When the data chunks of the first data are completely sent to the service provider, it can start to send the data chunks of the target data stored in the second storage module to the service provider until a second preset condition is met, stop storing the received data chunks of the target data into the second storage module, and directly send the data chunks of the target data that have not been stored in the second storage module to the service invoker. Among them, the target data includes the second data, or the target data includes the second data and the third data.
[0060] Based on the above embodiments, S201 described above includes the following steps:
[0061] Obtain data chunks of the initial service call request and split the data chunks of the initial service call request according to a preset splitting policy to obtain at least one data chunk of the first data and at least one data chunk of the second data.
[0062] Exemplarily, the data chunks of the initial service call request can be segmented according to the following preset segmentation strategy: Set a preset number of bytes according to requirements (let the preset number of bytes be N). If the number of bytes of the initial service call request is greater than N, then segment the initial service call request according to the preset number of bytes. The data chunk of the first N bytes in the initial service call request is used as the data chunk of the first data, and the data chunks of the other data except the first data are used as the data chunks of the second data. If the number of bytes of the initial service call request is not greater than N, then use the initial service call request as the first data.
[0063] It should be noted that the above segmentation of the initial service call request according to the preset number of bytes is only a possible implementation manner, and it is not limited that the initial service call request must be segmented according to the preset number of bytes. In practical applications, an appropriate preset segmentation strategy can be selected according to requirements to segment the initial service call request.
[0064] In the embodiment of the present application, obtaining the data chunks of the initial service call request and segmenting the data chunks of the initial service call request according to the preset segmentation strategy to obtain at least one data chunk of the first data and at least one data chunk of the second data can transmit the two parts of service request data through different paths, thereby avoiding forwarding all service request data through the internal gateway module, reducing the amount of data forwarded to the internal gateway module, being able to accelerate the transmission speed of the service request data, and not directly segmenting the initial service call request, but segmenting the data chunks of the initial service call request, which can improve the accuracy and precision of data segmentation.
[0065] Based on the above embodiment, before transmitting the first data to the node where the service provider is located, the method further includes the following steps:
[0066] Modify the first data according to the preset modification strategy and insert additional data into the first data; the additional data includes the second identifier of the initial service call request and the third identifier of the node where the service caller is located.
[0067] Among them, the second identifier is the unique identifier of the initial service request, and the third identifier is the unique identifier of the node where the service caller is located.
[0068] Optionally, after the node where the service caller is located receives the initial service call request and completes the segmentation of the initial service call request, it is also necessary to determine the preset modification strategy corresponding to the application layer protocol, and then modify the first data according to the preset modification strategy.
[0069] In a possible implementation, an initial service call request can be obtained through the node where the service caller is located, the initial service call request can be modified, and additional data can be inserted into the initial service call request. Then, the data chunks of the initial service call request with the additional data inserted are split to obtain data chunks of the first data and data chunks of the second data.
[0070] In another possible implementation, an initial service call request can be obtained through the node where the service caller is located, the data chunks of the initial service call request are split to obtain data chunks of the first data and data chunks of the second data, and then the first data is modified and additional data is inserted into the first data.
[0071] In yet another possible implementation, an initial service call request can be obtained through the node where the service caller is located, the data chunks of the initial service call request are split to obtain data chunks of the first data and data chunks of the second data, and then the data chunks of the first data are transmitted to the internal gateway module. After the internal gateway module obtains the first data, the initial service call request can be modified through the internal gateway module and additional data can be inserted into the first data.
[0072] In other possible implementations, an initial service call request can be obtained through the node where the service caller is located, the data chunks of the initial service call request are split to obtain data chunks of the first data and data chunks of the second data, and then the data chunks of the first data are transmitted to the internal gateway module. Before the internal gateway module obtains the first data, the initial service call request can be modified through software and hardware modules or devices (such as switches, routers, etc.) on the data transmission path between the node where the service caller is located and the internal gateway module, and additional data can be inserted into the first data.
[0073] In the embodiments of the present application, the first data is modified according to a preset modification policy, and additional data is inserted into the first data to uniquely identify the initial service request through the second identifier in the additional data and uniquely identify the node where the service caller is located through the third identifier. Thus, the second data corresponding to the first data (the second data corresponding to the first data, that is, the second data obtained from the same initial service call request and the same service caller as the first data) can be determined according to the additional data, improving the accuracy of the data sent to the service provider.
[0074] Based on the above embodiments, after receiving the transmission signal through the node where the service caller is located, S204 above can be implemented in the following manner:
[0075] In response to the transmission signal, the data blocks of the second data stored in the first storage module are sequentially sent to the node where the service provider corresponding to the first identifier is located. During the process of sequentially storing the data blocks of the second data in the first storage module, if it is determined that the transmission process of the data blocks in the first storage module meets the first preset condition, the data blocks of the third data are sequentially sent to the node where the service provider is located. Among them, the data blocks of the third data include the data blocks of the other part of the data in the initial service call request that have not been stored in the first storage module.
[0076] In the embodiment of the present application, since a part of the data in the other part of the data in the initial service call request, that is, the data blocks of the second data, has been stored in the first storage module before the node where the service invoker is located receives the transmission signal, after the node where the service invoker is located receives the transmission signal, the data blocks of the second data stored in the first storage module can be sequentially sent to the node where the service provider is located until the first preset condition is met, stop storing the data blocks of the second data, and sequentially send the data blocks of the third data that have not been stored in the first storage module to the node where the service provider is located through the node where the service invoker is located.
[0077] Exemplarily, the data blocks of the other part of the data in the initial service call request can be numbered, and then the data blocks of the second data are sequentially stored in the first storage module according to the numbers, and the number of the data blocks of the second data that have been sent by the node where the service invoker is located is recorded. After the node where the service invoker is located receives the transmission signal, in response to the transmission signal, the data blocks of the second data stored in the first storage module can be sequentially sent to the node where the service provider is located according to the numbers until the number of the last data block sent to the node where the service provider is located is equal to the number of the data blocks of the second data that have been sent by the node where the service invoker is located, which is determined to meet the first preset condition. At this time, the storage of the data blocks of the second data in the first storage module can be stopped, and the data blocks of the third data that have not been stored in the first storage module are sequentially sent to the node where the service provider is located through the node where the service invoker is located.
[0078] It should be noted that before the first preset condition is met, the node where the service invoker is located still needs to store the data blocks of the second data in the first storage module until the first preset condition is met and then stop storing the data blocks of the second data in the first storage module.
[0079] In an embodiment of the present application, in response to a transmission signal, data blocks of second data stored in a first storage module are sequentially sent to a node where a service provider corresponding to a first identifier is located. During the process of sequentially storing the data blocks of the second data in the first storage module, if it is determined that the transmission process of the data blocks in the first storage module meets a first preset condition, data blocks of third data are sequentially sent to the node where the service provider is located. Thus, the data blocks of the second data can be temporarily stored in the first storage module to improve the transmission speed of the second data and the third data, and the flexibility of the transmission of service call requests is improved.
[0080] In one embodiment, as Figure 4 shown, Figure 4 is a schematic flowchart of another method for transmitting a service call request provided by an embodiment of the present application. This method can be applied to Figure 1 a computer device, and the method includes the following steps:
[0081] S401, Obtain first data and send a transmission signal to the node where the service caller is located.
[0082] Among them, the first data includes a part of the data obtained by splitting an initial service call request by the node where the service caller is located. The transmission signal includes a first identifier of the service provider, and the transmission signal is used to trigger the transmission of the stored second data by the node where the service provider is located.
[0083] In one embodiment, after splitting the initial service call request and modifying the first data, the modified first data still travels along the original path: after the internal gateway module obtains the first data of the node where the service caller is located, the internal gateway module can detect whether there is an available service provider container in the serverless cluster. If there is an available service provider container in the serverless cluster, the internal gateway module directly forwards the first data to the node where the service provider corresponding to the available service provider container is located; if there is no available service provider container in the serverless cluster, the internal gateway forwards the first data to the Activator module. After receiving the first data, the Activator module sends a cold start signal to the AutoScaler module, and then waits for the service provider container to cold start successfully. When the AutoScaler module detects that the service provider container has cold started successfully, it forwards the first data to the node where the service provider corresponding to the just cold started successfully service provider container is located.
[0084] In one embodiment, after the internal gateway module obtains the first data of the node where the service caller is located, if there is an available service provider container in the serverless cluster, the node where the service provider is located can directly obtain the first data from the internal gateway module.
[0085] Alternatively, the node where the service provider is located can also obtain the first data from the Activator module and other system service modules, etc.
[0086] In the embodiments of the present application, the node where the service provider is located can sequentially obtain data chunks of the first data from the internal gateway module, and send a transmission signal to the node where the service invoker is located when starting to obtain the data chunks of the first data. After the node where the service provider is located obtains the first data, the additional data in the first data can be deleted, and the first data modified according to the preset modification policy can be restored to restore the semantic information corresponding to the original first data in the initial service invocation request.
[0087] Optionally, since in addition to the internal gateway module, the node where the service provider is located can also obtain the first data from the Activator module and other system service modules, etc., the transmission signal can also be sent to the node where the service invoker is located through any system service module including the internal gateway module and the Activator module, and any software and hardware module or device on the transmission path of the first data.
[0088] S402, receive the second data, and send the first data and the second data to the service provider.
[0089] Wherein, the second data includes another part of the data obtained by splitting the initial service invocation request by the node where the service invoker is located.
[0090] In one embodiment, the node where the service provider is located can restore the received first data, and then sequentially send the data chunks of the restored first data to the service provider. Since the data chunks of the first data are sequentially sent from the node where the service provider is located to the service provider, in order to enable the first data and the second data to be sent to the service provider corresponding to the second identifier in the initial order, before all the data chunks of the first data are sent to the service provider, the data chunks of the received second data can be stored in the second storage module of the node where the service provider is located until all the data chunks of the first data are sent to the service provider. At this time, the data chunks of the second data stored in the second storage module can be sequentially sent to the service provider until the second preset condition is met, stop storing the data chunks of the second data in the second storage module, and directly send the data chunks of the second data that are received by the node where the service provider is located and not stored in the second storage module to the service invoker. Wherein, the second preset condition is used to indicate that all the data chunks of the second data stored in the second storage module have been sent to the service invoker.
[0091] Optionally, if there is third data, before all data chunks of the first data are sent to the service provider, the data chunks of the received second data and third data can be stored in the second storage module of the node where the service provider is located until all data chunks of the first data are sent to the service provider. At this time, the data chunks of the second data and third data stored in the second storage module can be sent to the service provider in sequence until the second preset condition is met. Then, stop storing the data chunks of the second data and third data in the second storage module, and directly send the data chunks of the second data and third data that are received through the node where the service provider is located and not stored in the second storage module to the service invoker. The second preset condition is used to indicate that all data chunks of the second data and third data stored in the second storage module have been sent to the service invoker.
[0092] In the embodiment of the present application, the first data is obtained, and a transmission signal is sent to the node where the service invoker is located to trigger the node where the service provider is located to transmit the stored second data through the transmission signal. Then, the second data is received, and the first data and the second data are sent to the service provider. Since in the embodiment of the present application, the two parts of service request data are transmitted through different paths, it is possible to avoid forwarding all service request data through the internal gateway module, reduce the amount of data forwarded to the internal gateway module, and accelerate the transmission speed of the service request data.
[0093] Based on the above embodiment, before sending the first data and the second data to the service provider, the method further includes the following steps:
[0094] Delete the additional data in the first data, and restore the first data modified according to the preset modification strategy to restore the semantic information corresponding to a part of the data in the initial service invocation request.
[0095] In one embodiment, different modification strategies can be adopted to perform semantic modification on the first data according to different application layer protocols. The purpose of performing semantic modification on the first data is to delete the additional data in the first data and restore the first data modified according to the preset modification strategy so that the semantic information of the first data is the same as the semantic information of the original first data in the above initial service invocation request.
[0096] In the embodiment of the present application, the additional data in the first data is deleted, and the first data modified according to the preset modification strategy is restored to restore the semantic information corresponding to a part of the data in the initial service invocation request, so as to be able to restore the semantic information corresponding to the original first data in the initial service invocation request and improve the accuracy of the data sent to the service provider.
[0097] Refer to Figure 5 , Figure 5It is a schematic flowchart of a data sending method provided by an embodiment of the present application. This embodiment relates to a possible implementation manner of receiving second data and sending the first data and the second data to a service provider. Based on the above embodiment, the above S402 includes the following steps:
[0098] S501: Sequentially send the data blocks of the restored first data to the service provider, receive the data blocks of the target data sent from the node where the service caller corresponding to the third identifier is located, and sequentially store the received data blocks of the target data into the second storage module of the node where the service provider is located.
[0099] Among them, the target data includes the second data, or the target data includes the second data and the third data; the data blocks of the third data include the data blocks of the other part of the data in the initial service call request that are not stored in the first storage module.
[0100] Optionally, if all the other part of the data in the initial service call request has been stored in the first storage module before the transmission signal is received at the node where the service caller is located, the target data includes the second data; or, if after the transmission signal is received at the node where the service caller is located, not all the other part of the data in the initial service call request has been stored in the first storage module, but when the transmission process of the data blocks in the first storage module meets the first preset condition, all the other part of the data in the initial service call request has been sent to the node where the service provider is located, the target data includes the second data; or, if after the transmission signal is received at the node where the service caller is located, not all the other part of the data in the initial service call request has been stored in the first storage module, and when the transmission process of the data blocks in the first storage module meets the first preset condition, there is still a part of the other part of the data in the initial service call request that has not been stored in the first storage module, the target data includes the second data and the third data.
[0101] In one embodiment, after the first data is restored by the node where the service provider is located, the data blocks of the restored first data can be sequentially sent to the service provider by the node where the service provider is located. And start receiving the data blocks of the target data sent from the node where the service caller corresponding to the third identifier is located by the node where the service provider is located. Since the data blocks of the first data are sequentially sent from the node where the service provider is located to the service provider, in order to enable the first data and the target data to be sent to the corresponding service provider in the initial order, before all the data blocks of the first data are sent to the service provider, the received data blocks of the target data can be stored in the second storage module of the node where the service provider is located.
[0102] S502, in the case where all data chunks of the first data have been sent to the service provider, sequentially send the data chunks of the target data stored in the second storage module to the service provider.
[0103] In one embodiment, in the case where all data chunks of the first data have been sent to the service provider, the data chunks of the target data stored in the second storage module can be sequentially sent to the service provider. During the process of sequentially storing the received data chunks of the target data in the second storage module, if it is determined that the transmission process of the data chunks in the second storage module meets the second preset condition, stop storing the received data chunks of the target data in the second storage module, and directly send the received data chunks of the target data that have not been stored in the second storage module to the service provider.
[0104] Exemplarily, the data chunks of the target data can be numbered, and then the received data chunks of the target data are sequentially stored in the second storage module according to the numbers. In the case where all data chunks of the first data have been sent to the service provider through the node where the service provider is located, the data chunks of the target data stored in the second storage module are sequentially sent to the service provider according to the numbers, and record the second quantity of the data chunks of the target data sent to the service provider until the number of the last data chunk of the target data sent to the service provider through the second storage module is equal to the second quantity, which is determined as the second preset condition. At this time, stop storing the received data chunks of the target data in the second storage module, and directly send the received data chunks of the target data that have not been stored in the second storage module to the service invoker.
[0105] In the embodiment of the present application, the data chunks of the restored first data are sequentially sent to the service provider, receive the data chunks of the target data sent from the node where the service invoker corresponding to the third identifier is located, and sequentially store the received data chunks of the target data in the second storage module of the node where the service provider is located. In the case where all data chunks of the first data have been sent to the service provider, the data chunks of the target data stored in the second storage module are sequentially sent to the service provider. During the process of sequentially storing the received data chunks of the target data in the second storage module, if it is determined that the transmission process of the data chunks in the second storage module meets the second preset condition, directly send the received data chunks of the target data that have not been stored in the second storage module to the service provider, so that the first data and the second data can be sent to the service provider corresponding to the second identifier in the initial order, improving the accuracy of the data sent to the service provider and the flexibility of the transmission of the service call request.
[0106] Refer to Figure 6 , Figure 6It is a schematic flowchart of a method for transmitting an internal service call request in a serverless cluster provided by an embodiment of the present application. The method includes the following steps:
[0107] S601, the node where the service caller is located obtains data chunks of the initial service call request, and divides the data chunks of the initial service call request according to a preset segmentation strategy to obtain data chunks of the first data and data chunks of the second data.
[0108] S602, the node where the service caller is located modifies the data chunks of the first data according to a preset modification strategy and inserts additional data into the first data.
[0109] S603, the internal gateway module obtains the first data of the node where the service caller is located.
[0110] S604, the node where the service provider is located obtains the first data from the internal gateway module, restores the first data, and sends a transmission signal to the node where the service caller is located.
[0111] S605, the node where the service caller is located sequentially stores the data chunks of the second data into the first storage module of the node where the service caller is located and receives the transmission signal.
[0112] S606, in response to the transmission signal, start to sequentially send the data chunks of the second data stored in the first storage module to the node where the service provider is located until a first preset condition is met, stop storing the data chunks of the second data into the first storage module, and sequentially send the data chunks of the third data that have not been stored in the first storage module to the node where the service provider is located.
[0113] S607, the node where the service provider is located sequentially sends the restored data chunks of the first data to the service provider, and at the same time starts to receive the data chunks of the second data sent from the node where the service caller corresponding to the third identifier is located, and stores the received data chunks of the second data into the second storage module of the node where the service provider is located.
[0114] S608, when all the data chunks of the first data have been sent to the service provider by the node where the service provider is located, start to sequentially send the data chunks of the target data stored in the second storage module to the service provider until a second preset condition is met, stop storing the data chunks of the received target data into the second storage module, and send the data chunks of the received target data that have not been stored in the second storage module to the service caller.
[0115] For a clearer introduction of the embodiments of the present application, hereby in combination with Figure 7 make an exemplary illustration, Figure 7It is a schematic diagram of a method for splitting and transmitting service call request data provided by an embodiment of the present application.
[0116] Exemplarily, as Figure 7 shown, the IP of the service caller container is 10.11.9.100, the source port of the service call is 12345, the fast transmission intermediary service port is 9090, the IP of the node where the service caller container is located (Node 1) is 192.168.1.100, the source port of the data caching auxiliary TCP connection is 23456, the data caching auxiliary service port is 9097, the source port of the data forwarding auxiliary TCP connection is 34567, the data forwarding auxiliary service port is 9098, the internal gateway IP is 10.11.9.30, the internal gateway service port is 80, the IP of the service provider container is 10.11.9.200, the source port of the fast transmission TCP connection is 45678, and the IP of the node where the service caller container is located (Node 2) is 192.168.1.200. As Figure 7 shown in operation ①: The service request data fast transmission auxiliary process loads the compiled eBPF bytecode (extended Berkeley Packet Filter) into the linux kernel and initializes it. Among them, the eBPF bytecode includes multiple eBPF programs, namely:
[0117] (1) An eBPF program of BPF_PROG_TYPE_SK_SKB type (hereinafter referred to as the skb program);
[0118] (2) An eBPF program of BPF_PROG_TYPE_SK_MSG type (hereinafter referred to as the msg program);
[0119] (3) An eBPF program of BPF_PROG_TYPE_XDP type (hereinafter referred to as the xdp program);
[0120] As Figure 7 shown in operation ②: The service request data fast transmission auxiliary process starts the service request data caching auxiliary service and the service request data forwarding auxiliary service on the node where the service caller is located according to the pre-agreed port number, and then establishes a service request data caching auxiliary TCP connection and a service request data forwarding auxiliary TCP connection respectively.
[0121] When the service caller container starts, its sidecar container starts the service request data fast transmission intermediary service according to the pre-agreed port number, that is, as Figure 7 shown in operation ③.
[0122] Before the service invoker container transmits the initial service invocation request, it needs to establish a TCP connection first. After the above TCP connection is established, the service invoker container can send the initial service invocation request through this TCP connection. Generally, the service invoker container will call the send function multiple times during the process of sending the initial service invocation request. That is to say, each time the send function is called, a part of the data in the initial service invocation request will be sent. When the service invoker container calls the send function, the msg program on the node where the service invoker is located is triggered to execute. At this time, the msg program executes the operation ④ as shown in Figure 7 Operation ④ shown in
[0123] Split the initial service invocation request to obtain the first data and the second data, then modify the first data, and finally transmit the first data to the internal gateway module and temporarily store the second data in the first storage module.
[0124] After the node where the service invoker is located completes the operation of temporarily storing the second data in the first storage module described in operation ④, it is also necessary to redirect the second data to the receive buffer of the destination Socket of the data staging auxiliary TCP connection. In addition, the modification of the first data described in operation ④ can be: one is to add the Content-Length and CLen fields to the HTTP request header and set their values to 0 and -1 respectively, the second is to delete the original Transfer-Encoding field in the HTTP request header, and the third is to add two fields, Source-Address and Broker-Address, to the HTTP request header. Set the value of the Source-Address field to a string composed of the local IP address and the local port number of the source Socket of the service call (i.e., 10.11.9.100:12345), and set the value of the Broker-Address field to a string composed of the IP address and port number of the fast transmission intermediary service corresponding to the service invoker container (i.e., 10.11.9.100:9090). Source-Address and Broker-Address are the first identifier of the above initial service invocation request and the third identifier of the node where the service invoker is located respectively.
[0125] When there is data that needs to be put into the receive buffer of the destination Socket of the data staging auxiliary TCP connection, the node where the service invoker is located will ask the skb program whether to agree to put the data into the receive buffer of the destination Socket of the data staging auxiliary TCP connection. At this time, the skb program executes the operation ⑤ as shown in Figure 7 Operation ⑤ shown in
[0126] Refuse to put the current second data into the receive buffer of the destination Socket of the data staging auxiliary TCP connection.
[0127] The purpose of operation ⑤ is to prevent the service invoker container from perceiving the failure of the second data transmission.
[0128] When the first data is transmitted to the Sidecar container of the service provider container through the internal gateway module, the Sidecar container of the service provider container performs operation ⑥ as shown in Figure 7 below:
[0129] Semantically modify the first data and transmit the semantically modified first data to the service provider container.
[0130] Among them, the semantic modification of the first data may include the following:
[0131] If the Content-Length, CLen, Source-Address, and Broker-Address fields exist in the HTTP request header, and the value of the Content-Length field is 0 and the value of the CLen field is -1, then delete the Content-Length field in the HTTP request header, add a Transfer-Encoding field in the HTTP request header, and set the value of the Transfer-Encoding field to chunked; if the Content-Length, CLen, Source-Address, and Broker-Address fields exist in the HTTP request header, and the value of the Clen field is greater than 0, then set the value of the Content-Length field in the HTTP request header to the value of the CLen field and delete the CLen field in the HTTP request header.
[0132] When the first data is transmitted to the Sidecar container of the service provider container through the internal gateway module, the Sidecar container of the service provider container also needs to perform operation ⑦ as shown in Figure 7 below:
[0133] Send a transmission signal to the node where the service invoker is located, and the transmission signal includes the value of the Source-Address field in the HTTP request header.
[0134] The Sidecar container of the service provider container needs to establish a fast transmission TCP connection first in order to send the transmission signal.
[0135] When the node where the service invoker is located receives the transmission signal, the xdp program is triggered to execute, and at this time the xdp program performs operation ⑧ as shown in Figure 7 below:
[0136] Send a transmission signal arrival event to the service request data fast transmission auxiliary process at the node where the service caller is located. The content of this event is the content of the transmission signal.
[0137] After the service request data fast transmission auxiliary process at the node where the service caller is located receives the transmission signal arrival event, it performs the operations shown in Figure 7 as follows:
[0138] Call the send function to send the content of the transmission signal arrival event from the source Socket of the data forwarding auxiliary TCP connection.
[0139] When calling the send function to send the content of the transmission signal arrival event, the msg program on the node where the service caller is located is triggered to execute. At this time, the msg program performs the operations shown in Figure 7 as follows:
[0140] Determine the second data corresponding to the transmission signal, and transmit the second data to the node where the service provider is located through the fast transmission TCP connection.
[0141] When the second data arrives at the node where the service provider is located, first transmit the second data to the receive buffer of the source Socket of the fast transmission TCP connection on the node where the service provider is located (i.e., the above-mentioned second storage module), and then perform the operations shown in Figure 7 as follows:
[0142] The Sidecar container of the service provider container receives the second data from the source Socket of the fast transmission TCP connection according to the semantics of the modified HTTP request header, and then forwards it to the service provider container.
[0143] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least some of the steps or steps in other steps.
[0144] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0145] Split the initial service call request to obtain first data and second data; the first data includes a part of the data in the initial service call request, and the second data includes another part of the data in the initial service call request.
[0146] Transmit the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located.
[0147] Store the second data and receive a transmission signal; the transmission signal includes a first identifier of the service provider.
[0148] In response to the transmission signal, transmit the second data to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located; wherein, the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
[0149] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0150] Obtain the data chunks of the initial service call request, and split the data chunks of the initial service call request according to a preset splitting strategy to obtain at least one data chunk of the first data and at least one data chunk of the second data.
[0151] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0152] Modify the first data according to a preset modification strategy, and insert additional data into the first data; the additional data includes a second identifier of the initial service call request and a third identifier of the node where the service caller is located.
[0153] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0154] In response to the transmission signal, sequentially send the data chunks of the second data stored in the first storage module to the node where the service provider corresponding to the first identifier is located. During the process of sequentially storing the data chunks of the second data in the first storage module, if it is determined that the transmission process of the data chunks in the first storage module meets the first preset condition, then sequentially send the data chunks of the third data to the node where the service provider is located; the data chunks of the third data include the data chunks of another part of the data in the initial service call request that have not been stored in the first storage module.
[0155] In one embodiment, the first preset condition includes: all the data chunks of the second data stored in the first storage module are sent to the node where the service provider corresponding to the first identifier is located.
[0156] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0157] Obtain first data, and send a transmission signal to the node where the service invoker is located; the first data includes a part of the data obtained by splitting the initial service call request by the node where the service invoker is located, and the transmission signal includes the first identifier of the service provider, and the transmission signal is used to trigger the node where the service provider is located to transmit the stored second data;
[0158] Receive the second data, and send the first data and the second data to the service provider; the second data includes another part of the data obtained by splitting the initial service call request by the node where the service invoker is located.
[0159] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0160] Delete the additional data in the first data, and restore the first data modified according to the preset modification policy, so as to restore the semantic information corresponding to a part of the data in the initial service call request.
[0161] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0162] Send the data blocks of the restored first data to the service provider in sequence, receive the data blocks of the target data sent from the node where the service invoker corresponding to the third identifier is located, and store the received data blocks of the target data to the second storage module of the node where the service provider is located in sequence; wherein, the target data includes the second data, or the target data includes the second data and the third data; the data blocks of the third data include the data blocks of another part of the data in the initial service call request that are not stored in the first storage module;
[0163] In the case where all the data blocks of the first data have been sent to the service provider, send the data blocks of the target data stored in the second storage module to the service provider in sequence.
[0164] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0165] In the process of storing the received data blocks of the target data to the second storage module in sequence, if it is determined that the transmission process of the data blocks in the second storage module meets the second preset condition, directly send the data blocks of the target data that have not been stored in the second storage module to the service provider.
[0166] In one embodiment, the second preset condition includes: all the data blocks of the target data stored in the second storage module have been sent to the service provider.
[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0168] Split the initial service call request to obtain first data and second data; the first data includes a part of the data in the initial service call request, and the second data includes another part of the data in the initial service call request;
[0169] Transmit the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located;
[0170] Store the second data and receive a transmission signal; the transmission signal includes a first identifier of the service provider;
[0171] In response to the transmission signal, transmit the second data to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located; wherein, the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
[0172] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0173] Obtain the data chunks of the initial service call request, and split the data chunks of the initial service call request according to a preset splitting strategy to obtain at least one data chunk of the first data and at least one data chunk of the second data.
[0174] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0175] Modify the first data according to a preset modification strategy and insert additional data into the first data; the additional data includes a second identifier of the initial service call request and a third identifier of the node where the service caller is located.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0177] In response to the transmission signal, sequentially send the data chunks of the second data stored in the first storage module to the node where the service provider corresponding to the first identifier is located. During the process of sequentially storing the data chunks of the second data in the first storage module, if it is determined that the transmission process of the data chunks in the first storage module meets a first preset condition, then sequentially send the data chunks of the third data to the node where the service provider is located; the data chunks of the third data include the data chunks of another part of the data in the initial service call request that are not stored in the first storage module.
[0178] In one embodiment, the first preset condition includes: all data chunks of the second data stored in the first storage module are sent to the node where the service provider corresponding to the first identifier is located.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0180] Obtain first data, and send a transmission signal to the node where the service invoker is located; the first data includes a part of the data obtained by splitting the initial service call request by the node where the service invoker is located, and the transmission signal includes the first identifier of the service provider, and the transmission signal is used to trigger the node where the service provider is located to transmit the stored second data;
[0181] Receive the second data, and send the first data and the second data to the service provider; the second data includes another part of the data obtained by splitting the initial service call request by the node where the service invoker is located.
[0182] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0183] Delete the additional data in the first data, and restore the first data modified according to the preset modification policy to restore the semantic information corresponding to a part of the data in the initial service call request.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0185] Send the data chunks of the restored first data to the service provider in sequence, receive the data chunks of the target data sent from the node where the service invoker corresponding to the third identifier is located, and store the received data chunks of the target data to the second storage module of the node where the service provider is located in sequence; wherein, the target data includes the second data, or the target data includes the second data and the third data; the data chunks of the third data include the data chunks of the other part of the data in the initial service call request that are not stored in the first storage module;
[0186] In the case where all data chunks of the first data have been sent to the service provider, send the data chunks of the target data stored in the second storage module to the service provider in sequence.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0188] During the process of storing the received data chunks of the target data to the second storage module in sequence, if it is determined that the transmission process of the data chunks in the second storage module meets the second preset condition, directly send the data chunks of the target data that have not been stored in the second storage module and are received to the service provider.
[0189] In one embodiment, the second preset condition includes: all data chunks of the target data stored in the second storage module are sent to the service provider.
[0190] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the following steps:
[0191] Split an initial service call request to obtain first data and second data; the first data includes a part of the data in the initial service call request, and the second data includes another part of the data in the initial service call request;
[0192] Transmit the first data to the node where the service provider is located, so as to send the first data to the service provider through the node where the service provider is located;
[0193] Store the second data and receive a transmission signal; the transmission signal includes a first identifier of the service provider;
[0194] In response to the transmission signal, transmit the second data to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located; wherein, the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0196] Obtain data chunks of the initial service call request, and split the data chunks of the initial service call request according to a preset splitting strategy to obtain at least one data chunk of the first data and at least one data chunk of the second data.
[0197] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0198] Modify the first data according to a preset modification strategy, and insert additional data into the first data; the additional data includes a second identifier of the initial service call request and a third identifier of the node where the service caller is located.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0200] In response to the transmission signal, the data chunks of the second data stored in the first storage module are sequentially sent to the node where the service provider corresponding to the first identifier is located. During the process of sequentially storing the data chunks of the second data in the first storage module, if it is determined that the transmission process of the data chunks in the first storage module meets the first preset condition, the data chunks of the third data are sequentially sent to the node where the service provider is located; the data chunks of the third data include the data chunks of the other part of the data in the initial service call request that are not stored in the first storage module.
[0201] In one embodiment, the first preset condition includes: all the data chunks of the second data stored in the first storage module are sent to the node where the service provider corresponding to the first identifier is located.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0203] Obtain the first data and send a transmission signal to the node where the service caller is located; the first data includes a part of the data obtained by splitting the initial service call request by the node where the service caller is located, and the transmission signal includes the first identifier of the service provider, and the transmission signal is used to trigger the node where the service provider is located to transmit the stored second data;
[0204] Receive the second data and send the first data and the second data to the service provider; the second data includes the other part of the data obtained by splitting the initial service call request by the node where the service caller is located.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0206] Delete the additional data in the first data and restore the first data modified according to the preset modification policy to restore the semantic information corresponding to a part of the data in the initial service call request.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0208] Sequentially send the data chunks of the restored first data to the service provider, receive the data chunks of the target data sent from the node where the service caller corresponding to the third identifier is located, and sequentially store the received data chunks of the target data in the second storage module of the node where the service provider is located; wherein, the target data includes the second data, or the target data includes the second data and the third data; the data chunks of the third data include the data chunks of the other part of the data in the initial service call request that are not stored in the first storage module;
[0209] In the case where all data chunks of the first data have been sent to the service provider, the data chunks of the target data stored in the second storage module are sequentially sent to the service provider.
[0210] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0211] In the process of sequentially storing the received data chunks of the target data into the second storage module, if it is determined that the transmission process of the data chunks in the second storage module meets the second preset condition, the data chunks of the target data that have been received but not stored in the second storage module are directly sent to the service provider.
[0212] In one embodiment, the second preset condition includes: all data chunks of the target data stored in the second storage module have been sent to the service provider.
[0213] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0214] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0215] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for transmitting a service call request, characterized in that: Applied to the node where the service caller is located, the method includes: The initial service call request is split to obtain first data and second data; the first data includes a part of the data in the initial service call request, and the second data includes another part of the data in the initial service call request; Transmitting first data to a node where a service provider is located, so as to send the first data to the service provider through the node where the service provider is located; storing the second data, and receiving a transmission signal; the transmission signal includes a first identifier of the service provider; In response to the transmission signal, second data is transmitted to the node where the service provider is located, so as to send the second data to the service provider through the node where the service provider is located; wherein the node where the service provider is located is the node where the service provider corresponding to the first identifier is located.
2. The method according to claim 1, characterized in that The splitting of the initial service call request to obtain the first data and the second data includes: The data blocks of the initial service call request are obtained, and the data blocks of the initial service call request are segmented according to a preset segmentation strategy to obtain at least one data block of the first data and at least one data block of the second data.
3. The method according to claim 1, characterized in that Before transmitting the first data to the node where the service provider is located, the method further includes: The first data is modified according to a preset modification strategy, and additional data is inserted into the first data; the additional data includes a second identifier of the initial service call request and a third identifier of the node where the service caller is located.
4. The method according to claim 2, characterized in that: The transmitting, in response to the transmission signal, second data to the node where the service provider is located, comprises: In response to the transmission signal, the data blocks of the second data stored in the first storage module are sent in sequence to the node where the service provider corresponding to the first identifier is located. In the process of storing the data blocks of the second data in the first storage module in sequence, if it is determined that the transmission process of the data blocks in the first storage module meets the first preset condition, the data blocks of the third data are sent in sequence to the node where the service provider is located; the data blocks of the third data include the data blocks in another part of the data in the initial service call request that are not stored in the first storage module.
5. The method according to claim 4, characterized in that The first preset condition includes: all data blocks of the second data stored in the first storage module are sent to the node where the service provider corresponding to the first identifier is located.
6. A method for transmitting a service call request, characterized in that: Applied to the node where the service provider is located, the method includes: Acquire first data, and send a transmission signal to the node where the service caller is located; the first data includes a portion of data obtained by the node where the service caller is located splitting the initial service call request, the transmission signal includes a first identifier of the service provider, and the transmission signal is used to trigger the node where the service provider is located to transmit the stored second data; Receive second data, and send the first data and the second data to the service provider; the second data includes another part of data obtained by dividing the initial service call request by the node where the service caller is located.
7. The method according to claim 6, characterized in that Before sending the first data and the second data to the service provider, the method further includes: The additional data in the first data is deleted, and the first data modified according to the preset modification strategy is restored to restore the semantic information corresponding to the portion of data in the initial service call request.
8. The method according to claim 7, characterized in that In a case where both the data blocks of the first data and the data blocks of the second data are multiple, the receiving the second data and sending the first data and the second data to the service provider includes: The restored data blocks of the first data are sent to the service provider in sequence, the data blocks of the target data sent from the node where the service caller corresponding to the third identifier is located are received, and the received data blocks of the target data are stored in sequence in the second storage module of the node where the service provider is located; wherein the target data includes the second data, or the target data includes the second data and the third data; the data blocks of the third data include the data blocks of another part of the data in the initial service call request that are not stored in the first storage module; In a case where all the data blocks of the first data have been sent to the service provider, the data blocks of the target data stored in the second storage module are sent to the service provider in sequence.
9. The method according to claim 8, characterized in that The method further comprises: In the process of storing the received data blocks of the target data in the second storage module in sequence, if it is determined that the transmission process of the data blocks in the second storage module meets the second preset condition, the received data blocks of the target data that are not stored in the second storage module are directly sent to the service provider.
10. The method according to claim 9, characterized in that The second preset condition includes: all data blocks of the target data stored in the second storage module are sent to the service provider.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Combined communication request response method and device, electronic equipment and readable storage medium
CN113452703A
Method and device for processing conference service request, equipment and medium
CN117939058A
Target service data transmission method and system, storage medium and electronic device
CN118301214A
Two-stage service request routing forwarding method and system based on microservice gateway
CN118368232A
Load balancing processing method and apparatus, storage medium and electronic apparatus
WO2024056042A1
Cited By
Method and system for optimising cold start infrastructure for transport layer applications in serverless computing mode
RU2851979C1