CN109213584B - Task execution method, device, electronic equipment and computer readable storage medium - Google Patents

Task execution method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN109213584B
CN109213584B CN201810848246.2A CN201810848246A CN109213584B CN 109213584 B CN109213584 B CN 109213584B CN 201810848246 A CN201810848246 A CN 201810848246A CN 109213584 B CN109213584 B CN 109213584B
Authority
CN
China
Prior art keywords
service
tenant
task
executed
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810848246.2A
Other languages
Chinese (zh)
Other versions
CN109213584A (en
Inventor
任凤鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201810848246.2A priority Critical patent/CN109213584B/en
Publication of CN109213584A publication Critical patent/CN109213584A/en
Application granted granted Critical
Publication of CN109213584B publication Critical patent/CN109213584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure discloses a task execution method, a task execution device, electronic equipment and a computer-readable storage medium. The method comprises the following steps: generating tenant-related information in response to a task scheduling event; the tenant association information at least comprises the corresponding relation among users, tenants and services; acquiring a data primary key list related to the service to be executed according to the service to be executed and the tenant association information; and executing the task with the first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information. The method and the device realize the task and data isolation of multiple tenants, and simultaneously enable different services corresponding to different tenants to multiplex the same task, so that task resources can be saved.

Description

Task execution method, device, electronic equipment and computer readable storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a task execution method, a task execution device, electronic equipment and a computer readable storage medium.
Background
With the advent of public data center cloud platforms represented by Amazon EC2, more and more businesses migrate traffic from local data centers onto cloud platforms. To support a large number of users sharing hardware (e.g., CPU, storage, bandwidth, etc.) resources, cloud platform operators typically employ multi-tenant techniques to abstract physical hardware resources into virtual resources. Each tenant can rent virtual resources with different scales according to own business requirements, and pay operators according to the use amount of the resources. Therefore, the multi-tenant cloud platform has two major advantages: firstly, a large number of tenants can be served, and the utilization rate of physical resources is improved, so that the income of operators is improved; secondly, the tenant is allowed to flexibly stretch the use scale of the virtual resource according to the service requirement, so that the resource waste is avoided to the greatest extent.
Disclosure of Invention
The embodiment of the disclosure provides a task execution method, a task execution device, electronic equipment and a computer readable storage medium.
In a first aspect, a task execution method is provided in an embodiment of the present disclosure.
Specifically, the task execution method includes:
generating tenant-related information in response to a task scheduling event; the tenant association information at least comprises the corresponding relation among users, tenants and services;
acquiring a data primary key list related to the service to be executed according to the service to be executed and the tenant association information;
and executing the task with the first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information.
Further, the generating tenant-associated information includes:
acquiring a tenant identification list;
and determining the service with a second preset corresponding relation with the tenant in the tenant identification list.
Further, the generating tenant-associated information further includes:
determining a user identification list under a current execution area;
and establishing a one-to-one correspondence among the user, the tenant and the service according to the affiliation of the user and the tenant and the second preset corresponding relationship.
Further, acquiring the data primary key list related to the service to be executed according to the service to be executed and the tenant association information, including:
determining the task with the first preset corresponding relation with the service to be executed according to the service to be executed;
acquiring a data primary key list related to the service to be executed according to the task; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs.
Further, executing the task with the first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information, including:
determining detail data according to the data primary key list and the user requesting the service to be executed;
and executing the task according to the tenant association information and the detail data.
Further, the method further comprises:
generating configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and storing the configuration information in a cache.
Further, the configuration parameters of the tenant include at least one of: service parameters, service scheduling period and service execution environment.
Further, generating tenant-associated information, further includes:
determining a service scheduling period and/or a service execution environment corresponding to the tenant and the service with the second preset corresponding relation;
and determining whether to generate tenant associated information corresponding to the tenant and the service with the second preset corresponding relation according to the service scheduling period and/or the service execution environment.
In a second aspect, an embodiment of the present disclosure provides a task execution device, including:
the first generation module is configured to respond to the task scheduling event and generate tenant association information; the tenant association information at least comprises the corresponding relation among users, tenants and services;
the acquisition module is configured to acquire a data primary key list related to the service to be executed according to the service to be executed and the tenant association information;
and the execution module is configured to execute the task with the first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information.
Further, the first generating module includes:
The first acquisition submodule is configured to acquire a tenant identification list;
the first determining submodule is configured to determine the business with a second preset corresponding relation with the tenant in the tenant identification list.
Further, the first generating module further includes:
a second determining submodule configured to determine a list of user identities under a current execution area;
the establishing sub-module is configured to establish a one-to-one correspondence among the user, the tenant and the service according to the subordinate relationship between the user and the tenant and the second preset corresponding relationship.
Further, the acquisition module includes:
a third determining submodule configured to determine the task having the first preset correspondence with the service to be executed according to the service to be executed;
the second acquisition sub-module is configured to acquire the data primary key list related to the service to be executed according to the task; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs.
Further, the execution module includes:
a fourth determining submodule configured to determine detail data according to the data primary key list and the user who requests the service to be executed;
And the execution sub-module is configured to execute the task according to the tenant association information and the detail data.
Further, the apparatus further comprises:
a second generation module configured to generate configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and the storage module is configured to store the configuration information in a cache.
Further, the configuration parameters of the tenant include at least one of: service parameters, service scheduling period and service execution environment.
Further, the first generating module further includes:
a fifth determining submodule configured to determine a service scheduling period and/or a service execution environment corresponding to the tenant and the service having the second preset corresponding relation;
and a sixth determining submodule configured to determine whether to generate tenant associated information corresponding to the tenant and the service with the second preset corresponding relation according to the service scheduling period and/or the service execution environment.
The functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
In one possible design, the task performing device includes a memory in a structure for storing one or more computer instructions for supporting the task performing device to perform the task performing method in the first aspect, and a processor configured to execute the computer instructions stored in the memory. The task performing device may further comprise a communication interface for the task performing device to communicate with other devices or a communication network.
In a third aspect, embodiments of the present disclosure provide an electronic device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium for storing computer instructions for use by a task execution device, including computer instructions for performing the task execution method of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the embodiment of the disclosure, the corresponding relation is pre-established between the tenant and the service, the corresponding relation is pre-established between the service and the specific task capable of realizing the service, and further, in the task scheduling process, the corresponding relation among the user, the tenant and the service is obtained firstly, so that the task is divided by a combination layer of the service and the tenant, then a data primary key list related to the service to be executed is loaded according to the service to be executed and the corresponding relation, and finally, the task with the preset corresponding relation with the service to be executed is executed according to the data primary key list and the corresponding relation. According to the scheme, different tenants are isolated on the service level by utilizing the corresponding relation among the users, the tenants and the service, and corresponding tasks are called to acquire a data primary key list related to the users under the corresponding tenants based on the corresponding relation among the service and the tasks aiming at the service to be executed requested by the users, and the corresponding tasks are executed; therefore, the multi-tenant task and data isolation are realized, and meanwhile, different tasks corresponding to different tenant configuration can be multiplexed with the same task, so that task resources can be saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 illustrates a flow chart of a task execution method according to an embodiment of the present disclosure;
fig. 2 shows a flow chart of step S101 according to the embodiment shown in fig. 1;
FIG. 3 shows a further flowchart of step S101 according to the embodiment shown in FIG. 1;
FIG. 4 shows a flow chart of step S102 according to the embodiment shown in FIG. 1;
fig. 5 shows a flow chart of step S103 according to the embodiment shown in fig. 1;
FIG. 6 shows a further flowchart of step S101 according to the embodiment shown in FIG. 1;
FIG. 7 shows a block diagram of a task performing device according to an embodiment of the present disclosure;
FIG. 8 shows a block diagram of a first generation module 701 according to the embodiment shown in FIG. 7;
FIG. 9 shows a further block diagram of the first generation module 701 according to the embodiment shown in FIG. 7;
FIG. 10 shows a block diagram of the acquisition module 702 according to the embodiment shown in FIG. 7;
FIG. 11 shows a block diagram of the execution module 703 according to the embodiment shown in FIG. 7;
FIG. 12 shows a further block diagram of the first generation module 701 according to the embodiment shown in FIG. 7;
fig. 13 is a schematic structural view of an electronic device suitable for use in implementing a task execution method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, portions irrelevant to description of the exemplary embodiments are omitted in the drawings.
In this disclosure, it should be understood that terms such as "comprises" or "comprising," etc., are intended to indicate the presence of features, numbers, steps, acts, components, portions, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, acts, components, portions, or combinations thereof are present or added.
In addition, it should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates a flow chart of a task execution method according to an embodiment of the present disclosure. As shown in fig. 1, the task execution method includes the following steps S101 to S103:
in step S101, tenant-related information is generated in response to a task scheduling event; the tenant association information at least comprises the corresponding relation among users, tenants and services;
in step S102, a data primary key list related to the service to be executed is obtained according to the service to be executed and the tenant association information;
in step S103, a task having a first preset correspondence with the service to be executed is executed according to the data primary key list and the tenant association information.
Steps S101, S102, and S103 will be further described below, respectively.
Step S101
In this embodiment, the cloud system may include a task scheduling center and a plurality of servers. The task scheduling center can trigger task scheduling events at regular time or periodically to realize service requests of users under each tenant. The server can execute the corresponding task according to the task scheduling event initiated by the task scheduling center. Multiple tenants may share the same application resources provided by the same server, but the data resources between different tenants are isolated. Multiple users can exist under each tenant, and the multiple users can share application resources provided by the same server, but data among the users are isolated. Different users may be divided into the same effective execution area (zone) according to factors such as physical location of the users, and the same effective execution area may include one server or a plurality of servers, that is, the users divided into the same effective execution area may be served by one or more servers under the effective execution area. Multiple users under the same tenant can be divided into the same effective execution area, or can be divided into different effective execution areas, and the method is specifically set according to actual conditions, and is not limited herein. The same effective execution area may support a plurality of different tenants, and the same tenant may be supported by a plurality of different effective execution areas.
In the prior art, after a task scheduling event is initiated by a task scheduling center, a server determines one or more users divided into an effective execution area where the user or users are located, and then determines one or more tasks requested to be executed by the user or users (which can be determined by the correspondence between the user or user identifiers and task identifiers). And then the task loader corresponding to each task drags out a main key list of the data to be executed under the user requesting the task from the database, finally, the data detail list is obtained according to the main key list, and the corresponding task is executed. The prior art can isolate data of different users, but when the task is executed, different tasks cannot be customized for different services by taking the task as a dimension, and multiplexing of the tasks cannot be achieved.
In view of the above drawbacks, embodiments of the present disclosure propose the task execution method described above. In the task execution method, the corresponding relation between the tenant and the service and the corresponding relation between the service and the task can be preconfigured. The task execution entity (such as a server) generates tenant association information after receiving the task scheduling event. Tenant-associated information may include, but is not limited to, correspondence between users, tenants, and services. The tenant may be a tenant configured with a service, where the service and the tenant have a preset corresponding relationship, and the user belongs to a certain tenant. Therefore, the service configured by each tenant can be determined through all currently supported tenant information, and then the user under the tenant is determined. In this way, the correspondence between the user, tenant and business can be finally determined. The correspondence may be a one-to-one correspondence between the user, the tenant, and the service, and the tenant association information may include a plurality of the correspondence. For example, the correspondence may be expressed as (uid, business_code, tnt_inst_id), where uid is a user identifier, business_code is a service code, and tnt_inst_id is a tenant identifier.
In an embodiment, the tenant may be all tenants supported by the cloud system, that is, tenants having the use authority of the resources provided by the cloud system, and the user may be a user under the current effective execution area. In the embodiment of the disclosure, a plurality of effective execution areas can be divided according to the dimension of a user, and a task execution entity can operate data in the effective execution areas. The task is triggered in the effective execution area and executed in the effective execution area. For example, the divided effective execution area a includes N users, which may belong to the same tenant or different tenants, and the service requested by the user is executed in the effective execution area a. Multiple users under the same tenant can request the service corresponding to the tenant. For example, the tenant a is correspondingly configured with the service B, and the users belonging to the tenant a under the current effective execution area include the user C and the user D, and in response to the task scheduling event, the determinable tenant association information includes two correspondence relations: (C, B, A) and (D, B, A).
Step S102
In this embodiment, after determining tenant association information, that is, after determining a correspondence between one or more users, tenants, and services, a primary key list of corresponding data is obtained according to the correspondence and the service to be executed. The data primary key list refers to an index list of data related to a service to be executed, which does not include detail data. For example, the data corresponding to a certain user request is all the data in the database table D, and then the data primary key corresponding to the request may be an index of the database table D. The data primary key list is allocated to the tenant and the user below the tenant, which have a preset corresponding relation with the service to be executed, for example, a data table ID list specified for the tenant and the user in the cloud platform, and the like. The service to be executed is a service requested by the user and not executed, and the service has a preset corresponding relation with the tenant to which the user belongs, namely the service configured by the tenant. It should be noted that the user can only request the service corresponding to the tenant to which the user belongs. The service corresponding to each tenant may have multiple user requests. Since the same service can be configured to multiple tenants, data between the multiple tenants is isolated. Therefore, when the data primary key list is acquired, the data primary key list which is in the operation range and related to the execution service can be acquired according to the user and the tenant requesting the service to be executed. In an embodiment, the service corresponds to the task, so when the data primary key list is acquired, the data loader of the task can be invoked and load data related to the service from the database by taking the tenant identification and the user identification as query conditions, and the data loader of the task only loads data required for executing the task. For example, for the to-be-executed service X, according to the tenant association information, it can be known that the tenant corresponding to the to-be-executed service X is the tenant Y, and N users Z under the tenant Y have requests for the service, so that the data primary key list which is related to the to-be-executed service X and belongs to the operation range of the tenant Y and the user Z can be obtained. In this way, data between different tenants can be isolated.
Step S103
In this embodiment, after determining the data primary key list related to the service to be executed, a corresponding task may be executed to complete the service to be executed. The business is application-level and needs to be completed by specific tasks at the implementation level. In the embodiment of the disclosure, each service corresponds to a task, that is, each service has a preconfigured first preset corresponding relation with one task, and the corresponding service can be realized by executing the corresponding task. For example, for a payment related service, a task having a first preset correspondence therewith is used to perform a payment related operation. Each task can have a corresponding operation flow, and when the task is executed, the detail data can be obtained according to the data primary key list, and the corresponding operation is completed. It should be noted that, in the embodiment of the present disclosure, the same task may be multiplexed by multiple services. Because the corresponding relation between the service and the tenant is configured in advance, when the task is scheduled, firstly, grouping is carried out according to the corresponding relation between the service and the tenant and the user under the current execution area, namely, the tenant supported by the cloud system, the service configured for the tenant and the user under the tenant are combined, each combination relates to one corresponding relation among the user, the tenant and the service, and different combinations relate to different corresponding relations, after the corresponding relation is determined, when the service is realized, firstly, a data primary key list which corresponds to the tenant and the user and is related to the service is obtained according to the corresponding relation, then, detail data which corresponds to the tenant and the user and is related to the service is obtained according to the data primary key list and the corresponding relation, and then, the corresponding task is executed; when the data primary key list and the detail data are acquired through the process, only the data of the corresponding tenant and the user are acquired, and the tenant and the user are the tenant and the user which are determined from the combination and have the corresponding relation with the service to be executed, so that the data isolation between the tenants can be realized, and meanwhile, the multiplexing of tasks can also be realized (because different tenants can have the first preset corresponding relation with the same service, but when the tasks corresponding to the service are executed, the data of different tenants are different). For example, there is a service 1 and a service 2; service 1 charges corresponding funds at 9 o ' clock in the morning, and service 2 charges corresponding funds at 8 o ' clock to 10 o ' clock in the morning, then the two services can share the same task by configuring different execution times, i.e., the task of charging corresponding funds.
According to the embodiment of the disclosure, after the task scheduling event is received, the task corresponding to the to-be-executed service can be executed according to the data primary key list and the tenant association information by firstly loading the primary key list of the to-be-executed service related data corresponding to the tenant through the determined tenant association information and the to-be-executed service, so that the to-be-executed service is realized. According to the scheme, different tenants are isolated on the service level by utilizing the corresponding relation among the users, the tenants and the service, and corresponding tasks are called to acquire a data primary key list related to the users under the corresponding tenants based on the corresponding relation among the service and the tasks aiming at the service to be executed requested by the users, and the corresponding tasks are executed; therefore, the multi-tenant task and data isolation are realized, and meanwhile, different tasks corresponding to different tenant configuration can be multiplexed with the same task, so that task resources can be saved.
In an optional implementation manner of this embodiment, as shown in fig. 2, the step S101, that is, the step of generating tenant association information, further includes the following steps S201 to S202:
in step S201, a tenant identification list is obtained;
In step S202, the service having a second preset correspondence with the tenant in the tenant identification list is determined.
In this optional implementation manner, when the task scheduling event is received, the tenant identification list currently supported by the cloud system may be determined first, and then the service having the second preset correspondence with one or more tenants in the tenant identification list may be determined. In this embodiment, each tenant may have different services corresponding to each other, so a second preset corresponding relationship between the tenant and the service may be pre-established, and when the task is scheduled, the service that the tenant may want to implement may be determined according to the second preset corresponding relationship. When executing the task corresponding to the service, the data range related to the task execution can be determined according to the corresponding relation, so that data isolation among different tenants is realized. In this alternative implementation, multiple one-to-one correspondence may be formed between the tenant and the service, such as (business_code, tnt_inst_id). It should be noted that, different tenants may share the same service (i.e. service codes are consistent, but data of different tenants are different when tasks corresponding to the service are executed), so that it is seen that different tenants can also multiplex the same task, but only load data under the operational range of the tenant when loading data in the data layer, so that data isolation between different tenants can be well achieved.
In an optional implementation manner of this embodiment, as shown in fig. 3, the step S101, that is, the step of generating tenant association information, further includes the following steps S301 to S302:
in step S301, a user identification list under the current execution area is determined;
in step S302, a one-to-one correspondence among the user, the tenant and the service is established according to the subordinate relationship between the user and the tenant and the second preset correspondence.
In this alternative implementation, when tenant association information is generated, a user identifier list under the current execution area may also be determined. In the embodiment of the disclosure, the cloud system is divided into different execution areas (i.e. different zones) by taking a user as a dimension. Different users under the same tenant can be in the same execution area or in different execution areas. And different users under different tenants can be in the same execution area or in different execution areas. When the task is scheduled, the task execution entity is required to operate the data under the zone, and the timing task is triggered in the zone and executed in the zone. Therefore, when tenant association information is generated, a user identification list divided under the current execution area can also be determined. The user identification list includes a plurality of user IDs divided under the current execution area. After the user identification list is determined, a one-to-one correspondence among the user, the tenant and the service is established according to the subordinate relationship (namely the tenant information of the user) between the user and the tenant and the second preset correspondence between the tenant and the service. In this way, the services requested by those users that do not belong to the current execution area can be excluded, and thus the task execution entity under the current execution area only executes the user requests divided into the current execution area.
In an optional implementation manner of this embodiment, as shown in fig. 4, the step S102, that is, the step of obtaining the data primary key list related to the service to be executed according to the service to be executed and the tenant association information, further includes the following steps S401 to S402:
in step S401, determining, according to the service to be executed, the task having a first preset correspondence with the service to be executed;
in step S402, a data primary key list related to the service to be executed is obtained according to the task; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs.
In this optional implementation manner, after determining the correspondence between the user, the tenant and the service in the current execution area, that is, tenant association information, a data primary key service list related to the service to be executed may be determined. The service to be executed is a service which has been requested by a user and is not processed, and each service may have a plurality of user requests, i.e. a plurality of users request to execute the same service, for example, a service in which a plurality of users request to execute payment. In the embodiment of the present disclosure, a task having a first preset correspondence with a service to be executed may be determined for each service to be executed. As described above, each service corresponds to a task for implementing the service. The embodiment of the disclosure may preset a first preset correspondence between services and tasks, where one service corresponds to one task, and different services may correspond to the same task, that is, multiplex the same task. Different tenants may share the same business code, but the data of different tenants needs to be isolated. Therefore, when the task corresponding to the service to be executed is determined, the data required by different tasks are different, so that the data primary key list can be loaded according to the task (the data required for executing the task can be loaded according to the data loader of the task), and only the data primary key list belonging to the operation range of the service to be executed can be loaded according to the tenant information and the user information corresponding to the service to be executed, and different tenants can load different data primary key lists for the same service, so that the data isolation function is realized. For example, in the cloud system, a data table d1 is specified for a user a under tenant 1, and a data table d2 is specified for a user b under tenant 2; the user a and the user b request the same service, and the same service has a second preset corresponding relation with the tenant 1 and the tenant 2; then after determining the task to which the service corresponds, the index list of data table d1 may be loaded for the service request of user a, and the index list of data table d2 may be loaded for the service request of user b. In this way, data between tenants can be completely isolated when the data is recorded.
In an optional implementation manner of this embodiment, as shown in fig. 5, step S103, that is, a step of executing a task having a first preset correspondence with the service to be executed according to the data primary key list and the tenant association information, further includes the following steps S501 to S502:
in step S501, determining detail data according to the data primary key list and the user requesting the service to be executed;
in step S502, the task is executed according to the tenant-related information and the detail data.
In this optional implementation manner, under the data allocated to the tenant, different users correspond to different data sub-tables, so when the data primary key list is determined, the detail data corresponding to the data primary key list can be obtained according to the user ID of the service to be executed. For example, the index of the data table 1 corresponds to the data key list, and the detail data may be the partial data of the data table 1 corresponding to the user ID. Because different services can multiplex the same task, but because the task execution parameters of different tenants are different, when executing the task, the tenant corresponding to the service to be executed can be determined according to the tenant association information, and the configuration parameter corresponding to the tenant can be determined. As described above for service 1 and service 2, service 1 charges corresponding funds at 9 o 'clock in the morning, and service 2 charges corresponding funds at 8 o' clock to 10 o 'clock in the morning, then these two services can multiplex the same task by configuring different parameters, i.e. execution time (9 o' clock in the morning or 8 o 'clock to 10 o' clock in the morning), i.e. the task of charging corresponding funds. Therefore, when executing the task, different configuration parameters of the tenant can be obtained according to the second preset corresponding relation between the service and the tenant, further the service parameter corresponding to the service is determined, and the task is executed according to the service parameter and the detail data, so that the service to be executed is realized. The configuration parameters of the tenant comprise relevant parameters of the tenant when executing the corresponding service.
In an alternative implementation of this embodiment, the method further includes the steps of:
generating configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and storing the configuration information in a cache.
In this alternative implementation, configuration information may be generated for any tenant and for the services owned by that tenant. The configuration information may be built in the form of a database table, or may be in the form of an XML file or configuration file. And generating a piece of configuration information according to the corresponding relation between each group of tenants and the service. When new business is generated for the tenant, corresponding configuration information can be generated. The configuration parameters of the tenant may include at least one of a service parameter, a service scheduling period, and a service execution environment of a service having a second preset correspondence with the tenant. The service parameters may include execution parameters required by the task having the first preset correspondence with the service in the execution process, for example, execution time of the task, etc. The service scheduling period can include the scheduling time of the service, and the setting of the scheduling frequency of different services can be realized by setting the configuration parameter of the service scheduling period. The service execution environment includes an environment in which a service corresponding to the tenant is executed. The execution environment can include, but is not limited to, a prefire execution environment and an online execution environment, wherein the prefire execution environment is an execution environment which is not provided for a user to use, and when the service is just released, the prefire execution environment can be firstly entered for testing; and the online execution environment is that the service is released and is in the process of being used by the user. The execution environment of the service may be defined by configuring the service execution environment. After the configuration information is generated, the configuration information can be stored in a cache, and the configuration information can be obtained from the cache at any time in the task scheduling process, so that the execution speed can be increased.
In an optional implementation manner of this embodiment, as shown in fig. 6, the step S101, that is, the step of generating tenant association information, further includes the following steps S601 to S602:
in step S601, determining a service scheduling period and/or a service execution environment corresponding to the tenant and the service having the second preset correspondence;
in step S602, it is determined whether to generate tenant association information corresponding to the tenant and the service having the second preset correspondence according to the service scheduling period and/or the service execution environment.
In this optional implementation manner, when generating tenant association information, the tenant identification list is first obtained, and then, according to each tenant in the tenant identification list, the service identification having the second preset corresponding relationship with the tenant identification is determined, which may be obtained from the above-mentioned configuration information. After the service identifier of the tenant with the second preset corresponding relation is obtained, the service scheduling period and/or the service execution environment can be determined according to the configuration information, and if the current time is determined to be not the service scheduling period of the service or not the service execution environment of the service through the service parameters in the configuration information, tenant association information is not generated for the tenant and the service, namely, the subsequent execution of the request for the service is not needed. For example, when the tenant 1 and the service 1 have the second preset correspondence relationship and it is determined that the service scheduling period or the service execution environment in the configuration information of the tenant 1 and the service 1 does not match the current time or the execution environment after receiving the task scheduling event, the tenant 1 and the service 1 are no longer matched with the user to generate tenant association information, and in the subsequent steps, there is no implementation process of the request for the service 1 by the user under the tenant 1. By the method, the service scheduling period and/or the configurability of the service execution environment can be realized, and isolation of different execution environments can be realized.
The following are device embodiments of the present disclosure that may be used to perform method embodiments of the present disclosure.
Fig. 7 shows a block diagram of a task execution device according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 7, the task performing device includes a first generating module 701, an acquiring module 702, and an performing module 703:
a first generation module 701 configured to generate tenant-associated information in response to a task scheduling event; the tenant association information at least comprises the corresponding relation among users, tenants and services;
an obtaining module 702, configured to obtain a data primary key list related to a service to be executed according to the service to be executed and the tenant association information;
and an execution module 703 configured to execute a task having a first preset correspondence with the service to be executed according to the data primary key list and the tenant association information.
The first generating module 701, the acquiring module 702, and the executing module 703 will be further described below, respectively.
First generation module 701
After receiving the task scheduling event, the first generating module 701 generates tenant-related information. Tenant-associated information may include, but is not limited to, correspondence between users, tenants, and services. The tenant may be a tenant configured with a service, where the service and the tenant have a preset corresponding relationship, and the user belongs to a certain tenant. Therefore, the service configured by each tenant can be determined through all currently supported tenant information, and then the user under the tenant is determined. In this way, the correspondence between the user, tenant and business can be finally determined. The correspondence may be a one-to-one correspondence between the user, the tenant, and the service, and the tenant association information may include a plurality of the correspondence. For example, the correspondence may be expressed as (uid, business_code, tnt_inst_id), where uid is a user identifier, business_code is a service code, and tnt_inst_id is a tenant identifier.
Acquisition module 702
After determining tenant association information, that is, after determining a correspondence between one or more users, tenants, and services, the first generating module 701 obtains a primary key list of corresponding data according to the correspondence and the service to be executed by the obtaining module 702. The data primary key list refers to an index list of data related to a service to be executed, which does not include detail data. For example, the data corresponding to a certain user request is all the data in the database table D, and then the data primary key corresponding to the request may be an index of the database table D. The data primary key list is allocated to the tenant and the user below the tenant, which have a preset corresponding relation with the service to be executed, for example, a data table ID list specified for the tenant and the user in the cloud platform, and the like. The service to be executed is a service requested by the user and not executed, and the service has a preset corresponding relation with the tenant to which the user belongs, namely the service configured by the tenant. It should be noted that the user can only request the service corresponding to the tenant to which the user belongs. The service corresponding to each tenant may have multiple user requests. Since the same service can be configured to multiple tenants, data between the multiple tenants is isolated. Therefore, when the data primary key list is acquired, the data primary key list which is in the operation range and related to the execution service can be acquired according to the user and the tenant requesting the service to be executed. In an embodiment, the service corresponds to a task, so when the acquiring module 702 acquires the data primary key list, the acquiring module may call the data loader of the task and load data related to the service from the database with the tenant identifier and the user identifier as query conditions, where the data loader of the task only loads data required for executing the task. For example, for the to-be-executed service X, according to the tenant association information, it can be known that the tenant corresponding to the to-be-executed service X is the tenant Y, and N users Z under the tenant Y have requests for the service, so that the data primary key list which is related to the to-be-executed service X and belongs to the operation range of the tenant Y and the user Z can be obtained. In this way, data between different tenants can be isolated.
Execution module 703
After the acquiring module 702 determines the data primary key list related to the service to be executed, the executing module 703 may execute a corresponding task to complete the service to be executed. The business is application-level and needs to be completed by specific tasks at the implementation level. In the embodiment of the disclosure, each service corresponds to a task, that is, each service has a preconfigured first preset corresponding relation with one task, and the corresponding service can be realized by executing the corresponding task. For example, for a payment related service, a task having a first preset correspondence therewith is used to perform a payment related operation. Each task may have a corresponding operation flow, and when executing the task, the execution module 703 may obtain detailed data according to the data primary key list, and call the task processor to complete a corresponding operation. It should be noted that, in the embodiment of the present disclosure, the same task may be multiplexed by multiple services. Because the corresponding relation between the service and the tenant is configured in advance, when the task is scheduled, firstly, grouping is carried out according to the corresponding relation between the service and the tenant and the user under the current execution area, namely, the tenant supported by the cloud system, the service configured for the tenant and the user under the tenant are combined, each combination relates to one corresponding relation among the user, the tenant and the service, and different combinations relate to different corresponding relations, after the corresponding relation is determined, when the service is realized, firstly, a data primary key list which corresponds to the tenant and the user and is related to the service is obtained according to the corresponding relation, then, detail data which corresponds to the tenant and the user and is related to the service is obtained according to the data primary key list and the corresponding relation, and then, the corresponding task is executed; when the data primary key list and the detail data are acquired through the process, only the data of the corresponding tenant and the user are acquired, and the tenant and the user are the tenant and the user which are determined from the combination and have the corresponding relation with the service to be executed, so that the data isolation between the tenants can be realized, and meanwhile, the multiplexing of tasks can also be realized (because different tenants can have the first preset corresponding relation with the same service, but when the tasks corresponding to the service are executed, the data of different tenants are different).
The task execution device in this embodiment corresponds to the task execution method described above, and specific details may refer to the description of the task execution method described above, which is not repeated here.
In an alternative implementation manner of this embodiment, as shown in fig. 8, the first generating module 701 further includes the following sub-modules:
a first obtaining sub-module 801 configured to obtain a tenant identification list;
a first determining submodule 802 configured to determine the service having a second preset correspondence with the tenant in the tenant identification list.
In this alternative implementation, when receiving the task scheduling event, the first obtaining sub-module 801 may first determine a tenant identification list currently supported by the cloud system, and then the first determining sub-module 802 determines a service having a second preset correspondence with one or more tenants in the tenant identification list. In this embodiment, each tenant may have different services corresponding to each other, so a second preset corresponding relationship between the tenant and the service may be pre-established, and when the task is scheduled, the service that the tenant may want to implement may be determined according to the second preset corresponding relationship. When executing the task corresponding to the service, the data range related to the task execution can be determined according to the corresponding relation, so that data isolation among different tenants is realized. In this alternative implementation, multiple one-to-one correspondence may be formed between the tenant and the service, such as (business_code, tnt_inst_id). It should be noted that, different tenants may share the same service (i.e. service codes are consistent, but data of different tenants are different when tasks corresponding to the service are executed), so that it is seen that different tenants can also multiplex the same task, but only load data under the operational range of the tenant when loading data in the data layer, so that data isolation between different tenants can be well achieved.
In an alternative implementation manner of this embodiment, as shown in fig. 9, the first generating module 701 further includes the following sub-modules:
a second determining sub-module 901 configured to determine a list of user identifications under a current execution area;
the establishing sub-module 902 is configured to establish a one-to-one correspondence among the user, the tenant and the service according to the subordinate relationship between the user and the tenant and the second preset correspondence.
In this alternative implementation manner, when the first generating module 701 generates tenant association information, the second determining sub-module 901 may further determine a list of user identities under the current execution area. In the embodiment of the disclosure, the cloud system is divided into different execution areas (i.e. different zones) by taking a user as a dimension. Different users under the same tenant can be in the same execution area or in different execution areas. And different users under different tenants can be in the same execution area or in different execution areas. When the task is scheduled, the task execution entity is required to operate the data under the zone, and the timing task is triggered in the zone and executed in the zone. Therefore, when tenant association information is generated, a user identification list divided under the current execution area can also be determined. The user identification list includes a plurality of user IDs divided under the current execution area. After determining the user identifier list, the second determining submodule 901 establishes a one-to-one correspondence among the user, the tenant and the service according to the affiliation between the user and the tenant (i.e. the tenant information to which the user belongs) and the second preset correspondence between the tenant and the service by the establishing submodule 902. In this way, the services requested by those users that do not belong to the current execution area can be excluded, and thus the task execution entity under the current execution area only executes the user requests divided into the current execution area.
In an alternative implementation manner of this embodiment, as shown in fig. 10, the obtaining module 702 further includes the following sub-modules:
a third determining submodule 1001 configured to determine, according to the service to be executed, the task having the first preset correspondence with the service to be executed;
a second obtaining sub-module 1002, configured to obtain, according to the task, a data primary key list related to the service to be executed; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs.
In this alternative implementation manner, after determining the correspondence between the user, the tenant, and the service in the current execution area, that is, the tenant association information, the first generation module 701 may acquire the data primary key service list related to the service to be executed by the acquisition module 702. The service to be executed is a service which has been requested by a user and is not processed, and each service may have a plurality of user requests, i.e. a plurality of users request to execute the same service, for example, a service in which a plurality of users request to execute payment. In the embodiment of the present disclosure, the third determining submodule 1001 may determine, for each service to be executed, a task having a first preset correspondence with the service to be executed. As described above, each service corresponds to a task for implementing the service. The embodiment of the disclosure may preset a first preset correspondence between services and tasks, where one service corresponds to one task, and different services may correspond to the same task, that is, multiplex the same task. Different tenants may share the same business code, but the data of different tenants needs to be isolated. Therefore, when the third determining submodule 1001 determines the task corresponding to the service to be executed, since the data required by the task is different, the second obtaining submodule 1002 may load the data primary key list according to the task (may load the data required for executing the task according to the data loader of the task), and may load only the data primary key list belonging to the operation range according to the tenant information and the user information corresponding to the service to be executed, and different tenants may load different data primary key lists for the same service, thereby implementing the function of data isolation. In this way, data between tenants can be completely isolated when the data is recorded.
In an alternative implementation manner of this embodiment, as shown in fig. 11, the execution module 703 further includes the following sub-modules:
a fourth determination submodule 1101 configured to determine detail data according to the data primary key list and the user who requests the service to be performed;
an execution submodule 1102 configured to execute the task according to the tenant-associated information and the detail data.
In this alternative implementation manner, under the data allocated to the tenant, different users correspond to different data sub-tables, so when determining the data primary key list, the fourth determination sub-module 1101 may obtain, according to the user ID of the service to be executed, the detail data corresponding to the data primary key list. Because different services can multiplex the same task, but because the task execution parameters of different tenants are different, when executing the task, the tenant corresponding to the service to be executed can be determined according to the tenant association information, and the configuration parameter corresponding to the tenant can be determined. Therefore, when executing the task, the execution submodule 1102 may further obtain different configuration parameters of the tenant according to the second preset corresponding relation between the service and the tenant, further determine the service parameter corresponding to the service, and execute the task according to the service parameter and the detail data, so as to implement the service to be executed. The configuration parameters of the tenant comprise relevant parameters of the tenant when executing the corresponding service.
In an alternative implementation manner of this embodiment, the apparatus further includes the following modules:
a second generation module configured to generate configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and the storage module is configured to store the configuration information in a cache.
In this alternative implementation, the second generation module may generate configuration information for any tenant and for a service owned by that tenant. The configuration information may be built in the form of a database table, or may be in the form of an XML file or configuration file. And generating a piece of configuration information according to the corresponding relation between each group of tenants and the service. When new business is generated for the tenant, corresponding configuration information can be generated. The configuration parameters of the tenant may include at least one of a service parameter, a service scheduling period, and a service execution environment of a service having a second preset correspondence with the tenant. The service parameters may include execution parameters required by the task having the first preset correspondence with the service in the execution process, for example, execution time of the task, etc. The service scheduling period can include the scheduling time of the service, and the setting of the scheduling frequency of different services can be realized by setting the configuration parameter of the service scheduling period. The service execution environment includes an environment in which a service corresponding to the tenant is executed. The execution environment can include, but is not limited to, a prefire execution environment and an online execution environment, wherein the prefire execution environment is an execution environment which is not provided for a user to use, and when the service is just released, the prefire execution environment can be firstly entered for testing; and the online execution environment is that the service is released and is in the process of being used by the user. The execution environment of the service may be defined by configuring the service execution environment. The storage module can store the configuration information in the cache, and can acquire the configuration information from the cache at any time in the task scheduling process, so that the execution speed can be increased.
In an alternative implementation manner of this embodiment, as shown in fig. 12, the first generating module 701 further includes the following sub-modules:
a fifth determining submodule 1201 configured to determine a service scheduling period and/or a service execution environment corresponding to the tenant and the service having the second preset correspondence;
a sixth determining submodule 1202 is configured to determine whether to generate the tenant association information corresponding to the tenant and the service with the second preset corresponding relation according to the service scheduling period and/or the service execution environment.
In this alternative implementation manner, when the first generating module 701 generates tenant association information, the tenant identification list is first obtained, and then, according to each tenant in the tenant identification list, the service identification having the second preset correspondence relationship with the tenant identification is determined, which may be obtained from the above-mentioned configuration information. After the service identifier of the tenant with the second preset corresponding relationship is obtained, the service scheduling period and/or the service execution environment can be determined by the fifth determining submodule 1201 according to the configuration information, and if the current time is determined by the service parameter in the configuration information to be not the service scheduling period of the service or not the service execution environment of the service, the sixth determining submodule 1202 does not generate tenant association information for the tenant and the service, that is, does not need to execute the request for the service subsequently. For example, when the tenant 1 and the service 1 have the second preset correspondence relationship and it is determined that the service scheduling period or the service execution environment in the configuration information of the tenant 1 and the service 1 does not match the current time or the execution environment after receiving the task scheduling event, the tenant 1 and the service 1 are no longer matched with the user to generate tenant association information, and in the subsequent steps, there is no implementation process of the request for the service 1 by the user under the tenant 1. By the method, the service scheduling period and/or the configurability of the service execution environment can be realized, and isolation of different execution environments can be realized.
Fig. 13 is a schematic structural view of an electronic device suitable for use in implementing a task execution method according to an embodiment of the present disclosure.
As shown in fig. 13, the electronic apparatus 1300 includes a Central Processing Unit (CPU) 1301, which can execute various processes in the embodiment shown in fig. 1 described above in accordance with a program stored in a Read Only Memory (ROM) 1302 or a program loaded from a storage section 1308 into a Random Access Memory (RAM) 1303. In the RAM1303, various programs and data necessary for the operation of the electronic apparatus 1300 are also stored. The CPU1301, ROM1302, and RAM1303 are connected to each other through a bus 1304. An input/output (I/O) interface 1305 is also connected to bus 1304.
The following components are connected to the I/O interface 1305: an input section 1306 including a keyboard, a mouse, and the like; an output portion 1307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 1308 including a hard disk or the like; and a communication section 1309 including a network interface card such as a LAN card, a modem, or the like. The communication section 1309 performs a communication process via a network such as the internet. The drive 1310 is also connected to the I/O interface 1305 as needed. Removable media 1311, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memory, and the like, is installed as needed on drive 1310 so that a computer program read therefrom is installed as needed into storage portion 1308.
In particular, the method described above with reference to fig. 1 may be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method of fig. 1. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1309 and/or installed from the removable medium 1311.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (14)

1. A method of performing a task, comprising:
generating tenant-related information in response to a task scheduling event; the tenant association information at least comprises the corresponding relation among users, tenants and services;
acquiring a data primary key list related to the service to be executed according to the service to be executed and the tenant association information;
executing a task with a first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information;
the acquiring the data primary key list related to the service to be executed according to the service to be executed and the tenant association information comprises the following steps:
determining the task with the first preset corresponding relation with the service to be executed according to the service to be executed;
acquiring a data primary key list related to the service to be executed according to the task; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs;
executing the task with a first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information, wherein the task comprises the following steps:
Determining detail data according to the data primary key list and the user requesting the service to be executed;
and executing the task according to the tenant association information and the detail data.
2. The task execution method according to claim 1, wherein the generating tenant-associated information includes:
acquiring a tenant identification list;
and determining the service with a second preset corresponding relation with the tenant in the tenant identification list.
3. The task execution method according to claim 2, wherein the generating tenant association information further comprises:
determining a user identification list under a current execution area;
and establishing a one-to-one correspondence among the user, the tenant and the service according to the affiliation of the user and the tenant and the second preset corresponding relationship.
4. A task execution method according to any one of claims 1 to 3, further comprising:
generating configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and storing the configuration information in a cache.
5. The task execution method of claim 4, wherein the configuration parameters of the tenant include at least one of: service parameters, service scheduling period and service execution environment.
6. The task execution method of claim 5, wherein generating tenant association information further comprises:
determining a service scheduling period and/or a service execution environment corresponding to the tenant and the service with the second preset corresponding relation;
and determining whether to generate tenant associated information corresponding to the tenant and the service with the second preset corresponding relation according to the service scheduling period and/or the service execution environment.
7. A task execution device, characterized by comprising:
the first generation module is configured to respond to the task scheduling event and generate tenant association information; the tenant association information at least comprises the corresponding relation among users, tenants and services;
the acquisition module is configured to acquire a data primary key list related to the service to be executed according to the service to be executed and the tenant association information;
the execution module is configured to execute tasks with a first preset corresponding relation with the service to be executed according to the data primary key list and the tenant association information;
Wherein, the acquisition module includes:
a third determining submodule configured to determine the task having the first preset correspondence with the service to be executed according to the service to be executed;
the second acquisition sub-module is configured to acquire the data primary key list related to the service to be executed according to the task; the data primary key list is a data primary key list under the operation range of the user requesting the service to be executed and the tenant to which the user belongs;
the execution module comprises:
a fourth determining submodule configured to determine detail data according to the data primary key list and the user who requests the service to be executed;
and the execution sub-module is configured to execute the task according to the tenant association information and the detail data.
8. The task performing device of claim 7, wherein the first generation module comprises:
the first acquisition submodule is configured to acquire a tenant identification list;
the first determining submodule is configured to determine the business with a second preset corresponding relation with the tenant in the tenant identification list.
9. The task performing device of claim 8, wherein the first generation module further comprises:
A second determining submodule configured to determine a list of user identities under a current execution area;
the establishing sub-module is configured to establish a one-to-one correspondence among the user, the tenant and the service according to the subordinate relationship between the user and the tenant and the second preset corresponding relationship.
10. The task performing device according to any one of claims 7 to 9, characterized by further comprising:
a second generation module configured to generate configuration information; wherein the configuration information includes at least one of: a second preset corresponding relation between the tenant and the service, a first preset corresponding relation between the service and the task and configuration parameters of the tenant;
and the storage module is configured to store the configuration information in a cache.
11. The task execution device of claim 10, wherein the configuration parameters of the tenant include at least one of: service parameters, service scheduling period and service execution environment.
12. The task performing device of claim 11, wherein the first generation module further comprises:
a fifth determining submodule configured to determine a service scheduling period and/or a service execution environment corresponding to the tenant and the service having the second preset corresponding relation;
And a sixth determining submodule configured to determine whether to generate tenant associated information corresponding to the tenant and the service with the second preset corresponding relation according to the service scheduling period and/or the service execution environment.
13. An electronic device comprising a memory and a processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executable by the processor to implement the method steps of any one of claims 1-6.
14. A computer readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the method steps of any of claims 1-6.
CN201810848246.2A 2018-07-27 2018-07-27 Task execution method, device, electronic equipment and computer readable storage medium Active CN109213584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810848246.2A CN109213584B (en) 2018-07-27 2018-07-27 Task execution method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810848246.2A CN109213584B (en) 2018-07-27 2018-07-27 Task execution method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109213584A CN109213584A (en) 2019-01-15
CN109213584B true CN109213584B (en) 2023-04-25

Family

ID=64990897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810848246.2A Active CN109213584B (en) 2018-07-27 2018-07-27 Task execution method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109213584B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750371A (en) * 2019-10-17 2020-02-04 北京创鑫旅程网络技术有限公司 Flow execution method, device, equipment and storage medium
CN110826307A (en) * 2019-10-31 2020-02-21 北京字节跳动网络技术有限公司 Method and device for creating business object
CN111782352A (en) * 2019-11-29 2020-10-16 北京沃东天骏信息技术有限公司 Service scheduling method and device
CN112559076B (en) * 2020-12-21 2022-06-14 支付宝(杭州)信息技术有限公司 Tenant information processing method, device, system and equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270349A (en) * 2014-09-17 2015-01-07 广州中国科学院软件应用技术研究所 Isolation method and device for cloud computing multi-tenant application

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101348401B1 (en) * 2012-04-12 2014-01-09 주식회사 엘지씨엔에스 Method of rendering user interface, server performing the same and stroage media sotring the same
US20130332587A1 (en) * 2012-06-11 2013-12-12 International Business Machines Corporation Method and a system for on-boarding, administration and communication between cloud providers and tenants in a share-all multi-tenancy environment
US9208212B2 (en) * 2012-12-17 2015-12-08 Sap Ag Field extensibility in a multi-tenant environment with columnar database support
US9721117B2 (en) * 2014-09-19 2017-08-01 Oracle International Corporation Shared identity management (IDM) integration in a multi-tenant computing environment
US10250584B2 (en) * 2014-10-15 2019-04-02 Zuora, Inc. System and method for single sign-on technical support access to tenant accounts and data in a multi-tenant platform
US10831545B2 (en) * 2016-08-29 2020-11-10 Vmware, Inc. Efficient queueing and scheduling of backups in a multi-tenant cloud computing environment
CN106375323A (en) * 2016-09-09 2017-02-01 浪潮软件股份有限公司 Method for carrying out kerberos identity authentication in multi-tenant mode

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270349A (en) * 2014-09-17 2015-01-07 广州中国科学院软件应用技术研究所 Isolation method and device for cloud computing multi-tenant application

Also Published As

Publication number Publication date
CN109213584A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109213584B (en) Task execution method, device, electronic equipment and computer readable storage medium
EP2875439B1 (en) Migrating applications between networks
JP2020173778A (en) Method, apparatus, electronic facility, computer readable medium, and computer program for allocating resource
US20200344291A1 (en) Usage-based server load balancing
CN102132268A (en) Data center programming model
US10379834B2 (en) Tenant allocation in multi-tenant software applications
CN111901249A (en) Service current limiting method, device, equipment and storage medium
CN110071965B (en) Data center management system based on cloud platform
CN107659450B (en) Method and device for allocating big data cluster resources and storage medium
CN102970161A (en) Cloud machine deployment platform and deployment method
US10164897B1 (en) System and method for host isolation in a web-based computing system
CN110162397A (en) Resource allocation methods, apparatus and system
CN114175602A (en) Authority management of cloud resources
US20200387404A1 (en) Deployment of virtual node clusters in a multi-tenant environment
CN107147610B (en) Resource processing method and device
CN108520401B (en) User list management method, device, platform and storage medium
CN112035579B (en) Graph management, data storage and data query methods, devices and storage medium
US11782752B1 (en) System and method for assigning tasks
CN113039764A (en) Method and system for providing access to data stored in a secure data area of a cloud platform
US20190303956A1 (en) Information processing system, apparatus, and method
CN115834600A (en) Multi-cloud nanotube data synchronization method and device, electronic equipment and storage medium
CN115640146A (en) Back-end service calling method and device, electronic equipment and program product
CN111786801B (en) Method and device for charging based on data flow
CN108683608B (en) Method and device for distributing flow
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200918

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20200918

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant