CN114217820A - Container deployment method, device, equipment and medium based on software as a service (SaaS) software - Google Patents

Container deployment method, device, equipment and medium based on software as a service (SaaS) software Download PDF

Info

Publication number
CN114217820A
CN114217820A CN202111654835.5A CN202111654835A CN114217820A CN 114217820 A CN114217820 A CN 114217820A CN 202111654835 A CN202111654835 A CN 202111654835A CN 114217820 A CN114217820 A CN 114217820A
Authority
CN
China
Prior art keywords
deployment
shop
saas
container
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111654835.5A
Other languages
Chinese (zh)
Inventor
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Depu Technology Co ltd
Original Assignee
Shenzhen Depu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Depu Technology Co ltd filed Critical Shenzhen Depu Technology Co ltd
Priority to CN202111654835.5A priority Critical patent/CN114217820A/en
Publication of CN114217820A publication Critical patent/CN114217820A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a container deployment method based on SaaS software, which comprises the following steps: receiving a shop entrance request triggered by a user, and analyzing shop entrance information; establishing a shop SaaS container for the user according to the shop entrance information; inputting the shop SaaS container into a preset deployment strategy model to obtain a target deployment strategy matched with the shop SaaS container, a security score of each target deployment strategy and a deployment cost of each target deployment strategy; screening out an optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost; and deploying the shop SaaS container according to the optimal target deployment strategy. The invention also discloses a container deployment device based on the SaaS software, a computer device and a computer readable storage medium.

Description

Container deployment method, device, equipment and medium based on software as a service (SaaS) software
Technical Field
The invention relates to the technical field of container deployment, in particular to a container deployment method and device based on SaaS software, computer equipment and a computer readable storage medium.
Background
SaaS (Software-as-a-Service) provides Software services through a network. The SaaS platform supplier uniformly deploys the application software on a server of the SaaS platform supplier, a client can order the required application software service from a manufacturer through the Internet according to actual working requirements, pay the cost to the manufacturer according to the amount and time of the ordered service and obtain the service provided by the Saas platform supplier through the Internet, the application software provided by the SaaS platform supplier is called SaaS software, and different SaaS software can provide different functions.
Container technology for efficiently partitioning resources of a single operating system into isolated groups to better balance conflicting resource usage requirements among the isolated groups.
For the same SaaS software, there are usually multiple tenants, and in the prior art, an engineer manually creates a container for each tenant of each SaaS software, and manually writes a deployment policy of each container. For example, in the current market, the SaaS software having the online store-out function has a large number, and each SaaS software having the online store-out function has a large number of tenants, which results in a large number of containers to be created, and in this case, if a deployment policy of the containers is still manually written, the workload of engineers is inevitably increased, and the deployment efficiency of the containers is inevitably reduced; and the container deployment strategies required by different store types are different, and the safety of manually writing the deployment strategies is necessarily reduced due to the influence of numerous fussy factors.
Aiming at the technical problems of low deployment efficiency and poor deployment result safety in the prior art that deployment strategies of all containers of SaaS software with online store opening functions are manually compiled, an effective solution does not exist at present.
Disclosure of Invention
The invention aims to provide a SaaS container deployment method, a device, computer equipment and a computer readable storage medium, which can solve the technical problems of low deployment efficiency and poor deployment result safety in the prior art that deployment strategies of various containers of SaaS software with an online store opening function are manually compiled.
One aspect of the present invention provides a container deployment method based on SaaS software, including: receiving a shop entrance request triggered by a user, and analyzing shop entrance information; creating a shop SaaS container for the user according to the shop entrance information, wherein the shop SaaS container is a container for bearing shop SaaS information, and the shop SaaS information comprises software information of SaaS software for providing an online shop opening function and shop information of shops opened by the user on the SaaS software; inputting the shop SaaS container into a preset deployment strategy model to obtain a target deployment strategy matched with the shop SaaS container, a security score of each target deployment strategy and a deployment cost of each target deployment strategy; screening out an optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost; and deploying the shop SaaS container according to the optimal target deployment strategy.
Optionally, the constructing a shop SaaS container for the user according to the shop entrance information includes: obtaining a shop type from the shop entrance information; searching whether a data table type associated with the shop type exists in a preset container database; if the data table exists, the data table of the shop SaaS container is established according to the searched data table type; and if the type of the data table does not exist, receiving the type of the data table input from the outside, constructing the data table of the shop SaaS container according to the received type of the data table, associating the received type of the data table with the shop type, and storing the data table in the container database.
Optionally, the method further comprises: constructing a model training set, wherein the model training set comprises a plurality of training samples, and each training sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy; taking historical shop SaaS containers of a plurality of training samples in the training set as input, taking corresponding deployment strategies, safety scores and deployment costs as output, and training a preset deep learning model; and when the training result meets the preset condition, taking the correspondingly trained learning model as the deployment strategy model.
Optionally, determining a security score for the deployment policy comprises: after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container; dividing the acquired running log into an error log representing deployment errors and a correct log representing deployment correctness; determining the grade of the error log according to the category of the error log, and recording the grade as an error grade; determining the grade of the correct log according to the category of the correct log, and recording the grade as the correct grade; setting weight for the corresponding error log according to the error grade, and recording as error weight; setting weight for the corresponding correct log according to the correct grade, and recording as correct weight; counting the number of error logs belonging to the same error level, and recording the number as the number of error logs; counting the number of the logs of the correct logs belonging to the same correct level, and recording the number as the number of the correct logs; and determining the safety score of the deployment strategy according to the error log quantity, the error weight, the correct log quantity and the correct weight.
Optionally, determining the deployment cost of the deployment policy includes: after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container; screening out a resource log representing deployment resources from the acquired running logs; determining the grade of the resource log according to the category of the resource log, and recording the grade as the resource grade; setting weight for the corresponding resource log according to the resource grade, and recording as resource weight; counting the log number of the resource logs belonging to the same resource level, and recording the log number as the resource log number; and determining the deployment cost of the deployment strategy according to the resource log quantity and the resource weight.
Optionally, when the training result satisfies a preset condition, taking the correspondingly trained learning model as the deployment strategy model includes: constructing a model test set, wherein the model test set comprises a plurality of test samples, and each test sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy; inputting the historical shop SaaS containers of the test samples in the test set into a trained learning model to obtain an output deployment strategy, a safety score and a deployment cost; comparing the deployment strategy, the safety score and the deployment cost output by the trained learning model with the deployment strategy, the safety score and the deployment cost corresponding to the model test set, and judging whether the accuracy of the trained learning model is greater than or equal to a preset threshold value; and when the accuracy is greater than or equal to a preset threshold value, determining the corresponding trained learning model as the deployment strategy model.
Optionally, the screening out an optimal target deployment policy from the matched target deployment policies according to the security score and the deployment cost includes: determining the attributes of the shops according to the shop entrance information; when the store attributes represent security attributes, screening out a target deployment strategy with the highest security score from the matched target deployment strategies to serve as the optimal target deployment strategy; when the store attributes represent cost attributes, screening out a target deployment strategy with the lowest deployment cost from the matched target deployment strategies to serve as the optimal target deployment strategy; when the store attributes represent neutral attributes, obtaining a security score weight and a deployment cost weight which are associated with the neutral attributes, calculating an overall score of the target deployment strategy according to the security score, the security score weight, the deployment cost and the deployment cost weight, and screening out a target deployment strategy with the highest overall score from the matched target deployment strategies to serve as the optimal target deployment strategy.
Another aspect of the present invention provides a SaaS software-based container deployment apparatus, including: the receiving module is used for receiving a shop entrance request triggered by a user and analyzing shop entrance information; the system comprises a creating module, a storage module and a display module, wherein the creating module is used for creating a store SaaS container for the user according to the store entrance information, the store SaaS container is a container used for bearing store SaaS information, and the store SaaS information comprises software information of SaaS software used for providing an online store opening function and store information of a store opened by the user on the SaaS software; the input module is used for inputting the shop SaaS container into a preset deployment strategy model so as to obtain a target deployment strategy matched with the shop SaaS container, a security score of each target deployment strategy and a deployment cost of each target deployment strategy; the screening module is used for screening out an optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost; and the deployment module is used for deploying the shop SaaS container according to the optimal target deployment strategy.
Yet another aspect of the present invention provides a computer apparatus, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the payment account management method of any of the above embodiments when executing the computer program.
Yet another aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a payment account management method as described in any of the embodiments above.
The application provides a container deployment method based on SaaS software, the deployment strategy of a container and the safety score and the deployment cost of the deployment strategy are output through a preset deployment strategy model, manual compiling of the deployment strategy of the container is avoided, container deployment efficiency is improved, the safety of each deployment strategy can be obtained through the safety score, the optimal deployment strategy is selected according to requirements for container deployment, the safety of deployment results is improved, meanwhile, the deployment cost is further considered, deployment reference information is more comprehensively provided for users, the accuracy of selecting the deployment strategy by the users is improved, and therefore the deployment efficiency is further improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a SaaS software-based container deployment method according to an embodiment;
fig. 2 shows a block diagram of a SaaS software-based container deployment apparatus according to a second embodiment;
fig. 3 is a block diagram illustrating a computer device suitable for implementing the SaaS software-based container deployment method according to the third embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Example one
Fig. 1 shows a flowchart of a SaaS software-based container deployment method in an embodiment, as shown in fig. 1, the method includes steps S1 to S5, where:
step S1 is to receive a store entrance request triggered by a user and analyze store entrance information.
Step S2, a shop SaaS container is created for the user according to the shop entrance information, wherein the shop SaaS container is a container used for bearing shop SaaS information, and the shop SaaS information comprises software information of SaaS software used for providing an online shop opening function and shop information of shops opened on the SaaS software by the user.
The SaaS software in this embodiment is software for providing an online store opening function, a user may send a store entrance request to a vendor of the SaaS software, and the vendor creates a store SaaS container for the user according to store entrance information carried in the store entrance request, where the store entrance information includes store information including a store type, a store address, a store name, and the like. The shop SaaS container is actually a container that currently stores the above-mentioned shop information, container attributes including a container size, a container name, user information of a user associated with the container, and the like, and software information corresponding to SaaS software, including information of functions purchased by the user to a vendor of SaaS software, such as a function type (e.g., an online store opening type), function details, a software name of SaaS software to which the function belongs, a version number of SaaS software to which the function belongs, and the like, after the shop SaaS container is created. After the shop SaaS container deployment is completed, the user may upload the goods in the shop, and at this time, the shop SaaS container may further include goods information, where the goods information includes a goods type, a goods name, a goods price, a goods quantity, and the like.
Alternatively, step S2 may include:
obtaining a shop type from the shop entrance information;
searching whether a data table type associated with the shop type exists in a preset container database;
if the data table exists, the data table of the shop SaaS container is established according to the searched data table type;
and if the type of the data table does not exist, receiving the type of the data table input from the outside, constructing the data table of the shop SaaS container according to the received type of the data table, associating the received type of the data table with the shop type, and storing the data table in the container database.
Specifically, when a shop SaaS container is created for a user, a data table in the container is mainly created, and if a container of the same type has been created for the SaaS software before, when the container of the type is created again, an engineer does not need to intervene operation, and only the creation of the shop SaaS container needs to be automatically completed according to a history. If a container of this type has not been created for the SaaS software before, an engineer is required to input a data table type, and then a data table of a shop SaaS container is created according to the received data table type, and meanwhile, in order to ensure that automatic creation work can be realized when a container of this type of the SaaS software is created next time, the data table type received this time and the shop type can be associated and stored in a container database, wherein the container database is a database of the SaaS software and is used for storing an association relationship between the data table type and the shop type under the SaaS software.
Step S3, inputting the shop SaaS container into a preset deployment policy model to obtain a target deployment policy matched with the shop SaaS container, a security score of each target deployment policy, and a deployment cost of each target deployment policy.
The target deployment policy that matches the store SaaS container may include one or more.
Optionally, before step S3, the deployment strategy model needs to be trained, so the method further includes:
constructing a model training set, wherein the model training set comprises a plurality of training samples, and each training sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy;
taking historical shop SaaS containers of a plurality of training samples in the training set as input, taking corresponding deployment strategies, safety scores and deployment costs as output, and training a preset deep learning model;
and when the training result meets the preset condition, taking the correspondingly trained learning model as the deployment strategy model.
Optionally, when the training result satisfies a preset condition, taking the correspondingly trained learning model as the deployment strategy model includes:
constructing a model test set, wherein the model test set comprises a plurality of test samples, and each test sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy;
inputting the historical shop SaaS containers of the test samples in the test set into a trained learning model to obtain an output deployment strategy, a safety score and a deployment cost;
comparing the deployment strategy, the safety score and the deployment cost output by the trained learning model with the deployment strategy, the safety score and the deployment cost corresponding to the model test set, and judging whether the accuracy of the trained learning model is greater than or equal to a preset threshold value;
and when the accuracy is greater than or equal to a preset threshold value, determining the corresponding trained learning model as the deployment strategy model.
Each training sample and each testing sample respectively comprise a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy; and after each round of training is executed, evaluating the trained learning model through a test set, comparing whether a deployment strategy output by the trained learning model is the same as a deployment strategy corresponding to the model test set, comparing whether a safety score output by the trained learning model is the same as a safety score corresponding to the model test set, comparing whether a deployment cost output by the trained learning model is the same as a deployment cost corresponding to the model test set, calculating the accuracy of the trained learning model according to a comparison result, taking the trained learning model of the round as a deployment strategy model if the accuracy is greater than or equal to a preset threshold, and otherwise continuing to train the next round by using the model training set until the accuracy of the trained learning model is greater than or equal to the preset threshold.
Optionally, when constructing the model training set and the model test set, it is necessary to determine the security score and the deployment cost of each deployment policy, where the determination logic of the security score of each deployment policy is the same, and the determination logic of the deployment cost of each deployment policy is the same, so for any deployment policy, the method further includes: determining a security score for the deployment policy; determining a deployment cost of the deployment policy.
1) Determining a security score for the deployment policy, comprising:
after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container;
dividing the acquired running log into an error log representing deployment errors and a correct log representing deployment correctness;
determining the grade of the error log according to the category of the error log, and recording the grade as an error grade;
determining the grade of the correct log according to the category of the correct log, and recording the grade as the correct grade;
setting weight for the corresponding error log according to the error grade, and recording as error weight;
setting weight for the corresponding correct log according to the correct grade, and recording as correct weight;
counting the number of error logs belonging to the same error level, and recording the number as the number of error logs;
counting the number of the logs of the correct logs belonging to the same correct level, and recording the number as the number of the correct logs;
and determining the safety score of the deployment strategy according to the error log quantity, the error weight, the correct log quantity and the correct weight.
The error log for representing deployment errors comprises a plurality of running logs, and the correct log for representing deployment correctness comprises a plurality of running logs.
Determining an error level for each error log, wherein the error levels include a very severe level, a medium severe level, and a normal level: the very serious grade characterization error degree is large, and the deployment failure can be directly caused; the medium severity level represents that the error degree is generally severe, and the container can be successfully deployed after being modified; the common grade represents the error degree more commonly, and has little or no influence on the deployment result. Determining a correct rating for each correct log, wherein the correct ratings include a very important rating, a medium important rating, and a general rating: the important grade representation has a larger accuracy, and the core part of the container can be successfully deployed through the strip deployment; a medium level of importance characterizes how accurately it is, and by this strip deployment, can successfully deploy the general site of the container; the general grade represents the correctness degree, and the container part which is deployed successfully through the strip deployment may or may not exist.
The higher the rank, the greater the corresponding weight. In the error level: the error weight of the very high severity level > the error weight of the medium severity level > the error weight of the normal level, and the sum of the error weight of the very high severity level, the error weight of the medium severity level, and the error weight of the normal level is 1. In the correct level: the correct weight of the very important level > the correct weight of the medium important level > the correct weight of the general level, and the sum of the correct weight of the very important level, the correct weight of the medium important level, and the correct weight of the general level is 1.
And dividing the error logs belonging to the same error level into an error log group, counting the number of logs in each error log group, and recording the number of logs in each error log group as the number of error logs of each error log group. And dividing the correct logs belonging to the same correct level into a correct log group, counting the number of the logs in each correct log group, and recording the number of the logs as the number of the correct logs in each correct log group.
Calculating the product of the error weight of each error grade and the number of error logs corresponding to each error grade to obtain the weighted product of each error grade; calculating the product of the correct weight of each correct grade and the number of correct logs corresponding to each correct grade to obtain the weighted product of each correct grade; and calculating the absolute value of the difference value of the sum of the weighted products of all error levels and the sum of the weighted products of all correct levels as the safety score of the deployment strategy.
According to the embodiment, the influence of the error log on the deployment result and the influence of the correct log on the deployment result are considered, so that the safety performance of the deployment strategy is evaluated more comprehensively, the deployment strategies are scored objectively and fairly, and the accuracy of determining the safety score of the deployment strategy is improved.
2) Determining a deployment cost of the deployment policy, comprising:
after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container;
screening out a resource log representing deployment resources from the acquired running logs;
determining the grade of the resource log according to the category of the resource log, and recording the grade as the resource grade;
setting weight for the corresponding resource log according to the resource grade, and recording as resource weight;
counting the log number of the resource logs belonging to the same resource level, and recording the log number as the resource log number;
and determining the deployment cost of the deployment strategy according to the resource log quantity and the resource weight.
The resource log characterizing the deployment resource includes a plurality of run logs.
Determining a resource level of each resource log, wherein the resource levels comprise a core level, a medium level and a normal level: the core level representation needs to use more core resources, the cost of the resources is relatively high, or the resources of medium level, the quantity of which reaches or exceeds a preset value, need to be used, so that the cost of the whole resources is high; the medium-grade representation needs resources with relatively low use cost, and the use quantity does not reach a preset numerical value; the generic rating needles require the use of inexpensive resources.
The higher the rank, the greater the corresponding weight. The resource weight of the core level > the resource weight of the medium level > the resource weight of the normal level, and the sum of the resource weight of the core level, the resource weight of the medium level and the resource weight of the normal level is 1.
Dividing the resource logs belonging to the same resource level into a resource log group, counting the number of logs in each resource log group, and recording the number of the resource logs in each resource log group.
Calculating the product of the resource weight of each resource grade and the number of resource logs corresponding to each resource grade to obtain the weighted product of each resource grade; and calculating the sum of the weighted products of all the resource levels as the deployment cost of the deployment strategy.
When a certain deployment strategy is perfect but the deployment cost is very high, if a user uses the deployment strategy to deploy a container without knowledge, the deployment may fail due to insufficient resource supply of a server (server cluster), or other services may not operate normally due to occupation of too much resource of the server (or server cluster), so the deployment cost is also a very important consideration. According to the embodiment, the deployment cost of the deployment strategy is determined, so that a user can know each deployment strategy more in detail and more comprehensively when deploying the container, the deployment strategy more fitting actual requirements is selected, and the deployment progress is accelerated.
And step S4, screening out the optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost.
For example, a quotient of the security score and the deployment cost is calculated, and the target deployment policy with the largest quotient is selected as the optimal target deployment policy.
Alternatively, step S4 may include:
determining the attributes of the shops according to the shop entrance information;
when the store attributes represent security attributes, screening out a target deployment strategy with the highest security score from the matched target deployment strategies to serve as the optimal target deployment strategy;
when the store attributes represent cost attributes, screening out a target deployment strategy with the lowest deployment cost from the matched target deployment strategies to serve as the optimal target deployment strategy;
when the store attributes represent neutral attributes, obtaining a security score weight and a deployment cost weight which are associated with the neutral attributes, calculating an overall score of the target deployment strategy according to the security score, the security score weight, the deployment cost and the deployment cost weight, and screening out a target deployment strategy with the highest overall score from the matched target deployment strategies to serve as the optimal target deployment strategy.
Different store types have different factors which are considered with emphasis on, for example, some stores need to consider the security factor with emphasis on, and when selecting the deployment strategy, only the target deployment strategy with the highest security score is needed to be used as the deployment strategy; for another example, cost factors need to be considered in some shops, and when a deployment strategy is selected, only a target deployment strategy with the lowest deployment cost needs to be used as the deployment strategy; for example, if some stores are common and both the security factor and the cost factor need to be considered, for each target deployment policy, a first product of a security score and a security score weight corresponding to the security score is calculated, a second product of a deployment cost and a deployment cost weight corresponding to the deployment score is calculated, a quotient of the first product and the second product is calculated to serve as an overall score of the deployment policy, and then the target deployment policy with the highest overall score is used as an optimal target deployment policy.
And step S5, deploying the shop SaaS container according to the optimal target deployment strategy.
In this embodiment, the shop SaaS container may be deployed in a single server, or may be deployed in a server cluster. Preferably, due to the quantitative particularity of the SaaS software scenarios, the shop SaaS containers may be deployed into a server cluster.
Example two
The second embodiment of the present invention provides a container deployment apparatus based on SaaS software, which corresponds to the method provided in the first embodiment of the present invention, and corresponding technical features and technical effects are not described in detail in this embodiment, and reference may be made to the first embodiment of the present invention for relevant points. Specifically, fig. 2 shows a block diagram of the SaaS software-based container deployment apparatus in the second embodiment. As shown in fig. 2, the SaaS software-based container deployment apparatus 200 may include:
the receiving module 201 is configured to receive a store entrance request triggered by a user, and analyze store entrance information;
a creating module 202, configured to create a shop SaaS container for the user according to the shop entrance information, where the shop SaaS container is a container for carrying shop SaaS information, and the shop SaaS information includes software information of SaaS software for providing an online shop opening function and shop information of a shop opened by the user on the SaaS software;
an input module 203, configured to input the shop SaaS container into a preset deployment policy model, so as to obtain a target deployment policy matched with the shop SaaS container, a security score of each target deployment policy, and a deployment cost of each target deployment policy;
a screening module 204, configured to screen an optimal target deployment policy from the matched target deployment policies according to the security score and the deployment cost;
a deployment module 205, configured to deploy the shop SaaS container according to the optimal target deployment policy.
Optionally, the creating module is specifically configured to: obtaining a shop type from the shop entrance information; searching whether a data table type associated with the shop type exists in a preset container database; if the data table exists, the data table of the shop SaaS container is established according to the searched data table type; and if the type of the data table does not exist, receiving the type of the data table input from the outside, constructing the data table of the shop SaaS container according to the received type of the data table, associating the received type of the data table with the shop type, and storing the data table in the container database.
Optionally, the method further comprises: the system comprises a component module, a model training set and a data processing module, wherein the model training set comprises a plurality of training samples, and each training sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy; the training module is used for taking historical shop SaaS containers of a plurality of training samples in the training set as input, taking corresponding deployment strategies, safety scores and deployment costs as output, and training a preset deep learning model; and the determining module is used for taking the correspondingly trained learning model as the deployment strategy model when the training result meets the preset condition.
Optionally, the building module is further configured to: determining a security score of the deployment policy, wherein the construction module, when determining the security score of the deployment policy, is specifically configured to: after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container; dividing the acquired running log into an error log representing deployment errors and a correct log representing deployment correctness; determining the grade of the error log according to the category of the error log, and recording the grade as an error grade; determining the grade of the correct log according to the category of the correct log, and recording the grade as the correct grade; setting weight for the corresponding error log according to the error grade, and recording as error weight; setting weight for the corresponding correct log according to the correct grade, and recording as correct weight; counting the number of error logs belonging to the same error level, and recording the number as the number of error logs; counting the number of the logs of the correct logs belonging to the same correct level, and recording the number as the number of the correct logs; and determining the safety score of the deployment strategy according to the error log quantity, the error weight, the correct log quantity and the correct weight.
Optionally, the building module is further configured to: determining a deployment cost of the deployment policy, wherein the building module, when determining the deployment cost of the deployment policy, is specifically configured to: after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container; screening out a resource log representing deployment resources from the acquired running logs; determining the grade of the resource log according to the category of the resource log, and recording the grade as the resource grade; setting weight for the corresponding resource log according to the resource grade, and recording as resource weight; counting the log number of the resource logs belonging to the same resource level, and recording the log number as the resource log number; and determining the deployment cost of the deployment strategy according to the resource log quantity and the resource weight.
Optionally, the determining module is specifically configured to: constructing a model test set, wherein the model test set comprises a plurality of test samples, and each test sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy; inputting the historical shop SaaS containers of the test samples in the test set into a trained learning model to obtain an output deployment strategy, a safety score and a deployment cost; comparing the deployment strategy, the safety score and the deployment cost output by the trained learning model with the deployment strategy, the safety score and the deployment cost corresponding to the model test set, and judging whether the accuracy of the trained learning model is greater than or equal to a preset threshold value; and when the accuracy is greater than or equal to a preset threshold value, determining the corresponding trained learning model as the deployment strategy model.
Optionally, the screening module is specifically configured to: determining the attributes of the shops according to the shop entrance information; when the store attributes represent security attributes, screening out a target deployment strategy with the highest security score from the matched target deployment strategies to serve as the optimal target deployment strategy; when the store attributes represent cost attributes, screening out a target deployment strategy with the lowest deployment cost from the matched target deployment strategies to serve as the optimal target deployment strategy; when the store attributes represent neutral attributes, obtaining a security score weight and a deployment cost weight which are associated with the neutral attributes, calculating an overall score of the target deployment strategy according to the security score, the security score weight, the deployment cost and the deployment cost weight, and screening out a target deployment strategy with the highest overall score from the matched target deployment strategies to serve as the optimal target deployment strategy.
EXAMPLE III
Fig. 3 is a block diagram illustrating a computer device suitable for implementing the SaaS software-based container deployment method according to the third embodiment. In this embodiment, the computer device 300 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like that execute programs. As shown in fig. 3, the computer device 300 of the present embodiment includes at least but is not limited to: a memory 301, a processor 302, a network interface 303, which may be communicatively coupled to each other via a system bus. It is noted that FIG. 3 only shows computer device 300 having components 301 and 303, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 303 includes at least one type of computer-readable storage medium, which includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 301 may be an internal storage unit of the computer device 300, such as a hard disk or a memory of the computer device 300. In other embodiments, the memory 301 may also be an external storage device of the computer device 300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 300. Of course, the memory 301 may also include both internal and external storage devices for the computer device 300. In the present embodiment, the memory 301 is generally used for storing an operating system installed in the computer device 300 and various types of application software, such as program codes of a SaaS software-based container deployment method.
Processor 302 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 302 generally serves to control the overall operation of the computer device 300. Such as performing control and processing related to data interaction or communication with computer device 300. In this embodiment, the processor 302 is configured to execute a program code of the SaaS software-based container deployment method stored in the memory 301.
In this embodiment, the SaaS software-based container deployment method stored in the memory 301 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 302) to complete the present invention.
The network interface 303 may comprise a wireless network interface or a wired network interface, and the network interface 303 is typically used to establish communication links between the computer device 300 and other computer devices. For example, the network interface 303 is used to connect the computer device 300 to an external terminal via a network, establish a data transmission channel and a communication link between the computer device 300 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
Example four
The present embodiment also provides a computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor, implements the steps of the SaaS software-based container deployment method.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
It should be noted that the numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A container deployment method based on SaaS software is characterized by comprising the following steps:
receiving a shop entrance request triggered by a user, and analyzing shop entrance information;
creating a shop SaaS container for the user according to the shop entrance information, wherein the shop SaaS container is a container for bearing shop SaaS information, and the shop SaaS information comprises software information of SaaS software for providing an online shop opening function and shop information of shops opened by the user on the SaaS software;
inputting the shop SaaS container into a preset deployment strategy model to obtain a target deployment strategy matched with the shop SaaS container, a security score of each target deployment strategy and a deployment cost of each target deployment strategy;
screening out an optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost;
and deploying the shop SaaS container according to the optimal target deployment strategy.
2. The method of claim 1, wherein constructing a store SaaS container for the user from the store entry information comprises:
obtaining a shop type from the shop entrance information;
searching whether a data table type associated with the shop type exists in a preset container database;
if the data table exists, the data table of the shop SaaS container is established according to the searched data table type;
and if the type of the data table does not exist, receiving the type of the data table input from the outside, constructing the data table of the shop SaaS container according to the received type of the data table, associating the received type of the data table with the shop type, and storing the data table in the container database.
3. The method of claim 1, further comprising:
constructing a model training set, wherein the model training set comprises a plurality of training samples, and each training sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy;
taking historical shop SaaS containers of a plurality of training samples in the training set as input, taking corresponding deployment strategies, safety scores and deployment costs as output, and training a preset deep learning model;
and when the training result meets the preset condition, taking the correspondingly trained learning model as the deployment strategy model.
4. The method of claim 3, wherein determining a security score for the deployment policy comprises:
after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container;
dividing the acquired running log into an error log representing deployment errors and a correct log representing deployment correctness;
determining the grade of the error log according to the category of the error log, and recording the grade as an error grade;
determining the grade of the correct log according to the category of the correct log, and recording the grade as the correct grade;
setting weight for the corresponding error log according to the error grade, and recording as error weight;
setting weight for the corresponding correct log according to the correct grade, and recording as correct weight;
counting the number of error logs belonging to the same error level, and recording the number as the number of error logs;
counting the number of the logs of the correct logs belonging to the same correct level, and recording the number as the number of the correct logs;
and determining the safety score of the deployment strategy according to the error log quantity, the error weight, the correct log quantity and the correct weight.
5. The method of claim 3, wherein determining the deployment cost of the deployment policy comprises:
after deploying the corresponding historical shop SaaS container according to the deployment strategy, acquiring an operation log of the historical shop SaaS container;
screening out a resource log representing deployment resources from the acquired running logs;
determining the grade of the resource log according to the category of the resource log, and recording the grade as the resource grade;
setting weight for the corresponding resource log according to the resource grade, and recording as resource weight;
counting the log number of the resource logs belonging to the same resource level, and recording the log number as the resource log number;
and determining the deployment cost of the deployment strategy according to the resource log quantity and the resource weight.
6. The method according to claim 3, wherein when the training result satisfies a preset condition, using a correspondingly trained learning model as the deployment strategy model includes:
constructing a model test set, wherein the model test set comprises a plurality of test samples, and each test sample comprises a historical shop SaaS container, a deployment strategy of the historical shop SaaS container, a security score of the deployment strategy and a deployment cost of the deployment strategy;
inputting the historical shop SaaS containers of the test samples in the test set into a trained learning model to obtain an output deployment strategy, a safety score and a deployment cost;
comparing the deployment strategy, the safety score and the deployment cost output by the trained learning model with the deployment strategy, the safety score and the deployment cost corresponding to the model test set, and judging whether the accuracy of the trained learning model is greater than or equal to a preset threshold value;
and when the accuracy is greater than or equal to a preset threshold value, determining the corresponding trained learning model as the deployment strategy model.
7. The method of claim 1, wherein the screening the matched target deployment policies for an optimal target deployment policy according to the security score and the deployment cost comprises:
determining the attributes of the shops according to the shop entrance information;
when the store attributes represent security attributes, screening out a target deployment strategy with the highest security score from the matched target deployment strategies to serve as the optimal target deployment strategy;
when the store attributes represent cost attributes, screening out a target deployment strategy with the lowest deployment cost from the matched target deployment strategies to serve as the optimal target deployment strategy;
when the store attributes represent neutral attributes, obtaining a security score weight and a deployment cost weight which are associated with the neutral attributes, calculating an overall score of the target deployment strategy according to the security score, the security score weight, the deployment cost and the deployment cost weight, and screening out a target deployment strategy with the highest overall score from the matched target deployment strategies to serve as the optimal target deployment strategy.
8. A SaaS software-based container deployment apparatus, the apparatus comprising:
the receiving module is used for receiving a shop entrance request triggered by a user and analyzing shop entrance information;
the system comprises a creating module, a storage module and a display module, wherein the creating module is used for creating a store SaaS container for the user according to the store entrance information, the store SaaS container is a container used for bearing store SaaS information, and the store SaaS information comprises software information of SaaS software used for providing an online store opening function and store information of a store opened by the user on the SaaS software;
the input module is used for inputting the shop SaaS container into a preset deployment strategy model so as to obtain a target deployment strategy matched with the shop SaaS container, a security score of each target deployment strategy and a deployment cost of each target deployment strategy;
the screening module is used for screening out an optimal target deployment strategy from the matched target deployment strategies according to the security score and the deployment cost;
and the deployment module is used for deploying the shop SaaS container according to the optimal target deployment strategy.
9. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202111654835.5A 2021-12-30 2021-12-30 Container deployment method, device, equipment and medium based on software as a service (SaaS) software Pending CN114217820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111654835.5A CN114217820A (en) 2021-12-30 2021-12-30 Container deployment method, device, equipment and medium based on software as a service (SaaS) software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111654835.5A CN114217820A (en) 2021-12-30 2021-12-30 Container deployment method, device, equipment and medium based on software as a service (SaaS) software

Publications (1)

Publication Number Publication Date
CN114217820A true CN114217820A (en) 2022-03-22

Family

ID=80707079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111654835.5A Pending CN114217820A (en) 2021-12-30 2021-12-30 Container deployment method, device, equipment and medium based on software as a service (SaaS) software

Country Status (1)

Country Link
CN (1) CN114217820A (en)

Similar Documents

Publication Publication Date Title
CN111401609B (en) Prediction method and prediction device for traffic flow time series
AU2021273576B2 (en) Model integration tool
CN107885656B (en) Automatic product algorithm testing method and application server
CN109710528B (en) Test script generation method, device, equipment and medium
CN109726105A (en) Test data building method, device, equipment and storage medium
CN108038655A (en) Recommendation method, application server and the computer-readable recording medium of department's demand
CN113448862B (en) Software version testing method and device and computer equipment
CN110362479B (en) System upgrade test method and system
CN108763051B (en) Electronic device, transaction software running risk early warning method and storage medium
US11587094B2 (en) Customer service ticket evaluation using multiple time-based machine learning models customer
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN114217820A (en) Container deployment method, device, equipment and medium based on software as a service (SaaS) software
CN115098362B (en) Page test method, page test device, electronic equipment and storage medium
US20200167156A1 (en) Cognitive selection of software developer for software engineering task
CN107784548B (en) Order processing method and device
CN115168217A (en) Defect discovery method and device for source code file
CN113886906A (en) CAD drawing loading method, font file replacing method, device and storage medium
CN111597101B (en) SDK access state detection method, computer equipment and computer readable storage medium
CN111324537A (en) Test script-based test method and device and computer equipment
CN112084477A (en) Enterprise project management method, system, storage medium and electronic equipment
CN112540747A (en) Platform development method, device and computer readable storage medium
US20220261666A1 (en) Leveraging big data, statistical computation and artificial intelligence to determine a likelihood of object renunciation prior to a resource event
CN117829586A (en) Control method, equipment and storage medium of enterprise risk assessment system
CN113448849A (en) Page element testing method, device, equipment and storage medium
CN115905028A (en) Program testing method, program testing device, storage medium and electronic equipment

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