CN112131230A - Application software as a service (SaaS) realization method, device, equipment and storage medium - Google Patents

Application software as a service (SaaS) realization method, device, equipment and storage medium Download PDF

Info

Publication number
CN112131230A
CN112131230A CN202011367343.3A CN202011367343A CN112131230A CN 112131230 A CN112131230 A CN 112131230A CN 202011367343 A CN202011367343 A CN 202011367343A CN 112131230 A CN112131230 A CN 112131230A
Authority
CN
China
Prior art keywords
target
application
database
information
candidate
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.)
Granted
Application number
CN202011367343.3A
Other languages
Chinese (zh)
Other versions
CN112131230B (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.)
China Unicom Zhejiang Industrial Internet Co Ltd
Original Assignee
China Unicom Zhejiang Industrial Internet 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 China Unicom Zhejiang Industrial Internet Co Ltd filed Critical China Unicom Zhejiang Industrial Internet Co Ltd
Priority to CN202011367343.3A priority Critical patent/CN112131230B/en
Publication of CN112131230A publication Critical patent/CN112131230A/en
Application granted granted Critical
Publication of CN112131230B publication Critical patent/CN112131230B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/316Aspect-oriented programming techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method, a device, equipment and a storage medium for realizing SaaS application. And correspondingly configuring each application to be SaaS by using a preset middleware based on a section-oriented programming technology to obtain a plurality of corresponding candidate applications. And then generating candidate database information and a data creation statement, generating a target account number and target domain name information corresponding to the target application, and further determining the target database information according to the target application, the candidate database information and the data creation statement so as to obtain a corresponding target data table by using the target domain name information, the target account number and the target application number. The method is characterized in that the SaaS application is configured based on a section-oriented programming technology and a preset middleware, dynamic data source switching is realized on the SaaS application through a low-intrusion or non-intrusion mode, a relatively balanced data isolation scheme is provided for the SaaS application, and high concurrency requirements are met under the condition of less system resource consumption.

Description

Application software as a service (SaaS) realization method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for implementing SaaS.
Background
With the rapid development of internet technology and the maturity of each application Software, a completely innovative Software application mode, Software-as-a-Service (SaaS for short), is beginning to emerge. In the application for realizing the SaaS, various services related to the SaaS are uniformly deployed on a server of a software developer, and a user orders the related services required by the user to the software developer through the Internet at any time and any place according to actual requirements. The user can avoid the maintenance of the application software and the construction cost of the related infrastructure. This mode of application is therefore inherently advantageous for small-scale users.
In the prior art, the SaaS is implemented mainly by two aspects, one is to perform isolation design on a data plane, for example, each user has an independent database, a plurality of users or all users share a database, and the users are distinguished by using data table names. Secondly, corresponding design is carried out on a code level, for example, part of codes of the application are combined with account information of a user to obtain corresponding data sources and data tables, or database information is configured in related codes of a configuration file, or related codes such as data source connection creation and the like are additionally added in service codes of the application. However, for the former solution, it needs to consume higher system resources to construct an independent database, and if a shared database is constructed, it cannot satisfy various requirements of high concurrency of users because of limited database connection resources, and if an additional database is to be added, it needs to modify a configuration file or modify a service code and restart an application service, so that the configuration mode is not flexible enough. For the latter scheme, the user may be required to fill in the user's unique identification number when using the application, which is not user-friendly, which is an intrusive service for the user, and which faces problems of a large code modification task, low efficiency, and a high degree of coupling.
Therefore, there are many problems in the existing solutions, and a method for implementing SaaS is needed to solve the above problems.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for realizing SaaS, which are used for solving the problems that in the prior art, a solution for applying SaaS cannot meet high concurrency requirements under the condition of consuming less system resources or the realization process is an immersion service, so that the user friendliness is poor, codes need to be modified, the efficiency is low, the coupling degree is high and the like.
In a first aspect, the present application provides a method for implementing SaaS application, including:
the method comprises the steps that corresponding configuration is carried out on each application to be SaaS by utilizing a preset middleware based on a section-oriented programming technology so as to obtain a plurality of corresponding candidate applications, wherein a preset middleware database of the preset middleware comprises a database example, and the database example comprises a plurality of data tables used for representing corresponding information of the candidate applications;
generating candidate database information and generating a data creation statement, wherein the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing addresses of the candidate database instances, and the data creation statement is used for creating corresponding database tables and table data;
generating a target account number and target domain name information of a target application, and determining target database information according to the target application, the candidate database information and the data creation statement so as to obtain a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number.
In one possible design, the method includes, by using a preset middleware based on a section-oriented programming technology, performing corresponding configuration on each application to be SaaS-based to obtain a plurality of corresponding candidate applications, where the configuration includes one of:
based on the section-oriented programming technology, changing default database instances and corresponding data tables correspondingly connected with the applications to be SaaS by utilizing the annotations of the preset middleware database in the preset middleware to the methods or classes added to the applications to be SaaS so as to obtain the corresponding candidate applications;
adding a starting class annotation to each SaaS application to be processed by utilizing the preset middleware database in the preset middleware based on the section-oriented programming technology, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain the corresponding candidate application;
and based on the section-oriented programming technology, using the preset middleware database in the preset middleware to use global configuration for each to-be-SaaS application, and changing a default database instance and a corresponding data table which are correspondingly connected with each to-be-SaaS application to obtain the corresponding candidate application.
In one possible design, the generating a data creation statement includes:
and generating corresponding data creation statements according to the table structure information of the target application and the initial data, wherein the data creation statements comprise SQL statements for creating a database table and SQL statements for creating table data.
In one possible design, the determining target database information from the target application, the candidate database information, and the data creation statement includes:
determining a target database instance and a target server corresponding to a target user according to the target application, the candidate database information and the SQL sentence for creating the database table;
determining target name information of the target database instance;
and initializing the target data table corresponding to the target application according to the SQL statement of the created table data.
In one possible design, the determining a target database instance and a target server corresponding to a target user according to the target application, the candidate database information, and the SQL statement for creating the database table includes:
determining the target database instance corresponding to the target user according to the target application, the connection information of the candidate database instance and the SQL statement for creating the database table;
determining the corresponding target server for the target database instance according to the IP information of the candidate server corresponding to the candidate database instance;
the connection information of the candidate database instance at least comprises: login password information, type information, drive information, version information of the candidate database instance, and IP information of the candidate server.
In one possible design, the obtaining, from the target database information, a corresponding target data table by using the target domain name information, the target account number, and the target application number includes:
acquiring the corresponding target account number from the preset middleware database according to the target domain name information;
and acquiring the corresponding target data table from the target database instance through the target account number and the target application number.
In one possible design, after the generating the candidate database information, the method further includes:
and generating name information of the candidate database instance and application information of the target application, wherein the application information comprises at least one of application name information, application icon information and application module information.
In one possible design, before the determining the target database instance corresponding to the target user according to the target application, the connection information of the candidate database instance, and the SQL statement for creating the database table, the method further includes:
generating a corresponding query list so that the target user can query candidate applications which can be selected through the query list; and/or
And generating corresponding management information so that the target user can acquire at least one of the number, the use duration and the use authority of the target application through the management information.
In one possible design, after the generating target domain name information corresponding to the target application, the method further includes:
and generating an information database data table of the target user according to the data creation statement so as to store the user information corresponding to the target application by using the information database data table.
In one possible design, the database instance includes a plurality of data tables including at least: the system comprises an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table; wherein the content of the first and second substances,
the application table is used for storing at least one of the application name information, the target application number, the application icon information and the target domain name information;
the database instance table is used for storing the name information of the candidate database instance and/or a database service primary key, and the database service primary key is used for mapping the corresponding relation between the database instance table and the database service table;
the database service table is used for storing at least one of IP information, port information, the type information, the version information, a login account and the login password information of the candidate server;
the resource table is used for storing corresponding resource information in the application module information;
the statement table is used for storing the SQL statement for creating the database table, the SQL statement for creating the table data and the candidate application number;
the application relation table is used for storing the corresponding relation between the target user and the target application and between the target user and the target data table;
the database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server.
In a second aspect, the present application provides an apparatus for implementing SaaS application, including:
the configuration module is used for carrying out corresponding configuration on each application to be SaaS by utilizing a preset middleware based on a section-oriented programming technology so as to obtain a plurality of corresponding candidate applications, wherein a preset middleware database of the preset middleware comprises a database instance, and the database instance comprises a plurality of data tables used for representing corresponding information of the candidate applications;
the system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for generating candidate database information and generating a data creating statement, the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing addresses of the candidate database instances, and the data creating statement is used for creating corresponding database tables and table data;
and the second processing module is used for generating a target account number and target domain name information of a target application, determining target database information according to the target application, the candidate database information and the data creation statement, and acquiring a corresponding target data table from the target database information by using the target domain name information, the target account number and a target application number.
In one possible design, the configuration module is specifically configured to be used in one of:
based on the section-oriented programming technology, changing default database instances and corresponding data tables correspondingly connected with the applications to be SaaS by utilizing the annotations of the preset middleware database in the preset middleware to the methods or classes added to the applications to be SaaS so as to obtain the corresponding candidate applications;
adding a starting class annotation to each SaaS application to be processed by utilizing the preset middleware database in the preset middleware based on the section-oriented programming technology, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain the corresponding candidate application;
and based on the section-oriented programming technology, using the preset middleware database in the preset middleware to use global configuration for each to-be-SaaS application, and changing a default database instance and a corresponding data table which are correspondingly connected with each to-be-SaaS application to obtain the corresponding candidate application.
In one possible design, the first processing module is configured to generate the corresponding data creation statement according to the table structure information of the target application and the initial data, where the data creation statement includes an SQL statement for creating a database table and an SQL statement for creating table data.
In one possible design, the second processing module is specifically configured to:
determining a target database instance and a target server corresponding to the target user according to the target application, the candidate database information and the SQL sentence for creating the database table;
determining target name information of the target database instance;
and initializing the target data table corresponding to the target application according to the SQL statement of the created table data.
In one possible design, the second processing module is further configured to:
determining the target database instance corresponding to the target user according to the target application, the connection information of the candidate database instance and the SQL statement for creating the database table;
determining the corresponding target server for the target database instance according to the IP information of the candidate server corresponding to the candidate database instance;
the connection information of the candidate database instance at least comprises: login password information, type information, drive information, version information of the candidate database instance, and IP information of the candidate server.
In one possible design, the second processing module is further configured to:
acquiring the corresponding target account number from the preset middleware database according to the target domain name information;
and acquiring the corresponding target data table from the target database instance through the target account number and the target application number.
In one possible design, the SaaS-applied implementation apparatus further includes:
and the third processing module is used for generating name information of the candidate database instances and application information of the target application, wherein the application information comprises at least one of application name information, application icon information and application module information.
In one possible design, the SaaS-applied implementation apparatus further includes: a fourth processing module; the fourth processing module is configured to:
generating a corresponding query list so that the target user can query candidate applications which can be selected through the query list; and/or
And generating corresponding management information so that the target user can acquire at least one of the number, the use duration and the use authority of the target application through the management information.
In one possible design, the SaaS-applied implementation apparatus further includes:
and the fifth processing module is used for generating an information database data table of the target user according to the data creation statement so as to store the user information corresponding to the target application by using the information database data table.
In one possible design, the database instance includes a plurality of data tables including at least: the system comprises an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table; wherein the content of the first and second substances,
the application table is used for storing at least one of the application name information, the target application number, the application icon information and the target domain name information;
the database instance table is used for storing the name information of the candidate database instance and/or a database service primary key, and the database service primary key is used for mapping the corresponding relation between the database instance table and the database service table;
the database service table is used for storing at least one of IP information, port information, the type information, the version information, a login account and the login password information of the candidate server;
the resource table is used for storing corresponding resource information in the application module information;
the statement table is used for storing the SQL statement for creating the database table, the SQL statement for creating the table data and the candidate application number;
the application relation table is used for storing the corresponding relation between the target user and the target application and between the target user and the target data table;
the database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the application SaaS-based implementation methods as provided by the first aspect and the alternatives of the first aspect.
In a fourth aspect, the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute any one of the SaaS implementation methods provided by the first aspect and the alternatives of the first aspect.
According to the application SaaS implementation method, device, equipment and storage medium, firstly, the preset middleware is used for carrying out corresponding configuration on each application to be SaaS based on the section-oriented programming technology to obtain a plurality of corresponding candidate applications, wherein the preset middleware database of the preset middleware comprises a database example, and the database example comprises a plurality of data tables used for representing corresponding information of the candidate applications. And then generating candidate database information and a data creation statement, wherein the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing the addresses of the candidate database instances, and the data creation statement is used for creating corresponding database tables and table data. And finally, generating a target account number and target domain name information corresponding to the target application, and further determining the target database information according to the target application, the candidate database information and the data creation statement so as to acquire a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number. The application SaaS implementation method is based on a section-oriented programming technology and preset middleware, the to-be-SaaS application is firstly configured, dynamic data source switching is achieved on the to-be-SaaS application in a low-intrusion or non-intrusion mode, and a large amount of code modification is not needed. And moreover, a relatively balanced data isolation scheme is provided for SaaS of the application, and high concurrency requirements are met under the condition of less system resource consumption.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for implementing SaaS application according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of obtaining a candidate application according to an embodiment of the present application;
fig. 4 is a schematic flowchart of determining target database information according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an implementation apparatus for SaaS application according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another SaaS-based implementation apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another SaaS-applied implementation apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another SaaS-applied implementation apparatus provided in the embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of methods and apparatus consistent with certain aspects of the present application, as detailed in the appended claims.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For users of application software with a small data size, SaaS-based applications have an inherent advantage in use. However, in the prior art, in the process of implementing SaaS to an application, there are many problems in the data level and the code level, for example, in the data level, constructing an independent database requires consuming higher system resources, and if constructing a shared database, because the database connection resources are limited, various requirements of high concurrency of a user cannot be met, at this time, if an additional database is added, a configuration file needs to be modified or a service code needs to be modified and an application service needs to be restarted, so that the configuration mode is not flexible enough. At the code level, a user may be required to fill in a unique identification number of the user when using the application, which is not user-friendly, is an intrusive service for the user, and faces problems of large task amount for modifying codes, low efficiency, high coupling degree, and the like. Therefore, a method for implementing SaaS is needed to solve the above problems in the prior art.
The application SaaS implementation method, the device, the equipment and the storage medium provided by the embodiment of the application firstly utilize the preset middleware to correspondingly configure each application to be SaaS based on the section-oriented programming technology to obtain corresponding candidate applications, wherein the preset middleware database of the preset middleware comprises database instances which comprise various data tables used for characterizing corresponding information of the candidate applications, moreover, the section-oriented programming technology is a technology which dynamically and uniformly adds corresponding functions to a program under the condition of not modifying a source code by a pre-compiling mode and a running period, therefore, based on the section-oriented programming, each application to be SaaS is configured correspondingly by utilizing the preset middleware, the method is used for modifying the layer of the application to be SaaS without modifying codes so as to realize dynamic data source switching in a low-intrusion or non-intrusion mode. Further, candidate database information and a data creation statement are generated, target database information is determined according to the target application, the candidate database information and the data creation statement, a target account number and target domain name information corresponding to the target application are generated, a target user can acquire a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number, the function of dynamically expanding candidate database resources is achieved, a relatively balanced data isolation scheme is provided for SaaS application, and high concurrency requirements are met under the condition of low system resource consumption.
An exemplary application scenario of the embodiments of the present application is described below.
The application SaaS implementation method provided by the embodiment of the application is executed by the application SaaS implementation device provided by the embodiment of the application. Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, and as shown in fig. 1, a network is used to provide a medium of a communication link between a terminal device 11, a terminal device 12, a server 13, and a server 14. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. Terminal devices 11 and 12 and server 13 and server 14 may interact with each other via a network to receive or send messages. The application to be SaaS-modified and the application after SaaS-modification, that is, the target application, may be run in the terminal device 11 and/or the terminal device 12 as application software. And server 13 and server 14 are corresponding target servers in the target database information. The type, number, and the like of the terminal device are not limited in the embodiments of the present application, for example, the terminal device may be various electronic devices that support and are installed on various applications such as a browser application, a virus killing application, a search application, and the like, including but not limited to a smart phone, a smart watch, a tablet computer, a personal digital assistant, an e-book reader, a laptop portable computer, a desktop computer, and the like. The terminal device 11 and the terminal device 12 in fig. 1 are each illustrated by taking a computer as an example. The server 13 and the server 14 may be part or all of a server, and the embodiment of the present application is not limited thereto. According to the application SaaS implementation method provided in the embodiment of the present application, the target application may be run on the terminal device 11 and/or the terminal device 12, and the data table generated by running the target application and all target table data in the data table are stored in the corresponding target server, that is, the server 13 and/or the server 14.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 2 is a schematic flow diagram of an application SaaS implementation method provided in an embodiment of the present application, and as shown in fig. 2, the application SaaS implementation method provided in this embodiment includes:
s101: and correspondingly configuring each application to be SaaS by utilizing a preset middleware based on a section-oriented programming technology to obtain a plurality of corresponding candidate applications.
The preset middleware database of the preset middleware comprises a database instance, and the database instance comprises various data tables used for representing corresponding information of the candidate application.
The preset middleware database corresponding to the preset middleware comprises a plurality of data tables used for representing corresponding information of the candidate applications, the SaaS application to be treated is correspondingly configured by utilizing the preset middleware database, the configured SaaS application to be treated is the candidate application, and therefore each candidate application corresponding to each SaaS application to be treated is obtained.
Since various data tables required for characterizing corresponding information of the candidate application are already included in the preset middleware database, in other words, at the code level, various data which may be required when the SaaS-based application is modified to become the candidate application are formed in advance through writing of the code, and the data are stored into the corresponding data tables. The preset middleware as an application can perform corresponding configuration on each application to be SaaS-based application through a preset middleware database, and can be performed based on an Aspect Oriented Programming (AOP) technology in the configuration process.
The section-oriented programming technology is a technology which dynamically performs through a pre-compiling mode and a running period so as to dynamically add corresponding functions to corresponding programs without modifying source codes. For example, after the preset middleware is used to perform corresponding configuration on each application to be SaaS-based, the application can query a required target data table in a preset middleware database instance through a dynamic proxy technology of the preset middleware, and switch the requirement to connect to the corresponding data table.
And correspondingly configuring each application to be SaaS by using a preset middleware based on a section-oriented programming technology to obtain a corresponding candidate application, namely adding a preset middleware database to the application to be SaaS so as to realize the switching of a dynamic data source and a corresponding data table of the application to be SaaS.
The method comprises the steps of utilizing preset middleware to correspondingly configure the SaaS application based on the section-oriented programming technology, wherein corresponding service codes do not need to be modified in the process, and the whole process is in a non-perception state for terminal equipment running the SaaS application and belongs to a low-intrusion or even non-intrusion implementation process.
In a possible design, a possible implementation manner of step S101 is shown in fig. 3, and fig. 3 is a schematic flow chart of obtaining a candidate application provided in the embodiment of the present application, and as shown in fig. 3, the embodiment may include one of step S1011, step S1012, and step S1013:
s1011: and changing default database instances and corresponding data tables correspondingly connected with the SaaS applications to be treated based on the annotation of the addition method or class of the SaaS applications by using a preset middleware database in a preset middleware based on the section-oriented programming technology so as to obtain corresponding candidate applications.
S1012: and adding start-up annotation to each SaaS application to be processed by utilizing a preset middleware database in preset middleware based on a section-oriented programming technology, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain a corresponding candidate application.
S1013: and based on a section-oriented programming technology, using global configuration for each SaaS application to be processed by using a preset middleware database in preset middleware, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain a corresponding candidate application.
The three methods are based on a section-oriented programming technology, a preset middleware is utilized, a global interceptor is used for configuring the SaaS application, and dynamic switching of a data source and a corresponding data table is realized to obtain candidate applications.
The first S1011 method is to change default database instances and corresponding data tables correspondingly connected to each to-be-SaaS-implemented application based on a section-oriented programming technology by using annotations of a preset middleware to add methods or classes to each to-be-SaaS-implemented application. For example, a default database instance corresponding to the to-be-SaaS application and a corresponding data table are intercepted, and the application after interception is a candidate application. Specifically, a default database instance correspondingly connected to the SaaS application and annotations of a code adding method or class corresponding to a corresponding data table are added by using a preset middleware database based on a section-oriented programming technology to realize interception, and the intercepted application is a candidate application. For example, a default database instance connected to the SaaS application and a specific record corresponding to the default database instance in the corresponding data table may be intercepted, so as to configure the SaaS application.
The second S1012 method is to add a start-up annotation to each to-be-SaaS application by using a preset middleware database in a preset middleware based on the section-oriented programming technology, and change a default database instance and a corresponding data table correspondingly connected to each to-be-SaaS application. For example, a default database instance corresponding to the to-be-SaaS application and a corresponding data table are intercepted, and the intercepted application is a candidate application. Specifically, a default database instance correspondingly connected to the SaaS application and a code corresponding to a corresponding data table are added with a start-up class annotation based on a section-oriented programming technology by using a preset middleware database, so as to implement interception, and the intercepted application is a candidate application. For example, a default database instance correspondingly connected to the SaaS-to-be-treated application and corresponding original specific table data in the corresponding data table may be intercepted, so as to implement configuration of the SaaS-to-be-treated application.
The third S1013 method is to use global configuration for each to-be-SaaS application by using a preset middleware database in the preset middleware based on the facet-oriented programming technology, and change a default database instance and a corresponding data table correspondingly connected to each to-be-SaaS application. For example, a default database instance correspondingly connected to the SaaS application and a code corresponding to a corresponding data table are configured globally by using a preset middleware database based on a section-oriented programming technology, and original table data corresponding to the SaaS application is intercepted, and the application after interception is a candidate application.
And dynamically switching the data source and the data table from the code level by one of the three modes. In actual conditions, the three modes have priorities, usually, a preset middleware database is used to firstly search whether a third mode is adopted, then, whether a second mode is adopted is searched, and finally, whether a first mode is adopted is searched, and then, corresponding configuration is performed according to the firstly searched mode to realize dynamic switching so as to obtain candidate application.
It should be noted that, in any of the above manners, when the preset middleware is used to perform corresponding configuration on each application to be SaaS-based on the section-oriented programming technology, if there is a case where the configuration cannot be performed, the default database instance and the corresponding data table of the application to be SaaS-based are returned. At this point, the corresponding code is added to enable active switching back to the default database instance when this occurs.
According to the application SaaS implementation method provided by the embodiment of the application, the corresponding configuration is performed on the SaaS application to be processed by utilizing the preset middleware based on the section-oriented programming technology in one of the three modes, so that the dynamic data source switching is realized, and the candidate application is obtained. The process adopts a global interceptor based on a section-oriented programming technology, can realize dynamic switching of a data source without modifying service codes, is in a non-sensing state for user terminal equipment, and belongs to a low-intrusion or even non-intrusion realization mode.
For example, the process of obtaining the candidate application in the application SaaS implementation method provided in the embodiment of the present application may be implemented by executing corresponding steps by using a corresponding application configured in a server or a server cluster built in a corresponding control center, where the application includes, but is not limited to, a preset middleware application.
S102: generating candidate database information and generating a data creation statement.
The candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing addresses of the candidate database instances, and the data creation statements are used for creating corresponding database tables and table data.
After the candidate applications are determined, each candidate application has its own use and may have the same or different characteristics, so that the final SaaS-implemented application meets high-concurrency use requirements, candidate database information may be further generated, where the candidate database information includes connection information of multiple candidate database instances, and the connection information is used to characterize addresses of corresponding candidate database instances, so that the connection information of the candidate database instances may be connected to the corresponding candidate database instances, so as to add other corresponding candidate database instances to the application in the implementation process of SaaS-implemented. It is understood that the candidate database instances are various database instances preset in advance, wherein the specific content of the database instances is not limited in the embodiment of the present application.
And meanwhile, generating a data creation statement so as to create a database table and table data required in the SaaS implementation process by using the data creation statement.
Further, after generating the candidate database information, the method for implementing SaaS to be implemented according to the embodiment of the present application further includes:
name information of the candidate database instance and application information of the target application are generated.
The application information includes at least one of application name information, application icon information, and application module information.
After generating the candidate database information, corresponding name information may be generated for the candidate database instance to which the connection information is connected, i.e. name information of the candidate database instance is generated to distinguish the connection information from the corresponding candidate database instance. The application name information is name information of the target application to distinguish the target application.
The target application, that is, the candidate application selected by the target user, serves as an application software, and represents the basic features of the target application by using application information, for example, the application information may include any one or more of application name information, application icon information, and application module information corresponding to the target application. For example, if the target application is a subscription platform, the application name information may be a name for naming the target application; the application icon information can be a graphic identifier special for the target application; the application module information may be one or more of control information, view information, and menu information possessed by the target application. It should be understood that each of the above application information may be provided by a software developer and/or a target user, and the embodiments of the present application are not limited thereto. Moreover, the application information may also be determined according to characteristic information specifically included in the target application in the actual working condition, including but not limited to the information provided in the embodiment of the present application.
For example, the process of generating candidate database information by the application-to-SaaS implementation method provided in the embodiment of the present application may be implemented by executing corresponding steps based on a corresponding application configured in a server or a server cluster set up in a corresponding control center.
S103: and generating a target account number and target domain name information of the target application, determining the target database information according to the target application, the candidate database information and the data creation statement, and acquiring a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number.
After determining the candidate database information, further, generating a target account number and target domain name information of the target application, and determining the target database information through a data creation statement according to the target application and the candidate database information. The target application is a candidate application selected by a target user, correspondingly, a corresponding target account number is generated for the target user, and target domain name information corresponding to the target application is generated. And meanwhile, determining target database information corresponding to the target user by using the data creation statement according to the target application and the candidate database information, so that the target user can acquire a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number. The number of the target application is a number corresponding to the target application, and the specific form of the number is not limited in the embodiments of the present application.
After generating the candidate database information, the database structure is shared by all the target users. Therefore, further, the corresponding target database information is determined for the target users according to the target application, the candidate database information and the data creation statement, so that when each target user acquires the corresponding target data table from the corresponding target database information by using the target domain name information, the target account number and the target application number, the target database information among each target user can be the database information which is individually shared, for example, the target database instance and the corresponding target server are shared. Moreover, because the candidate database information is in a shared state, the dynamic balance of the target database information can be realized according to the actual requirements of the target users. For example, when there are many target users, the target database information corresponding to each target user can be dynamically adjusted to achieve relatively balanced database isolation.
For example, in the application-to-SaaS implementation method provided in the embodiment of the present application, to generate a target account number and target domain name information of a target application and determine target database information for a target user, a corresponding step may be implemented based on a corresponding application configured in a server or a server cluster of a corresponding control center.
According to the application SaaS implementation method provided by the embodiment of the application, firstly, the preset middleware is utilized to perform corresponding configuration on each application to be SaaS based on a section-oriented programming technology, and a plurality of corresponding candidate applications are obtained, wherein a preset middleware database of the preset middleware comprises a database instance, and the database instance comprises a plurality of data tables used for representing corresponding information of the candidate applications. And then generating candidate database information and generating a data creation statement, wherein the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for characterizing the addresses of the candidate database instances, and the data creation statement is used for creating corresponding database tables and table data. And finally, generating a target account number and target domain name information corresponding to the target application, and further determining the target database information according to the target application, the candidate database information and the data creation statement so as to acquire a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number. The application SaaS implementation method is based on a section-oriented programming technology and preset middleware, the to-be-SaaS application is firstly configured, dynamic data source switching is achieved on the to-be-SaaS application in a low-intrusion or non-intrusion mode, and a large amount of code modification is not needed. Moreover, a relatively balanced data isolation scheme is provided for SaaS of the application, high concurrency requirements are met under the condition of less system resource consumption, and the whole SaaS implementation process has the advantages of high efficiency and low coupling.
In one possible design, the possible implementation manner of generating the data creation statement in step S102 is to generate the data creation statement according to the table structure information of the target application and the initial data, where the data creation statement includes an SQL (Structured Query Language) statement for creating a database table and an SQL statement for creating table data. The SQL statement for creating a database table is a statement for generating a corresponding database, and the SQL statement for creating table data is a statement for initializing a corresponding data table. It is to be noted that the table structure information used for generating the data creation statement may be a table required for the application itself to store data. The initial data may be data characterizing the basic features of the target application, for example, data of some features common to different target applications, and the specific content of the initial data is not limited in the implementation of the present application.
In one possible design, the step of determining the target database information according to the target application, the candidate database information and the data creation statement in step S103 may be implemented by the steps shown in fig. 4. Fig. 4 is a schematic flowchart of a process for determining target database information according to an embodiment of the present application, and referring to fig. 4, the determining target database information in the SaaS-applied implementation method according to the embodiment includes:
s201: and determining a target database instance and a target server corresponding to the target user according to the target application, the candidate database information and the SQL sentence for creating the database table.
As described previously, the SQL statement that creates a database table is the statement used to generate the corresponding database table, and thus, the target database instance and target server corresponding to the target user can be determined from the target application, the candidate database information selected by the user, and the SQL statement that creates the database table.
For example, a target database instance corresponding to a target user may be determined according to a target application, connection information of a candidate database instance, and an SQL statement for creating a database table, and then a corresponding target server may be determined for the target database instance according to IP information of a candidate server corresponding to the candidate database instance, where the connection information of the candidate database instance includes login password information, type information, driving information, version information, and IP information of the candidate server of the candidate database instance. Since the connection information of the candidate database instance is used to characterize the address of the candidate database instance, the connection information of the candidate database instance can be linked to the corresponding candidate database instance, thereby determining the corresponding target database instance for the target user. Accordingly, the corresponding target server can be determined for the determined target database instance through the IP information of the candidate server corresponding to the candidate database instance. The number of the target servers can be set according to the actual requirement of the user for running the target application, which is not limited in the embodiment of the present application.
It should be noted that the number of candidate database instances may be one or more, or the number thereof may be dynamically changed. For example, when the resources of the server where the existing database is located are insufficient, a new database server may be added as the candidate database, and the operation of adding the candidate database may be completed without restarting the candidate application. The present embodiment is not limited to this.
S202: and determining name information corresponding to the target database instance.
Further, determining respective corresponding target name information for each target database instance, that is, selecting name information for each target database instance to obtain respective target name information, so as to distinguish each target database instance.
S203: and initializing a target data table corresponding to the target application according to the SQL statement for creating the table data.
The SQL statement for creating the table data is a statement for initializing the data table, and thus, the target data table corresponding to the target application can be initialized according to the SQL statement for creating the table data. Various table data generated by the target user running the target application on the respective terminal equipment are recorded in various different types of data tables, and before the target user normally runs the target application, the target data table is initialized so as to record the table data generated when the target application is run into the corresponding data table. It is to be understood that the target data table may be various types of tables involved by the target application, such as a financial table, a customer complaint table, an order table, and so forth.
According to the SaaS implementation method for the application, corresponding data creation statements are generated according to the table structure information of the target application and the initial data, wherein the data creation statements comprise SQL statements for creating a database table and SQL statements for creating table data. The target database instance and the target server corresponding to the target user may be determined according to the target application, the candidate database information, and the SQL statement for creating the database table, where the target database instance corresponding to the target user is determined according to the target application, the connection information of the candidate database instance, and the SQL statement for creating the database table, and the corresponding target server is determined for the target database instance according to the IP information of the candidate server corresponding to the candidate database instance. And then determining target name information for the target database instance, and initializing a target data table corresponding to the target application according to the SQL statement for creating the table data. Therefore, the target database instances in the corresponding target database information and the corresponding target servers are determined for the target users, so that the target users can acquire the corresponding target data tables from the target database instances of the target database information by using the target domain name information, the target account number and the target application number. The target server provides corresponding hardware support for the above process. The application SaaS implementation method provided in this embodiment implements SaaS of an application in a low-intrusion or non-intrusion manner, and also provides a relatively balanced data isolation scheme, which can meet high concurrency requirements even when system resources are consumed less, and has high-efficiency and low-coupling implementation effects.
In a possible design, a possible implementation manner of acquiring the corresponding target data table from the target database information by using the target domain name information, the target account number, and the target application number in the above embodiment is to first acquire the corresponding target account number from the preset middleware database according to the target domain name information, and then acquire the corresponding target data table from the target database instance by using the target account number and the target application number. According to the target domain name information, a link is connected to a target account number corresponding to the target domain name information in a preset middleware database, and a target data table corresponding to the target domain name information is inquired and obtained from a target database example by combining the target account number and a target application number. For the target user, only the target domain name information needs to be input, the target domain name information is output as a target data table, and the link process of the preset middleware database is in an unaware state, so that the use experience of the target user in running the target application is improved.
On the basis of the foregoing embodiment, the SaaS-applied implementation method provided in the embodiment of the present application, before determining the target database instance corresponding to the target user, further includes:
generating a corresponding query list so that the target user can query the candidate applications which can be selected through the query list; and/or
And generating corresponding management information so that the target user can acquire at least one of the number, the use duration and the use authority of the target application through the management information.
Before determining the target database instance corresponding to the target user, a corresponding query list may also be generated for the target user, so that the target user may query candidate applications available for subscription through the respective query list. In other words, each candidate application is listed through the generated query list for the target user to choose, and the chosen candidate application is the target application corresponding to the target user.
Meanwhile, or on the other hand, corresponding management information may also be generated for the target user, where the management information includes at least one of the number of candidate applications purchased by the target user, that is, the number of target applications, the duration of running the target application, and the permission of running the target application. For some target users, the target users may subscribe multiple SaaS-implemented applications of the software developer, and the target users may know the number of candidate applications currently subscribed, that is, the target applications, through the management information. And the use duration and the corresponding use authority of the ordered target application. The usage duration may be, for example, a duration between a start time when the target user subscribes to the target application and an end time when the target application provides a service. The usage right may be, for example, a specific service that the target application can provide for subscribing the target user, and the like. The specific content included in the usage duration and the usage right includes, but is not limited to, a setting according to a target user and a subscribed corresponding target application, and the embodiment of the present application is not limited thereto.
In one possible design, a portal page may also be generated to display the target applications ordered by the target user on the portal page. For example, the display may be performed in a list control form, and when a list control corresponding to a target application is clicked, the page may jump to a main page of the current target application. It is understood that the portal page is a page set by a software developer for managing target applications of all target users.
In one possible design, a user center may also be generated so that each target user creates other administrative roles at the respective user center. For example, the target user may create other administrative roles in his own user center. After the other management roles are created, various permissions for the target database instance and/or the target server can be correspondingly configured for the other management roles.
It is to be understood that some settings in this embodiment are further improved based on the use experience of the target application, and the application SaaS implementation method provided in this embodiment includes, but is not limited to, the setting of the improvement in this embodiment.
According to the application SaaS implementation method provided by the embodiment of the application, after the target database instance corresponding to the target user is determined, the corresponding query list is further generated, so that the target user can query the candidate applications which can be selected through the query list. Meanwhile, or additionally, corresponding management information is generated, so that the target user can know at least one of the number, the use duration and the use permission of the target application through the management information. The query list and the management information are set aiming at some perfect information of the target user, and the use experience of the target user for purchasing the candidate application is favorably improved.
For example, the above steps may be implemented based on executing the corresponding steps with the respective application configured therein in a server or a server cluster built in the respective control center.
Further, after generating target domain name information of a target application, the implementation method of SaaS application provided in the embodiment of the present application further includes:
and generating an information database data table of the target user according to the data creation statement so as to store the user information corresponding to the target application by using the information database data table.
After generating the target domain name information of the target application, an information database data table may also be generated according to the creation statement to store the user information corresponding to the target application by using the information database data table, for example, the information database data table may be generated according to an SQL statement that creates a database table. The target user runs the target application, for example, the target application is an e-commerce Application (APP), the software developer provides the SaaS-modified e-commerce APP, and the target user has ordered the e-commerce APP, when the target user runs the e-commerce APP, a corresponding consumer exists accordingly, when the consumer browses the e-commerce APP and conducts a transaction in the e-commerce APP, all information of the consumer is user information corresponding to the target application, a specific item included in the user information may be created by the target user according to the target application, which is not limited in the embodiment of the present application.
According to the application SaaS implementation method provided by the embodiment of the application, after the target domain name information of the target application is generated, the information database data table is generated for the target user, so that the user information corresponding to the target application is stored in the information database data table, the target user can manage the user using the target application, and the use experience of the target user in running the target application is further improved.
On the basis of the above embodiments, in one possible design, the database instance in the middleware database includes a plurality of data tables representing corresponding information of the candidate application. The plurality of data tables at least include: an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table, wherein
The application table is used for storing at least one of application name information, target application numbers, application icon information and target domain name information;
the database instance table is used for storing name information of candidate database instances and/or database service primary keys, and the database service primary keys are used for mapping the corresponding relation between the database instance table and the database service table;
the database service table is used for storing at least one of IP information, port information, type information, version information, login account and login password information of the candidate server;
the resource table is used for storing corresponding resource information in the application module information;
the statement table is used for storing SQL statements for creating a database table, SQL statements for creating table data and candidate application numbers;
the application relation table is used for storing the corresponding relation between the target user and the target application and between the target user and the target data table;
the database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server.
The database instance of the preset middleware database comprises a plurality of data tables for representing corresponding information of the candidate application, wherein the plurality of data tables include, but are not limited to, any one or more of an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table.
Specifically, the application table is used for storing one or more of corresponding information of the target application, such as application name information, a target application number, application icon information, target domain name information, and the like.
The database instance table is used for storing name information of the candidate database instance and/or a database service primary key, wherein the database service primary key is used for mapping a corresponding relation between the database instance table and the database service table. For example, a link may be made from a database instance table to a corresponding database service table through a database service to database service.
The database service table is used for storing at least one of IP information, port information, type information, version information, login account and login password information of the candidate server. And the login account and the login password information have a corresponding relation so as to cooperatively login the candidate database instance. The software developer can also effectively manage each hardware and/or software of the candidate server and/or the target server through the database service table. Such as version updates, etc.
The resource table is used for storing corresponding resource information in the application module information. It is understood that each resource information in the application module information may be set according to the function and the feature of the target application, and the resource information related to the application module information may be as much as possible.
The statement table is used for storing SQL statements used for creating a database table, SQL statements used for creating table data and candidate application numbers, wherein the candidate application numbers refer to corresponding numbers compiled for each candidate application, and can be recorded in the preset middleware database when the preset middleware is used for configuration. And after the target application is the target application, the target application also correspondingly has a target application number, and the target application number is consistent with the candidate application number. It is to be understood that the embodiments of the present application are not limited to the specific form of the candidate application number and/or the target application number.
The application relation table is used for storing the corresponding relation between the target user and the target application and the target data table so as to link the corresponding relation between the target user, the target application and the target data table.
The database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server so as to carry out direct link on each content included in the target database instance.
According to the application SaaS implementation method provided by the embodiment of the application, the database instance in the preset middleware database comprises a plurality of data tables for representing corresponding information of candidate applications. Therefore, in the process of obtaining corresponding candidate applications by using the preset middleware database to perform corresponding configuration on each application to be SaaS-based on the section-oriented programming technology, because a plurality of data tables included in the preset middleware database are set in advance in the code layer, for each different application to be SaaS-based, the SaaS-based candidate applications can be obtained only by performing corresponding configuration on the preset middleware database, and the code of each candidate application is not required to be modified. Therefore, when the section-oriented programming technology is used for SaaS application by using the preset intermediate database corresponding to the preset middleware, the SaaS application can be realized in a low-intrusion or non-intrusion mode, SaaS application to be treated can be quickly realized, high concurrency requirements can be met under the condition of less system resource consumption, and the implementation process also has the advantages of high efficiency, low coupling and the like.
Fig. 5 is a schematic structural diagram of an application SaaS implementation apparatus according to an embodiment of the present disclosure, and as shown in the drawing, an application SaaS implementation apparatus 300 according to this embodiment includes:
the configuration module 301 is configured to perform corresponding configuration on each application to be SaaS-implemented by using a preset middleware based on a section-oriented programming technology, so as to obtain a plurality of corresponding candidate applications. The preset middleware database of the preset middleware comprises a database instance, and the database instance comprises various data tables used for representing corresponding information of the candidate application.
The first processing module 302 is configured to generate candidate database information and generate a data creation statement, where the candidate database information includes connection information of multiple candidate database instances, the connection information of the candidate database instances is used to characterize addresses of the candidate database instances, and the data creation statement is used to create corresponding database tables and table data.
The second processing module 303 is configured to generate a target account number and target domain name information of a target application, determine target database information according to the target application, candidate database information, and a data creation statement, and acquire a corresponding target data table from the target database information by using the target domain name information, the target account number, and a target application number.
In one possible design, the module 301 is configured, in particular, in the following manner:
based on a section-oriented programming technology, a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed are changed by utilizing a preset middleware database in a preset middleware to add methods or classes to each SaaS application to obtain corresponding candidate applications;
adding start-up annotation to each SaaS application to be processed by utilizing a preset middleware database in a preset middleware based on a section-oriented programming technology, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain a corresponding candidate application;
and based on a section-oriented programming technology, using global configuration for each SaaS application to be processed by using a preset middleware database in preset middleware, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain a corresponding candidate application.
In one possible design, the first processing module 302 is specifically configured to:
and generating corresponding data creation statements according to the table structure information of the target application and the initial data, wherein the data creation statements comprise SQL statements for creating database tables and SQL statements for creating table data.
In one possible design, the second processing module 302 is specifically configured to:
determining a target database instance and a target server corresponding to a target user according to the target application, the candidate database information and the SQL sentence for creating the database table;
determining target name information of a target database instance;
and initializing a target data table corresponding to the target application according to the SQL statement for creating the table data.
Further, the second processing module 303 is further configured to:
determining a target database instance corresponding to a target user according to the target application, the connection information of the candidate database instance and the SQL sentence for creating the database table;
determining a corresponding target server for the target database instance according to the IP information of the candidate server corresponding to the candidate database instance;
wherein the connection information of the candidate database instance at least comprises: login password information, type information, drive information, version information of the candidate database instance, and IP information of the candidate server.
In one possible design, the second processing module 303 is further configured to:
acquiring a corresponding target account number from a preset middleware database according to the target domain name information;
and acquiring a corresponding target data table from the target database instance through the target account number and the target application number.
Based on the embodiment shown in fig. 5, fig. 6 is a schematic structural diagram of another application SaaS implementation apparatus provided in the embodiment of the present application, and as shown in fig. 6, an application SaaS implementation apparatus 300 provided in this embodiment further includes:
and the third processing module 304 is configured to generate name information of the candidate database instance and application information of the target application, where the application information includes at least one of application name information, application icon information, and application module information.
On the basis of the embodiments shown in fig. 5 and/or fig. 6, fig. 7 is a schematic structural diagram of another SaaS application implementation apparatus provided in the embodiments of the present application, and as shown in fig. 7, the SaaS application implementation apparatus 300 provided in this embodiment further includes: a fourth processing module 305.
Wherein, the fourth processing module 305 is configured to:
generating a corresponding query list so that the target user can query the candidate applications which can be selected through the query list; and/or
And generating corresponding management information so that the target user can acquire at least one of the number, the use duration and the use authority of the target application through the management information.
It will be appreciated that fig. 7 only shows a corresponding embodiment obtained on the basis of the embodiment of fig. 6.
Based on the embodiment shown in fig. 7, fig. 8 is a schematic structural diagram of another application SaaS implementation apparatus provided in the embodiment of the present application, and as shown in fig. 8, an application SaaS implementation apparatus 300 provided in this embodiment further includes: a fifth processing module 306.
The fifth processing module 306 is configured to generate an information database data table of the target user according to the data creation statement, so as to store the user information corresponding to the target application by using the information database data table.
In one possible design, the database instance includes a plurality of data tables including: at least one of an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table; wherein
The application table is used for storing at least one of application name information, target application numbers, application icon information and target domain name information;
the database instance table is used for storing name information of candidate database instances and/or database service primary keys, and the database service primary keys are used for mapping the corresponding relation between the database instance table and the database service table;
the database service table is used for storing at least one of IP information, port information, type information, version information, login account and login password information of the candidate server;
the resource table is used for storing corresponding resource information in the application module information;
the statement table is used for storing SQL statements for creating a database table, SQL statements for creating table data and candidate application numbers;
the application relation table is used for storing the corresponding relation between the target user and the target application and between the target user and the target data table;
the database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server.
It should be noted that the device embodiment provided in the present application is only an exemplary one, and the module division in the device embodiment is only a logic function division, and there may be another division manner in actual implementation. For example, multiple modules may be combined or may be integrated. The coupling of the various modules to each other may be through interfaces that are typically electrical communication interfaces, but mechanical or other forms of interfaces are not excluded. Thus, modules described as separate components may or may not be physically separate, may be located in one place, or may be distributed in different locations on the same or different devices.
The SaaS-as-application implementation apparatus provided in the foregoing embodiment may be configured to execute corresponding steps of the SaaS-as-application implementation method provided in the foregoing method embodiment, and specific implementation manners, principles, and technical effects are similar, and are not described herein again.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 9, an electronic device 700 according to the embodiment includes:
at least one processor 701; and
a memory 702 communicatively coupled to the at least one processor 701; wherein the content of the first and second substances,
the memory 702 stores instructions executable by the at least one processor 701, and the instructions are executed by the at least one processor 701, so that the at least one processor 701 can execute the steps of the SaaS implementation method in the foregoing method embodiment, which may be referred to in detail in the foregoing description of the method embodiment.
Alternatively, the memory 702 may be separate or integrated with the processor 701.
When the memory 702 is a separate device from the processor 701, the electronic device 700 may further include:
the bus 703 is used to connect the processor 701 and the memory 702.
In addition, embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the steps of the SaaS-applied implementation method in the foregoing embodiments. For example, the readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (13)

1. An application software as a service (SaaS) realization method is characterized by comprising the following steps:
the method comprises the steps that corresponding configuration is carried out on each application to be SaaS by utilizing a preset middleware based on a section-oriented programming technology so as to obtain a plurality of corresponding candidate applications, wherein a preset middleware database of the preset middleware comprises a database example, and the database example comprises a plurality of data tables used for representing corresponding information of the candidate applications;
generating candidate database information and generating a data creation statement, wherein the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing addresses of the candidate database instances, and the data creation statement is used for creating corresponding database tables and table data;
generating a target account number and target domain name information of a target application, and determining target database information according to the target application, the candidate database information and the data creation statement so as to obtain a corresponding target data table from the target database information by using the target domain name information, the target account number and the target application number.
2. The method as claimed in claim 1, wherein the method for implementing SaaS-based application is characterized in that the section-oriented programming technology is used to configure each application to be SaaS-based application by using a preset middleware to obtain a plurality of corresponding candidate applications, and the method includes one of the following steps:
based on the section-oriented programming technology, changing default database instances and corresponding data tables correspondingly connected with the applications to be SaaS by utilizing the annotations of the preset middleware database in the preset middleware to the methods or classes added to the applications to be SaaS so as to obtain the corresponding candidate applications;
adding a starting class annotation to each SaaS application to be processed by utilizing the preset middleware database in the preset middleware based on the section-oriented programming technology, and changing a default database instance and a corresponding data table which are correspondingly connected with each SaaS application to be processed so as to obtain the corresponding candidate application;
and based on the section-oriented programming technology, using the preset middleware database in the preset middleware to use global configuration for each to-be-SaaS application, and changing a default database instance and a corresponding data table which are correspondingly connected with each to-be-SaaS application to obtain the corresponding candidate application.
3. The SaaS implementation method as claimed in claim 1 or 2, wherein the generating a data creation statement includes:
and generating corresponding data creation statements according to the table structure information of the target application and the initial data, wherein the data creation statements comprise SQL statements for creating a database table and SQL statements for creating table data.
4. The application SaaS implementation method of claim 3, wherein the determining target database information according to the target application, the candidate database information, and the data creation statement includes:
determining a target database instance and a target server corresponding to a target user according to the target application, the candidate database information and the SQL sentence for creating the database table;
determining target name information of the target database instance;
and initializing the target data table corresponding to the target application according to the SQL statement of the created table data.
5. The SaaS implementation method of claim 4, wherein the determining a target database instance and a target server corresponding to a target user according to the target application, the candidate database information, and the SQL statement for creating the database table includes:
determining the target database instance corresponding to the target user according to the target application, the connection information of the candidate database instance and the SQL statement for creating the database table;
determining the corresponding target server for the target database instance according to the IP information of the candidate server corresponding to the candidate database instance;
the connection information of the candidate database instance at least comprises: login password information, type information, drive information, version information of the candidate database instance, and IP information of the candidate server.
6. The method as claimed in claim 5, wherein the obtaining a corresponding target data table from the target database information using the target domain name information, the target account number, and the target application number includes:
acquiring the corresponding target account number from the preset middleware database according to the target domain name information;
and acquiring the corresponding target data table from the target database instance through the target account number and the target application number.
7. The application SaaS-based implementation method according to claim 6, further comprising, after the generating candidate database information:
and generating name information of the candidate database instance and application information of the target application, wherein the application information comprises at least one of application name information, application icon information and application module information.
8. The application SaaS-based implementation method according to claim 7, before the determining the target database instance corresponding to the target user according to the target application, the connection information of the candidate database instance, and the SQL statement for creating the database table, further comprising:
generating a corresponding query list so that the target user can query candidate applications which can be selected through the query list; and/or
And generating corresponding management information so that the target user can acquire at least one of the number, the use duration and the use authority of the target application through the management information.
9. The application SaaS implementation method of claim 8, wherein after the generating target domain name information of the target application, the method further comprises:
and generating an information database data table of the target user according to the data creation statement so as to store the user information corresponding to the target application by using the information database data table.
10. The application SaaS implementation method of claim 9, wherein the database instance comprises a plurality of data tables at least comprising: the system comprises an application table, a database instance table, a database service table, a resource table, a statement table, an application relation table and a database relation table; wherein the content of the first and second substances,
the application table is used for storing at least one of the application name information, the target application number, the application icon information and the target domain name information;
the database instance table is used for storing the name information of the candidate database instance and/or a database service primary key, and the database service primary key is used for mapping the corresponding relation between the database instance table and the database service table;
the database service table is used for storing at least one of IP information, port information, the type information, the version information, a login account and the login password information of the candidate server;
the resource table is used for storing corresponding resource information in the application module information;
the statement table is used for storing the SQL statement for creating the database table, the SQL statement for creating the table data and the candidate application number;
the application relation table is used for storing the corresponding relation between the target user and the target application and between the target user and the target data table;
the database relation table is used for storing the corresponding relation among the target account number, the target application, the target domain name information, the target database instance and the target server.
11. An application software as a service (SaaS) realization device is characterized by comprising:
the configuration module is used for carrying out corresponding configuration on each application to be SaaS by utilizing a preset middleware based on a section-oriented programming technology so as to obtain a plurality of corresponding candidate applications, wherein a preset middleware database of the preset middleware comprises a database instance, and the database instance comprises a plurality of data tables used for representing corresponding information of the candidate applications;
the system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for generating candidate database information and generating a data creating statement, the candidate database information comprises connection information of a plurality of candidate database instances, the connection information of the candidate database instances is used for representing addresses of the candidate database instances, and the data creating statement is used for creating corresponding database tables and table data;
and the second processing module is used for generating a target account number and target domain name information of a target application, determining target database information according to the target application, the candidate database information and the data creation statement, and acquiring a corresponding target data table from the target database information by using the target domain name information, the target account number and a target application number.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the application SaaS implementation method of any one of claims 1-10.
13. A non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the SaaS-applied implementation method according to any one of claims 1 to 10.
CN202011367343.3A 2020-11-30 2020-11-30 Application software as a service (SaaS) realization method, device, equipment and storage medium Active CN112131230B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011367343.3A CN112131230B (en) 2020-11-30 2020-11-30 Application software as a service (SaaS) realization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011367343.3A CN112131230B (en) 2020-11-30 2020-11-30 Application software as a service (SaaS) realization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112131230A true CN112131230A (en) 2020-12-25
CN112131230B CN112131230B (en) 2021-02-19

Family

ID=73852518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011367343.3A Active CN112131230B (en) 2020-11-30 2020-11-30 Application software as a service (SaaS) realization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112131230B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779124A (en) * 2021-08-09 2021-12-10 深圳市惟客数据科技有限公司 Method, device and readable medium for stripping single group data under saas system
CN114510282A (en) * 2021-12-15 2022-05-17 北京达佳互联信息技术有限公司 Operation method, device, equipment and storage medium of automation application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036856A (en) * 2011-10-09 2013-04-10 镇江金软计算机科技有限责任公司 Multi-tenant system achievement based on software as a service (SAAS) application
CN106951555A (en) * 2017-03-29 2017-07-14 北京亿科天元信息技术有限公司 SaaS mode contents management systems based on structural data
CN110471775A (en) * 2018-05-08 2019-11-19 北京科东电力控制系统有限责任公司 A method of by modeling and simulating software encapsulation at privately owned cloud service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036856A (en) * 2011-10-09 2013-04-10 镇江金软计算机科技有限责任公司 Multi-tenant system achievement based on software as a service (SAAS) application
CN106951555A (en) * 2017-03-29 2017-07-14 北京亿科天元信息技术有限公司 SaaS mode contents management systems based on structural data
CN110471775A (en) * 2018-05-08 2019-11-19 北京科东电力控制系统有限责任公司 A method of by modeling and simulating software encapsulation at privately owned cloud service

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779124A (en) * 2021-08-09 2021-12-10 深圳市惟客数据科技有限公司 Method, device and readable medium for stripping single group data under saas system
CN114510282A (en) * 2021-12-15 2022-05-17 北京达佳互联信息技术有限公司 Operation method, device, equipment and storage medium of automation application
CN114510282B (en) * 2021-12-15 2024-02-13 北京达佳互联信息技术有限公司 Method, device, equipment and storage medium for running automation application

Also Published As

Publication number Publication date
CN112131230B (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN110532020B (en) Data processing method, device and system for micro-service arrangement
CN109597661B (en) Service function configuration method and device
US9645989B2 (en) Techniques to generate custom electronic forms using custom content
CN102567400B (en) Method for realizing Web visit and Web server
CN112131230B (en) Application software as a service (SaaS) realization method, device, equipment and storage medium
CN105335132A (en) Method, apparatus and system for user-defined application function
US10725795B2 (en) Systems, methods, and apparatuses for dynamic creation of an external code segment within a cloud based computing environment
CN105024913A (en) Method, apparatus and system of instant messaging conversation
CN103634393A (en) IVR (interactive voice response) and realization method thereof
US20080216050A1 (en) Method and System for Accessing a Resource Implemented in a Computer Network
Mukhopadhyay et al. Qos based framework for effective web services in cloud computing
US11018938B1 (en) Auditing metadata representation of a cloud-computing platform based datacenter
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
CN112235132A (en) Method, device, medium and server for dynamically configuring service
CN103917951B (en) Application invocation method, operating system and browser
Jeong et al. A service composition model based on user experience in Ubi-cloud comp
JP2021068414A (en) Wrapping method, registration method, device, rendering device, and program
US10554770B2 (en) Dynamic cognitive optimization of web applications
US20220284371A1 (en) Method, device and medium for a business function page
US9858355B1 (en) Search engine optimization based upon most popular search history
CN114661274A (en) Method and device for generating intelligent contract
Anjum et al. Glueing grids and clouds together: a service-oriented approach
CN112882698A (en) Development environment generation method and device, computer storage medium and electronic device
CN106570143B (en) Method and device for sending response object
US20210042334A1 (en) Multi-cloud object store access

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
GR01 Patent grant
GR01 Patent grant