A method and device for personalizing extension of an RPC communication protocol header

By using a personalized extension method for RPC communication protocol headers, the problem of RPC protocol headers being unable to be customized according to transaction scenarios is solved, enabling flexible configuration of the protocol headers and efficient transmission of transaction links, thus meeting the needs of different transaction scenarios.

CN116436960BActive Publication Date: 2025-12-16CHINA CITIC BANK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310316355.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2025-12-16
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

The existing RPC communication protocol header has fixed fields, which cannot be customized according to the transaction scenario, thus failing to meet the needs of different transaction scenarios.

Method used

It provides a method for customizing and extending the RPC communication protocol header. By generating an RPC communication header field configuration interface, users can input the protocol header fields and verification rules, generate API packets and send them to the starting business system of the business scenario transaction link, receive and parse the API packets to generate downstream service call requests.

Benefits of technology

It enables personalized extensions of the RPC communication protocol header to meet the needs of different transaction scenarios, reduces the cost of identifying call chains and transaction scenarios, and improves communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116436960B_ABST
    Figure CN116436960B_ABST
Patent Text Reader

Abstract

The application relates to the field of computer application system communication and provides an RPC communication protocol header personalized extension method and device.The method comprises the following steps: a processing mechanism interface is called to generate an RPC communication header field configuration interface, wherein the processing mechanism interface comprises a general RPC protocol header field processing mechanism interface and a self-defined RPC protocol header field processing mechanism interface; an RPC protocol header field and a field check rule input by a user according to a business scenario and the RPC communication header field configuration interface are utilized; an API package is generated according to the RPC protocol header field and the field check rule input by the user, and the API package is sent to a starting business system of a business scenario transaction link.The application can be extended according to the needs of different transaction scenarios, and personalized processing rules can be formulated, so that the personalized use needs of a service end protocol header are met, and the problem that a certain transaction scenario cannot be processed individually is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer application system communication, and in particular, to a method and device for personalizing and extending an RPC communication protocol header. BACKGROUND

[0002] A communication protocol is the basis for communication between two network entities. Data is transmitted from one entity to another on a network in the form of a byte stream. A protocol is an agreed-upon syntax and semantics for communication between two parties, as well as a synchronous operation on communication.

[0003] There is an RPC communication protocol in the prior art. RPC stands for Remote Procedure Call, which allows a service caller to call a remote service as if it were a local method, and the calling process is completely transparent to the caller. In the prior art, the fields in the RPC communication protocol header are fixed and cannot be changed according to different transaction scenarios. Moreover, the check rules for the fields in the RPC communication protocol header are also fixed and cannot be changed according to different transaction scenarios. SUMMARY

[0004] The present application addresses the problem in the prior art that, when responding to a transaction request using an RPC communication protocol, only the public protocol header fields for all transaction scenarios can be processed, and the transaction scenarios cannot be personalized.

[0005] To solve the above technical problem, the present application provides, in one aspect, a method for personalizing and extending an RPC communication protocol header, which is applied to an RPC communication component on the server side and includes the following steps:

[0006] generating an RPC communication header field configuration interface using a processing mechanism interface, wherein the processing mechanism interface includes a general RPC protocol header field processing mechanism interface and a custom RPC protocol header field processing mechanism interface;

[0007] using RPC protocol header fields and field check rules input by a user according to a business scenario and the RPC communication header field configuration interface;

[0008] generating an API package according to the RPC protocol header fields and field check rules input by the user, and sending the API package to a starting business system in a business scenario transaction link.

[0009] As a further embodiment of the present application, the RPC communication header field configuration interface includes a general RPC protocol header field and field check rule configuration control, and a custom RPC protocol header field and field check rule configuration control.

[0010] The present application provides, in a second aspect, a method for personalizing and extending an RPC communication protocol header, which is applied to an RPC communication component on the starting business system side and includes the following steps:

[0011] Receiving the API package sent by the service end, and parsing the API package to obtain the RPC protocol header field and the field check rule of the business scenario;

[0012] Receiving the local service call request of the business scenario, generating a downstream service call request according to the local service call request, the RPC protocol header field and the field check rule, and sending the downstream service call request to the next business system of the business scenario transaction link.

[0013] As a further embodiment herein, generating a downstream service call request according to the local service call request, the RPC protocol header field and the field check rule comprises:

[0014] Assigning values to the RPC protocol header field according to the local service call request;

[0015] Checking the data after the assignment using the field check rule;

[0016] If the check result does not conform to the rule, a prompt message is issued, and if the check result conforms to the rule, the RPC protocol header field and the field check rule are assigned to the communication carrier object, and the downstream service call request is obtained from the assigned RPC protocol header field and the communication carrier object.

[0017] As a further embodiment herein, after checking the data after the assignment using the field check rule, it further comprises:

[0018] Rechecking the data after the assignment using the field general check rule, and if the rechecking result does not conform to the rule, a prompt message is issued, and if the rechecking result conforms to the rule, the step of generating a downstream service call request is executed.

[0019] The third aspect of the present application provides an RPC communication protocol header individualization extension device, which is applied to an RPC communication component on the service end side, and comprises:

[0020] An interface call unit for calling a processing mechanism interface to generate an RPC communication header field configuration interface, wherein the processing mechanism interface comprises a general RPC protocol header field processing mechanism interface and a self-defined RPC protocol header field processing mechanism interface;

[0021] A protocol header field and rule configuration unit for using the RPC protocol header field and the field check rule input by a user according to the business scenario and the RPC communication header field configuration interface;

[0022] A protocol header field and rule issuing unit for generating an API package according to the RPC protocol header field and the field check rule input by the user, and sending the API package to the starting business system of the business scenario transaction link.

[0023] The fourth aspect of the present application provides an RPC communication protocol header personalized extension device, which is applied to an RPC communication component on a starting business system side, and comprises:

[0024] An analysis unit is configured to receive an API package sent by a server, and analyze the API package to obtain an RPC protocol header field and a field verification rule of a business scenario;

[0025] A data generation unit is configured to receive a local service invocation request of the business scenario, generate a downstream service invocation request according to the local service invocation request, the RPC protocol header field and the field verification rule, and send the downstream service invocation request to a next business system on a business scenario transaction link.

[0026] The fifth aspect of the present application provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method of any one of the preceding embodiments when executing the computer program.

[0027] The sixth aspect of the present application provides a computer storage medium, which stores a computer program, and the computer program implements the method of any one of the preceding embodiments when executed by a processor of a computer device.

[0028] The seventh aspect of the present application provides a computer program product, which comprises a computer program, and the computer program implements the method of any one of the preceding embodiments when executed by a processor of a computer device.

[0029] The RPC communication protocol header personalized extension method and device provided in the present application can extend the RPC communication protocol header according to the requirements of different transaction scenarios, and formulate personalized processing rules, thereby meeting the personalized use requirements of the server protocol header and solving the problem that a transaction scenario cannot be processed individually. Meanwhile, under micro-service invocation, the system is split into more parts, and the transaction link is longer. In the present application, the API package generated by the RPC protocol header field and the field transaction rule is sent to the starting business system on the business scenario transaction link, and the RPC protocol header field and the field transaction rule are transmitted to other business systems in the transaction link by the starting business system, which can reduce the cost of identifying the invocation link and the transaction scenario.

[0030] In order to make the above and other objects, features and advantages of the present application more apparent and understandable, the following preferred embodiments are described in detail below, and the accompanying drawings are referred to, and the detailed description is as follows. BRIEF DESCRIPTION OF DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

[0032] Figure 1 A structural diagram of an RPC communication protocol header personalized extension system according to an embodiment of the present disclosure is shown.

[0033] Figure 2 An interaction diagram of a business system in a business scenario according to an embodiment of the present disclosure is shown.

[0034] Figure 3 A flowchart of an RPC communication protocol header personalized extension method applied to a service side according to an embodiment of the present disclosure is shown.

[0035] Figure 4 An interface schematic diagram of a processing mechanism according to an embodiment of the present disclosure is shown.

[0036] Figure 5 A flowchart of an RPC communication protocol header personalized extension method applied to a starting business system side according to an embodiment of the present disclosure is shown.

[0037] Figure 6 A structural diagram of an RPC communication protocol header personalized extension device of an RPC communication component applied to a service side according to an embodiment of the present disclosure is shown.

[0038] Figure 7 A structural diagram of an RPC communication protocol header personalized extension device of an RPC communication component applied to a starting business system side according to an embodiment of the present disclosure is shown.

[0039] Figure 8 A structural diagram of a computer device according to an embodiment of the present disclosure is shown.

[0040] Explanation of drawing symbols:

[0041] 110, first RPC communication component;

[0042] 120, second RPC communication component;

[0043] 130, third RPC communication component;

[0044] 401, general RPC protocol header field processing mechanism interface;

[0045] 402, custom RPC protocol header field processing mechanism interface;

[0046] 601, interface calling unit;

[0047] 602, protocol header field and rule configuration unit;

[0048] 603, protocol header field and rule issuing unit;

[0049] 701, analysis unit;

[0050] 702, data generation unit;

[0051] 802, computer device;

[0052] 804, processor;

[0053] 806, memory;

[0054] 808, drive mechanism;

[0055] 810, input / output module;

[0056] 812, input device;

[0057] 814, output device;

[0058] 816, presentation device;

[0059] 818, graphical user interface;

[0060] 820, network interface;

[0061] 822, communication link;

[0062] 824, communication bus. DETAILED DESCRIPTION

[0063] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0064] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting, unless the contrary is indicated. For example, the description and drawings merely prefer certain arrangements, embodiments and procedures, which can be susceptible to change without departing from the scope of the application as defined in the following claims. It is to be understood that the phraseology and terminology used herein is for the purpose of description and not of limitation, since the scope of the application will be limited only by the appended claims, wherein many alternatives are attended to achieving the several objects and advantages of the application. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting, since the scope of the application will be limited only by the appended claims.

[0065] The specification provides method operation steps as described in the embodiments or flow charts, but can include more or fewer operations than shown or described, and the order of the operations can be changed. The order in which the steps are listed in the embodiments is merely one way of executing the steps, and is not meant to be limiting.

[0066] It should be noted that the RPC communication protocol header personalization extension and the device can be used in the field with multiple transaction scenarios and each transaction scenario has a complex transaction link, for example, the field of bank transaction, and can also be used in any field meeting the needs other than the financial field, and the application field of the RPC communication protocol header personalization extension and the device is not limited herein.

[0067] In an embodiment, an RPC communication protocol header personalization extension system is provided, as shown in the figure, comprising: a first RPC communication component 110, a second RPC communication component 120 and a third RPC communication component 130. Figure 1 The first RPC communication component 110 is configured on the server, and is used for a configuration personnel to call the first RPC communication component 110 to complete the configuration of the RPC communication header field and the field verification rule.

[0068] The first RPC communication component 110 is configured on the server, and is used for a configuration personnel to call the first RPC communication component 110 to complete the configuration of the RPC communication header field and the field verification rule.

[0069] The second RPC communication component 120 is configured on the starting business system (which can be regarded as a consumer) of each business scenario transaction link, and is used for analyzing the API package issued by the first RPC communication component to obtain the RPC protocol header field and the field verification rule of the business scenario. When a local service call request for the business scenario is received, a downstream service call request is generated according to the local service call request, the RPC protocol header field and the field verification rule, and the downstream service call request is sent to the next business system of the business scenario transaction link.

[0070] The third RPC communication component 130 is configured in a non-starting business system of a business scenario transaction link, and is used for receiving a downstream service call request sent by an upstream business system, parsing the downstream service call request to obtain an RPC protocol header field and a field verification rule, generating a local downstream service call request according to the RPC protocol header field and the field verification rule, and sending the local downstream service call request to a next business system of the business scenario transaction link. After the third RPC communication component of the last business system receives the downstream service call request, the RPC protocol header field and the field verification rule are parsed to obtain a local response result by calling a local service, and an upstream service response result is generated according to the local response result, the RPC protocol header field and the field verification rule, and the upstream business system. After the upstream business system receives the upstream service response result, the local response result is obtained by calling the local service according to the response result in the upstream service response result, and the upstream service response result is generated according to the local response result, the RPC protocol header field and the field verification rule, and the upstream business system. The starting business system calls the local service according to the response result in the upstream service response result to obtain a local response result, and sends the local response result to the service caller.

[0071] The third RPC communication component can carry the RPC protocol header and the field verification rule to each system on the transaction link, and the non-starting business system in the transaction link does not need to introduce an API package to use the protocol header field, so that the other business systems on the transaction link are not aware, and the invasion of the business systems in the link and the communication cost between systems are reduced.

[0072] The first RPC communication component can enable the configuration personnel to complete the individual configuration of the RPC protocol header field and the verification rule according to the business scenario demand, and further improve the communication efficiency of each business scenario.

[0073] Taking a business scenario including two business systems as an example, as shown in FIG. 1, the first RPC communication component 110 is configured in the starting business system of the business scenario transaction link, and is used for receiving a service call request sent by a service caller, parsing the service call request to obtain an RPC protocol header field and a field verification rule, generating a local service call request according to the RPC protocol header field and the field verification rule, and sending the local service call request to the non-starting business system of the business scenario transaction link. Figure 2As shown, the RPC communication component in the starting business system A is configured to: receive the API package sent by the server and containing the RPC protocol header field and the field check rule; parse the API package to obtain the protocol header field and the field check rule; after receiving the local service call request, assign values to the RPC protocol header field according to the local service call request and check the values by using the field check rule, and after the check passes, assign the RPC protocol header field and the field check rule to the communication carrier object, so as to obtain the downstream service call request by using the assigned RPC protocol header field and the communication carrier object. In a specific implementation, the assigned RPC protocol header field is in a key-value form, in which the key represents the RPC protocol header field and the value represents the field assignment. The process of generating the downstream service call request includes: first, serializing the assigned RPC protocol header field and the communication carrier object into a binary file, and then passing the binary file in the form of a data stream to the downstream business system.

[0074] The RPC communication component in the business system B is configured to: receive the downstream service call request sent by the business system A, and perform deserialization processing on the received downstream service call request to obtain the assigned RPC protocol header field, the RPC protocol header field, and the field check rule; call the local service interface and input the assigned RPC protocol header field into the local service interface to obtain a service response result, and feed back the response result to the business system A, so that the business system A calls the local service according to the response result of the business system B to complete the response.

[0075] In an implementation, if the business system B still has a downstream business system, the downstream service call request sent by the business system A is parsed to obtain the assigned RPC protocol header field, the RPC protocol header field, and the field check rule; a local service call request is started; the RPC protocol header field is re-assigned by using the local service call request; the assigned data is checked by using the field check rule; and after the check passes, the RPC protocol header field and the field check rule are assigned to the communication carrier object, so as to obtain the downstream service call request by using the assigned RPC protocol header field and the communication carrier object.

[0076] In an embodiment of the present disclosure, an RPC communication protocol header individualization extension method is provided, which is applied to an RPC communication component on a server side, as shown in Figure 3 As shown, the method comprises the following steps:

[0077] In step 301, a processing mechanism interface is called to generate an RPC communication header field configuration interface.

[0078] As shown in the figure, the processing mechanism interface comprises a general RPC protocol header field processing mechanism interface 401 and a self-defined RPC protocol header field processing mechanism interface 402. Figure 4

[0079] ​The general RPC protocol header field processing mechanism interface 401 is configured to implement the configuration of general fields of the RPC protocol header and the configuration of general check rules of the fields, and the general fields include, for example, transaction serial number and timestamp, and the general check rules include, but are not limited to, mandatory check, format check, length check and transparent attribute.

[0080] The custom RPC protocol header field processing mechanism interface 402 is configured to implement the customization of RPC protocol header fields and check rules according to the requirements of business scenarios, for example, for the scenario of initiating a transaction by a device such as a financial machine or a smart counter, the personalized PRC protocol header fields required include terminal device type and device number field.

[0081] The RPC communication header field configuration interface includes: general RPC protocol header fields and field check rule configuration controls, custom RPC protocol header fields and field check rule configuration controls, and these controls can be used by a user to complete the configuration of protocol header fields and check rules. Specifically, the RPC protocol header field and field check rule configuration controls are configured to implement the configuration of general protocol headers and check rules, the custom RPC protocol header field configuration controls are configured to implement the configuration of custom RPC protocol header fields, and the custom RPC protocol header field check rule configuration controls are configured to rewrite the check method of the interface and implement the setting of custom check rules.

[0082] In some embodiments of the present application, the protocol header fields and check rules specific to a certain transaction scenario that need to be extended can also be configured through configuration files in formats such as xml and json.

[0083] In step 302, the RPC protocol header fields and field check rules input by a user according to a business scenario and the RPC communication header field configuration interface are utilized.

[0084] In step 303, an API package is generated according to the RPC protocol header fields and field check rules input by the user, and the API package is sent to a starting business system of a transaction link of a business scenario.

[0085] The present embodiment can be extended according to the requirements of different transaction scenarios and develop personalized processing rules, thereby meeting the personalized use requirements of the server protocol header and solving the problem of being unable to make personalized processing for a certain transaction scenario. Meanwhile, under micro-service calling, the system is split into more parts and the transaction link is longer, and in the present application, the API package generated by the RPC protocol header fields and field transaction rules is sent to the starting business system of the transaction link of the business scenario, and the RPC protocol header fields and field transaction rules are transmitted by the starting business system to other business systems in the transaction link, thereby reducing the cost of identifying the calling link and the transaction scenario.

[0086] An embodiment of the present application also provides an RPC communication protocol header personalized extension method, which is applied to an RPC communication component on a starting business system side, as shown in the following embodiment. Figure 5

[0087] In step 501, an API package sent by a service end is received, and an RPC protocol header field and a field check rule of a business scenario are obtained by parsing the API package.

[0088] In step 502, a local service call request of a business scenario is received, a downstream service call request is generated according to the local service call request, the RPC protocol header field and the field check rule, and the downstream service call request is sent to a next business system on a business scenario transaction link for processing.

[0089] Specifically, in this step, the downstream service call request is generated according to the local service call request, the RPC protocol header field and the field check rule, and includes the following steps.

[0090] In step 5021, the RPC protocol header field is valued according to the local service call request.

[0091] In step 5022, the valued data is checked by using the field check rule. If the checking result does not conform to the rule, step 5023 is performed, and if the checking result conforms to the rule, step 5024 is performed.

[0092] In step 5023, a prompt information is sent out.

[0093] In step 5024, the RPC protocol header field and the field check rule are valued in a communication carrier object, and a downstream service call request is obtained from the valued RPC protocol header field and the communication carrier object.

[0094] In a further embodiment, in order to reduce the error rate of field information, after the step 5022 of checking the valued data by using the field check rule, the step 5022 further includes the following steps.

[0095] The valued data is rechecked by using a field general check rule. If the rechecking result does not conform to the rule, step 5023 is performed, and if the rechecking result conforms to the rule, step 5024 is performed.

[0096] Based on the same inventive concept, the present application also provides an RPC communication protocol header personalized extension device applied to an RPC communication component on a service end side and an RPC communication component on a starting business system side, as described in the following embodiments. Since the RPC communication protocol header personalized extension device solves problems in the same principle as the RPC communication protocol header personalized extension method, the implementation of the RPC communication protocol header personalized extension device can be referred to the RPC communication protocol header personalized extension method, and the repeated parts will not be described here. ​

[0097] Specifically, as shown in Figure 6 The RPC communication protocol header personalization extension device applied to the RPC communication component on the server side includes:

[0098] The interface calling unit 601 is configured to call a processing mechanism interface to generate an RPC communication header field configuration interface, wherein the processing mechanism interface includes a general RPC protocol header field processing mechanism interface and a custom RPC protocol header field processing mechanism interface.

[0099] The protocol header field and rule configuration unit 602 is configured to input an RPC protocol header field and a field check rule according to a business scenario and an RPC communication header field configuration interface by a user.

[0100] The protocol header field and rule issuing unit 603 is configured to generate an API package according to the RPC protocol header field and the field check rule input by the user, and send the API package to a starting business system of a business scenario transaction link.

[0101] As shown in Figure 7 The RPC communication protocol header personalization extension device applied to the RPC communication component on the starting business system side includes:

[0102] The analysis unit 701 is configured to receive an API package sent by the server, and analyze the API package to obtain an RPC protocol header field and a field check rule of a business scenario.

[0103] The data generation unit 702 is configured to receive a local service calling request of the business scenario, generate a downstream service calling request according to the local service calling request, the RPC protocol header field and the field check rule, and send the downstream service calling request to a next business system processing of the business scenario transaction link.

[0104] In an embodiment of the present disclosure, a computer device is also provided, as shown in Figure 8As shown, computer device 802 can include one or more processors 804, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. Computer device 802 can also include any memory 806 for storing any kind of information, such as code, settings, data, etc. Without limitation, for example, memory 806 can include any one or combination of: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any memory can use any technology for storing information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of computer device 802. In one case, processor 804 implements the method described in any of the above embodiments when executing a computer program. In one case, computer device 802 performs any operation of the associated instructions when processor 804 executes the associated instructions stored in any memory or combination of memories. Computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical drive mechanism, etc.

[0105] Computer device 802 can also include an input / output module 810 (I / O) for receiving various inputs (via input device 812) and for providing various outputs (via output device 814). One particular output mechanism can include a presentation device 816 and associated graphical user interface 818 (GUI). In other embodiments, input / output module 810 (I / O), input device 812, and output device 814 can also not be included, just as a computer device in a network. Computer device 802 can also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the above-described components together.

[0106] Communication links 822 can be implemented in any manner, such as through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communication links 822 can include any combination of hardwired links, wireless links, routers, gateway functionality, name servers, etc., governed by any protocol or combination of protocols.

[0107] The embodiments herein also provide a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, performs the steps of the above method.

[0108] The embodiments herein also provide a computer readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to perform the method shown in any of the above embodiments.

[0109] It should be understood that the size of the sequence number of the above processes in various embodiments herein does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments herein.

[0110] It should also be understood that in the embodiments herein, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships. For example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are in an "or" relationship.

[0111] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this paper.

[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0113] In several embodiments provided herein, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displays or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can also be electrical, mechanical or other forms of connection.

[0114] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiments herein.

[0115] In addition, each functional unit in each embodiment herein can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0116] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions herein, essentially or in the form of a contribution to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment herein. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various other media that can store program codes.

[0117] The principles and implementation manners of the present application are described herein by using specific embodiments, and the above description of the embodiments is only used to help understand the method and its core idea; meanwhile, for those skilled in the art, according to the idea herein, the specific implementation manners and application ranges can be changed, and the above description of the specification should not be understood as a limitation of the present application.

Claims

1. A method for personalizing extension of a RPC communication protocol header, characterized in that, The method comprises the following steps: The server-side RPC communication component generates an RPC communication header field configuration interface by calling a processing mechanism interface, wherein the processing mechanism interface comprises a general RPC protocol header field processing mechanism interface and a custom RPC protocol header field processing mechanism interface; the RPC protocol header field and the field verification rule input by the user according to the business scenario and the RPC communication header field configuration interface are utilized; an API package is generated according to the RPC protocol header field and the field verification rule input by the user, and the API package is sent to a starting business system of a business scenario transaction link; The starting business system-side RPC communication component receives the API package sent by the server, parses the API package to obtain the RPC protocol header field and the field verification rule of the business scenario, receives a local service call request of the business scenario, generates a downstream service call request according to the local service call request, the RPC protocol header field and the field verification rule, and sends the downstream service call request to a next business system of the business scenario transaction link for processing. The method comprises the following steps: The RPC protocol header field is assigned according to the local service call request; The assigned data is verified by using the field verification rule; If the verification result does not conform to the rule, a prompt information is sent, and if the verification result conforms to the rule, the RPC protocol header field and the field verification rule are assigned to a communication carrier object, and the downstream service call request is obtained from the assigned RPC protocol header field and the communication carrier object.

2. The method of claim 1, wherein, The RPC communication header field configuration interface comprises general RPC protocol header field and field verification rule configuration controls and custom RPC protocol header field and field verification rule configuration controls.

3. The method of claim 1, wherein, After the assigned data is verified by using the field verification rule, the following step is further included: The assigned data is reverified by using a general field verification rule, if the reverified result does not conform to the rule, a prompt information is sent, and if the reverified result conforms to the rule, the step of generating the downstream service call request is executed.

4. A device for personalizing extension of a RPC communication protocol header, characterized in that, The method comprises the following steps: The server-side RPC communication component and the starting business system-side RPC communication component are included. The server-side RPC communication component comprises the following steps: An interface calling unit is configured to call a processing mechanism interface to generate an RPC communication header field configuration interface, wherein the processing mechanism interface comprises a general RPC protocol header field processing mechanism interface and a custom RPC protocol header field processing mechanism interface; A protocol header field and rule configuration unit is configured to utilize the RPC protocol header field and the field verification rule input by the user according to the business scenario and the RPC communication header field configuration interface; A protocol header field and rule issuing unit is configured to generate an API package according to the RPC protocol header field and the field verification rule input by the user, and send the API package to a starting business system of a business scenario transaction link; The starting business system-side RPC communication component comprises the following steps: An analysis unit is configured to receive an API package sent by a server, and analyze the API package to obtain an RPC protocol header field and a field check rule of a business scenario; A data generation unit is configured to receive a local service call request of the business scenario, generate a downstream service call request according to the local service call request, the RPC protocol header field and the field check rule, and send the downstream service call request to a next business system of a business scenario transaction link for processing. The generation of the downstream service call request according to the local service call request, the RPC protocol header field and the field check rule comprises: The RPC protocol header field is assigned according to the local service call request; The assigned data is checked by using the field check rule; If the check result does not conform to the rule, a prompt information is sent, and if the check result conforms to the rule, the RPC protocol header field and the field check rule are assigned to a communication carrier object, and the downstream service call request is obtained from the assigned RPC protocol header field and the communication carrier object.

5. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method in any one of claims 1 to 3.

6. A computer storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor of the computer device to implement the method in any one of claims 1 to 3.

7. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor of the computer device to implement the method in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method, reading method, device and electronic equipment for extending Thrift protocol

    CN107800707A