Data acquisition method, device, computer equipment and storage medium

By receiving concurrent remote procedure call requests, generating aggregate keywords to filter the same data requests, and performing target remote procedure call communication, it solves the network pressure problem of RPC applications when facing a large number of identical data requests, and improves communication efficiency.

CN114860469BActive Publication Date: 2025-08-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110159963.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-05
Publication Date
2025-08-01
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

When existing RPC applications face a large number of requests for the same data, they cannot effectively alleviate network pressure, resulting in independent communication for each request, increasing network burden.

Method used

By receiving concurrent remote procedure call requests, performing aggregation operations to generate aggregate keywords, filtering the same data requests, performing target remote procedure call communications, and distributing data to the sender to reduce duplicate communications.

Benefits of technology

It effectively alleviates the network pressure caused by each request for independent communication in the traditional solution and improves network communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860469B_ABST
    Figure CN114860469B_ABST
Patent Text Reader

Abstract

The present application relates to a data acquisition method, apparatus, computer device, and storage medium. The method includes: receiving concurrent remote procedure call requests; performing an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword; filtering the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests; performing a target remote procedure call communication based on the target remote procedure call requests; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call requests from a remote end; and distributing the data obtained from the remote end to the senders of the remote procedure call requests. Using this method can alleviate the network pressure caused by a large number of remote procedure call requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and particularly to a data acquisition method, apparatus, computer device, and storage medium. Background Art

[0002] With the development of computer technologies, network programming has become an essential skill for technicians. However, a large amount of network programming results in a very low code reuse rate and makes the code difficult to maintain. Therefore, Remote Procedure Call (RPC) emerged. RPC shields the underlying details of network communication, enabling each network developer to perform network communication as if using local calls.

[0003] The extension of existing RPC applications is basically achieved by using plugins. For example, for the cache service extended to relieve network pressure, during the execution of an RPC application, through the slot hooks reserved before and after the RPC communication module of the RPC application, a user-predefined cache plugin group is called and executed to implement the cache service extension of the RPC application. Among them, the plugin group includes a pre-cache plugin and a post-cache plugin. The pre-cache plugin corresponds to the slot hook reserved before the RPC communication module of the application, and the post-cache plugin corresponds to the slot hook reserved after the RPC communication module of the application.

[0004] However, since the above cache service extension method needs to call the corresponding plugins in the cache plugin group before and after the RPC communication module respectively, that is, the cache service can only be implemented after the RPC communication is successful. Then, during the RPC communication based on a certain data request, if a large number of other data requests identical to the data request are received, RPC communications still need to be performed separately for the other data requests identical to the data request, resulting in the inability to effectively relieve the network pressure caused by a large number of data requests. Summary of the Invention

[0005] Based on this, it is necessary to provide a data acquisition method, apparatus, computer device, and storage medium that can relieve network pressure for the above technical problems.

[0006] A data acquisition method, the method includes:

[0007] Receiving concurrent remote procedure call requests;

[0008] Performing an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword;

[0009] Filtering the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests;

[0010] Execute a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end;

[0011] Distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0012] In one embodiment, the method is applied to a proxy server; the sender is different terminals; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different terminals at the same moment, and remote procedure call requests respectively sent by different terminals within a preset response duration of the proxy server.

[0013] In one embodiment, the method is applied to a terminal; the sender is different processes running on the terminal; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different processes at the same moment, and remote procedure call requests respectively sent by different processes within a preset response duration of the terminal.

[0014] In one embodiment, the remote procedure call request includes a multimedia data acquisition request triggered at a client; the data obtained from the remote end includes multimedia data; after distributing the data obtained from the remote end to the sender of the remote procedure call request, the method further includes:

[0015] Integrate the received multimedia data through the process to obtain integrated multimedia data;

[0016] Return the integrated multimedia data to the client to display the integrated multimedia data on the front-end page of the client.

[0017] A data acquisition device, the device includes:

[0018] A request receiving module, configured to receive concurrent remote procedure call requests;

[0019] An operation module, configured to perform an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword;

[0020] A request filtering module, configured to filter remote procedure call requests for the same data according to the aggregation keyword to obtain a target remote procedure call request;

[0021] A communication module for performing a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end;

[0022] A data distribution module for distributing the data obtained from the remote end to the sender of the remote procedure call request.

[0023] In one embodiment, the operation module is further configured to:

[0024] Determine the request type of the remote procedure call request;

[0025] Extract request parameters from the remote procedure call request based on the request type;

[0026] Perform a hash operation on each of the extracted request parameters through a remote procedure call middleware to obtain an aggregated keyword.

[0027] In one embodiment, the remote procedure call middleware includes an aggregation middleware and a cache middleware; the aggregated keyword is obtained by the aggregation middleware performing a hash operation on each of the extracted request parameters; the operation module is further configured to:

[0028] Determine, through the cache middleware, that data corresponding to the remote procedure call request is not cached;

[0029] When data corresponding to the target remote procedure call request is obtained from the remote end, then cache the data obtained from the remote end through the cache middleware.

[0030] In one embodiment, the operation module is further configured to:

[0031] Determine, through the cache middleware, that data corresponding to the remote procedure call request is cached;

[0032] Obtain the cached data corresponding to the remote procedure call request;

[0033] Distribute the obtained data to the sender of the remote procedure call request.

[0034] In one embodiment, both the aggregation middleware and the cache middleware are configured with pre-logic and post-logic; the pre-logic of the cache middleware is used to detect whether the data corresponding to the remote procedure call request is cached in the cache space; the post-logic of the cache middleware is used to cache the data obtained from the remote end when the data is obtained from the remote end; the pre-logic of the aggregation middleware is used to perform a hash operation on the request parameters in each of the remote procedure call requests, and filter the remote procedure call requests for the same data according to the aggregation keyword to obtain the target remote procedure call request; the post-logic of the aggregation middleware is used to distribute the data obtained from the remote end.

[0035] In one embodiment, the operation module is further configured to:

[0036] When the middleware list is not stored, or when the middleware list is stored but the middleware information is not included in the list, directly perform the corresponding remote procedure call communication based on the remote procedure call request to obtain the data corresponding to the remote procedure call request from the remote end;

[0037] When the middleware list is stored and the middleware information is included in the list, sequentially execute the pre-logic of the cache middleware and the pre-logic of the aggregation middleware in the middleware order; and when the data is obtained from the remote end, sequentially execute the post-logic of the aggregation middleware and the post-logic of the cache middleware in the reverse middleware order.

[0038] In one embodiment, the request filtering module is further configured to:

[0039] Group the remote procedure call requests according to the aggregation keyword; the data requested by the remote procedure call requests in the same group is the same;

[0040] Filter the remote procedure call requests in each group to obtain the target remote procedure call request corresponding to each group.

[0041] In one embodiment, the communication module is further configured to:

[0042] If there is no communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, establish a connection with the remote end based on the target remote procedure call request and perform the target remote procedure call communication according to the connection;

[0043] If there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, determine the matching communication as the target remote procedure call communication.

[0044] In one embodiment, the communication module is further configured to:

[0045] Obtain the aggregated keyword corresponding to the remote procedure call communication;

[0046] When the aggregated keyword corresponding to the remote procedure call communication is the same as the aggregated keyword of the target remote procedure call request, there is a communication in the remote procedure call communication that matches the aggregated keyword of the target remote procedure call request;

[0047] When the aggregated keyword corresponding to the remote procedure call communication is different from the aggregated keyword of the target remote procedure call request, there is no communication in the remote procedure call communication that matches the aggregated keyword of the target remote procedure call request.

[0048] In one embodiment, the communication module is further configured to:

[0049] If there is a communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the target remote procedure call request, enter the waiting state;

[0050] When the communication that matches the aggregated keyword of the target remote procedure call request is completed, obtain the data obtained from the remote end during the matching communication process, and perform the step of distributing the data obtained from the remote end to the sender of the remote procedure call request.

[0051] In one embodiment, the device further includes:

[0052] A storage module, configured to store the aggregated keyword of the target remote procedure call request as the aggregated keyword of the target remote procedure call communication;

[0053] The request filtering module is further configured to, if a new remote procedure call request is received, compare the aggregated keyword of the new remote procedure call request with the stored aggregated keyword;

[0054] The communication module is further configured to, when it is determined according to the comparison result that there is a remote procedure call communication in the execution state and corresponding to the new remote procedure call request, determine the remote procedure call communication in the execution state as the remote procedure call communication of the new remote procedure call request.

[0055] In one embodiment, the communication module is further configured to:

[0056] When it is determined according to the comparison result that there is no remote procedure call communication in the execution state and corresponding to the new remote procedure call request, a new target remote procedure call communication is executed based on the new remote procedure call request;

[0057] wherein, the new target remote procedure call communication is used to obtain data corresponding to the new remote procedure call request from the remote end.

[0058] In one embodiment, the device is included in a proxy server; the sender is different terminals; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different terminals at the same moment, and remote procedure call requests respectively sent by different terminals within a preset response duration of the proxy server.

[0059] In one embodiment, the device is included in a terminal; the sender is different processes running on the terminal; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different processes at the same moment, and remote procedure call requests respectively sent by different processes within a preset response duration of the terminal.

[0060] In one embodiment, the remote procedure call request includes a multimedia data acquisition request triggered at a client; the data obtained from the remote end includes multimedia data; the device further includes:

[0061] An integration module, configured to integrate the received multimedia data through the process to obtain integrated multimedia data;

[0062] A sending module, configured to return the integrated multimedia data to the client to display the integrated multimedia data on the front-end page of the client.

[0063] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0064] Receive concurrent remote procedure call requests;

[0065] Perform an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword;

[0066] Filter the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests;

[0067] Perform a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end;

[0068] Distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0069] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0070] Receive concurrent remote procedure call requests;

[0071] Perform an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword;

[0072] Filter the remote procedure call requests that request the same data according to the aggregation keyword to obtain a target remote procedure call request;

[0073] Perform a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end;

[0074] Distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0075] A computer program, the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the following steps:

[0076] Receive concurrent remote procedure call requests;

[0077] Perform an aggregation operation on the request parameters in each of the remote procedure call requests to obtain an aggregation keyword;

[0078] Filter the remote procedure call requests that request the same data according to the aggregation keyword to obtain a target remote procedure call request;

[0079] Perform a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end;

[0080] Distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0081] The above data acquisition method, device, computer equipment, and storage medium, after receiving concurrent remote procedure call requests, perform an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword; filter the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests, and perform target remote procedure call communication based on the target remote procedure call requests. After obtaining the data corresponding to the target remote procedure call requests from the remote end through the target remote procedure call communication, directly distribute the obtained data to the senders of the remote call requests. Thus, when receiving remote procedure call requests for the same data, by filtering the received remote procedure call requests and performing target remote procedure call communication based on the filtered remote procedure call requests, the network pressure caused by performing corresponding remote procedure call communication for each remote procedure call request in the traditional solution is alleviated. Description of the Drawings

[0082] Figure 1 It is an application environment diagram of the data acquisition method in an embodiment;

[0083] Figure 2 It is a schematic flowchart of the data acquisition method in an embodiment;

[0084] Figure 3 It is a schematic flowchart of obtaining data based on an aggregation middleware in an embodiment;

[0085] Figure 4 It is a schematic diagram of remote procedure call communication extended based on an aggregation middleware in an embodiment;

[0086] Figure 5 It is a schematic diagram of an RPC application extended based on a middleware in an embodiment;

[0087] Figure 6 It is a schematic flowchart of the data acquisition method in an embodiment;

[0088] Figure 7 It is a schematic flowchart of the step of performing target remote procedure call communication in an embodiment;

[0089] Figure 8 It is a schematic flowchart of the data acquisition method in another embodiment;

[0090] Figure 9 It is a structural block diagram of the data acquisition device in an embodiment;

[0091] Figure 10 It is a structural block diagram of the data acquisition device in another embodiment;

[0092] Figure 11Internal structure diagram of a computer device in an embodiment;

[0093] Figure 12 Internal structure diagram of a computer device in another embodiment. Detailed implementation manners

[0094] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the following further details the present application in conjunction with 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.

[0095] The data acquisition method provided by the present application can be implemented based on cloud technology. Among them, cloud technology is a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve the calculation, storage, processing, and sharing of data. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool, be used as needed, and be flexible and convenient. Cloud computing technology will become an important support. The back-end services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the back-end system for logical processing. Data at different levels will be processed separately, and various types of industry data require a powerful system back-end support, which can only be achieved through cloud computing.

[0096] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to be infinitely expandable to users, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage. As a basic capability provider of cloud computing, a cloud computing resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to select and use. The cloud computing resource pool mainly includes: computing devices (virtual machines, including operating systems), storage devices, and network devices.

[0097] The data acquisition method provided by the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 can communicate with the remote end 106 through the proxy server 104, or the terminal 102 can directly communicate with the remote end 106 through the network. The data acquisition methods provided by the embodiments of the present application can be executed through the cooperation of the terminal 102, the proxy server 104, and the remote end 106, or through the cooperation of the terminal 102 and the remote end 106, or can also be executed independently by the terminal 102, the proxy server 104, or the remote end 106. Taking the data acquisition method executed through the cooperation of the terminal 102, the proxy server 104, and the remote end 106 as an example, the proxy server 104 receives at least one concurrent remote procedure call request from the terminal 102; performs an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword; filters the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests; performs a target remote procedure call communication based on the target remote procedure call requests; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call requests from the remote end 106; and distributes the data obtained from the remote end 106 to the senders of the remote procedure call requests (at least one terminal 102). Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The proxy server 104 and the remote end 106 can be independent physical servers, or can be a server cluster or a distributed system composed of multiple physical servers, or can also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not limit this. The remote end 106 can specifically be a service server, such as a database server.

[0098] In one embodiment, as Figure 2 shown, a data acquisition method is provided. Taking the method applied to Figure 1 the computer device (the computer device can specifically be a terminal or a server) in

[0099] S202, receive concurrent remote procedure call requests.

[0100] Among them, Remote Procedure Call (RPC) is a protocol that requests services from a remote computer program over a network without the need to understand the underlying network technology. For example, a process on computer A calls a process on another computer B. The calling process on computer A is suspended, and the called process on computer B starts to execute. When the value is returned to computer A, the process on computer A continues to execute. The calling party can transmit information to the called party by using parameters and then obtain information through the returned results. Remote procedure call requests are used to request the execution of remote procedure call communications to obtain data. There can be various types of remote procedure call request types, such as HTTP requests, FTP requests, Telnet requests, etc. Concurrency means that two or more events occur within the same time interval. Concurrent remote procedure call requests can be multiple remote procedure call requests sent by the sender at the same moment or multiple remote procedure call requests sent by the sender within a preset response duration.

[0101] Specifically, the sender of the remote procedure call request can be one or more. Different senders can send remote procedure call requests to the computer device at the same moment respectively, or different senders can also send remote procedure call requests to the computer device respectively within the preset response duration of the computer device. The computer device receives the concurrent remote procedure call requests. The sender can be a terminal or different processes running on the terminal or the server.

[0102] In one embodiment, when the computer device is a terminal, the sender of the corresponding remote procedure call request is different processes running on the terminal. The remote procedure call requests received by the terminal include at least one of the following: remote procedure call requests sent by different processes at the same moment respectively, and remote procedure call requests sent by different processes within the preset response duration of the terminal respectively. After receiving the remote procedure call request, the terminal can establish a connection with the server based on the received remote procedure call request and perform remote procedure call communication with the server according to this connection. Among them, the server can be a proxy server or a business server.

[0103] For example, if the business server is a database server and the terminal needs to obtain data from a certain database server, it can send remote procedure call requests respectively through different processes in a concurrent manner. The terminal receives the concurrent remote procedure call requests from different processes, establishes a connection with the database server based on the received remote call requests, and performs remote procedure call communication with the database server according to this connection, so as to obtain data from the database server through this remote procedure call communication.

[0104] In one embodiment, when the computer device is a server, the sender of the corresponding remote procedure call request can be different terminals or different processes running on the server. If the sender of the remote procedure call request is different terminals, the remote procedure call requests received by the server include at least one of the following: remote procedure call requests sent by different terminals at the same time, and remote procedure call requests sent by different terminals within the preset response duration of the server. If the sender of the remote procedure call request is different processes running on the server, the remote procedure call requests received by the server include at least one of the following: remote procedure call requests sent by different processes at the same time, and remote procedure call requests sent by different processes within the preset response duration of the server.

[0105] Specifically, the server can be a business server or an agent server. When the server is an agent server, after receiving a remote procedure call request, the agent server can establish a connection with other business servers based on the received remote procedure call request and perform remote procedure call communication with other business servers according to the connection. Among them, for the scenario where the sender of the remote procedure call request is different processes running on the agent server, the agent server can, after receiving a data acquisition request from a terminal, trigger different processes running on the agent server to send remote procedure call requests in response to the received data acquisition request.

[0106] For example, if a terminal requests to display a certain web page, and the content in the web page is distributed on different business servers respectively, the terminal can send a web page display request to the agent server. The agent server, in response to the received web page display request, triggers multiple different processes running on the agent server to generate different remote procedure call requests respectively. The agent server establishes connections with different business servers based on the received remote procedure call requests sent by different processes and performs remote procedure call communication with the corresponding business servers according to the established connections, so as to obtain the corresponding content in the web page from the corresponding business server through the corresponding remote procedure call communication. After obtaining the corresponding content in the web page, the obtained content is returned to the terminal to display the web page requested by the terminal.

[0107] S204, perform an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword.

[0108] Among them, the aggregation operation calculates a single value from a set of values. Performing an aggregation operation on the request parameters means calculating a single value from the set composed of multiple request parameters, and the obtained single value is the aggregation keyword. The aggregation keyword is used to determine whether it is necessary to filter the received remote procedure call request to filter out the remote procedure call requests for the same data.

[0109] Specifically, after receiving concurrent remote procedure call requests, for each remote procedure call request, the computer device extracts the request parameters carried by it respectively, and performs an aggregation operation on the request parameters carried by it to obtain an aggregation keyword.

[0110] In one embodiment, S204 specifically includes the following steps: determining the request type of the remote procedure call request; extracting the request parameters in the remote procedure call request based on the request type; performing a hash operation on the extracted request parameters through the remote procedure call middleware to obtain an aggregation keyword.

[0111] Among them, the request type refers to the protocol type on which the remote procedure call request is based, such as an HTTP request based on the HTTP protocol, an FTP request based on the FTP protocol, and a Telnet request based on the Telnet protocol. The types of request parameters carried by remote procedure call requests of different request types are also different. For remote procedure call requests of the same request type for requesting different data, the parameter values of the carried request parameters are also different. For example, the request parameters of HTTP request A for obtaining data A and the request parameters of HTTP request B for obtaining data B have different parameter values.

[0112] The remote procedure call middleware is middleware that extends the functions of the remote procedure application itself. Based on different functions to be extended, the remote procedure call middleware is also different. For example, the remote procedure middleware can include a cache middleware for implementing data caching and an aggregation middleware for implementing request filtering. Middleware is a large category of basic software and belongs to the category of reusable software. Middleware is a type of software between the application system and the system software. It uses the basic services (functions) provided by the system software to connect various parts of the application system on the network or different applications, and can achieve the purpose of resource sharing and function sharing.

[0113] The hash operation is a mathematical operation performed through a hash function. The hash function is a mathematical equation that can generate a code called an information digest from text. In this application, the hash operation can adopt hash functions such as MD4, MD5, and SHS.

[0114] Specifically, after the computer device extracts the request parameters of the remote procedure call request, it uses the aggregation middleware in the remote procedure call middleware to perform a hash operation on the extracted request parameters, obtains the hash values corresponding to each remote procedure call request, and determines the obtained hash values as the aggregation keywords corresponding to the remote procedure call requests.

[0115] Taking the remote procedure call request as an HTTP request as an example for illustration, after the computer device receives each HTTP request, it extracts the request header, request body, and URL of each HTTP request respectively, and uses the md5 algorithm to calculate the corresponding hash values for the request header, request body, and URL of each HTTP request respectively, and determines the obtained hash values as the aggregation keywords corresponding to the HTTP requests.

[0116] In the above embodiment, the computer device determines the request type of the remote procedure call request, thereby extracts the request parameters based on the request type, and then realizes the aggregation operation on the request parameters through the remote procedure call middleware, obtains the aggregation keywords of each remote procedure call request, so as to filter the remote procedure call requests for obtaining the same data based on the aggregation keywords subsequently, reducing the network pressure on the computer device.

[0117] In one embodiment, S204 specifically includes the following steps: determining the request type of the remote procedure call request; extracting the valid data in the remote procedure call request based on the request type; performing a hash operation on each piece of extracted valid data through the remote procedure call middleware to obtain the aggregation keyword.

[0118] Among them, the remote procedure call request contains valid data and protocol format data based on the request type. The valid data can be the method function name to be called and the function input parameters. By calling the function corresponding to the method function name and inputting the function input parameters into the called function, the data to be requested can be obtained, while the protocol format data based on the request type has no substantial meaning for obtaining the data to be requested itself, and may even cause the two ends of the remote procedure call communication to be unable to achieve cross-language communication due to inconsistent programming languages.

[0119] Specifically, after the computer device determines the request type of the remote procedure call request, it removes the protocol format data in the remote procedure call request based on the request type to obtain the valid data in the remote procedure call request, and performs a hash operation on each piece of extracted valid data through the remote procedure middleware respectively to obtain the aggregation keyword.

[0120] S206, filtering the remote procedure call requests for requesting the same data according to the aggregation keyword to obtain the target remote procedure call request.

[0121] Among them, filtering remote procedure call requests for the same data means that for multiple remote procedure call requests for the same data, only one of the remote procedure call requests is selected, and the target remote procedure call request is determined based on the selected remote procedure call request. The target remote procedure call request is used to trigger remote procedure call communication, while the other unselected remote procedure call requests cannot trigger remote procedure call communication.

[0122] Specifically, after calculating the aggregation keyword of each remote procedure call request, the computer device determines the remote procedure call requests for the same data according to the aggregation keyword. For the remote procedure call requests for the same data, one remote procedure call request is selected from them according to a preset selection rule to further determine the target remote procedure call request. The preset selection rule can be random selection or selection in the order of the reception time of the remote procedure call requests. For example, for the remote procedure call requests for the same data, the earliest received remote procedure call request is selected from them, and then the target remote procedure call request is determined according to the earliest received remote procedure call request.

[0123] In one embodiment, after calculating the aggregation keyword of each remote procedure call request, the computer device groups the remote procedure call requests according to the aggregation keyword; filters the remote procedure call requests in each group to obtain the target remote procedure call request corresponding to each group. Among them, the data requested by the remote procedure call requests in the same group is the same.

[0124] Specifically, the computer device determines the remote procedure call requests with the same aggregation keyword as the remote procedure call requests for the same data, so as to divide the remote procedure call requests with the same aggregation keyword into the same group, and for the remote procedure call requests in each group, one remote procedure call request is selected by using a preset selection rule to determine the target remote procedure call request corresponding to each group.

[0125] In the above embodiment, the computer device groups the remote procedure call requests based on the aggregation keyword, and then filters the remote procedure call requests for obtaining the same data, thereby reducing the network pressure on the computer device.

[0126] In one embodiment, the computer device determining the target remote procedure call request based on the selected remote procedure call request includes: directly determining the selected remote procedure call request as the target remote procedure call request; or extracting the valid data in the selected remote procedure call request and generating a target remote procedure call request that conforms to remote procedure call communication according to the extracted valid data.

[0127] Among them, the selected remote procedure call request contains valid data and protocol format data based on the request type. The valid data can be the name of the method function to be called and the function input parameters. By calling the function corresponding to the name of the method function and inputting the function input parameters into the called function, the data to be requested can be obtained. However, the protocol format data based on the request type has no substantial meaning for obtaining the data to be requested itself, and may even cause the two ends of the remote procedure call communication to be unable to achieve cross-language communication due to inconsistent programming languages.

[0128] Specifically, after obtaining the valid data in the selected remote procedure call request, the computer device can generate a target remote procedure call request that conforms to the communication protocol of the remote procedure call communication based on the extracted valid data according to a preset communication protocol. The generated target remote procedure call request carries the valid data from the remote procedure call request.

[0129] S208, perform target remote procedure call communication based on the target remote procedure call request.

[0130] Among them, the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from the remote end. Specifically, it can be a newly established and executed remote procedure call communication based on the target remote procedure call request, or a remote procedure call communication that is currently in an execution state and matches the target remote procedure call request.

[0131] Specifically, after obtaining the target remote procedure call request, the computer device determines whether there is a communication that matches the target remote procedure call request in the remote procedure call communication that is currently in an execution state based on the target remote procedure call request. If not, it newly establishes and executes a target remote procedure call communication that matches the target remote procedure call request. If so, it directly determines the communication that matches the target remote procedure call request as the target remote procedure call communication. Among them, the communication that matches the target remote procedure call request can also be called the communication that matches the aggregation keyword of the target remote procedure call request.

[0132] In one embodiment, after obtaining the target remote procedure call request, the computer device determines whether there is a communication that matches the target remote procedure call request in the remote procedure call communication that is currently in an execution state based on the aggregation keyword of the target remote procedure call request.

[0133] Specifically, the computer device obtains the aggregated keywords of the remote procedure call communication in the execution state, and compares the aggregated keywords of the remote procedure call communication in the execution state with the aggregated keywords of the target remote procedure call request. When there is a match between the aggregated keywords of the remote procedure call communication in the execution state and the aggregated keywords of the target remote procedure call request, it is determined that there is a communication in the remote procedure call communication in the execution state that matches the aggregated keywords of the target remote procedure call request. When all the aggregated keywords of the remote procedure call communication in the execution state do not match the aggregated keywords of the target remote procedure call request, it is determined that there is no communication in the remote procedure call communication in the execution state that matches the aggregated keywords of the target remote procedure call request.

[0134] In one embodiment, for each target remote procedure call request corresponding to each packet, the computer device respectively executes the target remote procedure call communication based on the target remote procedure call request of each packet, so as to obtain data corresponding to the target remote procedure call request of each packet from the remote end.

[0135] In the above embodiment, by determining whether there is a communication in the remote procedure call communication in the current execution state that matches the target remote procedure call request, the computer device can, according to the determination result, confirm whether to execute a new remote procedure call communication, avoid repeatedly executing the remote procedure call communication for obtaining the same data, and further relieve the network pressure on the computer device.

[0136] S210, distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0137] Among them, the data obtained from the remote end is the data obtained through the target remote procedure call communication, and this data is the data that the target remote procedure call request is to obtain. Since the target remote procedure call request is obtained by filtering the remote procedure call requests for the same data, the data obtained from the remote end is also the data that the filtered remote procedure call requests are to obtain.

[0138] Specifically, after the computer device obtains the data from the remote end through the target remote procedure call communication, it copies the data obtained from the remote end based on the number of requests of the remote procedure call request corresponding to the target remote procedure call request to obtain data copies that match the number of requests, and sends each data copy to the sender of each remote procedure call request respectively, so that each remote procedure call request can request the corresponding data.

[0139] In one embodiment, after the computer device obtains data corresponding to the target remote procedure call request of each packet through different target remote procedure call communications, for the data corresponding to each packet, according to the number of requests in the remote procedure call request in each packet, the data of the packet is copied to obtain data copies matching the number of requests, and the respective data copies are respectively sent to the senders of the remote procedure call requests in the packet, so that each remote procedure call request can request the corresponding data.

[0140] For the above data acquisition method, after the computer device receives concurrent remote procedure call requests, it performs an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword; filters the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests, and performs target remote procedure call communication based on the target remote procedure call requests. After obtaining the data corresponding to the target remote procedure call requests from the remote end through the target remote procedure call communication, the obtained data is directly distributed to the senders of the remote call requests, so that when receiving remote procedure call requests for the same data, by filtering the received remote procedure call requests and performing target remote procedure call communication based on the filtered remote procedure call requests, the network pressure caused by performing corresponding remote procedure call communication for each remote procedure call request in the traditional solution is alleviated.

[0141] In one embodiment, the remote procedure call middleware includes an aggregation middleware and a cache middleware; the computer device performs a hash operation on the request parameters or valid data of the extracted remote procedure call requests through the aggregation middleware to obtain an aggregation keyword for the remote procedure call requests. Before the computer device calculates the aggregation keyword for the remote procedure call requests, it can also determine whether the data corresponding to the remote procedure call requests has been cached in the cache space through the cache middleware.

[0142] Specifically, the cache space of the computer device stores cached data and the cache keywords corresponding to each data. After the computer device obtains a remote procedure call request, it performs a cache keyword operation on the request parameters carried by the remote procedure call request through the cache middleware to obtain a cache keyword, and determines whether the data corresponding to the remote procedure call request is stored in the cache space according to the cache keyword.

[0143] In one embodiment, after the computer device determines whether the data corresponding to the remote procedure call request has been cached in the cache space through the cache middleware, if it is determined that the data corresponding to the remote procedure call request is not cached in the cache space, the computer device performs an aggregation operation on the request parameters in each remote procedure call request through the aggregation middleware to obtain an aggregation keyword, and after obtaining the data corresponding to the target remote procedure call request from the remote end, the computer device caches the data obtained from the remote end through the cache middleware.

[0144] Wherein, when caching the data obtained from the remote end through the cache middleware, the cache keyword of the target remote procedure call request is stored in the cache space correspondingly, so that when a new remote procedure call request is received, it is possible to determine whether the data corresponding to the new remote procedure call request is stored in the cache space based on the cache keyword in the cache space and the cache keyword of the new remote procedure call request.

[0145] Figure 3 FIG. shows a schematic flow diagram of obtaining data based on the aggregation middleware in one embodiment. Figure 4 FIG. shows a schematic diagram of remote procedure call communication extended based on the aggregation middleware in one embodiment. Refer to Figure 3 and Figure 4 , after the computer device receives requests 1, 2, and 3 that are concurrent and used to obtain the same data, the computer device filters requests 1, 2, and 3 through the aggregation middleware to obtain a target request, performs remote procedure call communication based on the target request, obtains data from the remote end based on the remote procedure call communication, and distributes the data obtained from the remote end as the result of each request to the sender of the request through the aggregation middleware.

[0146] In the above embodiment, the computer device extends the remote procedure call application through the aggregation middleware and the cache middleware, so that when receiving concurrent remote procedure call requests, the computer device can further reduce the execution of remote procedure call communication through the cache middleware and the aggregation middleware, thereby more effectively alleviating the network pressure on the computer device.

[0147] In one embodiment, after the computer device determines whether the data corresponding to the remote procedure call request has been cached in the cache space through the cache middleware, if it is determined that the data corresponding to the remote procedure call request is cached in the cache space, the computer device obtains the cached data corresponding to the remote procedure call request and distributes the obtained data to the sender of the remote procedure call request.

[0148] In the above embodiments, the computer device caches newly acquired data through the caching middleware. Thus, when a new remote procedure call request is subsequently received, there is no need to perform remote procedure call communication based on the new remote procedure call request. Instead, the result is directly obtained from the cached data and returned to the sender of the new remote procedure call request, thereby effectively alleviating the network pressure on the computer device.

[0149] In one embodiment, the remote procedure call middleware can also be configured with pre-logic and post-logic. The pre-logic is executed before the remote procedure call communication, and the post-logic is executed after data is obtained from the remote end based on the remote procedure call communication. For example, both the aggregation middleware and the caching middleware are configured with pre-logic and post-logic. Among them, the pre-logic of the caching middleware is used to detect whether the data corresponding to the remote procedure call request is cached in the cache space, and the post-logic of the caching middleware is used to cache the data obtained from the remote end when the data is obtained from the remote end; the pre-logic of the aggregation middleware is used to perform a hash operation on the request parameters in each remote procedure call request, and filter the remote procedure call requests for the same data according to the aggregation keyword to obtain the target remote procedure call request; the post-logic of the aggregation middleware is used to distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0150] In the above embodiments, by configuring pre-logic and post-logic for each middleware in the computer device, the implementation of extended functions can be ensured. Through the execution of the pre-logic and post-logic of the aggregation middleware and the caching middleware, the aggregation of concurrent remote procedure call requests can be achieved, reducing the execution of remote procedure call communication, thereby effectively alleviating the network pressure on the computer device.

[0151] In one embodiment, after receiving a remote procedure call request, the computer device looks up the middleware list and performs corresponding steps based on the lookup result of the middleware list. The specific process is as follows: when the middleware list is not stored in the computer device, or the middleware list is stored but does not contain middleware information, that is, when the computing device fails to find the middleware list, or the found middleware list does not contain middleware information, it directly performs the corresponding remote procedure call communication based on the received remote procedure call request to obtain data corresponding to the remote procedure call request from the remote end; when the computer device stores the middleware list and the list contains middleware information, that is, when the computer device finds the middleware list and the list contains middleware information, the computer device sequentially executes the pre-logic of each middleware in the middleware order, and after obtaining data from the remote end through remote procedure call communication, sequentially executes the post-logic of each middleware in the reverse order of each middleware. Among them, the middleware information includes each declared middleware and the order of each middleware, that is, the middleware order.

[0152] Specifically, when there is one middleware in the middleware information, after the computer device executes the pre-logic of the middleware, it performs the corresponding remote procedure call communication, and after obtaining data from the remote end based on the remote procedure call communication, it executes the post-logic of the middleware. For example, if there is only an aggregation middleware in the middleware information, after the computer device receives concurrent remote procedure call requests, it performs an aggregation operation on the request parameters in each remote procedure call request through the pre-logic of the aggregation middleware to obtain an aggregation keyword, filters the remote procedure call requests for the same data according to the aggregation keyword to obtain the target remote procedure call request, then performs the target remote procedure call communication based on the target remote procedure call request, and after obtaining data corresponding to the target remote procedure call request from the remote end based on the target remote procedure call communication, distributes the data obtained from the remote end to the sender of the remote procedure call request through the post-logic of the aggregation middleware.

[0153] When there are multiple middleware and corresponding middleware sequences in the middleware information, the computer device sequentially executes the pre-logic of each middleware according to the middleware sequence, and after obtaining data from the remote end through remote procedure call communication, sequentially executes the post-logic of each middleware in the reverse order of each middleware. For example, if the cache middleware and the aggregation middleware are declared in the middleware list, and the middleware sequence is "cache middleware, aggregation middleware", the computer device first executes the pre-logic of the cache middleware according to the middleware sequence, and when the execution result of the pre-logic determines that the data corresponding to the remote procedure call request is not cached through the cache middleware, then executes the pre-logic of the aggregation middleware. After obtaining the target remote procedure call request based on the pre-logic of the aggregation middleware, execute the target remote procedure call communication based on the target remote procedure call request. After obtaining the data corresponding to the target remote procedure call request from the remote end based on the target remote procedure call communication, through the post-logic of the aggregation middleware, and then execute the post-logic of the cache middleware to implement the caching of the data obtained from the remote end.

[0154] In one embodiment, when the computer device executes the above data acquisition method, context management is performed for each execution process, and the context management can be implemented through a context manager. Specifically, when the computer device executes each step of the above data acquisition method, the execution result of each step is respectively stored in the context management object, so that the execution result of the previous step can be read from the context management object before the next step is executed, and the next step is executed based on the execution result of the previous step.

[0155] For example, Figure 5 shows a schematic diagram of an RPC application based on middleware extension in one embodiment. Figure 6 shows a schematic flowchart of a data acquisition method in one embodiment. The RPC application is extended based on middleware 1 and middleware 2, so that the original RPC application forms an onion-like extension as Figure 5 shown. The outer layer of the remote procedure call communication is nested with user-defined middleware layer by layer, such as middleware 1 and middleware 2. It can be understood that in the Figure 5 outer layer of the remote procedure call communication, other middleware can also be added based on actual needs, and the middleware can be reused arbitrarily. When obtaining data through the RPC application based on middleware extension shown in Figure 5 , refer to Figure 5 and Figure 6, the computer device manages the entire data acquisition process through a unified context management object. Specifically, after receiving concurrent remote procedure call requests, the computer device extracts the original request parameters and saves them in the context management object. Specifically, the request parameters can be marked as context. Then, it looks up the middleware list. When the middleware list is found and contains middleware information, the computer device sequentially executes the pre-logic of each middleware in the middleware order. The parameters of all middlewares are saved in the context management object, that is, the parameters of all middlewares are marked as context. After obtaining data from the remote end through remote procedure call communication, the obtained data is stored in the context management object, that is, the obtained data is stored in context.result, and the post-logic of each middleware is sequentially executed in the reverse order of each middleware. The parameters of all middlewares are saved in the context management object, that is, the parameters of all middlewares are marked as context, and then the final result is output, and the result is context.result. When the middleware list is not found, or the found middleware list does not contain middleware information, the corresponding remote procedure call communication is directly executed based on the received remote procedure call request to obtain data corresponding to the remote procedure call request from the remote end, so as to obtain the data required by each request and return it to the sender of each request.

[0156] In the above embodiment, the computer device records the extended information of the remote procedure call communication application through the middleware list, and when obtaining data using the extended remote procedure call communication application, it can execute the middleware logic in order based on the middleware information saved in the middleware list, and manage each data acquisition process through the context management object, thereby improving the expansion ability of the remote procedure call communication application. After expanding the remote procedure call communication application using the aggregation middleware and the caching middleware, it can effectively relieve the network pressure on the computer device caused by a large number of remote procedure call requests.

[0157] In one embodiment, if the computer device determines that there is no communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, it establishes a connection with the remote end based on the target remote procedure call request and executes the target remote procedure call communication according to the established connection. Among them, if the connection between the computer device and the remote end is a short connection, the connection between the computer device and the remote end is re-established. If the connection between the computer device and the remote end is a long connection and the connection has been established before, the target remote procedure call communication is executed according to the previously established connection.

[0158] In one embodiment, if there is communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the target remote procedure call request, the matching communication is determined as the target remote procedure call communication. That is to say, the target remote procedure call communication corresponding to the target remote procedure call request is already in execution, and there is no need to establish and execute a new remote procedure call communication for the target procedure call request.

[0159] In the above embodiment, the computer device determines whether to execute a new remote procedure call communication based on whether there is communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the target remote procedure call request, avoiding repeated execution of remote procedure call communications for obtaining the same data, thereby further alleviating the network pressure on the computer device.

[0160] In one embodiment, when the computer device determines that there is communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the target remote procedure call request, the matching communication is determined as the target remote procedure call communication, and the target remote procedure call request is suspended, that is, the target remote procedure call request enters the waiting state. When the communication that matches the aggregated keyword of the target remote procedure call request is executed, the data obtained from the remote end during the matching communication is obtained, and the step of distributing the data obtained from the remote end to the sender of the remote procedure call request is executed.

[0161] In one embodiment, after the computer device receives concurrent remote procedure call requests and performs an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregated keyword, it can directly determine whether there is communication in the remote procedure call communication in the execution state that matches the keyword of the remote procedure call request. If not, a connection with the remote end is established based on the remote procedure call request, and the remote procedure call communication is executed according to the established connection; if so, the remote procedure call request is suspended, that is, the remote procedure call request enters the waiting state. When the communication that matches the aggregated keyword of the remote procedure call request is executed, the data obtained from the remote end during the matching communication is obtained, and the step of distributing the data obtained from the remote end to the sender of the remote procedure call request is executed.

[0162] Figure 7 shows a schematic flowchart of the steps of executing the target remote procedure call communication in one embodiment; refer to Figure 7After receiving concurrent remote procedure call requests, the computer device extracts the original request parameters, calculates an aggregated keyword based on the request parameters, and then determines whether there is a communication that matches the aggregated keyword in the remote procedure call communication in the execution state based on the aggregated keyword. If there is, it directly waits for the execution result of the matching communication and outputs the obtained execution result as the request result of the remote procedure call request; if not, it executes the remote procedure call communication corresponding to the remote procedure call request, stores the aggregated keyword corresponding to the remote call request, or writes the Promise object of the remote procedure call communication being executed into the aggregated keyword. After the remote procedure call communication is executed and the result is obtained, the result is output.

[0163] In the above embodiment, when the computer device determines that there is a communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the target remote procedure call request, it determines the matching communication as the target remote procedure call communication and suspends the target remote procedure call request, so that there is no need to execute a new remote procedure call communication, effectively alleviating the network pressure on the computer device.

[0164] In one embodiment, after the computer device executes the target remote procedure call communication based on the target remote procedure call request, it can also store the aggregated keyword of the target remote procedure call request as the aggregated keyword of the target remote procedure call communication; if a new remote procedure call request is received, it compares the aggregated keyword of the new remote procedure call request with the stored aggregated keyword; when it is determined according to the comparison result that there is a remote procedure call communication in the execution state and corresponding to the new remote procedure call request, it determines the remote procedure call communication in the execution state as the remote procedure call communication of the new remote procedure call request.

[0165] Specifically, when the computer device receives a new remote procedure call request, it performs an aggregation operation on the request parameters in the new remote procedure call request to obtain the aggregated keyword of the new remote procedure call request, and compares the aggregated keyword of the new remote procedure call request with the aggregated keyword of the remote procedure call communication in the execution state. When there is a communication in the remote procedure call communication in the execution state that matches the aggregated keyword of the new remote procedure call request, it determines the matching communication as the remote procedure call communication of the new remote procedure call request and suspends the new remote procedure call request. When the communication that matches the aggregated keyword of the new remote procedure call request is executed, it sends the data obtained from the remote end to the sender of the new remote procedure call request.

[0166] In addition, after the target remote procedure call communication is completed, the computer device clears the aggregated keyword corresponding to the target remote procedure call communication in the remote procedure call communication stored in the execution state, so that when a new remote procedure call request is received, the aggregated keyword of the new remote procedure call request can be compared with the stored aggregated keyword.

[0167] In the above embodiment, the computing device stores the aggregated keyword of the target remote procedure call request as the aggregated keyword of the target remote procedure call communication. Thus, during the execution of the target remote procedure call communication, when a new remote procedure call request for obtaining the same data as the target remote procedure call request is received, there is no need to execute a new target remote procedure call communication, effectively alleviating the network pressure on the computer device.

[0168] In one embodiment, when the computer device receives a new remote procedure call request, it compares the aggregated keyword of the new remote procedure call request with the stored aggregated keyword. When it is determined according to the comparison result that there is no remote procedure call communication in the execution state and corresponding to the new remote procedure call request, a new target remote procedure call communication is executed based on the new remote procedure call request.

[0169] Among them, the new target remote procedure call communication is used to obtain data corresponding to the new remote procedure call request from the remote end. In addition, after executing the new target remote procedure call communication based on the new target remote procedure call request, the computer device also stores the aggregated keyword of the new remote procedure call request as the aggregated keyword of the new target remote procedure call communication, so that when other new remote procedure call requests are received subsequently, the aggregated keyword of the new remote procedure call request can be compared with the stored aggregated keyword.

[0170] In the above embodiment, when the aggregated keyword of the new remote procedure call request is different from the stored aggregated keyword, by executing the new target remote procedure call communication based on the new remote procedure call request, it can be ensured that the new remote procedure call request can obtain data from the remote end, ensuring the reliability of data acquisition.

[0171] In one embodiment, when the computer device is a terminal and the sender is different processes running on the terminal, the remote procedure call request received by the terminal includes a multimedia data acquisition request triggered at the client; the data obtained by the terminal from the remote end through the target remote procedure call communication includes multimedia data; after the terminal distributes the data obtained from the remote end to different processes that send the remote procedure call request, the processes integrate the received multimedia data to obtain the integrated multimedia data, and return the integrated multimedia data to the client to display the integrated multimedia data on the front-end page of the client. Among them, the client includes a video client, a browser, and other clients that can view multimedia data. Integrating multimedia data means performing operations such as typesetting and rendering on the multimedia data according to a preset display method, and the preset display method corresponds to the page to be displayed.

[0172] Specifically, when the client on the terminal requests to display a multimedia page, it can trigger multiple processes on the terminal to send multimedia data acquisition requests respectively. The terminal receives the concurrent multimedia data acquisition requests, performs an aggregation operation on the request parameters in each multimedia data acquisition request to obtain an aggregation keyword, filters the multimedia data acquisition requests for the same data according to the aggregation keyword to obtain the target multimedia data acquisition request, executes the target remote procedure call communication based on the target multimedia data acquisition request, obtains the multimedia data corresponding to the target multimedia data acquisition request from the remote end through the target remote procedure call communication, then distributes the multimedia data obtained from the remote end to different processes that send the multimedia data acquisition request, integrates the multimedia data obtained by each process to obtain the integrated multimedia data, and returns the integrated multimedia data to the client to display the integrated multimedia data on the front-end page of the client.

[0173] In one embodiment, when the computer device is a proxy server and the sender is different processes running on the proxy server, the remote procedure call request received by the proxy server can be triggered based on at least one terminal multimedia data acquisition request. The data obtained by the proxy server from the remote end through the target remote procedure call communication includes multimedia data. After the proxy server distributes the data obtained from the remote end to different processes running on the proxy server that send the remote procedure call request, the processes integrate the received multimedia data to obtain the integrated multimedia data, and return the integrated multimedia data to the terminal so that the terminal can display the integrated multimedia data on the front-end page of the client.

[0174] Specifically, when a client on a terminal requests to display a multimedia page, it can send a multimedia data acquisition request to a proxy server. After receiving the multimedia data acquisition requests sent by different terminals, the proxy server can trigger multiple processes to send remote procedure call requests for each multimedia data acquisition request respectively, and perform an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword. Filter the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests, perform target remote procedure call communication based on the target remote procedure call requests, obtain multimedia data corresponding to the target remote procedure call requests through the target remote procedure call communication, and after distributing the multimedia data obtained from the remote end to different processes running on the proxy server that sent the remote procedure call requests, integrate the multimedia data obtained by each process to obtain the integrated multimedia data, and return the integrated multimedia data to the terminal that sent the multimedia data acquisition request correspondingly, so that the terminal can display the integrated multimedia data on the front-end page of the client.

[0175] In the above embodiment, after the computer device obtains the data, by integrating and outputting the obtained data, it can still ensure the display requirements of the client front-end page while alleviating the network pressure on the computer device.

[0176] In one embodiment, as Figure 8 shown, a data acquisition method is provided. Taking the computer device in Figure 1 (the computer device can specifically be a terminal or a server) as an example for illustration, the method includes the following steps:

[0177] S802, Receive concurrent remote procedure call requests.

[0178] S804, Determine whether the data corresponding to the remote procedure call request is cached through a cache middleware.

[0179] If so, execute S806; if not, execute S810.

[0180] S806, Obtain the cached data corresponding to the remote procedure call request.

[0181] S808, Distribute the obtained data to the sender of the remote procedure call request.

[0182] S810, Determine the request type of the remote procedure call request.

[0183] S812, Extract the request parameters in the remote procedure call request based on the request type.

[0184] S814. Perform a hash operation on each extracted request parameter through an aggregation middleware to obtain an aggregation keyword; filter the remote procedure call requests for the same data according to the aggregation keyword to obtain a target remote procedure call request.

[0185] S816. Determine that there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request.

[0186] If so, execute S818; if not, execute S820.

[0187] S818. Establish a connection with the remote end based on the target remote procedure call request and perform the target remote procedure call communication according to the connection.

[0188] S820. Enter the waiting state. When the communication that matches the aggregation keyword of the target remote procedure call request is completed, obtain the data obtained from the remote end during the matching communication.

[0189] S822. Distribute the data obtained from the remote end to the sender of the remote procedure call request.

[0190] This application also provides an application scenario that applies the above data acquisition method. Specifically, the application of the data acquisition method in this application scenario is as follows:

[0191] Taking the example of a proxy server providing CGI access layer services, the above embodiments will be illustrated. For example, a certain video client is running on both terminal A and terminal B. At a certain moment, both terminal A and terminal B request to display the client page to the proxy server. The client pages requested by terminal A and terminal B can be the same or different. That is, terminal A sends a multimedia data acquisition request A to the proxy server, and terminal B sends a multimedia data acquisition request B to the proxy server. The CGI access layer service of the proxy server triggers multiple processes to send remote procedure call requests respectively for each multimedia data acquisition request, and performs an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword. The remote procedure call requests for the same data are filtered according to the aggregation keyword to obtain the target remote procedure call request. Based on the target remote procedure call request, the target remote procedure call communication is executed, and the multimedia data corresponding to the target remote procedure call request is obtained through the target remote procedure call communication. After distributing the multimedia data obtained from the remote end to different processes running on the proxy server that sent the remote procedure call request, the multimedia data received by the processes corresponding to the multimedia data acquisition request A and the multimedia data acquisition request B are respectively integrated to obtain the integrated multimedia data A and the integrated multimedia data B, and the integrated multimedia data A is returned to terminal A, and the integrated multimedia data B is returned to terminal B, so that terminal A and terminal B respectively display the integrated multimedia data A and the integrated multimedia data B on the front-end page of the video client.

[0192] Among them, when the CGI access layer service obtains data based on the remote procedure call request, it can use an aggregation middleware to perform a hash operation on the request parameters in the remote procedure call request, and filter the remote procedure call requests for the same data according to the aggregation keyword to obtain the target remote procedure call request. After obtaining the multimedia data from the remote end, the aggregation middleware is used to distribute the multimedia data obtained from the remote end to different processes running on the proxy server that sent the remote procedure call request.

[0193] The present application also provides an application scenario that applies the above data acquisition method. Specifically, the application of the data acquisition method in this application scenario is as follows:

[0194] Taking the example of a proxy server providing a direct page output service, the above embodiments are illustrated as follows. The process of obtaining multimedia data for the direct page output service is the same as that of the multimedia data obtaining process for the above CGI access layer service. In addition, after the multimedia data obtained from the remote end is distributed to different processes running on the proxy server that send remote procedure call requests, the multimedia data received by the processes corresponding to the multimedia data obtaining request A and the multimedia data obtaining request B are respectively inserted into the corresponding page templates and rendered to obtain the rendered multimedia data A and the rendered multimedia data B, and the rendered multimedia data A and the rendered multimedia data B are respectively returned to the terminal A and the terminal B, so that the terminal A and the terminal B respectively display the rendered multimedia data A and the multimedia data B on the front-end page of the video client.

[0195] The present application also provides an application scenario that applies the above data acquisition method. Specifically, the application of the data acquisition method in this application scenario is as follows:

[0196] Taking the example that this method is executed on a terminal, there is a high-concurrency script running on the terminal. The high-concurrency script needs to obtain data from a remote database server. After the high-concurrency script generates concurrent remote procedure call requests, the terminal can perform an aggregation operation on the request parameters in the concurrent remote procedure call requests to obtain an aggregation keyword, and filter the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests. Based on the target remote procedure call requests, target remote procedure call communication is performed. The target remote procedure call communication is used to obtain the data corresponding to the target remote procedure call requests from the remote end, and distribute the data obtained from the remote end to the high-concurrency script of the remote procedure call request. Thus, in the case of high concurrency, the terminal only needs to send a small number of remote procedure call requests to obtain the response data with the same concurrent quantity, effectively alleviating the network pressure.

[0197] It should be understood that although Figure 2 、 6 、7 and 8 in the flowcharts of Figure 2 、 6At least some of the steps in 7 and 8 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.

[0198] In one embodiment, as Figure 9 shown, a data acquisition device is provided. This device can be a software module, a hardware module, or a combination of both to become a part of a computer device. Specifically, the device includes: a request receiving module 902, an operation module 904, a request filtering module 906, a communication module 908, and a data distribution module 910, where:

[0199] The request receiving module 902 is used to receive concurrent remote procedure call requests.

[0200] The operation module 904 is used to perform an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword.

[0201] The request filtering module 906 is used to filter the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests.

[0202] The communication module 908 is used to perform a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from a remote end.

[0203] The data distribution module 910 is used to distribute the data obtained from the remote end to the senders of the remote procedure call requests.

[0204] In one embodiment, the device is included in a proxy server; the sender is different terminals; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different terminals at the same moment, and remote procedure call requests respectively sent by different terminals within a preset response duration of the proxy server.

[0205] In one embodiment, the device is included in a terminal; the sender is different processes running on the terminal; the concurrent remote procedure call requests include at least one of the following: remote procedure call requests respectively sent by different processes at the same moment, and remote procedure call requests respectively sent by different processes within a preset response duration of the terminal.

[0206] In the above data acquisition method, after the computer device receives concurrent remote procedure call requests, it performs an aggregation operation on the request parameters in each remote procedure call request to obtain an aggregation keyword; filters the remote procedure call requests for the same data according to the aggregation keyword to obtain target remote procedure call requests, and performs target remote procedure call communication based on the target remote procedure call requests. After obtaining the data corresponding to the target remote procedure call requests from the remote end through the target remote procedure call communication, the obtained data is directly distributed to the senders of the remote call requests, so that when receiving remote procedure call requests for the same data, by filtering the received remote procedure call requests and performing target remote procedure call communication based on the filtered remote procedure call requests, the network pressure caused by executing corresponding remote procedure call communication for each remote procedure call request in the traditional solution is alleviated.

[0207] In one embodiment, the operation module 904 is further configured to: determine the request type of the remote procedure call request; extract the request parameters in the remote procedure call request based on the request type; perform a hash operation on the extracted request parameters through the remote procedure call middleware to obtain an aggregation keyword.

[0208] In the above embodiment, the computer device extends the remote procedure call application through the aggregation middleware and the cache middleware, so that when receiving concurrent remote procedure call requests, the execution of the remote procedure call communication can be further reduced through the cache middleware and the aggregation middleware, and thus the network pressure on the computer device can be more effectively alleviated.

[0209] In one embodiment, the remote procedure call middleware includes an aggregation middleware and a cache middleware; the aggregation keyword is obtained by the aggregation middleware performing a hash operation on the extracted request parameters; the operation module 904 is further configured to: determine through the cache middleware that the data corresponding to the remote procedure call request is not cached; when the data corresponding to the target remote procedure call request is obtained from the remote end, the data obtained from the remote end is cached through the cache middleware.

[0210] In the above embodiment, the computer device determines the request type of the remote procedure call request, thereby extracts the request parameters based on the request type, and then realizes the aggregation operation on the request parameters through the remote procedure call middleware to obtain the aggregation keywords of each remote procedure call request, so as to filter the remote procedure call requests for obtaining the same data based on the aggregation keywords subsequently, reducing the network pressure on the computer device.

[0211] In one embodiment, the operation module 904 is further configured to: determine, through the cache middleware, that data corresponding to the remote procedure call request is cached; obtain the cached data corresponding to the remote procedure call request; and distribute the obtained data to the sender of the remote procedure call request.

[0212] In the above embodiment, the computer device caches the newly obtained data through the cache middleware, so that when a new remote procedure call request is received subsequently, there is no need to perform remote procedure call communication based on the new remote procedure call request, directly obtain the result from the cached data, and return the result to the sender of the new remote procedure call request, thereby effectively alleviating the network pressure on the computer device.

[0213] In one embodiment, both the aggregation middleware and the cache middleware are configured with pre-logic and post-logic; the pre-logic of the cache middleware is used to detect whether data corresponding to the remote procedure call request is cached in the cache space; the post-logic of the cache middleware is used to cache the data obtained from the remote end when the data is obtained from the remote end; the pre-logic of the aggregation middleware is used to perform a hash operation on the request parameters in each remote procedure call request, and filter the remote procedure call requests that request the same data according to the aggregation keyword to obtain the target remote procedure call request; the post-logic of the aggregation middleware is used to distribute the data obtained from the remote end.

[0214] In the above embodiment, by configuring pre-logic and post-logic for each middleware in the computer device, the implementation of extended functions can be ensured. Through the execution of the pre-logic and post-logic of the aggregation middleware and the cache middleware, the aggregation of concurrent remote procedure call requests can be achieved, reducing the execution of remote procedure call communication, thereby effectively alleviating the network pressure on the computer device.

[0215] In one embodiment, the operation module 904 is further configured to: when the middleware list is not stored, or the middleware list is stored but the middleware information is not included in the list, directly perform the corresponding remote procedure call communication based on the remote procedure call request to obtain the data corresponding to the remote procedure call request from the remote end; when the middleware list is stored and the middleware information is included in the list, sequentially execute the pre-logic of the cache middleware and the pre-logic of the aggregation middleware according to the middleware order; and when the data is obtained from the remote end, sequentially execute the post-logic of the aggregation middleware and the post-logic of the cache middleware in reverse middleware order.

[0216] In the above embodiments, the computer device records the extended information of the remote procedure call communication through the middleware list, and when obtaining data by using the extended remote procedure call communication, it can execute the middleware logic in sequence based on the middleware information saved in the middleware list, and manage each data acquisition process through the context management object, thereby improving the expansion ability of the remote procedure call communication. And after expanding the remote procedure call communication by using the aggregation middleware and the cache middleware, the network pressure on the computer device caused by a large number of remote procedure call requests can be effectively alleviated.

[0217] In one embodiment, the request filtering module 906 is further configured to: group the remote procedure call requests according to the aggregation keyword; the data requested by the remote procedure call requests in the same group is the same; filter the remote procedure call requests in each group to obtain the target remote procedure call requests corresponding to each group.

[0218] In the above embodiments, the computer device groups the remote procedure call requests based on the aggregation keyword, and then filters the remote procedure call requests for obtaining the same data, thereby reducing the network pressure on the computer device.

[0219] In one embodiment, the communication module 908 is further configured to: if there is no communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, establish a connection with the remote end based on the target remote procedure call request, and execute the target remote procedure call communication according to the connection; if there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, determine the matching communication as the target remote procedure call communication.

[0220] In the above embodiments, the computer device determines whether to execute a new remote procedure call communication according to whether there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, avoiding repeatedly executing the remote procedure call communication for obtaining the same data, thereby further alleviating the network pressure on the computer device.

[0221] In one embodiment, the communication module 908 is further configured to: obtain the aggregation keyword corresponding to the remote procedure call communication; when the aggregation keyword corresponding to the remote procedure call communication is the same as the aggregation keyword of the target remote procedure call request, there is a communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request; when the aggregation keyword corresponding to the remote procedure call communication is different from the aggregation keyword of the target remote procedure call request, there is no communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request.

[0222] In the above embodiments, the computer device determines whether there is a communication that matches the target remote procedure call request in the remote procedure call communication that is currently in the execution state, so that according to the determination result, it can confirm whether to execute a new remote procedure call communication, avoiding the repeated execution of remote procedure call communications for obtaining the same data, thereby further alleviating the network pressure on the computer device.

[0223] In one embodiment, the communication module 908 is further configured to: if there is a communication that matches the aggregation keyword of the target remote procedure call request in the remote procedure call communication that is in the execution state, enter the waiting state; when the communication that matches the aggregation keyword of the target remote procedure call request is completed, obtain the data obtained from the remote end during the matching communication process, and perform the step of distributing the data obtained from the remote end to the sender of the remote procedure call request.

[0224] In the above embodiments, when the computer device determines that there is a communication that matches the aggregation keyword of the target remote procedure call request in the remote procedure call communication that is in the execution state, it determines the matching communication as the target remote procedure call communication and suspends the target remote procedure call request, so that there is no need to execute a new remote procedure call communication, effectively alleviating the network pressure on the computer device.

[0225] In one embodiment, as Figure 10 shown, the apparatus further includes: a storage module 912, where: the storage module 912 is configured to store the aggregation keyword of the target remote procedure call request as the aggregation keyword of the target remote procedure call communication; the request filtering module 906 is further configured to, if a new remote procedure call request is received, compare the aggregation keyword of the new remote procedure call request with the stored aggregation keyword; the communication module 908 is further configured to, when it is determined according to the comparison result that there is a remote procedure call communication that is in the execution state and corresponds to the new remote procedure call request, determine the remote procedure call communication that is in the execution state as the remote procedure call communication of the new remote procedure call request.

[0226] In the above embodiments, the computing device stores the aggregation keyword of the target remote procedure call request as the aggregation keyword of the target remote procedure call communication, so that when a new remote procedure call request for obtaining the same data as the target remote procedure call request is received during the execution of the target remote procedure call communication, there is no need to execute a new target remote procedure call communication, effectively alleviating the network pressure on the computer device.

[0227] In one embodiment, the communication module 908 is further configured to: when it is determined according to the comparison result that there is no remote procedure call communication in the execution state and corresponding to the new remote procedure call request, execute a new target remote procedure call communication based on the new remote procedure call request; wherein, the new target remote procedure call communication is used to obtain data corresponding to the new remote procedure call request from the remote end.

[0228] In the above embodiment, when the aggregated keyword of the new remote procedure call request is different from the stored aggregated keyword, the computer device can ensure that the new remote procedure call request can obtain data from the remote end by executing the new target remote procedure call communication based on the new remote procedure call request, ensuring the reliability of data acquisition.

[0229] In one embodiment, the remote procedure call request includes a multimedia data acquisition request triggered at the client; the data obtained from the remote end includes multimedia data; as Figure 10 shown, the apparatus further includes: an integration module 914 and a sending module 916, wherein: the integration module 914 is configured to integrate the received multimedia data through a process to obtain integrated multimedia data; the sending module 916 is configured to return the integrated multimedia data to the client to display the integrated multimedia data on the front-end page of the client.

[0230] In the above embodiment, after the computer device obtains the data, by integrating and outputting the obtained data, it can still ensure the display requirements of the front-end page of the client while alleviating the network pressure on the computer device.

[0231] For the specific limitations of the data acquisition device, reference can be made to the limitations on the data acquisition method in the foregoing text, which will not be elaborated here. Each module in the above data acquisition device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.

[0232] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11As shown in the figure. The computer device includes a processor, a memory, and a network interface connected via 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 database of the computer device is used to store remote procedure call request data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a data acquisition method.

[0233] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 12 shown in the figure. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected via 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data acquisition method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0234] Those skilled in the art can understand that Figure 11 the structures shown in Figures 10 or 12 are merely block diagrams of some structures related to the solution of the present application, and do not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.

[0235] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps in the above method embodiments.

[0236] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0237] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions that are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in the above-described method embodiments.

[0238] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in 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 above-described method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. 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.

[0239] 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 described in this specification.

[0240] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.

Claims

1. A data acquisition method, characterized in that, The method includes: Receiving concurrent remote procedure call requests; Determining the request type of the remote procedure call request; extracting the valid data in the remote procedure call request based on the request type; performing a hash operation on each piece of the extracted valid data through a remote procedure call middleware to obtain an aggregated keyword; the valid data is the method function name and function input parameters to be called; Determining the remote procedure call requests for requesting the same data according to the aggregated keyword; selecting one remote procedure call request from the remote procedure call requests for requesting the same data; extracting the valid data in the selected remote procedure call request, and generating a target remote procedure call request that conforms to remote procedure call communication according to the extracted valid data; Performing a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain the data corresponding to the target remote procedure call request from the remote end; Distributing the data obtained from the remote end to the sender of the remote procedure call request.

2. The method according to claim 1, characterized in that The remote procedure call middleware includes an aggregation middleware and a cache middleware; the method further includes: Determining through the cache middleware that the data corresponding to the remote procedure call request is not cached; When the data corresponding to the target remote procedure call request is obtained from the remote end, caching the data obtained from the remote end through the cache middleware.

3. The method according to claim 2, wherein The method further includes: Determining through the cache middleware that the data corresponding to the remote procedure call request is cached; Obtaining the cached data corresponding to the remote procedure call request; Distributing the obtained data to the sender of the remote procedure call request.

4. The method according to claim 2, wherein Both the aggregation middleware and the cache middleware are configured with pre-logic and post-logic; the pre-logic of the cache middleware is used to detect whether the data corresponding to the remote procedure call request is cached in the cache space; the post-logic of the cache middleware is used to cache the data obtained from the remote end when the data is obtained from the remote end; The pre-logic of the aggregation middleware is used to perform a hash operation on the request parameters in each remote procedure call request, and filter the remote procedure call requests for requesting the same data according to the aggregated keyword to obtain a target remote procedure call request; The post-logic of the aggregation middleware is used to distribute the data obtained from the remote end.

5. The method according to claim 4, wherein After receiving the concurrent remote procedure call requests, the method further includes: When the middleware list is not stored, or the middleware list is stored but the list does not contain middleware information, directly performing the corresponding remote procedure call communication based on the remote procedure call request to obtain the data corresponding to the remote procedure call request from the remote end; When the middleware list is stored and contains middleware information, the pre-logic of the caching middleware and the pre-logic of the aggregation middleware are executed sequentially according to the middleware order; and, when data is obtained from the remote end, the post-logic of the aggregation middleware and the post-logic of the caching middleware are executed sequentially in reverse middleware order.

6. The method according to claim 1, characterized in that, The method further includes: Grouping the remote procedure call requests according to the aggregation keyword; the data requested by the remote procedure call requests in the same group is the same; Filtering the remote procedure call requests in each group to obtain the target remote procedure call requests corresponding to each group.

7. The method according to claim 1, characterized in that, Performing the target remote procedure call communication based on the target remote procedure call requests includes: If there is no communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, a connection with the remote end is established based on the target remote procedure call request, and the target remote procedure call communication is performed according to the connection; If there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, the matching communication is determined as the target remote procedure call communication.

8. The method according to claim 7, wherein The method further includes: Obtaining the aggregation keyword corresponding to the remote procedure call communication; When the aggregation keyword corresponding to the remote procedure call communication is the same as the aggregation keyword of the target remote procedure call request, there is a communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request; When the aggregation keyword corresponding to the remote procedure call communication is different from the aggregation keyword of the target remote procedure call request, there is no communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request.

9. The method according to claim 7, wherein The method further includes: If there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, enter the waiting state; When the communication that matches the aggregation keyword of the target remote procedure call request is completed, obtain the data obtained from the remote end during the matching communication process, and perform the step of distributing the data obtained from the remote end to the sender of the remote procedure call request.

10. The method according to any one of claims 1 to 9, characterized in that, After performing the target remote procedure call communication based on the target remote procedure call requests, the method further includes: Storing the aggregation keyword of the target remote procedure call request as the aggregation keyword of the target remote procedure call communication; If a new remote procedure call request is received, comparing the aggregation keyword of the new remote procedure call request with the stored aggregation keyword; When it is determined according to the comparison result that there is a remote procedure call communication in the execution state and corresponding to the new remote procedure call request, the remote procedure call communication in the execution state is determined as the remote procedure call communication of the new remote procedure call request.

11. The method according to claim 10, characterized in that, The method further includes: When it is determined based on the comparison result that there is no remote procedure call communication in the execution state and corresponding to the new remote procedure call request, a new target remote procedure call communication is executed based on the new remote procedure call request; wherein, the new target remote procedure call communication is used to obtain data corresponding to the new remote procedure call request from the remote end.

12. A data acquisition device, characterized in that, The device includes: a request receiving module, configured to receive concurrent remote procedure call requests; an operation module, configured to determine the request type of the remote procedure call request; extract valid data from the remote procedure call request based on the request type; perform a hash operation on each piece of the extracted valid data through a remote procedure call middleware to obtain an aggregated keyword; the valid data is the method function name and function input parameters to be called; a request filtering module, configured to determine remote procedure call requests for requesting the same data according to the aggregated keyword; select one remote procedure call request from the remote procedure call requests for requesting the same data; extract the valid data from the selected remote procedure call request, and generate a target remote procedure call request that conforms to the remote procedure call communication according to the extracted valid data; a communication module, configured to execute a target remote procedure call communication based on the target remote procedure call request; the target remote procedure call communication is used to obtain data corresponding to the target remote procedure call request from the remote end; a data distribution module, configured to distribute the data obtained from the remote end to the sender of the remote procedure call request.

13. The device according to claim 12, characterized in that, The remote procedure call middleware includes an aggregation middleware and a cache middleware; the operation module is further configured to: determine, through the cache middleware, that data corresponding to the remote procedure call request is not cached; when data corresponding to the target remote procedure call request is obtained from the remote end, the data obtained from the remote end is cached through the cache middleware.

14. The device according to claim 13, wherein The operation module is further configured to: determine, through the cache middleware, that data corresponding to the remote procedure call request is cached; obtain the cached data corresponding to the remote procedure call request; distribute the obtained data to the sender of the remote procedure call request.

15. The device according to claim 13, characterized in that, Both the aggregation middleware and the cache middleware are configured with pre-logic and post-logic; the pre-logic of the cache middleware is used to detect whether data corresponding to the remote procedure call request is cached in the cache space; the post-logic of the cache middleware is used to cache the data obtained from the remote end when the data is obtained from the remote end; the pre-logic of the aggregation middleware is used to perform a hash operation on the request parameters in each remote procedure call request, and filter the remote procedure call requests for requesting the same data according to the aggregated keyword to obtain a target remote procedure call request; the post-logic of the aggregation middleware is used to distribute the data obtained from the remote end.

16. The device according to claim 15, characterized in that, After receiving the concurrent remote procedure call requests, the operation module is further configured to: When the middleware list is not stored, or the middleware list is stored but the middleware information is not included in the list, the corresponding remote procedure call communication is directly executed based on the remote procedure call request to obtain data corresponding to the remote procedure call request from the remote end; When the middleware list is stored and the middleware information is included in the list, the pre-logic of the caching middleware and the pre-logic of the aggregation middleware are sequentially executed according to the middleware order; and when the data is obtained from the remote end, the post-logic of the aggregation middleware and the post-logic of the caching middleware are sequentially executed according to the reverse middleware order.

17. The device according to claim 12, characterized in that, The request filtering module is further configured to: Group the remote procedure call requests according to the aggregation keyword; the data requested by the remote procedure call requests in the same group is the same; Filter the remote procedure call requests in each group to obtain the target remote procedure call requests corresponding to each group.

18. The device according to claim 12, characterized in that, The communication module is further configured to: If there is no communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, establish a connection with the remote end based on the target remote procedure call request and execute the target remote procedure call communication according to the connection; If there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, determine the matching communication as the target remote procedure call communication.

19. The device according to claim 18, characterized in that, The communication module is further configured to: Obtain the aggregation keyword corresponding to the remote procedure call communication; When the aggregation keyword corresponding to the remote procedure call communication is the same as the aggregation keyword of the target remote procedure call request, there is a communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request; When the aggregation keyword corresponding to the remote procedure call communication is different from the aggregation keyword of the target remote procedure call request, there is no communication in the remote procedure call communication that matches the aggregation keyword of the target remote procedure call request.

20. The device according to claim 18, characterized in that, The communication module is further configured to: If there is a communication in the remote procedure call communication in the execution state that matches the aggregation keyword of the target remote procedure call request, enter the waiting state; When the communication that matches the aggregation keyword of the target remote procedure call request is completed, obtain the data obtained from the remote end during the matching communication process and execute the step of distributing the data obtained from the remote end to the sender of the remote procedure call request.

21. The device according to any one of claims 12 to 20, characterized in that, After executing the target remote procedure call communication based on the target remote procedure call request, the device further includes: A storage module for storing the aggregation keyword of the target remote procedure call request as the aggregation keyword of the target remote procedure call communication; The request filtering module is further configured to compare the aggregation keyword of the new remote procedure call request with the stored aggregation keyword if a new remote procedure call request is received; The communication module is further configured to, when it is determined according to the comparison result that there is a remote procedure call communication in an execution state and corresponding to the new remote procedure call request, determine the remote procedure call communication in the execution state as the remote procedure call communication of the new remote procedure call request.

22. The device according to claim 21, characterized in that, The communication module is further configured to: when it is determined according to the comparison result that there is no remote procedure call communication in an execution state and corresponding to the new remote procedure call request, perform a new target remote procedure call communication based on the new remote procedure call request; wherein the new target remote procedure call communication is used to obtain data corresponding to the new remote procedure call request from the remote end.

23. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

24. A computer-readable storage medium stores a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.

25. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the controller, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Method and system for data packet distribution

    CN105490948A

  • Data submission request processing method and device and computer device

    CN110221925A

  • Data increment updating method and device for reducing data concurrency and computer equipment

    CN110457614A

  • Data rule mining method and device

    CN111930810A