CN116107547A - Unified service and multi-data source management method - Google Patents

Unified service and multi-data source management method Download PDF

Info

Publication number
CN116107547A
CN116107547A CN202310007948.9A CN202310007948A CN116107547A CN 116107547 A CN116107547 A CN 116107547A CN 202310007948 A CN202310007948 A CN 202310007948A CN 116107547 A CN116107547 A CN 116107547A
Authority
CN
China
Prior art keywords
service
data source
tenant
request
unified
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.)
Pending
Application number
CN202310007948.9A
Other languages
Chinese (zh)
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.)
Three Gorges High Technology Information Technology Co ltd
Original Assignee
Three Gorges High Technology Information Technology 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 Three Gorges High Technology Information Technology Co ltd filed Critical Three Gorges High Technology Information Technology Co ltd
Priority to CN202310007948.9A priority Critical patent/CN116107547A/en
Publication of CN116107547A publication Critical patent/CN116107547A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate
    • 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 invention provides a unified service and multi-data source management method, which comprises the following steps: step 1: after the service processing end receives the service request, tenant information and configuration environment information in the service request are obtained, a corresponding data source key identification is generated, and the data source key identification is filled into the current thread variable; step 2: determining a target data source to be switched based on the data source key identification; step 3: and after the data source connection is dynamically switched to the target data source based on the data source, executing the service request and returning a service processing result. The invention reduces the requirement on server resources, only needs one set of code for deployment of core business service, and needs no repeated deployment among different clients, thereby reducing deployment cost and maintenance complexity, reducing code maintenance complexity and improving code multiplexing degree. The customer personalized service is produced by expanding the core service, so that the uniformity of the core service can be maintained, and the requirements of various customers can be flexibly met.

Description

Unified service and multi-data source management method
Technical Field
The invention relates to the technical field of unified service and multi-data source management, in particular to a method for managing unified service and multi-data sources.
Background
Intelligent management has become the mainstream management mode in long lease renting markets, and it is convenient for tenant to provide corresponding lease service requirement to homeowner or apartment operator in time to maintain own legal equity while simultaneously making things convenient for homeowner or apartment operator to manage the lease. However, the existing house lease management is generally a database of one tenant, and in a multi-tenant and multi-project scene, a library is also adopted to be distinguished and isolated according to tenant or engineering identification, physical level isolation cannot be achieved, along with the increase of operation data, the maintenance convenience of data of each tenant is greatly reduced, service decoupling and cloud deployment requirements cannot be met, the same service can be repeatedly deployed due to different tenants, sharing and multiplexing cannot be realized, required application resources are increased along with the increase of tenant use, the resource investment is large, the cost is high, the operation and maintenance are complex, and branch versions are continuously generated along with the personalized requirements of tenant clients, so that the maintenance complexity of codes is increased, and management is disordered. The present invention thus proposes a method for unified service and multi-data source management.
Disclosure of Invention
The invention provides a unified service and multi-data source management method, which reduces the requirement on server resources, the core business service only needs one set of codes to be deployed, repeated deployment is not needed among different clients, the deployment cost and the maintenance complexity are reduced, and the code maintenance complexity is reduced. For the customer personalized part, the customer personalized service is produced by expanding the core service, and the core service can be kept unified by expanding the customer personalized part, so that the requirements of various customers can be met flexibly.
The invention provides a unified service and multi-data source management method, which comprises the following steps:
step 1: after the service processing end receives the service request, tenant information and configuration environment information in the service request are obtained, a corresponding data source key identification is generated, and the data source key identification is filled into the current thread variable;
step 2: determining a target data source to be switched based on the data source key identification;
step 3: and after the data source connection is dynamically switched to the target data source based on the data source, executing the service request and returning a service processing result.
Preferably, the data source comprises a main data source and a service data source, and the target data source refers to the service data source.
Preferably, the service processing end includes a unified service management component iserve for performing the same management on the service, and the unified service management component iserve determines a target data source to be switched according to a data source key identifier in a current thread variable.
Preferably, before the IService determines the target data source to be switched according to the data source key identification in the current thread variable, the method further includes:
delegating all data source information to a unified service management component IService management, including:
all service data sources of different tenants are obtained, the service data sources are initialized based on configuration of a main data source, and an initialization result is sent to an integrated service management component IService for management;
the configuration of the main data source comprises IP, port, database name, login account, password and database driver of the corresponding database.
Preferably, step 1 comprises:
the service end receives a service request of a tenant;
analyzing the service request to obtain tenant information and configuration environment information;
generating a first hash code based on tenant information, determining a corresponding tenant information calling path according to configuration environment information, and generating a second hash Ha Ma;
combining the first hash code and the second hash Ha Ma according to a preset identification recognition sequence to generate a third hash code, encrypting the third hash code according to a system authentication public key, preprocessing the encrypted digital string, and generating a data source key identification;
the data source key identification is filled into the current thread variable.
Preferably, step 2 includes:
and identifying the data source key identification, confirming the target data source to be switched, and opening a corresponding interface of the target data source.
Preferably, step 3 includes:
switching the data source connection to a target data source based on the data source dynamic setting;
analyzing the service request, confirming the service to be processed, and confirming corresponding response data in the target data source;
and carrying out corresponding service processing on the response data based on the service request, and returning a service processing result.
Preferably, the analyzing the service request, confirming the service to be processed, and confirming corresponding response data in the target data source includes:
acquiring a target data source corresponding to a service request, generating a first service operation pointer, determining a request type of the service request based on a request identifier carried by the service request, and generating a second service operation pointer according to the request type;
based on the combination of the second service operation pointer and the first service operation pointer, adjusting the combination pointer according to the operation pointer generation rule to generate a third service operation pointer;
confirming corresponding response data in the target data source based on the third service operation pointer;
when a service processing end receives a plurality of service requests of the same tenant end in a preset time period, carrying out identification and identification on the plurality of service requests to obtain an identification result, and establishing a plurality of request sets;
comparing a plurality of service requests in the same request set, merging the same service requests, respectively acquiring application time corresponding to the first service request in the same request set, and sequencing the application time to obtain a sequencing result;
and respectively confirming response data corresponding to the plurality of request sets in the target data source based on the sequencing result.
Preferably, the method for unified service and multi-data source management further comprises:
step 4: based on the service expansion module, the service items corresponding to the tenants are adjusted according to the service request application condition, and the personalized customization of business service is carried out for the tenants, which comprises the following steps:
acquiring historical tenant information, determining lease types corresponding to each historical tenant based on the historical tenant information, and classifying historical users according to the lease types to obtain a plurality of tenant sets;
acquiring all service items corresponding to each historical tenant in each tenant set based on the historical tenant information, and respectively adding individual labels to the service items according to the service item adding time, wherein the individual labels comprise default labels and expansion labels;
based on the personality tag, determining a default service item list and an extended service item list of the same rental housing type;
generating a default service item for a tenant according to the default service item list, recommending an optimal expansion service item to the tenant according to the actual service request application condition of the tenant and the expansion service item list, and adding the optimal expansion service item to the service item corresponding to the tenant based on a service expansion module after confirming and adding.
Preferably, recommending the optimal extended service item to the tenant according to the actual service request application condition and the extended service item list of the tenant, including:
based on the history tenant information, acquiring history service applications corresponding to each history tenant, and determining mapping relations between each history service application and each expansion service item in the expansion service item list;
according to the historical tenant information, determining the sending frequency of the historical service application corresponding to the extended service item corresponding to each historical tenant, and respectively calculating the triggering rate corresponding to each extended service item based on the sending frequency;
respectively generating triggering conditions corresponding to each extended service item according to the mapping relation and the triggering rate;
and recommending the corresponding extended service item to the tenant as the optimal extended service item when the tenant operation meets the triggering condition of the corresponding extended service item.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flow chart of a method of unified service and multi-data source management according to the present invention;
FIG. 2 is a flowchart illustrating a method step 1 of unified service and multiple data sources management according to the present invention
FIG. 3 is a flowchart illustrating a method step 2 of unified service and multiple data sources management according to the present invention
FIG. 4 is a flowchart illustrating a method step 3 of unified service and multiple data sources management according to the present invention
Fig. 5 is a schematic diagram of the business service personality customization of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
Example 1:
the invention provides a unified service and multi-data source management method, as shown in figure 1, comprising the following steps:
step 1: after the service processing end receives the service request, tenant information and configuration environment information in the service request are obtained, a corresponding data source key identification is generated, and the data source key identification is filled into the current thread variable;
step 2: determining a target data source to be switched based on the data source key identification;
step 3: and after the data source connection is dynamically switched to the target data source based on the data source, executing the service request and returning a service processing result.
In this embodiment, the tenant information mainly refers to identity information of the tenant.
In this embodiment, the configuration environment information refers to path information called by a data source of the tenant.
In this embodiment, the target data source refers to a service data source of a tenant that is managed by the unified service management component IService in advance.
In this embodiment, a tenant refers to any tenant that sends a service request to a service processing end.
The beneficial effects of the technical scheme are that: according to the invention, after a service processing end receives a service request, tenant information and configuration environment information in the service request are obtained, a corresponding data source key identification is generated, the data source key identification is filled in a current thread variable, a target data source to be switched is determined based on the data source key identification, after the data source connection is dynamically switched to the target data source based on the data source, the service request is executed and a service processing result is returned, the requirement on server resources is reduced, a set of codes is only needed for core service, repeated deployment is not needed among different clients, the deployment cost and maintenance complexity are reduced, and meanwhile, due to unification of the core service, a set of core codes is only needed, independent branches are not constructed for each tenant like in the traditional mode, the maintenance complexity of the codes is greatly reduced, and the code reuse degree is improved.
Example 2:
on the basis of embodiment 1, the data sources include two types of main data sources and service data sources, and the target data source refers to the service data source.
In this embodiment, the main data source (Master DataSource) is used as a basic public data source, and the key basic configuration of the whole persistent system includes tenant, routing gateway, authority, resource and the like, and is responsible for completing tenant registration, initializing the service data source configuration to be accessed by related service, where the configuration content includes IP, port, database name, login account, password (password is encrypted by RSA asymmetric public key) of the corresponding database, and database driver. The service data source (Business DataSource) is a data core supporting normal operation of each service.
The beneficial effects of the technical scheme are that: according to the invention, online tenants and data source registration initialization are completed through the main data source, and one-key distribution is carried out to the core service, so that quick non-stop deployment can be realized, the response speed is improved, the use influence of a new tenant on the existing tenant is reduced, and the deployment difficulty of implementation of a new project is reduced.
Example 3:
on the basis of embodiment 1, the service processing end includes a unified service management component IService for performing the same management on the service, where the unified service management component IService determines a target data source to be switched according to a data source key identifier in a current thread variable.
In this embodiment, the unified service management component IService is built based on the abstract routingdatasource technology of the Spring framework.
The beneficial effects of the technical scheme are that: the invention sets the unified service management component ISERVICE for carrying out the same management on the service at the service processing end, realizes the simultaneous management of a plurality of tenant information, ensures that the core service only needs one set of code to be deployed, reduces the requirement of server resources, does not need repeated deployment among different clients, and reduces the deployment cost and the maintenance complexity. The core business service only needs one set of codes to be deployed one set; the unified service management component IService determines a target data source to be switched according to the data source key identification in the current thread variable, so that the free switching among different data sources is realized, and the response speed of the tenant service request is improved.
Example 4:
on the basis of embodiment 1, before the IService determines the target data source to be switched according to the data source key identifier in the current thread variable, the method further includes:
delegating all data source information to a unified service management component IService management, including:
all service data sources of different tenants are obtained, the service data sources are initialized based on configuration of a main data source, and an initialization result is sent to an integrated service management component IService for management;
the configuration of the main data source comprises IP, port, database name, login account, password (password is encrypted by RSA asymmetric public key) of the corresponding database and database driver.
The beneficial effects of the technical scheme are that: the invention delegates all data source information to the unified service management component IService management before the IService determines the target data source to be switched according to the data source key identification in the current thread variable, and completes the framework of core business service, so that service request response of a plurality of tenants can be completed by only one set of core codes.
Example 5:
on the basis of embodiment 1, step 1, as shown in fig. 2, includes:
step 101: the service end receives a service request of a tenant;
step 102: analyzing the service request to obtain tenant information and configuration environment information;
step 103: generating a first hash code based on tenant information, determining a corresponding tenant information calling path according to configuration environment information, and generating a second hash Ha Ma;
step 104: combining the first hash code and the second hash Ha Ma according to a preset identification recognition sequence to generate a third hash code, encrypting the third hash code according to a system authentication public key, preprocessing the encrypted digital string, and generating a data source key identification;
step 105: the data source key identification is filled into the current thread variable.
In this embodiment, the service request refers to a request for performing a certain service, which is sent by the tenant to the service processing section through the mobile phone APP.
In this embodiment, the first hash Ha Ma refers to a hash code generated according to tenant information, and is used for confirming the identity of the tenant.
In this embodiment, the second ch Ha Ma refers to generating, according to the configuration environment information, a call path of the target data source corresponding to the tenant in the use of the generating ch Ha Ma.
In this embodiment, the third hash Ha Ma refers to a new hash Ha Ma generated by combining the first hash code and the second hash Ha Ma, where the hash Ha Ma includes tenant identity information and a call path of a target data source corresponding to the tenant identity information.
The beneficial effects of the technical scheme are that: according to the invention, different Hash Ha Ma is generated according to tenant information and configuration environment information, and two groups of Hash Ha Ma are subjected to tenant encryption and then are subjected to data source key identification generation, so that a target data source can be conveniently and always quickly found out from a plurality of data sources managed by the unified service management component IService commission, the response speed to tenant service requests is improved, and the user experience is improved.
Example 6:
on the basis of embodiment 1, step 2, as shown in fig. 3, includes:
step 201: identifying a data source key identification, and confirming a target data source to be switched;
step 202: and opening a corresponding interface of the target data source.
The beneficial effects of the technical scheme are that: according to the method and the device for identifying the target data source, the data source key identification is identified, the target data source to be switched is confirmed, the identification speed of the target data source is improved accurately due to the fact that the data source key identification carries information, and meanwhile, the corresponding interface of the target data is opened, so that accurate switching of the data source is facilitated.
Example 7:
on the basis of embodiment 1, step 3, as shown in fig. 4, includes:
step 301: switching the data source connection to a target data source based on the data source dynamic setting;
step 302: analyzing the service request, confirming the service to be processed, and confirming corresponding response data in the target data source;
step 303: and carrying out corresponding service processing on the response data based on the service request, and returning a service processing result.
In this embodiment, the data source dynamics are woven inside the service program before the service program runs.
In this embodiment, the service to be processed refers to a service that is completed by the service processing end according to the tenant requirement confirmed by the service request of the tenant.
In this embodiment, the response data refers to data for responding to the service to be processed among the plurality of service data in the target data source.
The beneficial effects of the technical scheme are that: after the data source is switched, the method and the device rapidly correspond to the service request to analyze, confirm the service to be processed, and confirm the response data in the target data source, thereby providing guarantee for rapidly completing the service to be processed.
Example 8:
on the basis of embodiment 7, resolving the service request, confirming the service to be processed, and confirming corresponding response data in the target data source, including:
acquiring a target data source corresponding to a service request, generating a first service operation pointer, determining a request type of the service request based on a request identifier carried by the service request, and generating a second service operation pointer according to the request type;
based on the combination of the second service operation pointer and the first service operation pointer, adjusting the combination pointer according to the operation pointer generation rule to generate a third service operation pointer;
confirming corresponding response data in the target data source based on the third service operation pointer;
when a service processing end receives a plurality of service requests of the same tenant end in a preset time period, carrying out identification and identification on the plurality of service requests to obtain an identification result, and establishing a plurality of request sets;
comparing a plurality of service requests in the same request set, merging the same service requests, respectively acquiring application time corresponding to the first service request in the same request set, and sequencing the application time to obtain a sequencing result;
and respectively confirming response data corresponding to the plurality of request sets in the target data source based on the sequencing result.
In this embodiment, the first service operation pointer refers to a pointer generated based on the storage address of the target data source.
In this embodiment, the request identifier refers to an identifier carried by the service request and indicating a type of service that is sent by the tenant and requested to be completed.
In this embodiment, the request types include, but are not limited to, query class, application class, change/prune class.
In this embodiment, the second service operation pointer refers to a pointer determined according to a request type, and the specific method includes:
requesting to confirm the physical block position information stored in a target data source by the execution data corresponding to the request type in a preset operation data execution comparison table based on the request type, and generating a data address in the target data source according to the position information;
generating a second operation pointer based on the data address;
wherein, the execution data refers to all data of the service request of a certain type of request type.
In this embodiment, the third service operation pointer refers to a pointer containing address information carried by the first service operation pointer and the second service operation pointer.
In this embodiment, the request set refers to a classification set corresponding to the same service request.
In this embodiment, the first service request refers to the service request with the earliest time in each request set.
In this embodiment, the application time refers to the receiving time corresponding to the earliest service request in each request set.
The beneficial effects of the technical scheme are that: the invention respectively generates the first service operation pointer according to the storage address of the target data source, then generates the second service operation pointer according to the position information of the execution data corresponding to different request types in the target data source, combines the two pointers to generate the third service operation pointer capable of rapidly confirming the response data address, so that after the data source is switched, the response data can be rapidly confirmed to rapidly respond to the service request of the tenant, the response capability is improved, and the response efficiency is improved; meanwhile, when a plurality of service requests of the same tenant end are received in a preset time period by the service processing end, after classifying and screening the service requests, non-repeated service requests are reserved, and response data of the same request set are acquired according to classification results, so that repeated response of the same service application is avoided, simultaneous confirmation of the response data of the same type of service requests is realized, the confirmation times of the response data are reduced, and the system operation pressure is reduced.
Example 9:
based on embodiment 1, the method for unified service and multi-data source management further includes:
step 4: based on the service expansion module, the service items corresponding to the tenants are adjusted according to the service request application condition, and the personalized customization of business service is carried out for the tenants, which comprises the following steps:
acquiring historical tenant information, determining lease types corresponding to each historical tenant based on the historical tenant information, and classifying historical users according to the lease types to obtain a plurality of tenant sets;
acquiring all service items corresponding to each historical tenant in each tenant set based on the historical tenant information, and respectively adding individual labels to the service items according to the service item adding time, wherein the individual labels comprise default labels and expansion labels;
based on the personality tag, determining a default service item list and an extended service item list of the same rental housing type;
generating a default service item for a tenant according to the default service item list, recommending an optimal expansion service item to the tenant according to the actual service request application condition of the tenant and the expansion service item list, and adding the optimal expansion service item to the service item corresponding to the tenant based on a service expansion module after confirming and adding.
In this embodiment, the history tenant information contains all operation data of the user during the rental period.
In this embodiment, the rental housing type refers to a housing type of renting a house, such as renting a whole house with two rooms with one hall, renting a house with one room with one bathroom, and the like.
In this embodiment, the tenant set refers to classifying the historical tenants according to different tenant types, where the historical tenants of the same tenant type are in the same tenant set.
In this embodiment, according to the service item adding time, the personalized tags are respectively added to the service items, because the service items existing when the tenant starts to rent a house are highlighted for the default service corresponding to the tenant lease type, and then the added service items are the expanded service items triggered according to the actual needs of the tenant or the application request.
In this embodiment, the personality label refers to an attribute label of a service item corresponding to a history tenant, and the default label refers to that the service screen is a default service item; the expansion tag refers to that the service stands out as an expansion service item.
In this embodiment, the default service item list includes all default service items corresponding to the same rental housing type; the extended service item list is a list generated by summarizing extended service items of all historic tenants of the same rental type.
The beneficial effects of the technical scheme are that: the invention adjusts the service items corresponding to the tenants according to the service request application condition based on the service expansion module, performs individual customization of business services for the tenants, can keep the core service unified by only expanding and realizing the individual parts of the clients, and can flexibly meet the needs of various clients.
Example 10:
based on embodiment 1, according to the actual service request application situation of the tenant and the extended service item list, recommending the optimal extended service item to the tenant includes:
based on the history tenant information, acquiring history service applications corresponding to each history tenant, and determining mapping relations between each history service application and each expansion service item in the expansion service item list;
according to the historical tenant information, determining the sending frequency of the historical service application corresponding to the extended service item corresponding to each historical tenant, and respectively calculating the triggering rate corresponding to each extended service item based on the sending frequency;
respectively generating triggering conditions corresponding to each extended service item according to the mapping relation and the triggering rate;
and recommending the corresponding extended service item to the tenant as the optimal extended service item when the tenant operation meets the triggering condition of the corresponding extended service item.
In this embodiment, the history service application refers to a service request sent by a history tenant to a service processing end and a service completed by the history tenant.
In this embodiment, the mapping relationship refers to a corresponding relationship between the history service application and each extended service item in the extended service item list.
In this embodiment, the triggering rate refers to the accumulated sending times of service requests of the corresponding extended service item triggered by the tenant, and is specifically calculated as follows:
Figure BDA0004036329890000131
wherein F is j The triggering rate of the jth extended service item is represented; n (N) j Representing a total number of historical tenants using the jth extended service item; n is n j,i Representing the issue frequency corresponding to the ith history tenant using the jth extended service item; []Representing a rounding function.
The beneficial effects of the embodiment are that: according to the method and the system, the trigger conditions corresponding to the expansion service items are respectively generated according to the mapping relation between each historical service application and each expansion service item in the expansion service item list and the trigger rate corresponding to the expansion service item, when the tenant operation meets the trigger conditions of the corresponding expansion service item, the corresponding expansion service item is recommended to the tenant as the optimal expansion service item, the autonomous expansion of the tenant expansion service item is realized, the expansion service conforming to the current use habit of the tenant is timely opened according to the dynamic change data of the tenant service request, and the service experience of is improved.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A method for unified service and multi-data source management, comprising:
step 1: after the service processing end receives the service request, tenant information and configuration environment information in the service request are obtained, a corresponding data source key identification is generated, and the data source key identification is filled into the current thread variable;
step 2: determining a target data source to be switched based on the data source key identification;
step 3: and after the data source connection is dynamically switched to the target data source based on the data source, executing the service request and returning a service processing result.
2. The method for unified service and multi-data source management according to claim 1 wherein:
the data source comprises a main data source and a service data source, and the target data source is the service data source.
3. The method of unified service and multi-data source management according to claim 1, comprising:
the service processing end comprises a unified service management component IService for carrying out the same management on service services, and the unified service management component IService determines a target data source to be switched according to a data source key identification in a current thread variable.
4. A method of unified service and multi-data source management as claimed in claim 3 wherein before said IService determines the target data source to be switched from the data source key identification in the current thread variable, further comprising:
delegating all data source information to a unified service management component IService management, including:
all service data sources of different tenants are obtained, the service data sources are initialized based on configuration of a main data source, and an initialization result is sent to an integrated service management component IService for management;
the configuration of the main data source comprises IP, port, database name, login account, password and database driver of the corresponding database.
5. The method of unified service and multi-data source management according to claim 1, wherein step 1 comprises:
the service end receives a service request of a tenant;
analyzing the service request to obtain tenant information and configuration environment information;
generating a first hash code based on tenant information, determining a corresponding tenant information calling path according to configuration environment information, and generating a second hash Ha Ma;
combining the first hash code and the second hash Ha Ma according to a preset identification recognition sequence to generate a third hash code, encrypting the third hash code according to a system authentication public key, preprocessing the encrypted digital string, and generating a data source key identification;
the data source key identification is filled into the current thread variable.
6. The method of unified service and multi-data source management according to claim 1, wherein step 2 comprises:
and identifying the data source key identification, confirming the target data source to be switched, and opening a corresponding interface of the target data source.
7. The method of unified service and multi-data source management according to claim 1, wherein step 3 comprises:
switching the data source connection to a target data source based on the data source dynamic setting;
analyzing the service request, confirming the service to be processed, and confirming corresponding response data in the target data source;
and carrying out corresponding service processing on the response data based on the service request, and returning a service processing result.
8. The method for unified service and multi-data source management according to claim 7 wherein parsing the service request, validating the pending traffic, and validating the corresponding reply data in the target data source, comprises:
acquiring a target data source corresponding to a service request, generating a first service operation pointer, determining a request type of the service request based on a request identifier carried by the service request, and generating a second service operation pointer according to the request type;
based on the combination of the second service operation pointer and the first service operation pointer, adjusting the combination pointer according to the operation pointer generation rule to generate a third service operation pointer;
confirming corresponding response data in the target data source based on the third service operation pointer;
when a service processing end receives a plurality of service requests of the same tenant end in a preset time period, carrying out identification and identification on the plurality of service requests to obtain an identification result, and establishing a plurality of request sets;
comparing a plurality of service requests in the same request set, merging the same service requests, respectively acquiring application time corresponding to the first service request in the same request set, and sequencing the application time to obtain a sequencing result;
and respectively confirming response data corresponding to the plurality of request sets in the target data source based on the sequencing result.
9. The method of unified service and multi-data source management according to claim 1, further comprising:
step 4: based on the service expansion module, the service items corresponding to the tenants are adjusted according to the service request application condition, and the personalized customization of business service is carried out for the tenants, which comprises the following steps:
acquiring historical tenant information, determining lease types corresponding to each historical tenant based on the historical tenant information, and classifying historical users according to the lease types to obtain a plurality of tenant sets;
acquiring all service items corresponding to each historical tenant in each tenant set based on the historical tenant information, and respectively adding individual labels to the service items according to the service item adding time, wherein the individual labels comprise default labels and expansion labels;
based on the personality tag, determining a default service item list and an extended service item list of the same rental housing type;
generating a default service item for a tenant according to the default service item list, recommending an optimal expansion service item to the tenant according to the actual service request application condition of the tenant and the expansion service item list, and adding the optimal expansion service item to the service item corresponding to the tenant based on a service expansion module after confirming and adding.
10. The method for unified service and multi-data source management according to claim 9, wherein recommending the best extended service item to the tenant according to the actual service request application situation of the tenant and the extended service item list comprises:
based on the history tenant information, acquiring history service applications corresponding to each history tenant, and determining mapping relations between each history service application and each expansion service item in the expansion service item list;
according to the historical tenant information, determining the sending frequency of the historical service application corresponding to the extended service item corresponding to each historical tenant, and respectively calculating the triggering rate corresponding to each extended service item based on the sending frequency;
respectively generating triggering conditions corresponding to each extended service item according to the mapping relation and the triggering rate;
and recommending the corresponding extended service item to the tenant as the optimal extended service item when the tenant operation meets the triggering condition of the corresponding extended service item.
CN202310007948.9A 2023-01-04 2023-01-04 Unified service and multi-data source management method Pending CN116107547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310007948.9A CN116107547A (en) 2023-01-04 2023-01-04 Unified service and multi-data source management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310007948.9A CN116107547A (en) 2023-01-04 2023-01-04 Unified service and multi-data source management method

Publications (1)

Publication Number Publication Date
CN116107547A true CN116107547A (en) 2023-05-12

Family

ID=86255602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310007948.9A Pending CN116107547A (en) 2023-01-04 2023-01-04 Unified service and multi-data source management method

Country Status (1)

Country Link
CN (1) CN116107547A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274731A (en) * 2018-09-04 2019-01-25 北京京东金融科技控股有限公司 Deployment, call method and the device of web services based on multi-tenant technology
US20190065520A1 (en) * 2017-08-30 2019-02-28 Ca, Inc. Transactional data source integration
CN111861140A (en) * 2020-06-28 2020-10-30 微民保险代理有限公司 Service processing method, device, storage medium and electronic device
CN112527310A (en) * 2020-12-15 2021-03-19 平安国际智慧城市科技股份有限公司 Multi-tenant data isolation method and device, computer equipment and storage medium
CN114791907A (en) * 2022-03-30 2022-07-26 北京柏睿数据技术股份有限公司 Method and system for processing multi-tenant shared data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190065520A1 (en) * 2017-08-30 2019-02-28 Ca, Inc. Transactional data source integration
CN109274731A (en) * 2018-09-04 2019-01-25 北京京东金融科技控股有限公司 Deployment, call method and the device of web services based on multi-tenant technology
CN111861140A (en) * 2020-06-28 2020-10-30 微民保险代理有限公司 Service processing method, device, storage medium and electronic device
CN112527310A (en) * 2020-12-15 2021-03-19 平安国际智慧城市科技股份有限公司 Multi-tenant data isolation method and device, computer equipment and storage medium
CN114791907A (en) * 2022-03-30 2022-07-26 北京柏睿数据技术股份有限公司 Method and system for processing multi-tenant shared data

Similar Documents

Publication Publication Date Title
US11088903B2 (en) Hybrid cloud network configuration management
US7200806B2 (en) System and method for generating pre-populated forms
US7603474B2 (en) Efficient endpoint matching using a header-to-bit conversion table
TWI473029B (en) Extensible and programmable multi-tenant service architecture
US11726987B2 (en) Normalizing user identification across disparate systems
CN109725980B (en) Method, apparatus and computer readable medium for generating mirror image tags
CN109413040B (en) Message authentication method, device, system and computer readable storage medium
US8365261B2 (en) Implementing organization-specific policy during establishment of an autonomous connection between computer resources
CN103368921A (en) Distributed user modeling system and method for intelligent device
CN110704749A (en) Recommendation engine customization system, recommendation method, recommendation system and electronic equipment
CN110232068B (en) Data sharing method and device
EP3873102A1 (en) Method for achieving optical line terminal slicing, storage medium, electronic device, and apparatus
CN113037831A (en) Service gateway message processing method and device
US9772834B2 (en) Exportable encoded identifications of networked machines
CN111800460A (en) Data synchronization method, device and equipment of LDAP (lightweight directory Access protocol) service node and storage medium
CN106776079B (en) Method and system for managing user data
CN108370329B (en) Management method and device for management function object
CN116107547A (en) Unified service and multi-data source management method
US10887267B2 (en) Intelligent notification routing and delivery
CN103533094A (en) Identification code all-in-one machine and identification code system
CN114745757B (en) Cluster switching method, device, equipment and medium
US8478795B2 (en) Method and system for automatically defining organizational data in unified messaging systems
CN115495513A (en) Event standardization method and device
CN114866416A (en) Multi-cluster unified management system and deployment method
CN112468340A (en) Pre-audit business data configuration system for multiple tenants

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