Route decision gateway neutrality verification method, device and medium
Patent Information
- Application Number
- CN202611163413.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-03
AI Technical Summary
[0004]鉴于以上内容,有必要提供一种路由决策网关中立性验证方法、设备及介质,旨在解决无法对路由决策网关的中立性进行有效验证的问题
[0009]As can be seen from the above technical solutions, this invention is applied to independent services integrated into existing gateways in the form of sidecars, which can decouple from existing gateway services; it generates decision credentials for each routing decision based on decision factors, enabling structured storage of the complete decision context; based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain nodes, and gateway service providers for storage, which can meet the control needs of each party for core data while ensuring data security; anti-tampering verification is performed based on the decision credentials stored by the enterprise and blockchain nodes, algorithm replay verification is performed based on the decision credentials stored by the enterprise, and statistical bias testing is performed based on the decision credentials within a preset time window stored by the enterprise, which can form a complete neutrality proof chain, thereby turning neutrality from a promise into mathematical provability, effectively ensuring the integrity of credentials, the authenticity of the algorithm, and the fairness of the decision.
Smart Images

Figure CN122661175B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, device and medium for verifying the neutrality of a routing decision gateway. Background Technology
[0002] Currently, one of the core demands of enterprises when choosing third-party LLM (Large Language Model) routing gateways (such as large model enterprise gateways) is that the gateway should maintain commercial neutrality towards each model vendor, that is, routing decisions should be based entirely on technical indicators (such as quality, cost, latency, etc.) rather than being influenced by the commercial interests of model vendors (such as exclusivity agreements, etc.).
[0003] However, existing LLM routing gateway products still have the following fundamental shortcomings in terms of neutrality guarantees: (1) Existing neutrality guarantees remain at the level of commercial commitments and service terms, lacking technically verifiable means; (2) Enterprise users cannot independently verify whether the gateway's routing decisions are influenced by external business factors; (3) Management agencies and third-party verification agencies lack the tools to technically verify the routing decision-making process; (4) The routing decision log can be modified or deleted unilaterally by the gateway service provider and does not have anti-tampering capabilities. Summary of the Invention
[0004] In view of the above, it is necessary to provide a method, device and medium for verifying the neutrality of a routing decision gateway, in order to solve the problem of the inability to effectively verify the neutrality of a routing decision gateway.
[0005] A method for verifying the neutrality of a routing decision gateway, applied to an independent service integrated into an existing gateway as a sidecar, the method comprising: Decision elements are recorded synchronously upon completion of each routing decision, and decision credentials for each routing decision are generated based on the decision elements. Based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain node, and gateway service provider for storage. In response to the neutrality verification command of the routing decision gateway, tamper-proof verification is performed based on the decision credentials stored by the enterprise and the blockchain node; When the result of the anti-tampering verification is that it has not been tampered with, the algorithm replay verification is performed based on the decision credentials stored by the enterprise. When the result of the algorithm replay verification is that the decision is consistent, a statistical bias test is performed based on the decision vouchers stored by the enterprise within a preset time window. When the result of the statistical bias test is no significant bias, the neutrality verification is passed.
[0006] A routing decision gateway neutrality verification device operates as an independent service integrated into an existing gateway in the form of a sidecar. The routing decision gateway neutrality verification device includes: The generation unit is used to synchronously record decision elements when each routing decision is completed, and generate decision credentials for each routing decision based on the decision elements; The distribution unit is used to distribute the decision credentials for each routing decision in parallel to the enterprise, blockchain node, and gateway service provider for storage based on a three-party anti-tampering strategy. The verification unit is used to perform tamper-proof verification based on the decision credentials stored by the enterprise and the blockchain node in response to the neutrality verification command of the routing decision gateway. The verification unit is used to perform algorithm replay verification based on the decision credentials stored by the enterprise when the result of the anti-tampering verification is that the data has not been tampered with. The verification unit is used to perform a statistical bias test based on the decision vouchers stored by the enterprise within a preset time window when the result of the algorithm replay verification is consistent with the decision. A determining unit is used to determine whether the neutrality verification is passed when the result of the statistical bias test is no significant bias.
[0007] A computer device, the computer device comprising: A memory for storing at least one instruction; and a processor for executing the instructions stored in the memory to implement the routing decision gateway neutrality verification method.
[0008] A computer-readable storage medium storing at least one instruction, which is executed by a processor in a computer device to implement the routing decision gateway neutrality verification method.
[0009] As can be seen from the above technical solutions, this invention is applied to independent services integrated into existing gateways in the form of sidecars, which can decouple from existing gateway services; it generates decision credentials for each routing decision based on decision factors, enabling structured storage of the complete decision context; based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain nodes, and gateway service providers for storage, which can meet the control needs of each party for core data while ensuring data security; anti-tampering verification is performed based on the decision credentials stored by the enterprise and blockchain nodes, algorithm replay verification is performed based on the decision credentials stored by the enterprise, and statistical bias testing is performed based on the decision credentials within a preset time window stored by the enterprise, which can form a complete neutrality proof chain, thereby turning neutrality from a promise into mathematical provability, effectively ensuring the integrity of credentials, the authenticity of the algorithm, and the fairness of the decision. Attached Figure Description
[0010] Figure 1 This is a flowchart of a preferred embodiment of the routing decision gateway neutrality verification method of the present invention; Figure 2 This is a functional block diagram of a preferred embodiment of the routing decision gateway neutrality verification device of the present invention; Figure 3 This is a schematic diagram of the structure of a computer device that implements a preferred embodiment of the routing decision gateway neutrality verification method of the present invention. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0012] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of the routing decision gateway neutrality verification method of the present invention. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0013] The routing decision gateway neutrality verification method is applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0014] The computer device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), interactive network television (IPTV), smart wearable device, etc.
[0015] The computer equipment may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0016] The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0017] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0018] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0019] The network in which the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).
[0020] The routing decision gateway neutrality verification method described in this embodiment is applied to an independent service integrated into an existing gateway in the form of a sidecar.
[0021] Of course, it can also be deployed as an embedded module of the routing decision gateway.
[0022] This standalone service or embedded module can also interface with an enterprise's existing compliance, management, and logging systems.
[0023] In this method, the functional units corresponding to each step of the routing decision gateway neutrality verification method are decoupled from each other and can be independently expanded horizontally. They are asynchronously integrated with the main routing decision link, thus having a small impact on routing performance.
[0024] Specifically, the routing decision gateway neutrality verification method includes: S10, synchronously record the decision elements when each routing decision is completed, and generate the decision credentials for each routing decision based on the decision elements.
[0025] The routing decisions of existing routing gateways are untraceable and non-replayable. Specifically, existing routing gateways typically only record which model was ultimately selected, but the record of the complete decision context (including candidate models, the metrics of each model at that time, algorithm version, weight snapshot, and decision rationale) is missing or incomplete. This means that even if the verifier obtains the logs, they cannot go back to the moment of decision to replay the decision process, and therefore cannot verify whether the decision is compliant.
[0026] Therefore, this embodiment records the complete decision-making elements.
[0027] Specifically, the step of synchronously recording decision elements upon completion of each routing decision includes: For each routing decision, the original request text of that routing decision is obtained, and the original request text is processed by a digest algorithm to obtain a request semantic digest; Obtain the version identifier and code hash value of the decision algorithm for the current routing decision, and obtain the model selection association information for the current routing decision; By combining the request semantic summary, the decision algorithm version identifier, the code hash value, and the model selection association information, the decision elements for the current routing decision are obtained.
[0028] The summarization algorithm can process the original request text using a semantic fingerprint based on the embedding vector or a fixed-length feature hash to preserve semantic representativeness (such as preserving the low-dimensional projection of the embedding vector or semantic category labels) while removing identity and sensitive details. This protects data privacy while preserving sufficient semantic representativeness and supports algorithm replay (validity is established as long as the same summary replay can reproduce the same decision result).
[0029] The decision algorithm version identifier can be the semantic version number corresponding to the algorithm, such as v3.2.1.
[0030] The code hash value can be the code hash of an online algorithm implementation using the SHA-256 (Secure Hash Algorithm 256-bit) algorithm.
[0031] The model selection association information may include, but is not limited to, one or more of the following combinations of information: (1) Candidate model list and measured values of indicators: IDs of all candidate models considered in this decision, cost value, quality score, delay score and final joint score of each model at the decision time; (2) Weight configuration snapshot: The weight vector used in decision-making and its source; (3) Final selection of model and reasons for decision: including the algorithm's interpretable output (such as score ranking, decisive indicators, etc.) of why the final selected model is chosen.
[0032] The above embodiments are used to record the complete decision elements of the routing decision gateway's routing decision process.
[0033] The decision context contains the request text, which is a core data asset of the enterprise, but complete verification requires that all decision elements be fully verifiable. Therefore, how to protect the privacy of the original request without compromising the effectiveness of verification is an engineering contradiction between data privacy and verification transparency that must be resolved.
[0034] Therefore, this embodiment generates decision credentials that can both protect data privacy and support the verification of transparency.
[0035] Specifically, generating the decision credentials for each routing decision based on the decision elements includes: For each routing decision, the fields are assembled according to the decision elements of the current routing decision, based on the preset field structure, to obtain the decision credential for the current routing decision; The decision credential includes a credential hash, which is obtained by aggregating all decision elements of the current routing decision using a Merkle tree. The decision credential also includes a gateway signature, which is obtained by digitally signing the concatenation feature of the credential hash and the credential generation timestamp using the gateway private key. The decision credential fields also include the decision payload obtained after structuring based on the complete context of the decision element, as well as the code hash value and the decision credential identifier.
[0036] For example, the decision credentials for each routing decision may include, but are not limited to: (1) Decision voucher identifier: A globally unique ID for the voucher; (2) Voucher hash: The Merkle tree root hash of all decision elements (such as SHA-256), any change in elements will result in a change in hash; (3) Voucher generation timestamp: such as using ISO8601 (International Organization for Standardization 8601, International Organization for Standardization 8601 Date and Time Representation Standard) + monotonic clock; (4) Gateway signature: The gateway private key is used to sign the concatenation result of the credential hash and the credential generation timestamp using RSA-2048 (Rivest-Shamir-Adleman 2048-bit asymmetric encryption algorithm) or ECDSA (Elliptic Curve Digital Signature Algorithm). (5) Code hash value: The hash of the source code or compilation artifact of the routing algorithm deployed at the decision-making moment; (6) Decision payload: that is, the complete decision context, which can be JSON (JavaScript Object Notation) structured data of decision elements.
[0037] Decision vouchers record all elements of the decision-making process, enabling the verifier to fully reconstruct the decision-making process, explain why this model was chosen instead of another, and make the decision context complete and traceable.
[0038] In the above embodiments, the request text in the generated decision credentials is processed by semantic digest (preserving embedding features but removing identity and sensitive details) to protect data privacy. At the same time, the digest retains sufficient semantic representativeness to support algorithm replay. As long as the same digest reproduces the same decision, the validity of the verification can be established. This balance achieves a balance between request privacy and verification transparency, making this embodiment applicable to scenarios involving sensitive data.
[0039] S11, based on a three-party anti-tampering strategy, distributes the decision credentials for each routing decision in parallel to the enterprise, blockchain node, and gateway service provider for storage.
[0040] Currently, decision logs are typically held and managed unilaterally by the gateway service provider, which poses the following risks of tampering: (1) Service providers may modify or delete specific decision records after the fact to cover up biased behavior; (2) The algorithm version can be replaced without leaving a trace; (3) Even if the logs contain verification such as hashes, the verification values themselves are controlled by the service provider and lack a third-party trust anchor.
[0041] The above approach results in the decision log being unilaterally tamperable.
[0042] Therefore, this embodiment requires the storage of multi-party decision credentials to prevent decision data from being tampered with.
[0043] Specifically, the method of distributing the decision credentials for each routing decision in parallel to the enterprise, blockchain node, and gateway service provider for storage based on a three-party anti-tampering strategy includes: Write the complete decision credentials for each routing decision to the enterprise's local log; and Write the credential hash of each routing decision to the blockchain node; and The decision credentials for each routing decision are aggregated and statistically analyzed to obtain an aggregated statistical version, which is then stored in the gateway service provider.
[0044] For example, complete decision credentials can be written into the enterprise's private cloud log system, giving the enterprise complete control. At the same time, the credential hash can be written into the blockchain node of the enterprise's chosen consortium blockchain or a trusted institution, thereby obtaining an immutable write timestamp and anti-counterfeiting anchor. Meanwhile, the aggregated statistical version can be written into the gateway service provider's storage system, which is convenient for the gateway service provider to analyze and display the SLA (Service Level Agreement).
[0045] The aggregated statistical version can be a de-sensitized sensitive field, and retains the version after model selection and indicator summary data.
[0046] In the above embodiments, the complete version of the decision credential (including all elements and signature) is written into the enterprise's private cloud log system, which is completely under the enterprise's control. The gateway service provider only retains the aggregated statistical version, and the blockchain is only anchored to the credential hash (excluding sensitive content). This data autonomy can meet the enterprise's control needs for core data and realize enterprise-level data autonomy.
[0047] Furthermore, the blockchain anchoring mechanism ensures that historical decision records cannot be unilaterally modified or deleted by the gateway service provider. Any modification to the decision credentials will be immediately detected by the verified party due to hash mismatch, achieving non-repudiation protection against tampering. This non-repudiation is a fundamental requirement for enterprise-level compliance verification.
[0048] Enterprises with high compliance requirements (such as financial and healthcare companies) typically need to provide independent verification materials to regulatory authorities to prove the compliance of their AI systems when adopting LLM (Large Language Model) gateways. However, existing gateway products do not provide standardized query interfaces, verification tools, and replay capabilities for third-party verification agencies. This prevents enterprises from completing compliance verification on their own and forces them to rely on the cooperation of gateway service providers, resulting in a lack of third-party verification capabilities.
[0049] Furthermore, the commercial neutrality claims currently made by LLM routing gateway products almost entirely remain at the level of textual commitments such as terms of service and privacy guidelines, lacking any technically verifiable means, thus facing a non-technical dilemma in upholding neutrality. From the perspective of enterprise users, this commercially committed neutrality faces the following three unverifiable challenges: (1) Gateway service providers may have undisclosed commercial ties with certain model manufacturers; (2) The gateway algorithm may be replaced at runtime with a version that favors certain models without the enterprise's knowledge; (3) Even if the gateway declares a routing algorithm, it cannot prove that the declared algorithm is actually executed during operation.
[0050] In view of the above problems, this embodiment performs the following triple verification in sequence: anti-tampering verification, algorithm replay verification, and statistical bias test in S12-S14.
[0051] S12, in response to the neutrality verification command of the routing decision gateway, performs tamper-proof verification based on the decision credentials stored by the enterprise and the blockchain node.
[0052] In this embodiment, the routing decision gateway neutrality verification command can be triggered by the verification party.
[0053] In this embodiment, the tamper-proof verification based on the decision credentials stored by the enterprise and the blockchain node includes: Obtain any decision credential to be verified from the enterprise and calculate the credential hash of the arbitrary decision credential to be verified as the verification hash; Obtain the credential hash corresponding to any decision credential to be verified from the blockchain node as the base hash; Compare the hash to be verified with the baseline hash; When the hash to be verified is the same as the base hash, the result of the anti-tampering verification is determined to be untampered; or When the hash to be verified is different from the base hash, the result of the anti-tampering verification is determined to be tampered with.
[0054] Among them, a unified credential verification API (Application Programming Interface) can be called to perform tamper-proof verification.
[0055] When it is determined that the result of the anti-tampering verification has been tampered with, an alarm can be directly issued to all relevant parties.
[0056] The above embodiments can detect whether decision credentials have been tampered with and verify the integrity of the credentials.
[0057] S13, when the result of the anti-tampering verification is that it has not been tampered with, the algorithm replay verification is performed based on the decision credentials stored by the enterprise.
[0058] In this embodiment, the algorithm replay verification based on the decision credentials stored by the enterprise includes: For each decision credential, obtain the code hash value in the decision credential; The matching algorithm code is loaded from a public algorithm repository based on the code hash value. The matching algorithm code is rerun using the decision elements corresponding to the decision credentials to obtain the replay decision model; Obtain the final selected model from the decision credentials; When the replay decision model is the same as the finally selected model, the result of the algorithm replay verification is determined to be consistent with the decision; or When the replay decision model is different from the final selected model, the result of the algorithm replay verification is determined to be inconsistent decision.
[0059] Among them, a unified replay decision API can be called to perform algorithm replay verification.
[0060] When the result of the algorithm replay verification is determined to be inconsistent decision-making, an alarm can be directly issued to all relevant parties.
[0061] In the above embodiments, the algorithm code can be tampered with by detecting decision consistency, thereby verifying the authenticity of the algorithm.
[0062] In this embodiment, before loading the matching algorithm code from a public algorithm repository based on the code hash value, the method further includes: For each routing decision, the hash value of the algorithm code used in that routing decision process and the generated timestamp increment are published to the public algorithm repository; Specifically, when an algorithm change event occurs, a change announcement is made, and the hash value and generation timestamp of the changed algorithm code are published to the public algorithm repository.
[0063] The verifier can verify the code hash value of the running gateway at any time, thereby ensuring that the algorithm deployed has not been replaced at runtime.
[0064] The above embodiments make it technically impossible for non-compliant behaviors such as runtime algorithm replacement to be implemented, thereby improving algorithm transparency.
[0065] S14, when the result of the algorithm replay verification is that the decision is consistent, a statistical bias test is performed based on the decision vouchers stored by the enterprise within a preset time window.
[0066] In addition to the neutral demands of enterprise users, model vendors also have reverse demands. If a gateway is suspected of systematically and unfairly allocating traffic (such as some models not receiving the required number of requests for a long time), there are currently no technical means to make an objective judgment, and model vendors find it difficult to prove the bias of the gateway.
[0067] Therefore, in this embodiment, the statistical bias test based on the decision vouchers stored by the enterprise within a preset time window includes: The actual selection frequency of each candidate model participating in the routing decision is calculated based on the decision credentials stored by the enterprise within a preset time window; Read the measured values of indicators and weight configuration snapshots of each candidate model recorded through the model selection association information from the decision vouchers stored by the enterprise within a preset time window; Based on the measured values of the indicators and the snapshot of the weight configuration for each candidate model, calculate the theoretical selection frequency of each candidate model; The bias index is calculated based on the actual selection frequency and the theoretical selection frequency of each candidate model. When the bias index is less than or equal to a preset threshold, the result of the statistical bias test is determined to be without significant bias; or When the bias index is greater than the preset threshold, the result of the statistical bias test is determined to be a significant bias.
[0068] Among them, the actual selection frequency of each candidate model can be obtained by directly calculating the proportion of the number of times each candidate model is selected to the total number of decisions based on the decision vouchers stored by the enterprise within a preset time window (such as 500,000 decision vouchers within 90 days).
[0069] Among them, the measured values of the indicators of each candidate model can be weighted and scored based on the weight configuration snapshot, and then the theoretical selection frequency distribution of each model can be obtained by normalization, that is, the theoretical selection frequency of each candidate model.
[0070] The bias index can be calculated using the chi-square test or the Kullback-Leibler Divergence (KL divergence).
[0071] The preset threshold can be configured according to the needs of the scenario.
[0072] Among these features, a unified statistical test API can be used to perform statistical bias tests.
[0073] When the statistical bias test result is determined to be significantly biased, an alert can be directly issued to all relevant parties.
[0074] In the above embodiments, the fairness of the decision-making process can be verified. If a model vendor suspects that a gateway system is unfairly allocating traffic (e.g., some models are not receiving the required amount of requests for a long time), a statistical bias test can be used to objectively determine this. This two-way neutral mechanism enables this embodiment to gain the trust of all parties in the LLM ecosystem, forming a foundation for win-win cooperation.
[0075] This embodiment forms a complete neutrality proof chain by executing the anti-tampering verification, algorithm replay verification, and statistical bias test in S12-S14, thus systematizing the verification process. Furthermore, this embodiment provides standardized RESTful (Representational State Transfer) or GraphQL (Graph Query Language) verification APIs, allowing different verification agencies, management departments, and internal audit teams to complete verification using a unified interface. This standardization enables the ecosystem of third-party verification tools to develop around this embodiment, further enhancing credibility and achieving standardized verification APIs and ecosystem friendliness.
[0076] S15, when the result of the statistical bias test is no significant bias, the neutrality verification is passed.
[0077] This embodiment constructs a trusted verification system through decision credentials, encrypted signatures, blockchain anchoring, and a unified verification API. It completely transforms the neutrality of the routing gateway from a commercial commitment into a system attribute that can be technically proven, independently verified, and statistically tested. This upgrades neutrality from a commitment to a technical proof, fundamentally eliminating enterprises' concerns about commercial interference.
[0078] This embodiment can also provide technical verification materials (including relevant data of the entire verification process) that can be submitted to management agencies for industries that require key management, such as finance and healthcare. This meets the compliance requirements of these industries for traceable, replayable, and auditable AI system decisions, enabling enterprises to securely adopt third-party LLM gateway services in managed scenarios. This significantly improves enterprise customers' willingness to purchase and renewal rates. In the competitive LLM gateway market, technically verifiable neutrality verification is a decisive advantage in winning over major industry customers.
[0079] Furthermore, when faced with compliance inquiries from verification agencies, due diligence from clients, or audits from industry self-regulatory organizations, companies can directly present complete decision-making documents and audit verification reports, upgrading from verbal defenses of neutrality to mathematically verifiable objective proof.
[0080] For example, when faced with competing products from different manufacturers, this embodiment can be used to demonstrate the fairness of the decision-making process to customers, thereby increasing trust.
[0081] As can be seen from the above technical solutions, this invention is applied to independent services integrated into existing gateways in the form of sidecars, which can decouple from existing gateway services; it generates decision credentials for each routing decision based on decision factors, enabling structured storage of the complete decision context; based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain nodes, and gateway service providers for storage, which can meet the control needs of each party for core data while ensuring data security; anti-tampering verification is performed based on the decision credentials stored by the enterprise and blockchain nodes, algorithm replay verification is performed based on the decision credentials stored by the enterprise, and statistical bias testing is performed based on the decision credentials within a preset time window stored by the enterprise, which can form a complete neutrality proof chain, thereby turning neutrality from a promise into mathematical provability, effectively ensuring the integrity of credentials, the authenticity of the algorithm, and the fairness of the decision.
[0082] like Figure 2 The diagram shown is a functional block diagram of a preferred embodiment of the routing decision gateway neutrality verification device of the present invention. The routing decision gateway neutrality verification device 11 operates as an independent service integrated into an existing gateway in the form of a sidecar, and includes a generation unit 110, a distribution unit 111, a verification unit 112, a validation unit 113, a verification unit 114, and a determination unit 115. The module / unit referred to in this invention refers to a series of computer program segments that can be executed by a processor and perform a fixed function, and are stored in memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0083] The generation unit 110 is used to synchronously record decision elements when each routing decision is completed, and generate decision credentials for each routing decision based on the decision elements. The distribution unit 111 is used to distribute the decision credentials of each routing decision to the enterprise, blockchain node and gateway service provider for storage in parallel based on the three-party anti-tampering strategy. The verification unit 112 is used to perform anti-tamper verification based on the decision credentials stored by the enterprise and the blockchain node in response to the neutrality verification command of the routing decision gateway. The verification unit 113 is used to perform algorithm replay verification based on the decision credentials stored by the enterprise when the result of the anti-tampering verification is that it has not been tampered with. The verification unit 114 is used to perform a statistical bias test based on the decision vouchers stored by the enterprise within a preset time window when the result of the algorithm replay verification is decision consistency. The determining unit 115 is used to determine that the neutrality verification has been passed when the result of the statistical bias test is no significant bias.
[0084] As can be seen from the above technical solutions, this invention is applied to independent services integrated into existing gateways in the form of sidecars, which can decouple from existing gateway services; it generates decision credentials for each routing decision based on decision factors, enabling structured storage of the complete decision context; based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain nodes, and gateway service providers for storage, which can meet the control needs of each party for core data while ensuring data security; anti-tampering verification is performed based on the decision credentials stored by the enterprise and blockchain nodes, algorithm replay verification is performed based on the decision credentials stored by the enterprise, and statistical bias testing is performed based on the decision credentials within a preset time window stored by the enterprise, which can form a complete neutrality proof chain, thereby turning neutrality from a promise into mathematical provability, effectively ensuring the integrity of credentials, the authenticity of the algorithm, and the fairness of the decision.
[0085] like Figure 3 The diagram shown is a structural schematic of a computer device that implements a preferred embodiment of the routing decision gateway neutrality verification method of the present invention.
[0086] The computer device 1 may include a memory 12, a processor 13, and a bus (the arrow in the figure represents the bus), and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a routing decision gateway neutrality verification program.
[0087] Those skilled in the art will understand that the schematic diagram is merely an example of computer device 1 and does not constitute a limitation on computer device 1. Computer device 1 can be either a bus topology or a star topology. Computer device 1 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, computer device 1 may also include input / output devices, network access devices, etc.
[0088] It should be noted that the computer device 1 described is merely an example. Other existing or future electronic products that are adaptable to this invention should also be included within the scope of protection of this invention and are incorporated herein by reference.
[0089] The memory 12 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a portable hard drive of the computer device 1. In other embodiments, the memory 12 can be an external storage device of the computer device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 1. Furthermore, the memory 12 can include both internal and external storage units of the computer device 1. The memory 12 can be used not only to store application software and various types of data installed on the computer device 1, such as the code of the routing decision gateway neutrality verification program, but also to temporarily store data that has been output or will be output.
[0090] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the computer device 1, connecting various components of the computer device 1 via various interfaces and lines. It executes programs or modules stored in the memory 12 (e.g., executing routing decision gateway neutrality verification programs), and calls data stored in the memory 12 to perform various functions of the computer device 1 and process data.
[0091] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes these applications to implement the steps in the various routing decision gateway neutrality verification method embodiments described above, for example... Figure 1 The steps are shown.
[0092] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, which describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a generation unit 110, a distribution unit 111, a verification unit 112, a validation unit 113, a checking unit 114, and a determination unit 115.
[0093] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the routing decision gateway neutrality verification method described in various embodiments of the present invention.
[0094] If the modules / units integrated in the computer device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.
[0095] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.
[0096] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.
[0097] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0098] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 3 The bus is represented by only one straight line, but this does not mean that there is only one bus or one type of bus. The bus is configured to enable communication between the memory 12 and at least one processor 13, etc.
[0099] Although not shown, the computer device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 13 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0100] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish a communication connection between the computer device 1 and other computer devices.
[0101] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the computer device 1 and to display a visual user interface.
[0102] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0103] It will be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0104] Combination Figure 1 The memory 12 in the computer device 1 stores multiple instructions to implement a routing decision gateway neutrality verification method, and the processor 13 can execute the multiple instructions to achieve: Decision elements are recorded synchronously upon completion of each routing decision, and decision credentials for each routing decision are generated based on the decision elements. Based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain node, and gateway service provider for storage. In response to the neutrality verification command of the routing decision gateway, tamper-proof verification is performed based on the decision credentials stored by the enterprise and the blockchain node; When the result of the anti-tampering verification is that it has not been tampered with, the algorithm replay verification is performed based on the decision credentials stored by the enterprise. When the result of the algorithm replay verification is that the decision is consistent, a statistical bias test is performed based on the decision vouchers stored by the enterprise within a preset time window. When the result of the statistical bias test is no significant bias, the neutrality verification is passed.
[0105] Specifically, the processor 13's implementation method for the above instructions can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0106] It should be noted that all the data involved in this case was legally obtained.
[0107] If any AI models, software tools, or components not belonging to this company appear in the embodiments of this invention, they are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this invention has been obtained by an entity authorized (with the knowledge and consent) or fully authorized by all parties through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0108] In the several embodiments provided by this invention, 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 modules is only a logical functional division, and other division methods may be used in actual implementation.
[0109] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0110] The modules described as separate components may or may not be physically separate. The components shown as modules 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 modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0111] Furthermore, the functional modules in the various embodiments of the present invention 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 in the form of hardware plus software functional modules.
[0112] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0113] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0114] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this invention can also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for verifying gateway neutrality in routing decisions for large language models, characterized in that, The large language model routing decision gateway neutrality verification method, applied to standalone services integrated into existing gateways as sidecars, includes: Decision elements are recorded synchronously upon completion of each routing decision, and decision credentials for each routing decision are generated based on the decision elements. Based on a three-party anti-tampering strategy, the decision credentials for each routing decision are distributed in parallel to the enterprise, blockchain node, and gateway service provider for storage. In response to the neutrality verification command of the large language model routing decision gateway, anti-tampering verification is performed based on the decision credentials stored by the enterprise and the blockchain node; When the result of the anti-tampering verification is that it has not been tampered with, the algorithm replay verification is performed based on the decision credentials stored by the enterprise. When the algorithm replay verification result is consistent with the decision, a statistical bias test is performed based on the decision vouchers stored by the enterprise within a preset time window. This includes: calculating the actual selection frequency of each candidate model participating in the routing decision based on the decision vouchers stored by the enterprise within the preset time window; reading the measured values of the indicators and weight configuration snapshots of each candidate model recorded in the model selection association information of the current routing decision from the decision vouchers stored by the enterprise within the preset time window; calculating the theoretical selection frequency of each candidate model based on the measured values of the indicators and weight configuration snapshots of each candidate model; calculating the bias index based on the actual selection frequency and the theoretical selection frequency of each candidate model; determining that the result of the statistical bias test is no significant bias when the bias index is less than or equal to a preset threshold; or determining that the result of the statistical bias test is significant bias when the bias index is greater than the preset threshold. When the result of the statistical bias test is no significant bias, the neutrality verification is passed.
2. The method for verifying gateway neutrality in large language model routing decisions as described in claim 1, characterized in that, The synchronous recording of decision elements upon completion of each routing decision includes: For each routing decision, the original request text of that routing decision is obtained, and the original request text is processed by a digest algorithm to obtain a request semantic digest; Obtain the decision algorithm version identifier and code hash value for the current routing decision, and obtain the model selection association information; By combining the request semantic summary, the decision algorithm version identifier, the code hash value, and the model selection association information, the decision elements for the current routing decision are obtained.
3. The method for verifying gateway neutrality in large language model routing decisions as described in claim 2, characterized in that, The step of generating decision credentials for each routing decision based on the decision elements includes: For each routing decision, the fields are assembled according to the decision elements of the current routing decision, based on the preset field structure, to obtain the decision credential for the current routing decision; The decision credential includes a credential hash, which is obtained by aggregating all decision elements of the current routing decision using a Merkle tree. The decision credential also includes a gateway signature, which is obtained by digitally signing the credential hash and the credential generation timestamp using the gateway private key. The decision credential fields also include the decision payload obtained after structuring based on the complete context of the decision element, as well as the code hash value and the decision credential identifier.
4. The method for verifying gateway neutrality in large language model routing decisions as described in claim 3, characterized in that, The method of distributing decision credentials for each routing decision in parallel to the enterprise, blockchain node, and gateway service provider for storage based on a three-party anti-tampering strategy includes: Write the complete decision credentials for each routing decision to the enterprise's local log; and Write the credential hash of each routing decision to the blockchain node; and The decision credentials for each routing decision are aggregated and statistically analyzed to obtain an aggregated statistical version, which is then stored in the gateway service provider.
5. The method for verifying the neutrality of a large language model routing decision gateway as described in claim 3, characterized in that, The tamper-proof verification based on the decision credentials stored by the enterprise and the blockchain node includes: Obtain any decision credential to be verified from the enterprise and calculate the credential hash of the arbitrary decision credential to be verified as the verification hash; Obtain the credential hash corresponding to any decision credential to be verified from the blockchain node as the base hash; Compare the hash to be verified with the baseline hash; When the hash to be verified is the same as the base hash, the result of the anti-tampering verification is determined to be untampered; or When the hash to be verified is different from the base hash, the result of the anti-tampering verification is determined to be tampered with.
6. The method for verifying gateway neutrality in a large language model routing decision as described in claim 3, characterized in that, The algorithm replay verification based on the decision credentials stored by the enterprise includes: For each decision credential, obtain the code hash value in the decision credential; The matching algorithm code is loaded from a public algorithm repository based on the code hash value. The matching algorithm code is rerun using the decision elements corresponding to the decision credentials to obtain the replay decision model; Obtain the final selected model from the decision credentials; When the replay decision model is the same as the finally selected model, the result of the algorithm replay verification is determined to be consistent with the decision; or When the replay decision model is different from the final selected model, the result of the algorithm replay verification is determined to be inconsistent decision.
7. The method for verifying gateway neutrality in a large language model routing decision as described in claim 6, characterized in that, Before loading the matching algorithm code from a public algorithm repository based on the code hash value, the method further includes: For each routing decision, the hash value of the algorithm code used in that routing decision process and the generated timestamp increment are published to the public algorithm repository; Specifically, when an algorithm change event occurs, a change announcement is made, and the hash value and generation timestamp of the changed algorithm code are published to the public algorithm repository.
8. A computer device, characterized in that, The computer device includes: A memory for storing at least one instruction; and a processor for executing the instructions stored in the memory to implement the gateway neutrality verification method for large language model routing decision as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, which is executed by a processor in a computer device to implement the large language model routing decision gateway neutrality verification method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Verifiable intelligent contract execution method and device and electronic equipment
CN121560446A
Explainable large language model routing with immutable audit trails
US20250384072A1
Intelligent ai routing advisory platform with synthetic injection testing, bias detection digital twin, zero-copy pipeline, cryptographic compliance verification, and autonomous multi-tier coordination for heterogeneous ai provider ecosystems
US20250385797A1