Disclosure of Invention
The embodiment of the application provides an extensible configuration method and device for Saas mode service, which are used for solving the problems of complex workload, complex implementation process and poor flexibility of the existing software supply service.
The method for extensible configuration of the Saas mode service provided by the embodiment of the application comprises the following steps:
receiving a service extensible configuration request; the expandable configuration request comprises an expandable configuration type identifier, an expandable configuration item identifier and a user identifier;
determining a corresponding operation strategy according to the extensible configuration type identifier;
and processing the extensible configuration items corresponding to the extensible configuration item identifications according to the user identifications and the determined operation strategies.
In one example, determining a corresponding operation policy according to the extensible configuration type identifier includes: determining corresponding expandable configuration type information according to the expandable configuration type identifier; if the operation strategy in the expandable configuration type information is not empty, determining to adopt the operation strategy appointed in the expandable configuration type information; and if the operation strategy in the extensible configuration type information is null, determining to adopt a default operation strategy.
In one example, determining corresponding extensible configuration type information according to the extensible configuration type identifier includes: and calling the operation of loading the extensible configuration type in the extensible configuration type interface according to the extensible configuration type identifier, and determining corresponding extensible configuration type information.
In one example, according to the user identifier and the determined operation policy, processing an extensible configuration item corresponding to the extensible configuration item identifier includes: determining corresponding strategy configuration description according to the user identification and the determined operation strategy; and loading a corresponding operation strategy program according to the strategy configuration description, and executing corresponding operation on the expandable configuration item corresponding to the expandable configuration item identifier.
In one example, the extensible configuration request is a save extensible configuration request; after receiving the service extensible configuration request, the method further includes: and constructing an extensible configuration context according to the extensible configuration type identifier, the user identifier and the extensible configuration item identifier.
In one example, the extensible configuration request is a load extensible configuration request; the operation strategy is a loading strategy; processing the extensible configuration item corresponding to the extensible configuration item identifier according to the user identifier and the determined operation strategy, wherein the processing comprises the following steps: and inquiring all pre-stored expandable configuration items according to the determined loading strategy, determining the expandable configuration items matched with the expandable configuration type identifier and the user identifier, and loading.
In one example, the extensible configuration request is a load extensible configuration request; the method further comprises the following steps: and calling a corresponding interpretation strategy according to the front-end language type corresponding to the loading extensible configuration request, and returning a corresponding script to the front end for displaying.
In one example, the extensible configuration request is a delete extensible configuration request; the operation strategy is a deletion strategy; processing the extensible configuration item corresponding to the extensible configuration item identifier according to the user identifier and the determined operation strategy, wherein the processing comprises the following steps: and when the extensible configuration item identifier is determined to be empty, deleting all extensible configuration items matched with the user identifier and the extensible configuration type identifier according to the determined deletion strategy.
In one example, prior to receiving the service scalable configuration request, the method further comprises: determining predefined interface standards, wherein the interface standards comprise an extensible configuration type interface, an extensible configuration item, an extensible configuration context, an extensible configuration operation policy interface and an extensible configuration operation policy configuration.
An apparatus for extensible configuration of Saas mode services provided in an embodiment of the present application includes:
the receiving module is used for receiving the service extensible configuration request; the expandable configuration request comprises an expandable configuration type identifier, an expandable configuration item identifier and a user identifier;
the determining module is used for determining a corresponding operation strategy according to the extensible configuration type identifier;
and the processing module is used for processing the extensible configuration items corresponding to the extensible configuration item identifications according to the user identifications and the determined operation strategies.
The embodiment of the application provides a method and a device for extensible configuration of Saas mode service, which at least have the following beneficial effects:
the user can freely set the extensible configuration of any service type according to the self requirement on the premise of meeting the predefined interface standard. And based on the setting and operation of the user, the system can automatically inquire the corresponding strategy and program for realizing the extensible configuration so as to process the content of the extensible configuration set by the user. Therefore, different requirements of the user can be flexibly met, user experience is improved, meanwhile, a software provider does not need to manually design the user in an individualized way one by one, workload of the software provider is reduced, and working efficiency is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. 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 application.
Fig. 1 is a flowchart of an Saas mode service extensible configuration method provided in an embodiment of the present application, which specifically includes the following steps:
s101: a service extensible configuration request is received.
In the embodiment of the present application, the server may determine the predefined interface standard, so as to automatically query, display and execute the extensible configuration operation made by the user (i.e. the client) according to the definition in the interface standard.
The interface standard represents a standard to be followed when performing extensible configuration on a specific service, and the interface standard includes an extensible configuration type interface, an extensible configuration item, an extensible configuration context, an extensible configuration operation policy interface, an extensible configuration operation policy configuration, and the like.
In the embodiment of the application, the server can receive a service extensible configuration request submitted by a user. The service extensible configuration request represents a request initiated by a user for modifying the extensible configuration of the service.
The service extensible configuration request can comprise an extensible configuration type identifier, an extensible configuration item identifier and a user identifier. The user identifier is used for uniquely identifying a user, the extensible configuration type identifier is used for representing an identifier of an extensible configuration type which is requested to be modified by the user, namely specific entities, such as different types of materials, material suppliers and the like, and the extensible configuration item identifier is used for representing an identifier of an extensible configuration item which is requested to be modified by the user, namely specific configuration items such as fields and the like.
Specifically, the extensible configuration item is used for recording related information of extensible configuration performed by a user, and includes attributes such as an identifier, an extensible configuration type identifier, a tenant, an encoding, a name, a data type, a data length, an option detail, whether to fill in, whether to prefabricate a system, a prompt message, an order, and a remark.
Wherein, the 'identification' is used for uniquely identifying one extensible configuration item; "extensible configuration type identifier" is used to indicate an identifier of an extensible configuration type to which an extensible configuration item belongs; "user" is used to denote the user to which an extensible configuration item belongs; "encoding" is used to indicate the encoding of a scalable configuration item; "name" is used to denote the name of an extensible configuration item; "data type" is used to indicate the data type of an extensible configuration item, including text, numbers, Boolean, dates, files, options, etc.; "data length" is used to indicate the maximum length of data that a user can input; "option details" are used to indicate option values that the user can input, and the attribute can be set only when the data type is an option; whether the extensible configuration item needs to be filled or not is controlled, if yes, the user needs to fill the current extensible configuration item when operating the corresponding extensible configuration type; whether the system is prefabricated or not is used for indicating whether the expandable configuration items are prefabricated in the system or not, and the expandable configuration items are added according to needs at a later stage; the prompt message is used for indicating the prompt message displayed when the user fills in the expandable configuration item; "order" is used to indicate the order of the current extensible configuration item in the corresponding extensible configuration type and under the corresponding user name in all the extensible configuration items; the remarks are used for explaining the application and applicable scenarios of the extensible configuration items.
S102: and determining a corresponding operation strategy according to the extensible configuration type identifier.
In the embodiment of the application, the server may determine the corresponding operation policy according to the extensible configuration type identifier in the extensible configuration request, so as to perform corresponding operation according to the determined operation policy in the following. The operation policy represents different processing modes for the extensible configuration item according to different operations of the user, and specifically may include a save policy, a load policy, a delete policy, and the like.
Specifically, the server may invoke an operation of "loading an extensible configuration type" in an "extensible configuration type interface" predefined in the interface standard according to the extensible configuration type identifier, and determine corresponding extensible configuration type information.
The extensible configuration type interface is used for defining an interface standard which needs to be realized by the extensible configuration type. The expandable configuration type information comprises expandable configuration type identification, coding, name, remark, storage strategy identification, loading strategy identification, deleting strategy identification and other attributes.
The extensible configuration type identifier is used for uniquely identifying one extensible configuration type and is used for distinguishing extensible different service entities in the system; "encoding" is used to indicate encoding of the scalable configuration type; "name" is used to denote the name of an extensible configuration type; the remarks are used for explaining the purposes and applicable scenes of the extensible configuration types; the 'storage policy identifier' is used for specifying an identifier of a storage policy corresponding to the extensible configuration type; the loading policy identifier is used for specifying an identifier of a loading policy corresponding to the extensible configuration type; the "deletion policy identification" is used to specify an identification of the deletion policy corresponding to the extensible configuration type.
In one embodiment, there are multiple implementations of the save policy, the load policy, and the delete policy, and therefore, in the extensible configuration type interface, a specific operation policy may be specified for the extensible configuration type.
If the attribute value of the corresponding operation policy identifier in the extensible configuration type information is not null, the server may determine to use the operation policy corresponding to the operation policy identifier specified in the extensible configuration type information.
Then, the server may obtain, according to the corresponding operation policy identifier, the configuration of the corresponding extensible configuration storage policy, the configuration of the extensible configuration loading policy, or the configuration of the extensible configuration deletion policy from "extensible configuration storage policy configuration", "extensible configuration loading policy configuration", or "extensible configuration deletion policy configuration" predefined in the interface standard.
If the attribute value of the corresponding operation policy identifier in the extensible configuration type information is null, the server can determine to adopt the default operation policy and obtain the configuration of the default extensible configuration operation policy.
S103: and processing the extensible configuration items corresponding to the extensible configuration item identifications according to the user identifications and the determined operation strategies.
In the embodiment of the application, the server may determine the extensible configuration item to be processed according to the user identifier and the extensible configuration item identifier in the request. Then, the server may process the expandable configuration item to be processed according to the operation policy determined in S102.
In one embodiment, the server may determine the corresponding policy configuration description according to the determined operation policy. Then, the server can load the corresponding operation policy program according to the policy configuration description, including saving the policy program, loading the policy program, and deleting the policy program. Therefore, the server can perform corresponding processing such as saving, loading, deleting and the like on the extended configuration items through corresponding operation policy programs.
In the embodiment of the application, a user can freely set the extensible configuration of any service type according to own requirements on the premise of meeting the predefined interface standard. And based on the setting and operation of the user, the system can automatically inquire the corresponding strategy and program for realizing the extensible configuration so as to process the content of the extensible configuration set by the user. Therefore, different requirements of the user can be flexibly met, user experience is improved, meanwhile, a software provider does not need to manually design the user in an individualized way one by one, workload of the software provider is reduced, and working efficiency is improved.
In one embodiment, when the extensible configuration request received by the server is a save extensible configuration request, the request of the user for saving the extensible configuration set by the user is indicated. Therefore, the server can construct the extensible configuration context according to the extensible configuration type identifier, the user identifier and the extensible configuration item identifier in the extensible configuration request.
The extensible configuration context is used for recording related information of the extensible configuration, and the related information comprises attributes such as an extensible configuration type identifier, a user identifier and an extensible configuration item list. The extensible configuration type identifier is used for indicating an identifier of an extensible configuration type corresponding to the current extensible configuration context; "user identification" is used to indicate the identification of the user who sets the extensible configuration context; the "extensible configuration item list" is used to indicate all the extensible configuration items set by the user under the extensible configuration type.
In the process of saving the extensible configuration, the server can call the operation of saving the extensible configuration in the extensible configuration saving strategy interface to save the extensible configuration context set by the user. The extensible configuration saving strategy interface is used for executing saving operation of the extensible configuration items.
In one embodiment, when a user opens a corresponding user interface by using a software service, a request for loading the extensible configuration is sent to the server through the client, so as to request the server to load and display the extensible configuration set by the server.
Therefore, the server can query all the pre-stored expandable configuration items according to the predetermined loading strategy, determine the expandable configuration items matched with the expandable configuration type identifier and the user identifier in the request, and load and display the expandable configuration items.
Specifically, in the process of loading the extensible configuration, the server may invoke a "load extensible configuration" operation in the extensible configuration load policy interface to load the corresponding extensible configuration item queried by the user. The extensible configuration loading policy interface is used for executing loading operation of the extensible configuration item.
In an embodiment, in the process of presenting the extensible configuration item, the server may obtain the corresponding interpreted policy configuration by an operation of "obtaining the extensible configuration interpreted policy configuration" in "extensible configuration interpreted policy configuration" predefined in the interface standard according to the front-end language type corresponding to the request for loading the extensible configuration.
The server may then load the corresponding interpretation policy program according to the obtained configuration description of the interpretation policy to invoke an "interpret extensible configuration" operation in an extensible configuration interpretation policy interface predefined in the interface standard.
The server can interpret the extensible configuration operation into a control markup language which can be identified at the front end by interpreting the extensible configuration operation according to the extensible configuration item to be displayed. The server may then return the interpreted corresponding script to the front end to expose the queried extensible configuration items to the user.
In one embodiment, when a user requests to delete a previously set extensible configuration, a corresponding delete extensible configuration request is sent to the server via the client.
Therefore, in the process of deleting the extensible configuration, the server can call the operation of 'deleting the extensible configuration' in the extensible configuration deletion policy interface, and delete the corresponding extensible configuration item according to the extensible configuration type identifier, the user identifier and the extensible configuration item identifier to be deleted. The extensible configuration deletion policy interface is used for executing deletion operation of the extensible configuration item.
In an embodiment, if the request for deleting the extensible configuration received by the server only includes the identifier of the extensible configuration type, but does not include the identifier of the extensible configuration item, the identifier of the extensible configuration item is null, which indicates that the extensible configuration that the user wants to delete is not specific to the extensible configuration item.
Therefore, the server can determine all extensible configuration items matched with the user identifier and the extensible configuration type identifier from all the pre-stored extensible configurations, and delete all extensible configuration items corresponding to the extensible configuration type.
For ease of understanding, the present application is illustrated with an example of a scalable configuration of vendor warehousing.
The process of loading an extensible configuration includes the steps of:
first, the server may invoke a "load extensible configuration type" operation of the extensible configuration type interface according to the extensible configuration type SupplierIn corresponding to the load extensible configuration request, to obtain corresponding extensible configuration type information.
As shown in table 1, a 1 st column indicates attributes of the extensible configuration type information, and a 2 nd column indicates corresponding attribute values. It can be known that the storage policy corresponding to the SupplierIn extensible configuration type is extensedconfigugddatatracegy, the corresponding loading policy is extensdconfigugdlobstrategy, and the corresponding deletion policy is extensdconfigugdlobstratgage.
TABLE 1
Attribute name
|
Value of
|
Extensible configuration type identification
|
SupplierIn
|
Encoding
|
SupplierIn
|
Name (R)
|
Extensible configuration for supplier warehousing
|
Remarks for note
|
Extensible configuration types suitable for supplier warehousing
|
Saving policy identification
|
ExtendConfigDBSaveStrategy
|
Load policy identification
|
ExtendConfigDBLoadStrategy
|
Delete policy identification
|
ExtendConfigDBDeleteStategy |
Second, the server may load the corresponding load policy program according to the load policy identifier extensionconfigdbloadstrategy specified in the extensible configuration type information.
Therefore, the server can determine the matched extensible configuration item, namely the extensible configuration item to be loaded, from all the pre-stored extensible configuration items through the obtained extensible configuration loading strategy according to the extensible configuration type identifier and the user identifier in the request.
Thirdly, the server can call the extensible configuration interpretation policy configuration according to the front-end language type Jsp corresponding to the request, and obtain the specified interpretation policy configuration ExtendeConfigJspInterpretetStaegy. And then, the server can load a corresponding interpretation strategy program, interpret the extensible configuration items obtained in the second step, return the corresponding scripts to the front end, and display the scripts by the front end to finish the loading of the extensible configuration.
As shown in Table 2, column 1 represents the attributes of the extensible configuration interpretation policy configuration and column 2 represents the corresponding attribute values.
TABLE 2
Attribute name
|
Value of
|
Identification
|
1
|
Language category
|
Jsp
|
Extensible configuration interpretation policy configuration
|
ExtendConfigJspInterpreterStategy |
Based on the same inventive concept, the Saas mode service extensible configuration method provided in the embodiment of the present application further provides a corresponding Saas mode service extensible configuration device, as shown in fig. 2.
Fig. 2 is a schematic structural diagram of a Saas mode service extensible configuration device provided in an embodiment of the present application, which specifically includes:
a receiving module 201, configured to receive a service extensible configuration request; the expandable configuration request comprises an expandable configuration type identifier, an expandable configuration item identifier and a user identifier;
a determining module 202, configured to determine a corresponding operation policy according to the extensible configuration type identifier;
and the processing module 203 processes the extensible configuration item corresponding to the extensible configuration item identifier according to the user identifier and the determined operation strategy.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should also be noted that 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.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.