A context information transmission method and device based on RPC and a computer device
By determining and generating the current node context information within the RPC framework, the problems of low efficiency and insufficient security in existing technologies are solved, and independent lifecycle management and secure transmission of context information are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2026-03-31
AI Technical Summary
Existing context information passing methods based on RPC frameworks are inefficient in complex scenarios, cannot meet the requirements of automatic invalidation and clearing of multiple transactions and data security, and cannot manage context information at different lifecycles.
By receiving the context information of the previous node of the current node, determining its validity, generating the context information of the current node, and passing it to the next node in sequence, and adding state attributes to achieve independent lifecycle management, the information transmission is ensured to meet business requirements.
It achieves independent lifecycle management of context information, ensuring that information transmission meets actual production requirements, solving transmission needs in complex scenarios, and preventing information leakage.
Smart Images

Figure CN116319931B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the field of financial technology, and in particular to a method, device, and computer equipment for transmitting context information based on RPC. Background Technology
[0002] Currently, context information passing based on the RPC framework mainly enables simple sharing of transaction-level information between the client and server. Context information is simply transmitted from the client to the server via message communication, and is passed through by copying the context.
[0003] In existing technologies, context information passing based on RPC frameworks typically involves the application system receiving the context information manually clearing or passing it, which is time-consuming and inefficient. While RPC frameworks can generally handle transaction-level or globally valid context information, they do not adequately support complex scenarios with multiple user requirements. For example, they cannot meet the needs of automatic expiration and clearing after multiple transactions, or the need for automatic expiration and clearing of data when passing it to a specific system to ensure data security. They also cannot meet the requirements for context information passing or manage data with different lifecycles within the context information. Summary of the Invention
[0004] To address the problem that the existing technologies cannot meet the complex context passing requirements, this embodiment provides a context information passing method, apparatus, and computer device based on RPC.
[0005] According to one aspect of the embodiments herein, the method is applied to any node in an RPC framework, the method comprising: receiving prior node context information transmitted by the previous node of the current node; determining the validity of the prior node context information in the current node according to rules in the prior node context information; generating current node context information based on the information of the current node and the validity of the prior node context information; sending the current node context information to the next node; and sequentially executing the context information transmission method on each node until the last node in the RPC has received the context information sent by the previous node.
[0006] According to one aspect of the embodiments herein, determining the validity of the prior node context information in the current node based on the rules in the prior node context information includes: parsing the rules to obtain information validity rules in the prior node context information; determining whether the link metadata of the current node satisfies the information validity rules, wherein the link metadata includes a link sequence number and a system code; if yes, determining that the prior node context information is valid in the current node; if no, determining that the prior node context information is invalid in the current node.
[0007] According to one aspect of the embodiments herein, generating current node context information based on the validity of the current node information and the prior node context information includes: if the prior node context information is invalid in the current node, removing the information of the corresponding prior node from the prior node context information, and generating the current node context information by combining the current node information; if the prior node context information is valid in the current node, using the current node information and the prior node context information as the current node context information.
[0008] According to one aspect of the embodiments herein, using the information of the current node and the context information of the preceding node as the current node context information includes: copying and saving the context information of the preceding node to the context information carrier of the current node; saving the information of the current node to the context information carrier; and combining the context information of the preceding node and the information of the current node in the context information carrier to obtain the current node context information.
[0009] According to one aspect of the embodiments herein, the step of determining the information of the current node includes: determining the data to be transmitted and the information transmission rules of the current node based on the information production requirements corresponding to the current node; determining the information validity rules of the current node based on the information transmission rules and the link metadata to which the current node belongs; and determining the information of the current node based on the information validity rules of the current node and the data to be transmitted by the current node.
[0010] According to one aspect of the embodiments herein, if the current node is the starting node, then the context information of the prior node is empty, and the information of the current node is used as the context information of the current node.
[0011] This embodiment also provides an RPC-based context information transmission device, the device comprising: a receiving unit for receiving prior node context information transmitted by the previous node of the current node; a validity determination unit for determining the validity of the prior node context information in the current node according to the rules in the prior node context information; a current node context information determination unit for generating current node context information based on the information of the current node and the validity of the prior node context information; a sending unit for sending the current node context information to the next node; and a looping unit for sequentially executing the context information transmission method on each node until the last node in the RPC has received the context information sent by the previous node.
[0012] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the RPC-based context information passing method.
[0013] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the RPC-based context information passing method.
[0014] This embodiment also provides a computer program product, which includes a computer program that, when executed by a processor, implements the RPC-based context information passing method.
[0015] This solution adds state attributes to context information during context information transmission, enabling independent lifecycle management of context information and transferring control over the lifecycle of context information. This ensures that the ownership and control of context information are not separated, and that context information can be independently managed without interference. This better meets actual production requirements and can effectively solve the context information transmission needs in complex scenarios. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments or prior art described herein, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this article. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 The figure shown is a flowchart of a context information passing method based on RPC according to an embodiment of this paper;
[0018] Figure 2 The diagram shown is a flowchart of a method for determining the context information of a prior node according to an embodiment of this paper.
[0019] Figure 3 The diagram shown is a flowchart of a method for generating current node context information according to an embodiment of this paper;
[0020] Figure 4 The diagram shown is a flowchart of a method for determining the context information of the current node according to an embodiment of this paper;
[0021] Figure 5 The diagram shown is a flowchart of a method for determining the information of the current node according to an embodiment of this paper;
[0022] Figure 6 The diagram shown is a schematic representation of a context information transmission device based on RPC according to an embodiment of this paper.
[0023] Figure 7 The diagram shown is a schematic representation of a node context information processing method according to an embodiment of this paper.
[0024] Figure 8 The diagram shown is a structural schematic of a computer device according to an embodiment of this article.
[0025] Explanation of symbols in the attached drawings:
[0026] 601. Receiving Unit;
[0027] 602. Validity Judgment Unit;
[0028] 603. Current Node Context Information Determination Unit;
[0029] 604. Transmitting Unit;
[0030] 605. Cyclic Unit;
[0031] 802. Computer equipment;
[0032] 804, Processor;
[0033] 806. Memory;
[0034] 808. Drive mechanism;
[0035] 810. Input / Output Module;
[0036] 812. Input devices;
[0037] 814. Output devices;
[0038] 816. Presentation equipment;
[0039] 818. Graphical User Interface;
[0040] 820. Network interface;
[0041] 822. Communication link;
[0042] 824. Communication bus. Detailed Implementation
[0043] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments herein will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments herein, and not all of the embodiments. Based on the embodiments herein, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this document.
[0044] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings herein are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0045] This specification provides the operational steps of the methods described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel.
[0046] It should be noted that the RPC-based context information passing method in this paper can be used in the fintech field as well as other fields. This paper does not limit the application areas of the RPC-based context information passing method and device.
[0047] Figure 1 The diagram shown is a flowchart of a context information passing method based on RPC, as described in this embodiment. This method is applied to any node in an RPC framework and specifically includes the following steps:
[0048] Step 101: Receive the context information of the preceding nodes from the previous node of the current node. In this step, the current node is the message receiver, and the previous node is the message sender. The preceding nodes are all nodes preceding the current node, including but not limited to: the previous node and other nodes preceding the previous node. The context information of the preceding nodes passed from the previous node to the current node includes, but is not limited to, information about the previous node and information about other nodes preceding the previous node; this information is collectively referred to as the context information of the preceding nodes.
[0049] In this step, based on the specific content contained in the messages passed by each of the preceding nodes, it can be determined whether to pass the message of that node to the current node.
[0050] Step 102: Determine the validity of the prior node context information in the current node based on the rules in the prior node context information. In this step, each node in the prior nodes has control over information transmission. Each node may have specified corresponding information transmission rules in its context information to control whether its information can be transmitted to the current node. For example, the previous node of the current node may specify that its information can be transmitted to the current node, while the previous node's previous node may specify that its information cannot be transmitted to the current node. Therefore, it can be determined that the information of the previous node of the current node is valid in the current node, and the information of the previous node's previous node is invalid in the current node.
[0051] In this application, the validity of the transmission of control information of each preceding node to subsequent nodes in the link can ensure the security of data transmission according to business requirements.
[0052] Step 103: Generate current node context information based on the information of the current node and the validity of the prior node context information. In this step, the current node itself will generate its own information according to business requirements. If the prior node context information is valid on the current node, the current node context information is generated based on the current node's information and the prior node context information; if the prior node context information is invalid on the current node, the current node's information is directly used as the current node context information.
[0053] Step 104: Send the current node context information to the next node. In this step, the current node acts as the sender of information, sending the information to the next node, which is the receiver of the information.
[0054] Step 105: Execute the context information passing method sequentially for each node until the last node in the RPC has received the context information sent by the previous node. All nodes in the RPC framework execute the context information passing method described in the preceding steps until the information is passed to the last node in the RPC framework. Once it is confirmed that the last node has received the context information sent by the previous node, the context information passing stops.
[0055] Figure 2 The diagram shown is a flowchart of a method for determining the context information of a prior node according to an embodiment of this paper, which specifically includes the following steps:
[0056] Step 201: Parse the rules to obtain the information validity rules in the context information of preceding nodes. In this step, the current node parses the context information of preceding nodes passed by the previous node. The context information of preceding nodes includes a context information name, context information data, and context passing rules. After parsing the context information of preceding nodes, the current node obtains the context passing rules and then derives the information validity rules based on these rules. The context information of preceding nodes may include one or more information validity rules from different preceding nodes. When there are multiple information validity rules from different preceding nodes, the current node needs to judge them one by one or in parallel.
[0057] Step 202: Determine whether the link metadata of the current node satisfies the information validity rules. The link metadata includes the link sequence number and system code. The system sequence number is an Arabic numeral such as 2, 3, or 4, and the system code includes data such as the node name.
[0058] In this step, the preceding nodes of the current node pre-determine the information validity rules based on the link metadata, and the current node determines whether the link metadata of the current node meets the information validity rules.
[0059] For example, the previous node of the current node sets the information validity rule as: syscode == 'usercenter'? false:true, meaning that when the system code is "User Center", the context information of the previous node is invalid. If the system code of the current node is "Unified Login Platform" instead of "User Center", then the current node can determine that its link metadata satisfies the information validity rule. As another example, the validity rule set by the previous node is: x>2? false:true, where x represents the link sequence number parameter. If the link sequence number of the current node is greater than 2, then this information is invalid on the current node.
[0060] In some embodiments of this specification, information validity rules may also be represented by information validity flag bits.
[0061] Step 203: If yes, determine that the context information of the preceding node is valid in the current node. If the current node satisfies the information validity rule, then the current node can save the context information of the preceding node and use it for subsequent information transmission.
[0062] Step 204: If not, determine that the context information of the preceding node is invalid in the current node. If the current node does not satisfy the information validity rule, then the current node cannot pass the invalid context information from the preceding node to the next node. Whether the current node can save the invalid context information from the preceding node to the current node can be determined according to the provisions of the information validity rule.
[0063] Figure 3 The diagram shown is a flowchart of a method for generating current node context information according to an embodiment of this paper, which specifically includes the following steps:
[0064] Step 301: If the prior node context information is invalid in the current node, remove the information of the corresponding prior node from the prior node context information, and combine it with the information of the current node to generate the current node context information. In this step, if it has been determined that the information of some nodes in the prior node context information is invalid in the current node, then delete the information of these nodes from the prior node context information, and then combine it with the information of the current node to form the current node context information.
[0065] Step 302: If the prior node context information is valid in the current node, use the information of the current node and the prior node context information as the current node context information. In this step, determining that the prior node context information is valid in the current node means that all prior node information in the prior node context information is valid in the current node; therefore, use the prior node context information and the information of the current node as the current node context information.
[0066] Figure 4 The diagram shown is a flowchart of a method for determining the context information of the current node according to an embodiment of this paper, which specifically includes the following steps:
[0067] Step 401: Copy and save the context information of the preceding node to the context information carrier of the current node. This step is performed by the current node. Figure 7 As shown in the diagram, "Link Node 2" is the current node, "Link Node 1" is the previous node, and "Link Node 3" is the next node. The current node "Link Node 2" determines that the context information (all or part of the information data) of the previous node "Link Node 1" is valid on Link Node 2. If so, Link Node 2 performs a valid data copy or clone of the context information transmitted by Link Node 1 and saves it to the new context carrier generated by Link Node 2.
[0068] Step 402: Save the information of the current node to the context information carrier. For example... Figure 7 As shown, the current node "Link Node 2" receives context information from the previous node while also generating its own information. Therefore, Link Node 2 saves its generated local node information to the context information carrier.
[0069] Step 403: Combine the prior node context information and the current node information in the context information carrier to obtain the current node context information. In some embodiments of this specification, the context information carrier currently stores both prior node context information and current node information; combining these two types of information determines the current node context information.
[0070] In other embodiments of this specification, the following application scenarios are used as examples for illustration:
[0071] The application system -> unified login platform -> user center -> content management platform, where the application system needs to provide user avatar maintenance functionality. Specifically, the application system, as the starting node in this chain, requests avatar content information from the content management platform. During the call to the content management platform, it's crucial to ensure the accuracy of the user information provided by the application system. Therefore, user information needs to be verified by the unified login platform and the user center, but it doesn't need to be disclosed to the content management platform. The content management platform doesn't need user-related information, only the unique file ID information generated by the user center. However, the user ID information and user authorization token need to pass through the unified login platform and the user center. Therefore, when organizing context information, the application system establishes the following validity rule: information becomes invalid after passing through the user center to avoid leakage of permission information.
[0072] In some embodiments of this specification, the application system first needs to access the unified login platform to obtain a user authorization token. The user authorization token and user ID information are then used as context information, combined with the request body information in the form of a binary stream of the avatar file and information validity rules, to form sender context information, which is then used to request the user center. For example, the information validity rule is: syscode == 'usercenter'? false: true, indicating that this context information is invalid when the system encoding is 'usercenter'.
[0073] The unified login platform's system code is sso, and its link sequence number is 2. If the unified login platform successfully verifies the user ID, it enters the user center, whose system code is usercenter, and link sequence number is 3. After receiving the context information sent by the unified login platform, the user center confirms that the context information content is an avatar modification operation. The user center verifies the validity of the context information, combines it with the information of its own node, and sends it to the content management platform. Specifically, after the user center sends the context information, it verifies its validity. If the system code is determined to be usercenter, the token information and user ID information will be identified as invalid. When accessing the content management platform, this context information will not be copied to the sender's context information in the user center.
[0074] Figure 5 The diagram shown is a flowchart of a method for determining the information of the current node according to an embodiment of this paper, which specifically includes the following steps:
[0075] Step 501: Based on the information production requirements corresponding to the current node, determine the data to be transmitted and the information transmission rules for the current node. In some embodiments of this specification, all nodes in the RPC framework can have corresponding information production requirements. Based on the information production requirements, each node determines its own information transmission rules and the data to be transmitted. In this step, the information transmission rules can be: information transmission becomes invalid after link sequence number 4, or information transmission becomes invalid after reaching the user center. This application does not limit the form of the information transmission rules.
[0076] Step 502: Determine the information validity rules for the current node based on the information transmission rules and the metadata of the link to which the current node belongs. In this step, the information validity rules for the current node can be determined based on the link sequence number and system code to which the current node belongs. Specifically, by combining the link sequence number, system code, and information transmission rules of the current node, specific information validity rule fields are determined, forming a data format that can be recognized and parsed by each node in the RPC link.
[0077] Step 503: Determine the information of the current node based on the information validity rules of the current node and the data to be transmitted by the current node. In this specification, the information of the current node can have the same form and format as the context information. Because the context information includes context data, context name, and context rules, the information of the current node can include information validity rules, the data to be transmitted by the current node, and further, the name of the data to be transmitted by the current node.
[0078] Figure 6 The diagram shown is a schematic representation of an RPC-based context information passing device according to an embodiment of this paper. The basic structure of the RPC-based context information passing device is illustrated in this diagram. The functional units and modules can be implemented in software, or using general-purpose chips or specific chips to achieve RPC-based context information passing. The device specifically includes:
[0079] The receiving unit 601 is used to receive the context information of the previous node transmitted by the previous node of the current node;
[0080] The validity determination unit 602 is used to determine the validity of the prior node context information in the current node according to the rules in the prior node context information;
[0081] The current node context information determination unit 603 is used to generate current node context information based on the information of the current node and the validity of the context information of the prior node;
[0082] Sending unit 604 is used to send the current node context information to the next node;
[0083] The loop unit 605 is used to sequentially execute the context information passing method on each node until the last node in the RPC has received the context information sent by the previous node.
[0084] This solution adds state attributes to context information during context information transmission, enabling independent lifecycle management of context information and transferring control over the lifecycle of context information. This ensures that the ownership and control of context information are not separated, and that context information can be independently managed without interference. This better meets actual production requirements and can effectively solve the context information transmission needs in complex scenarios.
[0085] Figure 7 The diagram illustrates a method for processing inter-node context information according to an embodiment of this paper. Three link nodes are shown: Link Node 1, Link Node 2, and Link Node 3. Link Node 1 gathers information from previous nodes to form the context information of the node preceding the current node. Link Node 1 uses this context information as the sender context and transmits it to the link node (Link Node 2 is considered the current node in this diagram). The current node, Link Node 2, as the receiver, receives the context information from Link Node 1, performs a validity check, clones valid data, and combines it with its own information to generate its own context information. This context information is then transmitted to Link Node 3 as the sender context. Link Node 3, as the current node's receiver, receives the context information from Link Node 2 and uses it as its receiver context information.
[0086] like Figure 8The illustration shows a computer device provided in an embodiment of this document, which can execute the RPC-based context information passing method described herein. The computer device 802 may 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. The computer device 802 may also include any memory 806 for storing information of any kind, such as code, settings, data, etc. Without limitation, for example, the memory 806 may include any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes associated instructions stored in any memory or combination of memories, the computer device 802 can perform any operation of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as hard disk drive mechanisms, optical disk drive mechanisms, etc.
[0087] Computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input device 812) and providing various outputs (via output device 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), input device 812, and output device 814 may be omitted, and the device may function solely as a computer device within a network. Computer device 802 may 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 components described above together.
[0088] Communication link 822 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. Communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0089] Corresponding to Figures 1 to 5 In addition to the methods described above, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the above-described methods.
[0090] This embodiment also provides a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to perform the following: Figures 1 to 5 The method shown.
[0091] This embodiment also provides a computer program product, which includes a computer program that is executed by a processor, such as... Figures 1 to 5 The method shown.
[0092] It should be understood that in the various embodiments of this document, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0093] It should also be understood that, in the embodiments herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0094] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those 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 document.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0096] In the embodiments provided herein, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described herein, depending on actual needs.
[0098] Furthermore, the functional units in the various embodiments of this document can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0099] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this paper, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this paper. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0100] This document uses specific embodiments to illustrate the principles and implementation methods of this document. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this document. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this document. Therefore, the content of this specification should not be construed as a limitation of this document.
Claims
1. A method for passing context information based on RPC, characterized in that, The method is applied to any node in an RPC framework, and the method comprises: receiving previous node context information transmitted by a previous node of a current node; judging validity of the previous node context information at the current node according to a rule in the previous node context information, wherein the previous node context information comprises information of the previous node and information of other nodes before the previous node; the rule in the previous node context information is an information transmission rule defined in the context information of the previous node, and is used to control whether the information of the previous node can be transmitted to the current node; generating current node context information according to information of the current node and the validity of the previous node context information; transmitting the current node context information to a next node; sequentially performing the context information transmission method on each node until the last node in the RPC has received the context information transmitted by the previous node.
2. The RPC-based context information transfer method according to claim 1, characterized in that, The judging validity of the previous node context information at the current node according to the rule in the previous node context information comprises: parsing the rule to obtain an information validity rule in the previous node context information; determining whether link metadata of the current node satisfies the information validity rule, wherein the link metadata comprises a link serial number and a system code; if yes, determining that the previous node context information is valid at the current node; if no, determining that the previous node context information is invalid at the current node.
3. The RPC-based context information transfer method according to claim 2, characterized in that, The generating current node context information according to information of the current node and the validity of the previous node context information comprises: if the previous node context information is invalid at the current node, removing information of the corresponding previous node from the previous node context information, and combining the information of the current node to generate the current node context information; if the previous node context information is valid at the current node, taking the information of the current node and the previous node context information as the current node context information.
4. The RPC-based context information transfer method according to claim 3, characterized in that, The taking the information of the current node and the previous node context information as the current node context information comprises: copying and saving the previous node context information to a context information carrier of the current node; saving the information of the current node to the context information carrier; combining the previous node context information in the context information carrier and the information of the current node to obtain the current node context information.
5. The RPC-based context information transfer method of claim 1, wherein, The determining step of the information of the current node comprises: determining data to be transmitted and an information transmission rule of the current node according to an information production requirement corresponding to the current node; determining an information validity rule of the current node according to the information transmission rule and link metadata to which the current node belongs; determining the information of the current node according to the information validity rule of the current node and the data to be transmitted by the current node.
6. The RPC-based context information transfer method according to claim 1, wherein, If the current node is a starting node, the previous node context information is empty, and the information of the current node is taken as the context information of the current node.
7. A context information transmission device based on RPC, characterized in that, The device comprises: a receiving unit configured to receive previous node context information transmitted by a previous node of a current node; An effectiveness judging unit is configured to judge effectiveness of the previous node context information at the current node according to a rule in the previous node context information; A current node context information determining unit is configured to generate current node context information according to information of the current node and effectiveness of the previous node context information, wherein the previous node context information comprises information of a previous node and information of other nodes before the previous node; the rule in the previous node context information is an information transmission rule defined in context information of the previous node, and is used to control whether information of the previous node can be transmitted to the current node; A sending unit is configured to send the current node context information to a next node; A loop unit is configured to sequentially execute the context information transmission method for each node until context information sent by a previous node is received by a last node in the RPC.
8. 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 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 6.
10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Data transmission method, device and system based on node information
CN114422422A
SESSION Management METHOD AND SYSTEM FOR CHEKING BEARER-IDENTIFIER VALIDITY BETWEEN PCRF AND PCEF
KR1020120098058A