Remote procedure calling method and device, electronic equipment, storage medium and program product
By automatically generating remote procedure call request streams, the problem of low efficiency in connecting the metrics platform with heterogeneous services is solved, enabling efficient acquisition of metrics data and rapid trial and error, thus meeting the agile iteration needs of business users.
Patent Information
- Application Number
- CN202511500926.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-23
AI Technical Summary
In existing technologies, indicator platforms need to interface with a large number of heterogeneous remote procedure call services, which requires developing separate adaptation code for each service, resulting in low efficiency and failing to meet the needs of rapid trial and error and agile iteration.
This paper provides a remote procedure call method that obtains the interface definition of the target remote procedure call method by allowing the user to input a service identifier and a method identifier, configure query indicators and conditions, automatically generate a remote procedure call request stream, and directly obtain the return value from the remote procedure call server, thus avoiding code development.
It improves the efficiency of acquiring indicator data, provides a user-friendly experience, has a low configuration error rate, and meets the needs of rapid trial and error and agile iteration.
Smart Images

Figure CN121387590A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a remote procedure call method, a remote procedure call device, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] The metrics platform is responsible for providing unified metric calculation and data service capabilities to various business systems. Typically, business systems can access the interfaces provided by the metrics platform via Remote Procedure Call (RPC) to obtain the required metric data. However, currently, the metrics platform needs to interface with a large number of heterogeneous RPC services. Traditionally, this requires developing separate adaptation code for each service, managing RPC parameters through static configuration files, and having developers manually write parameter assembly logic, resulting in low efficiency in metric data acquisition. Summary of the Invention
[0003] In view of the above, embodiments of this disclosure provide a remote procedure call method, a remote procedure call apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which can solve or partially solve the above problems.
[0004] The remote procedure call method according to embodiments of this disclosure includes: obtaining an interface definition of a target remote procedure call method based on a service identifier and a method identifier input by a user; obtaining a target query indicator and query conditions configured by the user based on the interface definition; in response to receiving a query request for the target query indicator, generating a remote procedure call request stream based on the service identifier, the method identifier, the target query indicator, and the query conditions of the target query indicator; sending the remote procedure call request stream to a remote procedure call server; and obtaining and returning the return value corresponding to the target query indicator from a remote procedure call response stream received from the remote procedure call server.
[0005] In embodiments of this disclosure, obtaining the interface definition of the target remote procedure call method based on the service identifier and method identifier input by the user includes: obtaining the service identifier and method identifier input by the user; matching the service identifier and method identifier with the service identifier and method identifier corresponding to the registered remote procedure call method to determine the target remote procedure call method; and extracting the interface definition language file corresponding to the target remote procedure call method as the interface definition.
[0006] In embodiments of this disclosure, the interface definition includes at least one input parameter and at least one output parameter of the target remote procedure call method; wherein, obtaining the target query metric and the query conditions of the target query metric configured by the user based on the interface definition includes: obtaining the dataset input parameter selected by the user from the at least one input parameter and the dataset output parameter selected from the at least one output parameter; obtaining the data label configured by the user based on the dataset input parameter; and obtaining the query conditions of the target query metric configured by the user based on the data label and the target query metric configured based on the dataset output parameter.
[0007] In embodiments of this disclosure, generating a remote procedure call request stream based on the service identifier, the method identifier, the target query metric, and the query conditions of the target query metric includes: generating a message header based on the service identifier and the method identifier; generating a data structure for a remote procedure call request based on the target query metric and the query conditions of the target query metric; serializing the data structure for the remote procedure call request to obtain serialized data; and generating the remote procedure call request stream based on the message header and the serialized data.
[0008] In embodiments of this disclosure, the data structure includes: a first data structure and a second data structure; wherein, the data structure for generating a remote procedure call request based on the target query index and the query conditions of the target query index includes: generating an input parameter mapping and an output parameter mapping based on the query conditions of the target query index and the target query index; generating the first data structure based on the input parameter mapping; wherein the first data structure is a tree structure including a root node and at least one first child node; each first child node corresponds to an input parameter in the input parameter mapping; and generating the second data structure based on the output parameter mapping; wherein the second data structure is a tree structure including a root node and at least one second child node; wherein each second child node corresponds to an output parameter in the output parameter mapping.
[0009] In embodiments of this disclosure, generating the first data structure based on the input parameter mapping includes: generating one or more first child nodes corresponding to the input parameter mapping; wherein each first child node corresponds to a data mapping in the input parameter mapping; and using the one or more first child nodes as child node fields to generate the root node of the first data structure of type structure at the upper layer; and generating the second data structure based on the output parameter mapping includes: generating one or more second child nodes corresponding to the output parameter mapping; wherein each second child node corresponds to a data mapping in the output parameter mapping; and using the one or more second child nodes as child node fields to generate the root node of the second data structure of type structure at the upper layer.
[0010] In embodiments of this disclosure, serializing the data structure of the remote procedure call request to obtain serialized data includes: for the first data structure, recursively reading the data of the nodes of the first data structure sequentially, and serializing the data of the nodes of the first data structure based on the type of the input parameters corresponding to the nodes of the first data structure and a pre-set serialization rule; and for the second data structure, recursively reading the data of the nodes of the second data structure sequentially, and serializing the data of the nodes of the second data structure based on the type of the output parameters corresponding to the nodes of the second data structure and a pre-set serialization rule.
[0011] In embodiments of this disclosure, obtaining and returning the return value corresponding to the target query indicator from the remote procedure call response stream received from the remote procedure call server includes: extracting serialized data from the remote procedure call response stream; deserializing the serialized data from the remote procedure call response stream to obtain a result mapping; and determining the return value corresponding to the target query indicator based on the result mapping.
[0012] In embodiments of this disclosure, the remote procedure call method further includes: storing the service identifier, the method identifier, and the interface definition as metadata of a data source; in response to determining that the user chooses to update the metadata of the data source, re-acquiring the interface definition of the target remote procedure call method based on the service identifier and the method identifier; generating metadata update details based on the re-acquired interface definition of the target remote procedure call method and the interface definition of the target remote procedure call method in the metadata of the data source; and feeding back the metadata update details to the user.
[0013] Corresponding to the above-described remote procedure call method, embodiments of this disclosure also provide a remote procedure call apparatus, including: The data source configuration module is used to obtain the interface definition of the target remote procedure call method based on the service identifier and method identifier input by the user; The query metric configuration module is used to obtain the target query metric and query conditions of the target query metric as defined and configured by the user based on the interface. The remote procedure call request generation module is used to generate a remote procedure call request stream based on the service identifier, the method identifier, the target query indicator, and the query conditions of the target query indicator in response to receiving a query request for the target query indicator. The request sending module is used to send the remote procedure call request stream to the remote procedure call server; and The indicator extraction module is used to obtain and return the return value corresponding to the target query indicator from the remote procedure call response stream received from the remote procedure call server.
[0014] Embodiments of this disclosure also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the remote procedure call method described above.
[0015] Embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the remote procedure call method described above.
[0016] Embodiments of this disclosure also provide a computer program product, including computer program instructions that, when executed on a computer, cause the computer to perform the remote procedure call method described above.
[0017] It can be seen that in the remote procedure call method, remote procedure call device, electronic device, computer-readable storage medium and computer program product described in the embodiments of this disclosure, the user only needs to configure the data and then directly select to initiate an indicator query request to automatically generate a remote procedure call request stream to realize remote procedure call, without any code development work. This configuration method not only has a user-friendly experience and a low configuration error rate, but also greatly improves the efficiency of indicator data acquisition, meeting the needs of business users for rapid trial and error and agile iteration. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram of an exemplary system provided by some embodiments of the present disclosure is shown.
[0020] Figure 2 The implementation flow of the remote procedure call method described in some embodiments of this disclosure is shown.
[0021] Figure 3 This document illustrates the implementation flow of a method for generating a remote procedure call request stream based on a service identifier, a method identifier, a target query index, and query conditions of the target query index, as described in some embodiments of this disclosure.
[0022] Figure 4 The implementation flow of the configuration update method described in some embodiments of this disclosure is shown.
[0023] Figure 5 The internal structure of the remote procedure call apparatus described in some embodiments of this disclosure is shown.
[0024] Figure 6 A schematic diagram of a more specific electronic device hardware structure described in some embodiments of this disclosure is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0026] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0028] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution.
[0029] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0031] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of subsequent actions performed in response to such event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is met. For example, in some cases, subsequent actions may be performed immediately upon the occurrence of the event or the fulfillment of the condition; while in others, they may be performed some time after the occurrence of the event or the fulfillment of the condition.
[0032] As mentioned earlier, when business systems obtain metric data from the metric platform via remote procedure calls, it is necessary to develop adaptation code for each service. This not only requires managing remote procedure call parameters through static configuration files but also requires developers to manually write parameter assembly logic, resulting in low efficiency in obtaining metric data.
[0033] Taking the establishment of a new information promotion strategy in an information promotion business system as an example, when the system wants to create a new strategy targeting a specific customer group, operations personnel typically need to submit specific requirements to the data team's developers. They must request that the developers separately develop remote procedure call (RPC) code tailored to the characteristics of this specific customer group to retrieve the corresponding customer identifiers from the Customer Data Platform (CDP). This allows the system to integrate with downstream information promotion strategy services such as reward distribution or push notifications. The implementation of this information promotion strategy requires development, integration testing, and deployment, which is not only time-consuming, costly, and inflexible, but also fails to meet the needs of operations personnel for rapid trial and error and agile iteration. This severely limits the efficiency and effectiveness of marketing activities.
[0034] In view of this, embodiments of the present disclosure provide a remote procedure call method, apparatus, electronic device, storage medium, and program product that can realize remote procedure calls without the need to develop separate adapted remote procedure call code, so as to quickly obtain the return value of the user-configured target query indicator from the indicator platform, thereby significantly improving the efficiency of indicator data acquisition to meet the needs of rapid trial and error and agile iteration.
[0035] For clarity, before describing the specific technical solutions of the embodiments of this disclosure, the technical terms involved in the embodiments of this disclosure will be explained first.
[0036] Remote Procedure Call (RPC) is a technology for implementing cross-process communication in distributed systems. Its core goal is to make remote service calls as simple and efficient as local calls. The implementation process of RPC typically includes three phases: service definition, service exposure, and service invocation. In the service definition phase, this usually involves defining the RPC service interface using an Interface Definition Language (IDL). In the service exposure phase, this typically involves implementing the RPC service interface defined by the IDL on the server side, registering the RPC service interface with the service center, and starting network listening. In the service invocation phase, the requesting end of the RPC generates a RPC request and transmits it to the server over the network. After the server listens for the RPC request, it invokes the specified RPC service instance based on the parameters passed in the RPC request and then returns the execution result.
[0037] A data metrics platform is a specialized tool for the unified management, calculation, analysis, and visualization of core business metrics for an enterprise. Its core objective is to solve problems such as inconsistent data metric definitions and redundant development, thereby enabling efficient reuse of data assets. A customer data platform (CDP) can be considered a specific implementation of a data metrics platform, used for the unified management, calculation, analysis, and visualization of business metrics related to customer data.
[0038] The Parameterized Service Mesh (PSM) interface parameter service discovery mechanism is a key system in microservice architectures used for dynamically managing and coordinating service calls. PSM can uniquely identify service instances using service identifiers and can also provide metadata information such as service interfaces and parameter structures. Furthermore, PSM supports various load balancing strategies and provides service governance capabilities such as circuit breaking, rate limiting, and monitoring.
[0039] Figure 1 A schematic diagram of an exemplary system 100 provided in an embodiment of this disclosure is shown.
[0040] like Figure 1 As shown, system 100 may include terminal device 102, RPC call system 104, RPC service management system 106, RPC server 108, and indicator platform 110. The communication links between terminal device 102 and RPC call system 104, between RPC call system 104 and RPC service management system 106, between RPC call system 104 and RPC server 108, and between RPC server 108 and indicator platform 110 may include media (e.g., a network). The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0041] For example, in the embodiments of this disclosure, through the information interaction between the RPC call system 104, the RPC service management system 106, the RPC server 108, and the indicator platform 110, the RPC call system 104 can provide users with registered RPC service capabilities, thereby assisting users in configuring target query indicators, and automatically generating remote procedure call request streams based on user configurations to access the indicator platform 110 via the RPC server 108 to query the target query indicators configured by the user.
[0042] Specifically, a metric query client can be installed on terminal device 102. Users can configure target query metrics through the metric query client on terminal device 102. Terminal device 102 can be hardware or software. When terminal device 102 is hardware, it can be various electronic devices with a display screen, including but not limited to smartphones, tablets, laptops, and desktop computers (PCs). When terminal device 102 is software, it can be installed on the aforementioned electronic devices. It can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module. No specific limitations are made here.
[0043] The RPC call system 104 can be a backend server supporting the indicator query client on the terminal device 102. It can automatically generate remote procedure call request streams based on the user's configuration of the target query indicator, thereby allowing the indicator platform 110 to query the user-configured target query indicator via the RPC service management system 106, and returning the return value of the target query indicator to the terminal device 102. The RPC call system 104 can be either hardware or software. When the RPC call system 104 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the RPC call system 104 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0044] The RPC service management system 106 can be a system for developing and managing remote procedure call (RPC) services. It registers developed RPC services and one or more corresponding RPC methods. The RPC services can be identified using a service identifier (e.g., service name), and the RPC methods can be identified using a method identifier (e.g., method name). Each RPC method can define a service interface using an IDL (Internet Protocol Documentation), including at least one input parameter and at least one output parameter involved in the remote procedure call. The RPC service management system 106 can be either hardware or software. When the RPC service management system 106 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers or as a single server. When the RPC service management system 106 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services) or as a single software program or software module. No specific limitations are made here.
[0045] The RPC server 108 has registered service instances corresponding to the developed remote procedure call methods. In the embodiments of this disclosure, after deserializing the remote procedure call request stream received from the RPC call system 104, the RPC server 108 can obtain the remote procedure call service instance to be called by the remote procedure call request stream and the corresponding input parameter configuration, and complete the call of the corresponding remote procedure call service instance accordingly, thereby obtaining the return value of the target query indicator from the indicator platform 110. Furthermore, the RPC server 108 can generate a remote procedure call response stream based on the return value of the target query indicator and return the remote procedure call response stream to the RPC call system 104.
[0046] The indicator platform 110 can be the aforementioned specialized tool for unified management, calculation, analysis, and visualization of core business indicators of an enterprise. In some embodiments of this disclosure, the indicator platform can specifically be the aforementioned CDP. Specifically, the indicator platform 110 can receive query requests from the RPC server 108 for target query indicators, extract the return value of the target query indicator, and return the return value of the target query indicator to the RPC server 108.
[0047] It should be understood that Figure 1 The number of hardware devices and users shown is merely illustrative. Depending on implementation needs, there can be any number of hardware devices and users.
[0048] As an example scenario, user 112 can first provide the service identifier and method identifier involved in the remote procedure call to RPC call system 104 using the indicator query client on terminal device 102 to complete the data source configuration. RPC call system 104 can obtain the registered IDL of the target remote procedure call method corresponding to the service identifier and method identifier from RPC service management system 106 based on the user-input service identifier and method identifier, and feed back the input parameters and output parameters contained in the IDL to terminal device 102 as the data source corresponding to the user-input service identifier and method identifier. Further, user 112 can configure the dataset based on the configured data source using the indicator query client on terminal device 102. For example, dataset configuration may include selecting one or more input parameters and one or more output parameters that meet the user's needs from the configured data source, and configuring the attributes of the input and output parameters. Even further, user 112 can configure data tags based on the configured dataset using the indicator query client on terminal device 102. In the embodiments of this disclosure, the aforementioned data tags can be used to configure target query indicators. Specifically, each data label can correspond to an input parameter in the configured dataset. The configuration of these data labels includes not only selecting input parameters from the dataset but also configuring the attributes of the input parameters, such as setting default values or ranges. After configuring the data labels, user 112 can configure the target query metric based on the configured data labels and the configured dataset. The configuration of the target query metric can specifically include setting the parameters corresponding to the target query metric and configuring the query conditions for the target query metric. The configuration of the parameters corresponding to the target query metric typically refers to selecting an output metric from the dataset as the target query metric; while the configuration of the query conditions for the target query metric typically includes configuring at least one data label (input parameter) related to the target query metric and configuring the input parameter values corresponding to the aforementioned at least one data label.
[0049] After configuring the data as described above, the user can initiate a query request for the target query indicator through terminal device 102. Upon receiving the query request, RPC call system 104 can automatically generate a remote procedure call request stream based on the user's configuration of the target query indicator, thereby enabling the RPC service management system 106 to access the indicator platform 110 to query the target query indicator configured by the user, and return the return value of the target query indicator to terminal device 102.
[0050] Taking the establishment of a new information promotion strategy in an information promotion business system as an example, when the system wants to create a new information promotion strategy targeting customers whose most recent login time falls within a certain time range, user 112 can first determine, through research, the remote procedure call service identifier and remote procedure call method identifier that can be selected from the CDP platform for the specific customer group, thereby configuring the data source; then, from the configured data source, the most recent login time can be selected as the input parameter and the customer identifier as the output parameter, forming a dataset; furthermore, data tags for selecting the specific customer group, i.e., the most recent login time, can be set from the dataset; finally, the target query indicator can be set as the customer identifier, and the query condition for the target query indicator can be set as the most recent login time (input parameter) falling within a preset time range (input parameter value). After the above data configuration, the user can initiate a query request for the target query indicator through terminal device 102. Upon receiving a query request, the RPC call system 104 determines the service identifier and method identifier corresponding to the remote procedure call service instance that the user wishes to invoke. It also determines that the input parameters for the remote procedure call are the most recent login time, the input parameter values within a preset time range, and the output parameter is the customer identifier. Based on this information, the RPC call system 104 automatically generates a remote procedure call request stream. This stream can then be accessed via the RPC service management system 106 through the indicator platform 110 to query the customer identifier whose most recent login time falls within the preset time range. The retrieved customer identifier is then returned to the terminal device 102. Furthermore, the user 112 can use the obtained customer identifier to connect to downstream information promotion strategies such as reward distribution or message push notifications.
[0051] Based on the aforementioned system 100, in order to solve the problems of long implementation cycle, high cost, and poor flexibility of existing remote procedure call indicator data, this disclosure provides a remote procedure call method.
[0052] Figure 2 The implementation flow of the remote procedure call method described in some embodiments of this disclosure is illustrated. In some embodiments, the remote procedure call method described above can be implemented by the RPC call system 104 described above. Figure 2 As shown, the remote procedure call method described above may specifically include the following steps.
[0053] In step 210, the interface definition of the target remote procedure call method is obtained based on the service identifier and method identifier input by the user.
[0054] In step 220, the target query metrics and query conditions for the target query metrics configured by the user based on the interface definition are obtained.
[0055] In step 230, in response to receiving a query request for the target query metric, a remote procedure call request stream is generated based on the service identifier, method identifier, target query metric, and query conditions of the target query metric.
[0056] In step 240, the remote procedure call request stream is sent to the remote procedure call server, i.e., the RPC server.
[0057] In step 250, the return value corresponding to the target query metric is obtained and returned from the remote procedure call response stream received from the RPC server.
[0058] As can be seen from this, in the remote procedure call method provided in the embodiments of this disclosure, the user only needs to configure the data and then directly select to initiate an indicator query request to automatically generate a remote procedure call request stream to realize remote procedure call without any code development work. This configuration method not only has a user-friendly experience and a low configuration error rate, but also greatly improves the efficiency of obtaining indicator data, meeting the needs of business users for rapid trial and error and agile iteration.
[0059] In some embodiments of this disclosure, step 210 involves configuring a data source. Specifically, the data source can be identified by a combination of service identifier and method identifier, including the definition of at least one input parameter and the definition of at least one output parameter extracted from the IDL. In a specific example, the input parameter definition may include the identifier, name, type, etc., of the data field corresponding to the input parameter; the output parameter definition may include the identifier, name, type, etc., of the data field corresponding to the output parameter.
[0060] In step 210 above, during the process of obtaining the interface definition of the target remote procedure call method based on the user-input service identifier and method identifier, the user-input service identifier and method identifier can be obtained first; then, the service identifier and method identifier are matched with the service identifier and method identifier corresponding to the remote procedure call methods registered in the RPC service management system 106 to determine the target remote procedure call method; finally, the interface definition language file corresponding to the target remote procedure call method is extracted as the interface definition. In embodiments of this disclosure, the interface definition may include: the definition of at least one input parameter and the definition of at least one output parameter of the target remote procedure call method. In some embodiments of this disclosure, the service identifier may be information such as a service name that can uniquely identify a remote procedure call service; the method identifier may also be information such as a method name that can uniquely identify a remote procedure call method.
[0061] As mentioned earlier, the service interface of the Remote Procedure Call (RPC) service is primarily defined through an IDL (Independent Definition Language). Therefore, each registered RPC method corresponds to an IDL file, which defines at least one input parameter and at least one output parameter involved in that RPC method. It can be understood that the IDL defines the input parameters and their attributes (including: identifier, name, type, and whether they are required, etc.). Furthermore, the IDL also defines the output parameters and their attributes (including: identifier, name, type, and whether they are required, etc.).
[0062] Specifically, in some embodiments of this disclosure, the terminal device 102 may display a data source configuration page, which includes input boxes prompting the user to enter a service identifier and a method identifier. Thus, after detecting that the user has entered a service identifier and a method identifier on the data source configuration page, the terminal device 102 can submit the entered service identifier and method identifier to the RPC call system 104. The RPC call system 104 can extract the IDL file of the target remote procedure call method matching the entered service identifier and method identifier from the RPC service management system 106 based on the entered service identifier and method identifier, and use the extracted IDL file as the aforementioned interface definition. Furthermore, the terminal device 102 and / or the RPC call system 104 can store the aforementioned service identifier, method identifier, and interface definition as metadata information of the data source. The metadata information of the data source can be stored using a separately defined data source identifier, or it can be stored using a combination of the service identifier and the method identifier.
[0063] After configuring the data source, in step 220 above, you can further configure the dataset, data labels, and target query metrics.
[0064] Specifically, configuring the aforementioned dataset can include: obtaining dataset input parameters selected by the user from at least one input parameter and dataset output parameters selected from at least one output parameter. That is, the configured dataset also corresponds to the definition of at least one input parameter and at least one output parameter. Furthermore, the user can further configure the attributes of the input and output parameters in the selected dataset. It can be seen that the aforementioned dataset can be a subset of the data source.
[0065] In some embodiments of this disclosure, the terminal device 102 may display a dataset configuration page, which shows the input and output parameters of the data source configured by the user. This allows the user to select or further configure the input and output parameters displayed on the dataset configuration page. After detecting the input and output parameters selected by the user on the dataset configuration page, the terminal device 102 can generate metadata information for the dataset, such as the dataset identifier, the definitions of the input and output parameters included in the dataset, and the identifier of the data source to which the dataset belongs. The terminal device 102 can then submit the metadata information of the dataset to the RPC call system 104 for storage.
[0066] By configuring the dataset described above, users can select the input and output parameters that their business is concerned with from the interface definition provided by the data source before performing specific metric queries. This greatly narrows down the data range for subsequent configuration and improves the efficiency of subsequent data configuration.
[0067] The configuration of the aforementioned data tags may include: obtaining data tags configured by the user based on dataset input parameters. As mentioned above, in the embodiments of this disclosure, the aforementioned data tags can be used to configure target query metrics. Specifically, each data tag may correspond to an input parameter in the configured dataset. In addition to selecting input parameters from the dataset, the configuration of the aforementioned data tags may also include further attribute configuration of the input parameters, such as setting default values for the input parameters, etc.
[0068] In some embodiments of this disclosure, a data tag configuration page can be displayed on the terminal device 102, showing the input parameters included in the user-configured dataset. This allows the user to select input parameters displayed on the data tag configuration page or perform further attribute configuration. After detecting the input parameters selected by the user on the data tag configuration page, the terminal device 102 can generate metadata information for the data tag, including, for example, the identifier of the data tag, the definition of the input parameters corresponding to the data tag, and the identifier of the dataset to which the data tag belongs. Furthermore, the terminal device 102 can submit the metadata information of the data tag to the RPC call system 104 for storage.
[0069] The configuration of the aforementioned target query metrics may include: obtaining the query conditions for the target query metrics configured by the user based on data tags, and obtaining the target query metrics configured by the user based on the dataset output parameters. As mentioned earlier, the aforementioned target query metrics may correspond to one output parameter, and the query conditions for the aforementioned target query metrics may correspond to one or more data tags and their corresponding input parameter values.
[0070] In some embodiments of this disclosure, the terminal device 102 may display a query indicator configuration page, which displays user-configured data tags and output parameters included in the configured dataset. This allows the user to select data tags displayed on the query indicator configuration page and set query conditions, i.e., set the input parameter values for the data fields corresponding to the data tags. Furthermore, the user can also select output parameters displayed on the query indicator configuration page to set a target query indicator. After detecting that the user has configured a target query indicator and its query conditions on the query indicator configuration page, the terminal device 102 can generate metadata information for the query indicator, including, for example, the identifier of the target query indicator, the definition and values of its corresponding input parameters, the definition of the corresponding output parameters, and the identifier of the dataset to which the target query indicator belongs. The terminal device 102 can then further submit the metadata information of the query indicator to the RPC call system 104 for storage.
[0071] Taking the establishment of a new information promotion strategy in an information promotion business system as an example, when the system wants to create a new information promotion strategy targeting customers whose most recent login time falls within a certain time range, it needs to configure the customer group, that is, the target query indicator is the identifier of the customer within the specific customer group. First, through research, it can determine the Remote Procedure Call Service identifier and Remote Procedure Call Method identifier that can be selected from the CDP platform for the specific customer group, thus configuring the data source. Then, from the configured data source, the most recent login time is selected as the input parameter, and the customer identifier is selected as the output parameter, thus configuring the dataset. Further, the data tag used to select the specific customer group, i.e., the most recent login time, is set from the input parameters of the dataset. Finally, when configuring the customer group, the target query indicator can be set as the customer identifier, and the query condition for the target query indicator can be set as the most recent login time (data tag) falling within a preset time range (input parameter value).
[0072] After the user has completed the configuration of the data source, dataset, data tags, and target query metric, in step 230 above, the user can choose to initiate a query request for the configured target query metric, for example, by clicking the metric query button on the metric query page. In this case, the terminal device 102 can submit the service identifier, method identifier, target query metric, and query conditions to the RPC call system 104. Alternatively, if the RPC call system 104 has already stored the metadata information of the data source, dataset, and query metric, the terminal device 102 can submit the identifier corresponding to the target query metric to the RPC call system 104. The RPC call system 104 then retrieves the service identifier, method identifier, target query metric, and query conditions from the stored query metric metadata information. The RPC call system 104 can then further generate a remote procedure call request stream based on the service identifier, method identifier, target query metric, and query conditions.
[0073] Specifically, in some embodiments of this disclosure, the specific process of generating a remote procedure call request stream based on the service identifier, method identifier, target query index, and query conditions of the target query index can be as follows: Figure 3 As shown, the specific steps may include the following.
[0074] In step 310, a message header is generated based on the service identifier and the method identifier.
[0075] In step 320, a data structure for a remote procedure call request is generated based on the target query metric and the query conditions of the target query metric.
[0076] In step 330, the data structure of the remote procedure call request is serialized to obtain the serialized data.
[0077] In step 340, a remote procedure call request stream is generated based on the message header and the serialized data.
[0078] Specifically, in some embodiments of this disclosure, the process of generating the message header in step 310 can refer to the process of generating the remote procedure call request message header, and will not be described in detail here.
[0079] Regarding step 320 above, in the embodiments of this disclosure, the data structure may include: a first data structure and a second data structure. The first data structure may be generated based on query conditions of the target query metric; the second data structure may be generated based on the target query metric.
[0080] Specifically, step 320 above may include the following steps.
[0081] First, input parameter mappings and output parameter mappings are generated based on the query conditions and the target query metric. Specifically, input parameter mappings can be generated based on the query conditions and output parameter mappings can be generated based on the target query metric.
[0082] As mentioned above, the query conditions for the target query metrics can include: the definition of input parameters and the input parameter values. In some embodiments, the definition of the input parameters can include: the identifier, name, type, etc., of the data field corresponding to the input parameter. That is, in the above steps, an input parameter mapping can be generated based on the identifier, name, type, and input parameter value of the data field corresponding to the input parameter. Specifically, the input parameter mapping can include one or more data mappings, where each data mapping can correspond to a data field.
[0083] Similarly, as mentioned earlier, the target query metric can correspond to the definition of output parameters. In some embodiments, the definition of the output parameters may include the identifier, name, type, etc., of the data field corresponding to the output parameter. That is, in the above steps, an output parameter mapping can be generated based on the identifier, name, and type of the data field corresponding to the output parameter. The output parameter mapping may also include one or more data mappings, where each data mapping may correspond to one data field.
[0084] Next, a first data structure is generated based on the input parameter mapping, and a second data structure is generated based on the output parameter mapping.
[0085] In the embodiments of this disclosure, in order to effectively serialize the input parameter mapping and the output parameter mapping, a first data structure for wrapping the input parameter mapping is predefined. Similarly, a second data structure for wrapping the output parameter mapping is also predefined.
[0086] Specifically, the first and second data structures described above are typically tree structures including a root node and at least one child node. The root node and child nodes in both structures can be collectively referred to as nodes and can have the same structure. In some specific examples, each node may include: an index field, a name field, a type field, a must field, and a children field. The index field identifies the processing order of the node during subsequent serialization; the name field identifies the name of the data field corresponding to the node; the type field represents the type of the data field; the must field indicates whether it is an optional data field; and the children field encapsulates the next level of data fields.
[0087] Based on the aforementioned first data structure, the specific steps of generating the first data structure based on the input parameter mapping can include: firstly, generating one or more first child nodes corresponding to the input parameter mapping; wherein each first child node corresponds to a data mapping in the input parameter mapping; and then using the one or more first child nodes corresponding to the input parameter mapping as child node fields to generate the root node of the first data structure of type structure at the upper level. In some specific examples, the index field of the root node can be set to a pre-defined first value (e.g., index=1); the name field of the root node can be set to request; the required field of the root node can be set to mandatory; and the type field of the root node can be set to structure type.
[0088] Based on the aforementioned second data structure, the specific steps of generating the second data structure based on the output parameter mapping can include: first, generating one or more second child nodes corresponding to the output parameter mapping; wherein each second child node corresponds to a data mapping in the output parameter mapping; and using the one or more second child nodes corresponding to the output parameter mapping as child node fields to generate the root node of the second data structure of type structure at the upper level. In some specific examples, the index field of the root node can be set to a pre-defined second value (e.g., index=0); the name field of the root node can be set to response; the required field of the root node can be set to mandatory; and the type field of the root node can be set to structure type.
[0089] Furthermore, regarding step 330 above, the process of serializing the data structure of the remote procedure call request can specifically include: serialization of the first data structure and serialization of the second data structure. The serialization processes for the first data structure and the second data structure are essentially the same.
[0090] Specifically, for the first data structure, the data of each node in the first data structure can be read recursively. The data of each node is then serialized based on the type of the input parameters corresponding to the read node and a pre-defined serialization rule. For example, first, the root node of the first data structure can be read, and its data can be serialized based on its structure type and a pre-defined serialization rule. Then, a child node is read in the order of its child nodes in its child node field, and its data is serialized based on its type and a pre-defined serialization rule. If the child node's type is a basic type, the next child node is read directly in the order of its parent node's child node field after serialization. If the child node's type is a structure type, it is recursively read in the order of its own child node field after serialization. This node reading and serialization process is repeated until all the data of all nodes in the entire first data structure has been serialized. The aforementioned pre-defined serialization rules define the node type and its corresponding serialization method, allowing the node data to be serialized directly based on the node type and serialization rules.
[0091] Similarly, the data of the nodes in the second data structure can be read recursively. The data of the read nodes is then serialized based on the type of the output parameters corresponding to the read nodes and pre-defined serialization rules. The serialization process for the second data structure can be referenced from the serialization process for the first data structure, and will not be repeated here.
[0092] It can be understood that serializing the first data structure and the second data structure will yield the serialized data. In other words, the serialized data described in step 330 can be composed of the serialized data from the first data structure and the serialized data from the second data structure.
[0093] In the embodiments of this disclosure, based on the aforementioned pre-defined serialization rules (following the adopted serialization protocol), the serialized data can be a binary stream or a format specified by other protocols. The embodiments of this disclosure do not limit the format of the serialized data.
[0094] Regarding step 340 above, the message header and serialized data can be concatenated based on the adopted remote procedure call protocol to obtain a remote procedure call request stream suitable for transmission over the network. In some embodiments, the message header may also include information such as an auto-incrementing sequence number and message type. The message type may be a call type.
[0095] Regarding step 240 above, after obtaining the remote procedure call request stream, the remote procedure call request stream can be sent to the RPC server.
[0096] Next, in the embodiments of this disclosure, after receiving the remote procedure call request stream from the RPC call system 104, the RPC server can first extract the message header and the serialized data from it.
[0097] Regarding the extracted message header, on the one hand, the message type in the message header can be read to determine the type of the currently received remote procedure call request stream; on the other hand, the sequence number can be extracted from the message header and cached to add the response sequence number to the returned remote procedure call response stream to identify the request corresponding to the remote procedure call response stream; and on the third hand, the service identifier and method identifier can be extracted from the message header to determine the specific service instance to be called.
[0098] For the serialized data, the RPC server will deserialize it based on pre-configured deserialization rules to obtain the result mapping, namely the input parameter mapping and output parameter mapping involved in the remote procedure call request. Finally, based on the input parameter mapping determined through the above process, the server calls the service instance to be invoked, thereby obtaining the parameter values of the output parameters from the metrics platform 110, which is the return value of the target query metric.
[0099] Furthermore, for the return value of the target query metric, the RPC server will use a method similar to step 230 above to generate a remote procedure call response stream based on the return value of the target query metric, and then return the generated remote procedure call response stream to the RPC call system 104.
[0100] Specifically, the remote procedure call response stream also includes two parts: a message header and serialized data. The message header may include the sequence number extracted from the message header of the remote procedure call request stream and cached therein. The serialized data is obtained by serializing the target query metric and its corresponding return value. The specific serialization method can also refer to the serialization process described in step 230 above.
[0101] After receiving the remote procedure call response stream returned by the RPC server, in step 250 above, the RPC call system 104 can also first extract the message header and serialized data from it.
[0102] Regarding the extracted message header, on the one hand, the message type in the message header can be read to determine if the currently received remote procedure call response stream is a response type; on the other hand, the sequence number can be extracted from the message header and compared with the sequence number carried in the remote procedure call request to ensure that the two are consistent. If it is determined that the message type is not a response type, a call exception message can be returned to the terminal device 102; if the extracted sequence number does not match the sequence number carried in the remote procedure call request, a sequence number exception message can be returned to the terminal device 102.
[0103] For the serialized data, the RPC call system 104 can deserialize the data based on pre-configured deserialization rules to determine the output parameter mapping involved in the remote procedure call response, thereby obtaining the return value of the target query metric. If the output parameter mapping is not obtained after deserialization, a parameter error message can be returned.
[0104] As can be seen from this, in the above remote procedure call method, users only need to configure the data source, dataset, data metrics, and target query metrics, and then directly select to initiate a metric query request to automatically generate a remote procedure call request stream to realize remote procedure call, without any code development work. This configuration method not only has a user-friendly experience and a low configuration error rate, but also greatly improves the efficiency of metric data acquisition, meeting the needs of business users for rapid trial and error and agile iteration.
[0105] Furthermore, the configuration of the aforementioned data sources, datasets, data metrics, and target query metrics is carried out in a hierarchical manner, and the relevant configuration information can also be stored as metadata information. This greatly facilitates users to reuse the data when querying other metrics, or to update and modify the target query metric configuration based on the current configuration, thereby better meeting the needs of business users for rapid trial and error and agile iteration.
[0106] Furthermore, in the embodiments of this disclosure, since the configuration information for data sources, datasets, data tags, and target query metrics can all be stored as metadata, when an IDL related to a data source is updated, and the user expects to synchronously update the existing configuration, the update of the aforementioned IDL can also be synchronized to the configuration of the aforementioned data source, dataset, data tags, or target query metrics. Specifically, the remote procedure call method described in the embodiments of this disclosure may further include, for example: Figure 4 The configuration update method is shown.
[0107] In step 410, in response to determining the metadata of the data source selected by the user for updating, the interface definition of the target remote procedure call method is re-acquired based on the service identifier and method identifier.
[0108] In the embodiments of this disclosure, the metadata update can be initiated by clicking the metadata update button on the data update page. At this time, the terminal device 102 will send a metadata update request to the RPC call system 104. Subsequently, the RPC call system 104 will re-obtain the interface definition of the target remote procedure call method based on the service identifier and method identifier. Specifically, the specific method for re-obtaining the interface definition of the target remote procedure call method based on the service identifier and method identifier can be referred to step 210 above, and will not be repeated here.
[0109] In step 420, metadata update details are generated based on the interface definition of the target remote procedure call method that has been reacquired and the interface definition of the target remote procedure call method in the metadata of the data source.
[0110] In embodiments of this disclosure, step 420 may include: first, comparing the interface definition of the target remote procedure call method that has been reacquired with the interface definition of the target remote procedure call method in the metadata information of the data source; in response to determining that there is no difference between the two, a message that the metadata has not been updated can be directly returned to the terminal device 102; and in response to determining that there is a difference between the two, metadata update details can be generated.
[0111] Specifically, the aforementioned generation of metadata update details may include: identifying the target input parameters and / or target output parameters that differ, and using the definitions of the target input parameters and / or target output parameters as parameter update information (e.g., it may include both the definitions before and after the update); determining the datasets, data tags, and / or target query metrics associated with the target input parameters and target output parameters based on the metadata information of the stored datasets, the metadata information of the data tags, and the metadata information of the query metrics, as associated configuration information; and generating metadata update details based on the aforementioned parameter update information and associated configuration information. In other words, the aforementioned metadata update details may include not only the definitions of the input parameters and / or output parameters involved in the update, but also the datasets, data tags, or query metrics and query conditions associated with the updated parameters, thereby facilitating the user's understanding of the configuration information involved in the update and determining whether a synchronous update is required.
[0112] In step 430, the metadata update details are fed back to the user.
[0113] In step 430 above, the RPC call system 104 can feed back the generated metadata update details to the user through the terminal device 102. Next, in response to determining that the user has chosen to update the configuration, the configuration of the data source can be updated according to the interface definition of the re-acquired target remote procedure call method. If the user chooses not to update the configuration, the process can end.
[0114] As can be seen, the above method can achieve synchronization between local configuration information and RPC server configuration information, thereby ensuring the effective implementation of remote procedure calls. Furthermore, during the synchronization process, metadata update details can be displayed to the user to assist them in determining whether to perform metadata synchronization updates, further enhancing the user experience.
[0115] Corresponding to the above-described remote procedure call method, some embodiments of this disclosure also disclose a remote procedure call apparatus. Figure 5 The internal structure of the remote procedure call apparatus described in some embodiments of this disclosure is shown. For example... Figure 5 The aforementioned remote procedure call device may include: The data source configuration module 510 is used to obtain the interface definition of the target remote procedure call method based on the service identifier and method identifier input by the user; The query metric configuration module 520 is used to obtain the target query metric and the query conditions of the target query metric as defined and configured by the user based on the interface. The remote procedure call request generation module 530 is used to generate a remote procedure call request stream based on the service identifier, method identifier, target query indicator, and query conditions of the target query indicator in response to a received query request for the target query indicator. Request sending module 540 is used to send the remote procedure call request stream to the RPC server; and The indicator extraction module 550 is used to obtain the return value corresponding to the target query indicator from the remote procedure call response stream received from the RPC server.
[0116] The specific implementation methods of each module in the aforementioned remote procedure call device can be referred to the foregoing embodiments, and will not be repeated here. Furthermore, it is understood that the aforementioned remote procedure call device can also achieve the technical effects of the aforementioned remote procedure call method to a certain extent, and will not be repeated here either.
[0117] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the remote procedure call method described in any of the above embodiments.
[0118] Figure 6 This embodiment illustrates a hardware structure diagram of a more specific electronic device, which may include a processor 2010, a memory 2020, an input / output interface 2030, a communication interface 2040, and a bus 2050. The processor 2010, memory 2020, input / output interface 2030, and communication interface 2040 are interconnected internally via the bus 2050.
[0119] The processor 2010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0120] The memory 2020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 2020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 2020 and is called and executed by the processor 2010.
[0121] The input / output interface 2030 is used to connect input / output devices to enable information input and output. These input / output devices can be configured as components within the device or externally connected to provide corresponding functions. Input devices may include microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0122] The communication interface 2040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0123] Bus 2050 includes a pathway for transmitting information between various components of the device, such as processor 2010, memory 2020, input / output interface 2030, and communication interface 2040.
[0124] It should be noted that although the above-described device only shows the processor 2010, memory 2020, input / output interface 2030, communication interface 2040, and bus 2050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0125] The electronic devices described above are used to implement the corresponding remote procedure call methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0126] Based on the same inventive concept, corresponding to any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute the remote procedure call method as described in any of the above embodiments.
[0127] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0128] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the remote procedure call method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0129] The embodiments of this disclosure also provide a computer program product, including computer program instructions, which, when executed on a computer, cause the computer to perform the remote procedure call method described above, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0130] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0131] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0132] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0133] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A remote procedure call method, comprising: The interface definition of the target remote procedure call method is obtained based on the service identifier and method identifier input by the user. Obtain the target query metrics configured by the user based on the interface definition, as well as the query conditions for the target query metrics; In response to receiving a query request for the target query metric, a remote procedure call request stream is generated based on the service identifier, the method identifier, the target query metric, and the query conditions of the target query metric; Send the remote procedure call request stream to the remote procedure call server; as well as The return value corresponding to the target query metric is obtained and returned from the remote procedure call response stream received from the remote procedure call server.
2. The method of claim 1, wherein, The interface definition for obtaining the target remote procedure call method based on the service identifier and method identifier input by the user includes: Obtain the service identifier and the method identifier input by the user; The service identifier and the method identifier are matched with the service identifier and method identifier corresponding to the registered remote procedure call method to determine the target remote procedure call method; and Extract the interface definition language file corresponding to the target remote procedure call method as the interface definition.
3. The method of claim 1, wherein, The interface definition includes: at least one input parameter and at least one output parameter of the target remote procedure call method; wherein, The step of obtaining the target query metric configured by the user based on the interface and the query conditions for the target query metric includes: Obtain the dataset input parameters selected by the user from the at least one input parameter and the dataset output parameters selected from the at least one output parameter; Obtain the data labels configured by the user based on the input parameters of the dataset; and Obtain the query conditions of the target query indicator configured by the user based on the data tag, and the target query indicator configured based on the output parameters of the dataset.
4. The method of claim 3, wherein, The process of generating a remote procedure call request stream based on the service identifier, the method identifier, the target query metric, and the query conditions of the target query metric includes: Generate a message header based on the service identifier and the method identifier; A data structure for a remote procedure call request is generated based on the target query metric and the query conditions of the target query metric; The data structure of the remote procedure call request is serialized to obtain serialized data; and The remote procedure call request stream is generated based on the message header and the serialized data.
5. The method according to claim 4, wherein, The data structure includes: a first data structure and a second data structure; wherein... The data structure for generating a remote procedure call request based on the target query metric and the query conditions of the target query metric includes: Based on the query conditions of the target query metric and the target query metric, an input parameter mapping and an output parameter mapping are generated; The first data structure is generated based on the input parameter mapping; wherein the first data structure is a tree structure including a root node and at least one first child node; each first child node corresponds to an input parameter in the input parameter mapping; and The second data structure is generated based on the output parameter mapping; wherein the second data structure is a tree structure including a root node and at least one second child node; wherein each second child node corresponds to an output parameter in the output parameter mapping.
6. The method according to claim 5, wherein, The step of generating the first data structure based on the input parameter mapping includes: One or more first child nodes corresponding to the input parameter mapping are generated based on the input parameter mapping; wherein each first child node corresponds to a data mapping in the input parameter mapping; and The root node of the first data structure of type struct is generated at the upper level using the one or more first child nodes as child node fields; and The step of generating the second data structure based on the output parameter mapping includes: One or more second child nodes corresponding to the output parameter mapping are generated based on the output parameter mapping; wherein each second child node corresponds to a data mapping in the output parameter mapping; and The root node of the second data structure of type structure is generated at the upper level by using the one or more second child nodes as child node fields.
7. The method according to claim 5, wherein, The serialization of the data structure of the remote procedure call request to obtain the serialized data includes: For the first data structure, the data of the nodes of the first data structure is read recursively and sequentially, and the data of the nodes of the first data structure is serialized based on the type of the input parameters corresponding to the nodes of the first data structure and the pre-defined serialization rules; and For the second data structure, the data of the nodes of the second data structure are read recursively in sequence, and the data of the nodes of the second data structure is serialized based on the type of the output parameters corresponding to the nodes of the second data structure and the pre-set serialization rules.
8. The method according to claim 1, wherein, The step of obtaining and returning the return value corresponding to the target query metric from the remote procedure call response stream received from the remote procedure call server includes: Extract the serialized data from the remote procedure call response stream; The serialized data in the remote procedure call response stream is deserialized to obtain a result mapping; and The return value corresponding to the target query metric is determined based on the result mapping.
9. The method of claim 1, further comprising: The service identifier, the method identifier, and the interface definition are stored as metadata of the data source. In response to determining that the user has chosen to update the metadata of the data source, the interface definition of the target remote procedure call method is re-acquired based on the service identifier and the method identifier; Metadata update details are generated based on the re-acquired interface definition of the target remote procedure call method and the interface definition of the target remote procedure call method in the metadata of the data source; as well as The updated metadata details will be fed back to the user.
10. A remote procedure call apparatus, comprising: The data source configuration module is used to obtain the interface definition of the target remote procedure call method based on the service identifier and method identifier input by the user; The query metric configuration module is used to obtain the target query metric and query conditions of the target query metric as defined and configured by the user based on the interface. The remote procedure call request generation module is used to generate a remote procedure call request stream based on the service identifier, the method identifier, the target query indicator, and the query conditions of the target query indicator in response to receiving a query request for the target query indicator. The request sending module is used to send the remote procedure call request stream to the remote procedure call server; as well as The indicator extraction module is used to obtain and return the return value corresponding to the target query indicator from the remote procedure call response stream received from the remote procedure call server.
11. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the remote procedure call method as described in any one of claims 1-9.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the remote procedure call method according to any one of claims 1-9.
13. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform the remote procedure call method as described in any one of claims 1-9.
