Method and device for handling multi-tenant request
AssigneeAdvanced New Technologies Co., Ltd.
InventorXinyu Jia
Life of this patent
Estimating the term…
Abstract
Implementations of the present specification provide a method and device for handling a multi-tenant request. A request to access an application from a user device is received, wherein the request includes a user identifier and request data. Tenant information corresponding to the user identifier is determined based on a mapping relationship between the user device and a tenant. Type information of the application is determined based on the request data. A first identifier of the application is extracted from the request data based on the type information of the application. The first identifier is modified to a second identifier based on the tenant information. A new request is determined based on the second identifier. The new request is sent to the application.
Claims14
A computer-implemented method, comprising:
- receiving a request to access an application from a user device, wherein the request comprises a user identifier and request data, wherein the application is hosted by a server, and wherein the user identifier is associated with a user of the user device;
- determining tenant information corresponding to the user identifier based on a mapping relationship between the user and a tenant;
- determining type information of the application based on the request data;
- extracting a first identifier of the application from the request data based on the type information of the application;
- appending the tenant information to the first identifier of the application to obtain a second identifier;
- determining a new request based on the second identifier;
- sending the new request to the application;
- receiving a response message for the new request, wherein the response message comprises the second identifier;
- removing the tenant information from the second identifier to obtain the first identifier of the application;
- determining a new response message based on the first identifier;
- and
- returning the new response message to the user device.
A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
- receiving a request to access an application from a user device, wherein the request comprises a user identifier and request data, wherein the application is hosted by a server, and wherein the user identifier is associated with a user of the user device;
- determining tenant information corresponding to the user identifier based on a mapping relationship between the user and a tenant;
- determining type information of the application based on the request data;
- extracting a first identifier of the application from the request data based on the type information of the application;
- appending the tenant information to the first identifier of the application to obtain a second identifier;
- determining a new request based on the second identifier;
- sending the new request to the application;
- receiving a response message for the new request, wherein the response message comprises the second identifier;
- removing the tenant information from the second identifier to obtain the first identifier of the application;
- determining a new response message based on the first identifier;
- and
- returning the new response message to the user device.
A computer-implemented system, comprising:
- one or more computers;
- and
- one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations comprising:
- receiving a request to access an application from a user device, wherein the request comprises a user identifier and request data, wherein the application is hosted by a server, and wherein the user identifier is associated with a user of the user device;
- determining tenant information corresponding to the user identifier based on a mapping relationship between the user and a tenant;
- determining type information of the application based on the request data;
- extracting a first identifier of the application from the request data based on the type information of the application;
- appending the tenant information to the first identifier of the application to obtain a second identifier;
- determining a new request based on the second identifier;
- sending the new request to the application;
- receiving a response message for the new request, wherein the response message comprises the second identifier;
- removing the tenant information from the second identifier to obtain the first identifier of the application;
- determining a new response message based on the first identifier;
- and
- returning the new response message to the user device.
Dependencies are inferred from the claim text.