Data processing method, apparatus and device
By introducing proxy devices in the cloud cluster, data operation requests from user devices are marked and processed, which solves the problem of tenants occupying service devices alone, and achieves tenant isolation and cost reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2023-03-29
- Publication Date
- 2026-05-29
AI Technical Summary
In a cloud cluster, when a tenant has only one user device, existing technologies require allocating a service device for it, resulting in high service device costs.
By introducing a proxy device between user equipment and service equipment, the data operation requests of user equipment are marked and processed to generate tenant-specific data operation requests, which are then sent to the service equipment to achieve tenant isolation and enable multiple tenants to share a single service equipment.
Tenant isolation was achieved, reducing the cost of service equipment.
Smart Images

Figure CN116366647B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, and device. Background Technology
[0002] A cloud cluster can include multiple service devices. Tenants can rent service devices and mount multiple user devices on the rented service devices so that multiple user devices can access the service devices.
[0003] In related technologies, to achieve isolation between tenants, one tenant corresponds to one service device. Each new tenant requires an additional service device. However, in this approach, if a tenant has only one user device, then one user device requires a corresponding service device, resulting in high service device costs. Summary of the Invention
[0004] This application provides a data processing method, apparatus, and device to reduce the cost of service equipment.
[0005] In a first aspect, embodiments of this application provide a data processing method applied to a proxy device, the method comprising:
[0006] Receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant;
[0007] The first data operation request is marked based on the first tenant information to obtain the second data operation request.
[0008] The service device sends the second data operation request to the service device so that the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. The service device is used to provide services to user equipment of multiple tenants.
[0009] Secondly, embodiments of this application provide a data processing method applied to a service device, the service device being used to provide services to user devices of multiple tenants, the method comprising:
[0010] Receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant;
[0011] The first data operation request is marked based on the first tenant information to obtain the second data operation request.
[0012] Based on the second data operation request, the data corresponding to the first tenant is processed.
[0013] In one possible implementation, the first data operation request is marked based on the first tenant information to obtain a second data operation request, including:
[0014] Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type;
[0015] Based on the operation type and the first tenant information, the first data operation request is marked to obtain the second data operation request.
[0016] In one possible implementation, the operation type is a write type or an update type, and the first data operation request includes first data and a first operation instruction; based on the operation type and the first tenant information, the first data operation request is marked to obtain a second data operation request, including:
[0017] The first data is marked based on the first tenant information to obtain the second data;
[0018] The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0019] In one possible implementation, the operation type is a deletion type or a query type, and the first data operation request includes a third operation instruction; based on the operation type and the first tenant information, the first data operation request is marked to obtain a second data operation request, including:
[0020] The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0021] In one possible implementation, the first data operation request is marked based on the first tenant information to obtain a second data operation request, including:
[0022] Obtain the preset tenant information corresponding to the first tenant;
[0023] The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure.
[0024] When the verification result is successful, the first data operation request is marked according to the first tenant information to obtain the second data operation request.
[0025] In one possible implementation, before obtaining the preset tenant information corresponding to the first tenant, the method further includes:
[0026] Obtain the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment;
[0027] Based on the requested access, the preset tenant information is generated.
[0028] In one possible implementation, the method further includes:
[0029] Obtain the initial response data corresponding to the first data operation request sent by the service device;
[0030] The target response data corresponding to the first tenant is determined from the initial response data. The target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information.
[0031] The target response data is sent to the first user equipment.
[0032] In one possible implementation, the service device is equipped with a multi-tenant component;
[0033] Receiving a first data operation request sent by a first user equipment includes:
[0034] The multi-tenant component receives a first data operation request sent by a first user equipment.
[0035] The first data operation request is marked based on the first tenant information to obtain a second data operation request, including:
[0036] Based on the first tenant information, the first data operation request is marked by the multi-tenant component to obtain the second data operation request.
[0037] Thirdly, embodiments of this application provide a data processing method applied to a user equipment, wherein the user equipment is equipped with a proxy component, and the method includes:
[0038] Generate an initial data operation request;
[0039] Determine the tenant information corresponding to the first user equipment;
[0040] Based on the first tenant information and the initial data operation request, a first data operation request is generated and sent to a service device, which provides services to user equipment of multiple tenants.
[0041] In one possible implementation, generating a first data operation request based on the first tenant information and the initial data operation request includes:
[0042] The first tenant information is added to the initial data operation request to obtain the first data operation request.
[0043] In one possible implementation, the method further includes:
[0044] Send an access request to the service device, the access request including the first tenant information and the device information of the first user device;
[0045] Receive the access request response corresponding to the access request sent by the service device.
[0046] Fourthly, embodiments of this application provide a data processing apparatus applied to a proxy device, the apparatus comprising: a receiving module, a processing module, and a sending module, wherein...
[0047] The receiving module is used to receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant.
[0048] The processing module is used to mark the first data operation request according to the first tenant information to obtain a second data operation request.
[0049] The sending module is used to send the second data operation request to the service device, so that the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. The service device is used to provide services to user equipment of multiple tenants.
[0050] In one possible implementation, the processing module is specifically used for:
[0051] Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type;
[0052] Based on the operation type and the first tenant information, the first data operation request is marked to obtain the second data operation request.
[0053] In one possible implementation, the operation type is a write type or an update type, and the first data operation request includes first data and a first operation instruction; the processing module is specifically used for:
[0054] The first data is marked based on the first tenant information to obtain the second data;
[0055] The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0056] In one possible implementation, the operation type is a deletion type or a query type, and the first data operation request includes a third operation instruction; the processing device is specifically used for:
[0057] The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0058] In one possible implementation, the processing module is specifically used for:
[0059] Obtain the preset tenant information corresponding to the first tenant;
[0060] The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure.
[0061] When the verification result is successful, the first data operation request is marked according to the first tenant information to obtain the second data operation request.
[0062] In one possible implementation, the apparatus further includes: an acquisition module and a generation module, wherein,
[0063] The acquisition module is used to acquire the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment;
[0064] The generation module is used to generate the preset tenant information based on the access request.
[0065] In one possible implementation, the acquisition module is further configured to acquire the initial response data corresponding to the first data operation request sent by the service device;
[0066] In one possible implementation, the device further includes a determining module.
[0067] The determining module is used to determine the target response data corresponding to the first tenant in the initial response data, wherein the target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information;
[0068] The sending module is further configured to send the target response data to the first user equipment.
[0069] Fifthly, embodiments of this application provide a data processing apparatus applied to a service device, the service device being used to provide services to user devices of multiple tenants, the apparatus comprising: a receiving module, a first processing module, and a second processing module, wherein...
[0070] The receiving module is used to receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant.
[0071] The first processing module is used to mark the first data operation request according to the first tenant information to obtain a second data operation request;
[0072] The second processing module is used to process the data corresponding to the first tenant according to the second data operation request.
[0073] In one possible implementation, the first processing module is specifically used for:
[0074] Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type;
[0075] Based on the operation type and the first tenant information, the first data operation request is marked to obtain the second data operation request.
[0076] In one possible implementation, the operation type is a write type or an update type, and the first data operation request includes first data and a first operation instruction; the first processing module is specifically used for:
[0077] The first data is marked based on the first tenant information to obtain the second data;
[0078] The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0079] In one possible implementation, the operation type is a deletion type or a query type, and the first data operation request includes a third operation instruction; the first processing module is specifically used for:
[0080] The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0081] In one possible implementation, the first processing module is specifically used for:
[0082] Obtain the preset tenant information corresponding to the first tenant;
[0083] The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure.
[0084] When the verification result is successful, the first data operation request is marked according to the first tenant information to obtain the second data operation request.
[0085] In one possible implementation, the apparatus further includes an acquisition module and a generation module, wherein
[0086] The acquisition module is used to acquire the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment;
[0087] The generation module is used to generate the preset tenant information based on the access request.
[0088] In one possible implementation, the acquisition module is further configured to:
[0089] Obtain the initial response data corresponding to the first data operation request sent by the service device;
[0090] In one possible implementation, the apparatus further includes a determining module and a transmitting module.
[0091] The determining module is used to determine the target response data corresponding to the first tenant in the initial response data, wherein the target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information;
[0092] The sending module is used to send the target response data to the first user equipment.
[0093] In one possible implementation, the service device is equipped with a multi-tenant component; the receiving module is used for:
[0094] The multi-tenant component receives a first data operation request sent by a first user equipment.
[0095] In one possible implementation, the first processing module is used to:
[0096] Based on the first tenant information, the first data operation request is marked by the multi-tenant component to obtain the second data operation request.
[0097] Sixthly, embodiments of this application provide a data processing apparatus applied to a user equipment, wherein the user equipment is equipped with a proxy component, and the apparatus includes: a first generation module, a determining module, a second generation module, and a sending module, wherein...
[0098] The first generation module is used to generate an initial data operation request;
[0099] The determining module is used to determine the tenant information corresponding to the first user equipment;
[0100] The second generation module is used to generate a first data operation request based on the first tenant information and the initial data operation request;
[0101] The sending module is used to send the first data operation request to the service device, which is used to provide services to user equipment of multiple tenants.
[0102] In one possible implementation, the second generation module is specifically used for:
[0103] The first tenant information is added to the initial data operation request to obtain the first data operation request.
[0104] In one possible implementation, the sending module is further configured to:
[0105] Send an access request to the service device, the access request including the first tenant information and the device information of the first user device;
[0106] In one possible implementation, the device further includes a receiving module.
[0107] The receiving module is used to receive the request access response corresponding to the request access request sent by the service device.
[0108] In a seventh aspect, embodiments of this application provide a proxy device, including: a memory and a processor;
[0109] The memory stores computer-executed instructions;
[0110] The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method according to any one of the first aspects.
[0111] Eighthly, embodiments of this application provide a service device, including: a memory and a processor;
[0112] The memory stores computer-executed instructions;
[0113] The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method described in any of the second aspects.
[0114] Ninthly, embodiments of this application provide a user equipment, including: a memory and a processor;
[0115] The memory stores computer-executed instructions;
[0116] The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method described in any of the third aspects.
[0117] In a tenth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data processing method described in any of the first aspects.
[0118] Eleventhly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data processing method described in any of the second aspects.
[0119] In a twelfth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the data processing method described in any of the third aspects.
[0120] In a thirteenth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the data processing method shown in any of the first aspects.
[0121] In a fourteenth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the data processing method shown in any of the second aspects.
[0122] In a fifteenth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the data processing method shown in any of the third aspects.
[0123] This application provides a data processing method, apparatus, and device. A first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, a first data operation request can be generated. The first user equipment can send the first data operation request to a proxy device. After receiving the first data operation request, the proxy device can mark the first data operation request according to the first tenant information to obtain a second data operation request, and then send the second data operation request to a service device. After receiving the second data operation request, the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. Because the proxy device can mark the data operation requests sent by the user equipment, each tenant's user equipment can only operate on the tenant-operable data in the service device, achieving tenant isolation and allowing multiple tenants to share a single service device, thus reducing the cost of the service device. Attached Figure Description
[0124] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0125] Figure 1 A schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application;
[0126] Figure 2 A flowchart illustrating a data processing method provided for an exemplary embodiment of this application;
[0127] Figure 3 A flowchart illustrating another data processing method provided for an exemplary embodiment of this application;
[0128] Figure 4 A flowchart illustrating yet another data processing method provided for an exemplary embodiment of this application;
[0129] Figure 5 A schematic diagram of a data processing procedure provided for an exemplary embodiment of this application. Figure 1 ;
[0130] Figure 6 A schematic diagram of a data processing procedure provided for an exemplary embodiment of this application. Figure 2 ;
[0131] Figure 7A schematic diagram of the structure of a data processing apparatus provided for an exemplary embodiment of this application;
[0132] Figure 8 A schematic diagram of another data processing apparatus provided as an exemplary embodiment of this application;
[0133] Figure 9 A schematic diagram of the structure of another data processing apparatus provided for an exemplary embodiment of this application;
[0134] Figure 10 A schematic diagram of the structure of an agent device provided for an exemplary embodiment of this application;
[0135] Figure 11 A schematic diagram of the structure of a service device provided for an exemplary embodiment of this application;
[0136] Figure 12 This is a schematic diagram of the structure of a user equipment provided for an exemplary embodiment of this application. Detailed Implementation
[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0138] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0139] Figure 1 This is a schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 1 This includes multiple user devices, agent devices, and service devices. Agent devices and service devices can be located in the cloud.
[0140] Multiple user devices can be designated as User Device 1, User Device 2, ..., User Device n. These multiple user devices can be devices belonging to multiple tenants. For example, User Device 1 and User Device 2 can be devices belonging to tenant 1, while User Device 3, User Device 4, and User Device 5 can be devices belonging to tenant 2.
[0141] For any user equipment, the user equipment can send a first data operation request to the agent equipment.
[0142] The agent device can mark the first data operation request based on the tenant information, obtain the second data operation request, and send the second data request to the service device.
[0143] The service device can store data corresponding to multiple tenants. After receiving a second data request, the service device can process the data corresponding to the tenant according to the second data request.
[0144] For example, if user equipment 1 is tenant 1's device, user equipment 1 can send a first data operation request 1 to the proxy device. After receiving the first data operation request 1, the proxy device can mark the first data operation request 1 according to the tenant 1's information to obtain a second data operation request 2, and send the second data operation request 2 to the service device. After receiving the second data request, the service device can perform operation processing on the data corresponding to tenant 1 according to the second data request.
[0145] In related technologies, to achieve isolation between tenants, one tenant corresponds to one service device. Each new tenant requires an additional service device. However, in this approach, if a tenant has only one user device, then one user device requires a corresponding service device, resulting in high service device costs.
[0146] In this embodiment, a proxy device can be set up between the user equipment and the service equipment. The proxy device can mark the data operation requests sent by the user equipment, so that each tenant's user equipment can only operate on the tenant-accessible data in the service equipment, thus achieving tenant isolation and allowing multiple tenants to share a single service equipment, reducing the cost of the service equipment.
[0147] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.
[0148] Figure 2 This is a schematic flowchart illustrating a data processing method provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 2 The method may include:
[0149] S201, The first user equipment generates an initial data operation request.
[0150] The first tenant can correspond to multiple user devices, and the first user device can be one of the user devices corresponding to the first tenant.
[0151] Optionally, the first user equipment can read program statements to generate an initial data operation request. For example, if the first user equipment is user equipment 1 of tenant 1, and program statement 1 can be "update data1 to data2", then user equipment 1 can read program statement 1 to generate an initial data operation request 1, which is "update data1 to data2".
[0152] S202, The first user equipment determines the corresponding first tenant information.
[0153] The first tenant information may include a tenant identifier and / or a tenant account. For example, if the first tenant is tenant 1, the first tenant information may include tenant 1's tenant identifier 1 and / or tenant account 1.
[0154] In an optional embodiment, a proxy component may be configured in the first user equipment. The corresponding first tenant information can be determined through the proxy component.
[0155] For example, if the first user equipment belongs to tenant 1, the corresponding first tenant information can be determined through the proxy component. The first tenant information may include the tenant identifier 1 of tenant 1. For example, the tenant identifier 1 of tenant 1 can be 001.
[0156] S203. The first user equipment generates a first data operation request based on the first tenant information and the initial data operation request.
[0157] The first data operation request may include the first tenant's information. For example, if the first tenant is tenant 1, the first data request 1 may include tenant 1's tenant identifier 1 and / or tenant account 1, etc.
[0158] In an alternative embodiment, the first data operation request can be obtained by adding the first tenant information to the initial data operation request through a proxy component.
[0159] For example, if the first tenant information includes tenant identifier 1 of tenant 1 as 001, and the initial data operation request 1 is "update data 1 to data 2", then the first tenant information can be added to the initial data operation request 1 through the proxy component to obtain the first data operation request. The first data operation request can include "update data 1 to data 2" and tenant identifier 1.
[0160] S204. The first user equipment sends a first data operation request to the agent equipment.
[0161] Optionally, the first user equipment can connect to the agent device via a wireless network. The first user equipment can send a first data operation request to the agent device via the wireless network.
[0162] For example, if the first user equipment is user equipment 1 of tenant 1, user equipment 1 can send a first data operation request 1 to the agent equipment.
[0163] S205. The agent device marks the first data operation request based on the first tenant information to obtain the second data operation request.
[0164] Optionally, the agent device may include multiple multi-tenant components, and one multi-tenant component may correspond to one service device and multiple tenant user devices.
[0165] After the agent device obtains the first data operation request, it can use the multi-tenant component to mark the first data operation request based on the first tenant information to obtain the second data operation request.
[0166] In an optional embodiment, a second data operation request can be obtained by marking the first data operation request based on the first tenant information in the following manner: determining the operation type corresponding to the first data operation request; marking the first data operation request based on the operation type and the first tenant information to obtain the second data operation request.
[0167] The operation type may include at least one of the following: write type, delete type, query type, or update type.
[0168] The proxy device can determine the operation type corresponding to the first data operation request. For example, if the first data request 1 is "write data 1", the proxy device can determine that the operation type corresponding to the first data operation request 1 is a write type; if the first data request 2 is "delete data 1", the proxy device can determine that the operation type corresponding to the first data operation request 2 is a delete type; if the first data operation request 3 is "query data 2", the proxy device can determine that the operation type corresponding to the first data operation request 3 is a query type; if the first data operation request 4 is "update data 1 to data 2", the proxy device can determine that the operation type corresponding to the first data operation request 4 is an update type.
[0169] After determining the operation type, the first data operation request is marked by the multi-tenant component according to the operation type and the first tenant information to obtain the second data operation request.
[0170] For example, if the first tenant information includes tenant identifier 1 of tenant 1, and the first data operation request is "update data 1 to data 2", then the multi-tenant component will mark the first data operation request according to the operation type and the first tenant information to obtain the second data operation request. Assume the second data operation request can be "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1".
[0171] S206. The agent device sends a second data operation request to the service device.
[0172] Alternatively, the agent device can connect to the service device via a wireless or wired connection.
[0173] For example, if the second data operation request is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then the agent device can send the second data operation request to the service device.
[0174] S207. The service equipment performs operation processing on the data corresponding to the first tenant according to the second data operation request.
[0175] A service device can be a physical server or a virtual machine set up within a physical server. A service device can include data from multiple tenants and can be used to provide services to user devices of multiple tenants. For example, a service device can include data from tenant 1 and data from tenant 2.
[0176] After receiving the second data operation request, the service device can process the data corresponding to the first tenant according to the second data operation request.
[0177] For example, if the second data operation request is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then the service device can update data 1 of tenant 1 to data 2 according to the second data operation request.
[0178] It should be noted that the data in the service device can carry corresponding tenant information. For example, if the second data operation request is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", after the service device updates data 1 of tenant 1 to data 2 according to the second data operation request, then the data 2 in the service device will carry tenant identifier 1.
[0179] In this embodiment, the first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, it can generate a first data operation request. The first user equipment can send the first data operation request to a proxy device. After receiving the first data operation request, the proxy device can mark the first data operation request according to the first tenant information to obtain a second data operation request, and then send the second data operation request to the service device. After receiving the second data operation request, the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. Because the proxy device can mark the data operation requests sent by the user equipment, each tenant's user equipment can only operate on tenant-operable data within the service device, achieving tenant isolation and allowing multiple tenants to share a single service device, thus reducing the cost of the service device.
[0180] Figure 3 A flowchart illustrating another data processing method provided for an exemplary embodiment of this application. Please refer to... Figure 3 The method may include:
[0181] S301, The first user equipment generates an initial data operation request.
[0182] S302, The first user equipment determines the corresponding first tenant information.
[0183] S303. The first user equipment generates a first data operation request based on the first tenant information and the initial data operation request.
[0184] It should be noted that steps S301 to S303 can be found in steps S201 to S203, and will not be repeated here.
[0185] S304. The first user equipment sends a first data operation request to the service equipment.
[0186] Optionally, the first user equipment can connect to the service equipment via a wireless network. The first user equipment can send a first data operation request to the service equipment via the wireless network.
[0187] For example, if the first user equipment is user equipment 1 of tenant 1, user equipment 1 can send a first data operation request 1 to the service equipment.
[0188] S305. The service device marks the first data operation request based on the first tenant information to obtain the second data operation request.
[0189] A service device can be a physical server or a virtual machine set up within a physical server. A service device can include data from multiple tenants and can be used to provide services to user devices of multiple tenants. For example, a service device can include data from tenant 1 and data from tenant 2.
[0190] In an alternative embodiment, the service device may be equipped with a multi-tenant component.
[0191] Optionally, the service device receives a first data operation request sent by the first user equipment through a multi-tenant component. For example, if the service device 1 is equipped with a multi-tenant component 1, and the first user equipment is user equipment 1 of tenant 1, if user equipment 1 sends a first data operation request 1 to the service device, the service device can receive the first data operation request 1 sent by user equipment 1 through the multi-tenant component 1. The first data operation request 1 may include tenant information 1 of tenant 1.
[0192] Optionally, based on the first tenant information, the first data operation request can be marked by a multi-tenant component to obtain the second data operation request.
[0193] In an optional embodiment, a second data operation request can be obtained by marking the first data operation request based on the first tenant information in the following manner: determining the operation type corresponding to the first data operation request; marking the first data operation request based on the operation type and the first tenant information to obtain the second data operation request.
[0194] The operation type may include at least one of the following: write type, delete type, query type, or update type.
[0195] For example, if the first tenant information includes tenant identifier 1 of tenant 1, and the first data operation request is "update data 1 to data 2", then the service device can use the multi-tenant component to mark the first data operation request according to the operation type and the first tenant information to obtain the second data operation request. Assume the second data operation request can be "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1".
[0196] S306. The service equipment performs operation processing on the data corresponding to the first tenant according to the second data operation request.
[0197] For example, if the second data operation request can be "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then the service device can update data 1 of tenant 1 to data 2 according to the second data operation request.
[0198] It should be noted that the data in the service device can carry corresponding tenant information. For example, if the second data operation request is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", after the service device updates data 1 of tenant 1 to data 2 according to the second data operation request, then the data 2 in the service device will carry tenant identifier 1.
[0199] In this embodiment, the first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, a first data operation request can be generated. The first user equipment can send the first data operation request to the service equipment. After receiving the first data operation request, the service equipment can mark the first data operation request according to the first tenant information to obtain a second data operation request. Then, based on the second data operation request, the service equipment can perform operation processing on the data corresponding to the first tenant. Since a multi-tenant component can be set in the service equipment, the data operation requests sent by the user equipment can be marked through the multi-tenant component, ensuring that each tenant's user equipment can only operate on tenant-operable data within the service equipment. This achieves tenant isolation and allows multiple tenants to share a single service equipment, reducing the cost of the service equipment.
[0200] Below, in Figure 2 and Figure 3 Based on the illustrated embodiments, combined with Figure 4 The above data processing methods will be explained in further detail.
[0201] Figure 4 A flowchart illustrating yet another data processing method provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 4 The method may include:
[0202] S401. The first user equipment can send an access request to the service equipment through the agent equipment.
[0203] The access request may include information about the first tenant and the device information of the first user device. For example, the access request may include tenant identifier 1 and the Internet Protocol (IP) address of user device 1.
[0204] Optionally, the access request may also include a temporary credential. The temporary credential can be a random number sent by the serving device to the first user equipment. For example, the temporary credential could be 705256.
[0205] For example, if the first user equipment is user equipment 1 of tenant 1, then the first user equipment can send an access request 1 to the proxy device. After receiving the access request 1, the proxy device can send the access request 1 to the service device. The access request 1 may include tenant identifier 1, IP address 1 of user equipment 1, and temporary credential 705256.
[0206] S402. The service equipment generates preset tenant information based on the requested access request.
[0207] After receiving an access request, the service device can obtain the first tenant information and the first user device's device information from the access request to generate preset tenant information. The preset tenant information may include the first tenant information and the first user device's device information.
[0208] For example, if the service device receives an access request 1, and if the access request 1 includes a tenant identifier 1 and the IP address 1 of user equipment 1, the service device can generate and save preset tenant information 1 based on the tenant identifier 1 and the IP address 1 of user equipment 1. The preset tenant information 1 may include the tenant identifier 1 and / or the IP address 1 of user equipment 1.
[0209] S403. The service device sends the request access response corresponding to the request access request to the first user device through the agent device.
[0210] The access request response may include the request result and access credentials, and the access credentials may include the first tenant information.
[0211] For example, if the service device receives an access request 1 from user equipment 1, the service device can send an access request response 1 to user equipment 1. The access request response 1 may include an access result of "approved" and access credential 1, which may include tenant identifier 1.
[0212] S404, The first user equipment generates an initial data operation request.
[0213] When a user has a task requirement, the first user device can read program statements to generate an initial data operation request.
[0214] For example, if the first user device is user device 1 of tenant 1, and program statement 1 can be "update data1 to data2", then user device 1 can read program statement 1 to generate initial data operation request 1, which is "update data1 to data2".
[0215] S405. The first user equipment determines the corresponding first tenant information.
[0216] It should be noted that the execution process of step S405 can be found in step S202, and will not be repeated here.
[0217] S406. The first user equipment generates a first data operation request based on the first tenant information and the initial data operation request.
[0218] It should be noted that the execution process of step S406 can be found in step S203, and will not be repeated here.
[0219] S407. The first user equipment sends a first data operation request to the agent equipment.
[0220] For example, if the first data operation request 1 includes "update data 1 to data 2" and tenant identifier 1, and the first user device is user device 1 of tenant 1, then user device 1 can send the first data operation request 1 to the agent device.
[0221] S408, The agent device obtains the preset tenant information corresponding to the first tenant.
[0222] Optionally, after the proxy device obtains the first data operation request, it can parse and process the first data operation request through the multi-tenant component to obtain the first tenant information in the first data operation request, and obtain the preset tenant information corresponding to the first tenant in the service device based on the first tenant information.
[0223] For example, if the first data operation request 1 includes "update data 1 to data 2" and tenant identifier 1, the proxy device can parse and process the first data operation request, obtain the tenant identifier 1 from the first data operation request 1, and obtain the preset tenant information corresponding to tenant 1 from the service device based on the tenant identifier 1. The preset tenant information may include the original tenant identifier 1 and the IP address of the first user device.
[0224] S409. The agent device verifies the first tenant information and the first data operation request based on the preset tenant information, and obtains the verification result.
[0225] Optionally, the multi-tenant component in the proxy device can be used to verify the first tenant information based on preset tenant information to obtain a verification result. If the preset tenant information and the first tenant information are consistent, the verification result is successful; if the preset tenant information and the first tenant information are inconsistent, the verification result is unsuccessful.
[0226] For example, if the original tenant identifier 1 in the preset tenant information is 001, and the first data operation request is parsed and processed to obtain the first tenant information as tenant identifier 1, which is 001, then since the parsed tenant identifier 1 is consistent with the original tenant identifier 1, the verification result can be determined to be successful. If the parsed tenant identifier 1 is 002, then since the parsed tenant identifier 1 is inconsistent with the original tenant identifier 1, the verification result can be determined to be unsuccessful.
[0227] Optionally, after the first tenant information is successfully verified, the first data operation request can be further verified and processed by the multi-tenant component in the proxy device according to the preset tenant information.
[0228] In one optional embodiment, the first data operation request can be verified based on preset tenant information in the following manner: The target data in the first data operation request can be determined; the preset tenant information corresponding to the target data can be determined; and the first data operation request can be verified based on the preset tenant information corresponding to the target data. If the preset tenant information corresponding to the target data is consistent with the first tenant information, the verification result is successful; if the preset tenant information corresponding to the target data is inconsistent with the first tenant information, the verification result is unsuccessful.
[0229] For example, if the first data operation request is parsed and processed, the first tenant information is obtained as tenant identifier 1, which is 001; and the first data operation request is "update data 1 to data 2", then the target data in the first data operation request can be determined to be "data 1". If the original tenant identifier 1 corresponding to "data 1" is determined to be 001, then since the parsed tenant identifier 1 and the original tenant identifier 1 corresponding to "data 1" are consistent, the verification result can be determined to be successful. If the original tenant identifier 1 corresponding to "data 1" is 005, then since the parsed tenant identifier 1 and the original tenant identifier 1 are inconsistent, the verification result can be determined to be unsuccessful.
[0230] S410. When the verification result is successful, the agent device marks the first data operation request according to the first tenant information to obtain the second data operation request.
[0231] Optionally, the agent device can determine the operation type corresponding to the first data operation request through the multi-tenant component, and then mark the first data operation request according to the operation type and the first tenant information to obtain the second data operation request.
[0232] The operation type can include at least one of the following: write, delete, query, or update. The process of marking the first data operation request differs depending on the operation type, and can include the following two cases:
[0233] Case 1: The operation type is write or update.
[0234] In this case, the first data operation request may include first data and a first operation instruction. For example,
[0235] For example, if the first data operation request is "update data 1 to data 2", then the first data in the first data operation request is data 2, and the first operation instruction is "update data 1 to data 2".
[0236] Optionally, the first data operation request can be marked to obtain the second data operation request in the following manner: marking the first data according to the first tenant information to obtain the second data; marking the first operation instruction according to the first tenant information to obtain the second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0237] For example, if the first data operation request is "update data 1 to data 2", where the first data is data 2 and the first operation instruction is "update data 1 to data 2", and if the first tenant information is tenant identifier 1, and tenant identifier 1 is 001, then data 2 can be marked according to tenant identifier 1 to obtain the second data as data 2 with tenant identifier 1; the first operation instruction can be marked according to tenant identifier 1 to obtain the second operation instruction as "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then the second data operation request can include the second data as "data 2 with tenant identifier 1" and the second operation instruction.
[0238] Case 2: The operation type is deletion or query.
[0239] In this case, the first data operation request may include a third operation instruction. For example, if the first data request is "Delete data 1", the third operation instruction is "Delete data 1".
[0240] Optionally, the first data operation request can be marked to obtain the second data operation request in the following manner: the third operation instruction can be marked according to the first tenant information to obtain the fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0241] For example, if the first data request is "delete data 1", and the third operation instruction is "delete data 1", and if the first tenant information is tenant identifier 1, and tenant identifier 1 is 001, then the third operation instruction can be marked according to tenant identifier 1 to obtain the fourth operation instruction "delete data 1 with tenant identifier 1", and the second data operation request can include the fourth operation instruction.
[0242] S411, The agent device sends a second data operation request to the service device.
[0243] For example, if the second data operation request includes the second data as "data 2 with tenant identifier 1" and the second operation instruction as "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then the agent device can send the second data operation request to the service device.
[0244] S412. The service device performs operation processing on the data corresponding to the first tenant according to the second data operation request.
[0245] For example, if the second data operation request includes the second data as "data 2 with tenant identifier 1" and the second operation instruction as "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1", then after receiving the second data operation request, the service device can parse and process the second data operation request to obtain the second data and the second operation instruction in the second data operation request. The service device can then update data 1 with tenant identifier 1 to data 2 with tenant identifier 1 according to the second operation instruction.
[0246] For example, if the second data operation request includes a fourth operation instruction of "delete data 1 with tenant identifier 1", the service device can delete data 1 with tenant identifier 1 according to the fourth operation instruction.
[0247] Optionally, if the operation type corresponding to the first data operation request is a query type, since the second data operation request is generated based on the first data operation request, the service device can obtain the initial response data corresponding to the first data operation request based on the second data operation request, and send the initial response data to the proxy device. The proxy device can obtain the initial response data corresponding to the first data operation request, filter the initial response data according to the first tenant information through the multi-tenant component, that is, determine the target response data corresponding to the first tenant in the initial response data, and send the target response data to the first user equipment so that the first user equipment can receive the target response data.
[0248] The initial response data may include tenant information marked with the first tenant, unmarked tenant information, and tenant information marked with other tenants.
[0249] The target response data may include tenant information tagged with the first tenant and / or tenant information not tagged.
[0250] It should be noted that data without tenant information is public data, which is accessible to all tenants.
[0251] For example, if the first data operation request is "query data from 2023 / 2 / 10 to 2023 / 3 / 10", the service device can obtain multiple data points from 2023 / 2 / 10 to 2023 / 3 / 10 and send these multiple data points to the proxy device. Assuming that the multiple data points from 2023 / 2 / 10 to 2023 / 3 / 10 include 500 data points, these 500 data points may include 300 data points marked with tenant information of the first tenant, 100 data points marked with tenant information of the second tenant, and 100 data points without tenant information. These 500 data points can then be filtered based on the first tenant information. That is, the target response data corresponding to the first tenant can be determined from these 500 data points. The target response data can include the 300 data points marked with tenant information of the first tenant and the 100 data points without tenant information, for a total of 400 data points. The agent device can send the 400 target response data to the first user equipment so that the first user equipment can receive the 400 target response data.
[0252] In this embodiment, a first user equipment can send an access request to a service equipment via a proxy device. The service equipment can generate preset tenant information based on the access request and send an access response corresponding to the access request to the first user equipment via the proxy device. When a user has a task requirement, the first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, it can generate a first data operation request. The first user equipment can send the first data operation request to the proxy device. The proxy device can obtain the preset tenant information corresponding to the first tenant and verify the first tenant information in the first data operation request based on the preset tenant information to obtain a verification result. If the verification result is successful, the proxy device can mark the first data operation request based on the first tenant information to obtain a second data operation request and send the second data operation request to the service equipment. The service equipment can then perform operations on the data corresponding to the first tenant based on the second data operation request. Because the proxy device can mark the data operation requests sent by user devices, each tenant's user devices can only operate on the data that the tenant can operate on in the service device. Furthermore, the proxy device can filter the initial response data sent by the service device to prevent the first tenant's user devices from accessing the data of other tenants. This achieves tenant isolation and allows multiple tenants to share a single service device, reducing the cost of the service device.
[0253] Below, based on any of the above embodiments, specific examples will be used to illustrate... Figure 5 The above data processing methods will be explained in further detail.
[0254] Figure 5 A schematic diagram of a data processing procedure provided for an exemplary embodiment of this application. Figure 1 Please see. Figure 5 This includes multiple user devices, agent devices, and multiple service devices. The multiple user devices can be edge devices, while the agent devices and multiple service devices can be cloud devices.
[0255] Multiple user devices can be user devices of multiple tenants. For example, multiple user devices can be user devices of tenant 1, ..., tenant n respectively, where tenant 1 can have 10 user devices, namely user device 1-1, user device 1-2, ..., user device 1-10; ...; tenant n can have 2 user devices, namely user device n-1 and user device n-2.
[0256] For any user device, a proxy component can be configured. For example, user device 1-1 can have a proxy component 1-1 configured.
[0257] A proxy device can include multiple multi-tenant components. One multi-tenant component can correspond to multiple tenant user devices and one service device. For example, a proxy device can include multi-tenant component 1, ..., multi-tenant component m, where multi-tenant component 1 can manage multiple user devices of tenant 1, ..., tenant n, and multi-tenant component 1 can correspond to service device 1.
[0258] Multiple service devices can be designated as service device 1, ..., service device m.
[0259] It should be noted that by using multi-tenant components and proxy components in conjunction with tenant agents, it is possible to achieve non-intrusiveness to existing systems.
[0260] For any given first user equipment, in step ①, the first user equipment may send an access request to the proxy device. The access request may include first tenant information and the device information of the first user equipment. For example, if the first user equipment is user equipment 1-1, user equipment 1-1 may send access request 1 to the proxy device, and access request 1 may include tenant 1 information and the IP address of user equipment 1-1.
[0261] In step ②, after receiving the access request, the agent device can send the access request to the service device.
[0262] In step ③, after receiving the access request, the service device can obtain the first tenant information and the device information of the first user device from the access request to generate preset tenant information. The preset tenant information may include the first tenant information and the device information of the first user device. For example, if access request 1 includes the information of tenant 1 and the IP address of user device 1-1, then after receiving access request 1, the service device can obtain the information of tenant 1 and the IP address of user device 1-1 to generate preset tenant information 1-1, which may include the information of tenant 1 and the IP address of user device 1-1.
[0263] After the service device generates the preset tenant information, it can send the corresponding access request response to the proxy device.
[0264] In step ④, after receiving the access request response, the agent device can send an access request response to user equipment 1-1. The access request response may include the request result and access credentials, and the access credentials may include the first tenant information.
[0265] When a user has a task requirement, steps ⑤, ⑥, and ⑦ can be executed.
[0266] In step ⑤, the user equipment can generate an initial data operation request through a process.
[0267] In step ⑥, the proxy component can determine the first tenant information corresponding to the user equipment, add the first tenant information to the initial data operation request to obtain the first data operation request, and send the first data operation request to the proxy device. For example, if the first tenant information includes tenant identifier 1 of tenant 1 as 001, and the initial data operation request 1 is "update data 1 to data 2", then the proxy component can add the first tenant information to the initial data operation request 1 to obtain the first data operation request. The first data operation request can then include "update data 1 to data 2" and tenant identifier 1.
[0268] In step ⑦, after the agent device obtains the first data operation request, it can parse and process the first data operation request through the multi-tenant component to obtain the first tenant information in the first data operation request. It can also verify the first tenant information and the first data operation request according to the preset tenant information to obtain the verification result.
[0269] When the verification result is successful, the agent device can use the multi-tenant component to mark the first data operation request based on the first tenant information to obtain the second data operation request, and then send the second data operation request to the service device 1. For example, if the first data operation request is "update data 1 to data 2", after being marked by the multi-tenant component 1, the second data operation request may include "data 2 with tenant identifier 1" and the second operation instruction is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1".
[0270] After receiving the second data operation request, the service device can process the data corresponding to the first tenant according to the second data operation request. For example, the second data operation request may include "data 2 with tenant identifier 1" and the second operation instruction may be "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1". Then the service device can update data 1 with tenant identifier 1 to data 2 with tenant identifier 1 according to the second operation instruction.
[0271] Optionally, if the operation type corresponding to the first data operation request is a query type, since the second data operation request is generated based on the first data operation request, the service device can obtain the initial response data corresponding to the first data operation request based on the second data operation request, and send the initial response data to the proxy device. The proxy device can obtain the initial response data corresponding to the first data operation request, filter the initial response data according to the first tenant information through the multi-tenant component, that is, determine the target response data corresponding to the first tenant in the initial response data, and send the target response data to the first user equipment so that the first user equipment can receive the target response data.
[0272] In this embodiment, a first user equipment can send an access request to a service equipment via a proxy device. The service equipment can generate preset tenant information based on the access request and send an access response corresponding to the access request to the first user equipment via the proxy device. When a user has a task requirement, the first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, it can generate a first data operation request. The first user equipment can send the first data operation request to the proxy device. The proxy device can obtain the preset tenant information corresponding to the first tenant and verify the first tenant information in the first data operation request based on the preset tenant information to obtain a verification result. If the verification result is successful, the proxy device can mark the first data operation request based on the first tenant information to obtain a second data operation request and send the second data operation request to the service equipment. The service equipment can then perform operations on the data corresponding to the first tenant based on the second data operation request. Because the proxy device can mark the data operation requests sent by user devices, each tenant's user devices can only operate on the data that the tenant can operate on in the service device. Furthermore, the proxy device can filter the initial response data sent by the service device to prevent the first tenant's user devices from accessing the data of other tenants. This achieves tenant isolation and allows multiple tenants to share a single service device, reducing the cost of the service device.
[0273] Figure 6 A schematic diagram of a data processing procedure provided for an exemplary embodiment of this application. Figure 2 Please see. Figure 6 This includes multiple user devices and multiple service devices. (and) Figure 5 The difference in the illustrated embodiment is that, without the need for a proxy device, a multi-tenant component can be set up in each service device. For example, multi-tenant component 1 can be set up in service device 1, ..., and multi-tenant component m can be set up in service device m.
[0274] For any given first user equipment, in step ①, the first user equipment may send an access request to the service equipment. The access request may include first tenant information and the device information of the first user equipment.
[0275] In step ②, after receiving the request for access, the service device can obtain the first tenant information and the device information of the first user device in the request for access to generate preset tenant information and send the request for access response corresponding to the request for access to the first user device.
[0276] When a user has a task requirement, steps ③, ④, and ⑤ can be executed.
[0277] In step ③, the user equipment can generate an initial data operation request through a process.
[0278] In step ④, the proxy component can determine the first tenant information corresponding to the user equipment, add the first tenant information to the initial data operation request to obtain the first data operation request, and send the first data operation request to the service equipment. For example, if the first tenant information includes tenant identifier 1 of tenant 1 as 001, and the initial data operation request 1 is "update data 1 to data 2", then the proxy component can add the first tenant information to the initial data operation request 1 to obtain the first data operation request. The first data operation request can then include "update data 1 to data 2" and tenant identifier 1.
[0279] In step ⑤, after the service device obtains the first data operation request, it can parse and process the first data operation request through the multi-tenant component to obtain the first tenant information in the first data operation request. It can also verify the first tenant information and the first data operation request according to the preset tenant information to obtain the verification result.
[0280] When the verification result is successful, the service device can use the multi-tenant component to mark the first data operation request based on the first tenant information to obtain the second data operation request. For example, if the first data operation request is "update data 1 to data 2", after being marked by the multi-tenant component 1, the second data operation request may include "data 2 with tenant identifier 1" and the second operation instruction is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1".
[0281] The service device can process the data corresponding to the first tenant according to the second data operation request. For example, the second data operation request may include "data 2 with tenant identifier 1" and the second operation instruction is "update data 1 with tenant identifier 1 to data 2 with tenant identifier 1". Then the service device can update data 1 with tenant identifier 1 to data 2 with tenant identifier 1 according to the second operation instruction.
[0282] Optionally, if the operation type corresponding to the first data operation request is a query type, since the second data operation request is generated based on the first data operation request, the service device can obtain the initial response data corresponding to the first data operation request based on the second data operation request, and can filter the initial response data based on the first tenant information through the multi-tenant component, that is, determine the target response data corresponding to the first tenant in the initial response data, and send the target response data to the first user equipment so that the first user equipment can receive the target response data.
[0283] In this embodiment, a first user equipment can send an access request to a service equipment. The service equipment can generate preset tenant information based on the access request and send an access response corresponding to the access request to the first user equipment. When a user has a task requirement, the first user equipment can generate an initial data operation request and determine the corresponding first tenant information. Then, based on the first tenant information and the initial data operation request, it can generate a first data operation request. The first user equipment can send the first data operation request to the service equipment. After receiving the first data operation request, the service equipment can mark the first data operation request based on the first tenant information to obtain a second data operation request. Then, based on the second data operation request, it can perform operations on the data corresponding to the first tenant. Since a multi-tenant component can be set in the service equipment, the data operation requests sent by user equipment can be marked through the multi-tenant component, ensuring that each tenant's user equipment can only operate on data that the tenant can operate on within the service equipment. This achieves tenant isolation and allows multiple tenants to share a single service equipment, reducing the cost of the service equipment.
[0284] Figure 7 This is a schematic diagram of a data processing apparatus provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 7 The device, used in proxy equipment, includes: a receiving module 11, a processing module 12, and a sending module 13, wherein...
[0285] The receiving module 11 is used to receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant.
[0286] The processing module 12 is used to mark the first data operation request according to the first tenant information to obtain a second data operation request.
[0287] The sending module 13 is used to send the second data operation request to the service device, so that the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. The service device is used to provide services to user equipment of multiple tenants.
[0288] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0289] In one possible implementation, the processing module 12 is specifically used for:
[0290] Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type;
[0291] Based on the operation type and the first tenant information, the first data operation request is marked to obtain the second data operation request.
[0292] In one possible implementation, the operation type is a write type or an update type, and the first data operation request includes first data and a first operation instruction; the processing module 12 is specifically used for:
[0293] The first data is marked based on the first tenant information to obtain the second data;
[0294] The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0295] In one possible implementation, the operation type is a deletion type or a query type, and the first data operation request includes a third operation instruction; the processing module 12 is specifically used for:
[0296] The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0297] In one possible implementation, the processing module 12 is specifically used for:
[0298] Obtain the preset tenant information corresponding to the first tenant;
[0299] The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure.
[0300] When the verification result is successful, the first data operation request is marked according to the first tenant information to obtain the second data operation request.
[0301] In one possible implementation, the apparatus further includes: an acquisition module 14 and a generation module 15, wherein,
[0302] The acquisition module 14 is used to acquire the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment;
[0303] The generation module 15 is used to generate the preset tenant information based on the access request.
[0304] In one possible implementation, the acquisition module 14 is further configured to acquire the initial response data corresponding to the first data operation request sent by the service device;
[0305] In one possible implementation, the device further includes a determining module 16.
[0306] The determining module 16 is used to determine the target response data corresponding to the first tenant in the initial response data, wherein the target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information;
[0307] The sending module is further configured to send the target response data to the first user equipment.
[0308] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0309] Figure 8 A schematic diagram of another data processing apparatus provided for an exemplary embodiment of this application. Please refer to... Figure 8 The device, applied to service equipment, includes: a receiving module 21, a first processing module 22, and a second processing module 23, wherein...
[0310] The receiving module 21 is used to receive a first data operation request sent by a first user equipment, wherein the first user equipment is the user equipment corresponding to the first tenant, and the first data operation request includes the first tenant information of the first tenant.
[0311] The first processing module 22 is used to mark the first data operation request according to the first tenant information to obtain a second data operation request;
[0312] The second processing module 23 is used to process the data corresponding to the first tenant according to the second data operation request.
[0313] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0314] In one possible implementation, the first processing module 22 is specifically used for:
[0315] Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type;
[0316] Based on the operation type and the first tenant information, the first data operation request is marked to obtain the second data operation request.
[0317] In one possible implementation, the operation type is a write type or an update type, and the first data operation request includes first data and a first operation instruction; the first processing module 22 is specifically used for:
[0318] The first data is marked based on the first tenant information to obtain the second data;
[0319] The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
[0320] In one possible implementation, the operation type is a deletion type or a query type, and the first data operation request includes a third operation instruction; the first processing module 22 is specifically used for:
[0321] The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
[0322] In one possible implementation, the first processing module 22 is specifically used for:
[0323] Obtain the preset tenant information corresponding to the first tenant;
[0324] The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure.
[0325] When the verification result is successful, the first data operation request is marked according to the first tenant information to obtain the second data operation request.
[0326] In one possible implementation, the apparatus further includes an acquisition module 24 and a generation module 25, wherein
[0327] The acquisition module 24 is used to acquire the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment;
[0328] The generation module 25 is used to generate the preset tenant information based on the access request.
[0329] In one possible implementation, the acquisition module 24 is further configured to:
[0330] Obtain the initial response data corresponding to the first data operation request sent by the service device;
[0331] In one possible implementation, the device further includes a determining module 26 and a transmitting module 27.
[0332] The determining module 26 is used to determine the target response data corresponding to the first tenant in the initial response data, wherein the target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information;
[0333] The sending module 27 is used to send the target response data to the first user equipment.
[0334] In one possible implementation, the service device is equipped with a multi-tenant component; the receiving module 21 is used for:
[0335] The multi-tenant component receives a first data operation request sent by a first user equipment.
[0336] In one possible implementation, the first processing module 22 is used to:
[0337] Based on the first tenant information, the first data operation request is marked by the multi-tenant component to obtain the second data operation request.
[0338] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0339] Figure 9 This is a schematic diagram of another data processing apparatus provided as an exemplary embodiment of this application. Please refer to... Figure 9 The device, applied to user equipment, includes: a first generation module 31, a determining module 32, a second generation module 33, and a sending module 34, wherein...
[0340] The first generation module 31 is used to generate an initial data operation request;
[0341] The determining module 32 is used to determine the tenant information corresponding to the first user equipment;
[0342] The second generation module 33 is used to generate a first data operation request based on the first tenant information and the initial data operation request;
[0343] The sending module 34 is used to send the first data operation request to the service device, which is used to provide services to user equipment of multiple tenants.
[0344] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0345] In one possible implementation, the second generation module 33 is specifically used for:
[0346] The first tenant information is added to the initial data operation request to obtain the first data operation request.
[0347] In one possible implementation, the sending module 34 is further configured to:
[0348] Send an access request to the service device, the access request including the first tenant information and the device information of the first user device;
[0349] In one possible implementation, the device further includes a receiving module 35.
[0350] The receiving module 35 is used to receive the request access response corresponding to the request access request sent by the service device.
[0351] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0352] This application provides an exemplary embodiment of a schematic diagram of a proxy device. Please refer to [link / reference]. Figure 10 The agent device 40 may include a processor 41 and a memory 42. Exemplarily, the processor 41 and the memory 42 are interconnected via a bus 43.
[0353] The memory 42 stores computer-executed instructions;
[0354] The processor 41 executes the computer execution instructions stored in the memory 42, causing the processor 41 to perform the data processing method as shown in the above method embodiment.
[0355] An exemplary embodiment of this application provides a structural schematic diagram of a service device. Please refer to [link / reference]. Figure 11 The service device 50 may include a processor 51 and a memory 52. Exemplarily, the processor 51 and the memory 52 are interconnected via a bus 53.
[0356] The memory 52 stores computer-executed instructions;
[0357] The processor 51 executes the computer execution instructions stored in the memory 52, causing the processor 51 to perform the data processing method as shown in the above method embodiment.
[0358] An exemplary embodiment of this application provides a schematic diagram of the structure of a user equipment. Please refer to [link / reference]. Figure 12 The user equipment 60 may include a processor 61 and a memory 62. Exemplarily, the processor 61 and the memory 62 are interconnected via a bus 63.
[0359] The memory 62 stores computer-executed instructions;
[0360] The processor 61 executes the computer execution instructions stored in the memory 62, causing the processor 61 to perform the data processing method as shown in the above method embodiment.
[0361] Accordingly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data processing method described in any of the above method embodiments.
[0362] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the data processing method shown in any of the above method embodiments.
[0363] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0364] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0365] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0366] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0367] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0368] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0369] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0370] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0371] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data processing method, characterized in that, Applied to a proxy device, the proxy device including multiple multi-tenant components, one multi-tenant component corresponding to one service device and multiple tenant user devices, the method includes: The system receives a first data operation request sent by a first user equipment, parses and processes the first data operation request through a multi-tenant component, and obtains the first tenant information of the first tenant in the first data operation request. The first user equipment is the user equipment corresponding to the first tenant. Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type; Obtain the preset tenant information corresponding to the first tenant, wherein the preset tenant information is generated by the service device after receiving the access request and obtaining the first tenant information and the device information of the first user device in the access request; The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure. When the verification result is successful, the first data operation request is marked by the multi-tenant component according to the operation type and the first tenant information to obtain the second data operation request. The service device sends the second data operation request to the service device so that the service device can perform operation processing on the data corresponding to the first tenant according to the second data operation request. The service device is used to provide services to user equipment of multiple tenants. Obtain the initial response data corresponding to the first data operation request sent by the service device; The target response data corresponding to the first tenant is determined from the initial response data by the multi-tenant component. The target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information. The target response data is sent to the first user equipment.
2. A data processing method, characterized in that, Applied to a service device for providing services to user devices of multiple tenants, the service device having a multi-tenant component, the method includes: The multi-tenant component receives a first data operation request sent by a first user equipment and parses the first data operation request to obtain the first tenant information of the first tenant in the first data operation request. The first user equipment is the user equipment corresponding to the first tenant. Determine the operation type corresponding to the first data operation request, wherein the operation type includes at least one of the following: write type, delete type, query type, or update type; Obtain the preset tenant information corresponding to the first tenant, wherein the preset tenant information is generated by the service device after receiving the access request and obtaining the first tenant information and the device information of the first user device in the access request; The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either verification success or verification failure. When the verification result is successful, the first data operation request is marked by the multi-tenant component according to the operation type and the first tenant information to obtain the second data operation request. Based on the second data operation request, perform operation processing on the data corresponding to the first tenant; Obtain the initial response data corresponding to the first data operation request sent by the service device; The target response data corresponding to the first tenant is determined from the initial response data by the multi-tenant component. The target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information. The target response data is sent to the first user equipment.
3. The method according to claim 1 or 2, characterized in that, The operation type is either write or update, and the first data operation request includes first data and a first operation instruction. The first data operation request is marked to obtain the second data operation request, including: The first data is marked based on the first tenant information to obtain the second data; The first operation instruction is marked based on the first tenant information to obtain a second operation instruction, wherein the second data operation request includes the second data and the second operation instruction.
4. The method according to claim 1 or 2, characterized in that, The operation type is either deletion or query, and the first data operation request includes a third operation instruction; the first data operation request is marked to obtain a second data operation request, including: The third operation instruction is marked based on the first tenant information to obtain a fourth operation instruction, wherein the second data operation request includes the fourth operation instruction.
5. The method according to claim 1 or 2, characterized in that, Before obtaining the preset tenant information corresponding to the first tenant, the process also includes: Obtain the access request sent by the first user equipment, wherein the access request includes the first tenant information and the device information of the first user equipment; Based on the requested access, the preset tenant information is generated.
6. A data processing method, characterized in that, Applied to a user equipment, wherein the user equipment is equipped with a proxy component, the method includes: Generate an initial data operation request; Determine the first tenant information corresponding to the first user equipment; Based on the first tenant information and the initial data operation request, a first data operation request is generated and sent to the service device. This allows the multi-tenant component in the service device to determine the operation type corresponding to the first data operation request. The operation type includes at least one of the following: write, delete, query, or update. Preset tenant information corresponding to the first tenant is obtained, where the preset tenant information is generated by the service device after receiving an access request, by obtaining the first tenant information and the device information of the first user device in the access request. The first tenant information and the first data operation request are verified based on the preset tenant information to obtain a verification result, which is either successful or unsuccessful. When the verification result is successful, the first data operation request is marked by the multi-tenant component based on the operation type and the first tenant information to obtain a second data operation request. The data corresponding to the first tenant is then processed according to the second data operation request. The service device provides services to user devices of multiple tenants. The service device receives target response data sent by the service device. The target response data is the target response data corresponding to the first tenant, which is determined by the multi-tenant component in the initial response data corresponding to the first data operation request. The target response data is marked with the tenant information of the first tenant, or the target response data is not marked with tenant information.
7. The method according to claim 6, characterized in that, Based on the first tenant information and the initial data operation request, a first data operation request is generated, including: The first tenant information is added to the initial data operation request to obtain the first data operation request.
8. The method according to claim 6 or 7, characterized in that, The method further includes: Send an access request to the service device, the access request including the first tenant information and the device information of the first user device; Receive the access request response corresponding to the access request sent by the service device.
9. An agent device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method as described in any one of claims 1 to 5.
10. A service device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method as described in any one of claims 2 to 5.
11. A user equipment, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the data processing method as described in any one of claims 6 to 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data processing method according to any one of claims 1 to 5, or the data processing method according to any one of claims 6 to 8.
13. A computer program product comprising a computer program that, when executed by a processor, implements the data processing method according to any one of claims 1 to 5, or the data processing method according to any one of claims 6 to 8.