Business processing method and device
By obtaining the target rule identifier of the business request and parsing the business configuration rules, configuration information is automatically generated for business processing, solving the problem of repeated code writing for different demand parties and achieving rapid development and reuse of business functions.
Patent Information
- Application Number
- CN202210095995.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-01-26
AI Technical Summary
When different demand parties implement the same business function, they need to write their own business code, which leads to a long development cycle and the inability to reuse business functions.
By obtaining the target rule identifier of the pending business request, parsing the target business configuration rules to generate target configuration information, business processing is automatically performed, reducing the workload of the demand side in developing business functions.
It achieves rapid development and reuse of business functions, shortens the development cycle, and improves the reuse rate of business functions.
Smart Images

Figure CN114416075B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of electronic equipment technology, and in particular to a service processing method and device. Background Art
[0002] When using systems and applications, business functions such as data statistics (for example, counting mobile phone sales within a specified time period) and message notification functions (for example, sending verification codes to users via SMS) are often required.
[0003] Currently, to implement business functions, the user needs to write the corresponding business code and then perform business processing based on the business code. For example, to implement data statistics, the developer of the user needs to write the corresponding database code and then use the database code to perform data statistics processing from the database.
[0004] However, when different demand parties need to implement the same business function, the corresponding developers of each demand party need to write the corresponding business code, which leads to a long cycle for the demand parties to develop business functions. Summary of the Invention
[0005] To overcome the problems existing in the related art, this specification provides a service processing method and device.
[0006] According to a first aspect of an embodiment of this specification, a service processing method is provided, the method comprising:
[0007] Obtaining a pending business request and determining a target rule identifier corresponding to the pending business request;
[0008] Determine the target service configuration rule corresponding to the target rule identifier;
[0009] Parsing the target service configuration rules to obtain corresponding target configuration information;
[0010] Perform corresponding business processing according to the target configuration information.
[0011] Optionally, determining the target service configuration rule corresponding to the target rule identifier includes:
[0012] Determine a service encapsulation interface corresponding to the target rule identifier; wherein the service encapsulation interface indicates at least one service configuration rule;
[0013] The service encapsulation interface is called, and the target service configuration rule corresponding to the target rule identifier is determined according to the service configuration rule indicated by the service encapsulation interface.
[0014] Optionally, performing corresponding service processing according to the target configuration information includes:
[0015] A target service code is determined according to the target configuration information, and corresponding service processing is performed based on the target service code.
[0016] Optionally, determining the target service code according to the target configuration information includes:
[0017] The preset code information is configured according to the target configuration information to obtain the target service code.
[0018] Optionally, the target business configuration rule includes a data statistics rule; the target configuration information includes target statistics configuration information; the code information includes a database statement format;
[0019] The configuring the preset code information according to the target configuration information to obtain the target service code includes:
[0020] Generate a corresponding database query statement according to the database statement format and the target statistical configuration information;
[0021] The performing corresponding business processing based on the target business code includes:
[0022] Execute the database query statement to perform corresponding data statistical processing to obtain target statistical data.
[0023] Optionally, the target statistics configuration information includes one or more of a target database identifier, a target data table identifier, a target field name to be counted, and a target query condition;
[0024] Generating a corresponding database query statement according to the database statement format and the target statistical configuration information includes:
[0025] Based on the database statement format, one or more of the target database identifier, the target data table identifier, the target field name to be counted, and the target query condition are concatenated to generate a corresponding database query statement.
[0026] Optionally, executing the database query statement to perform corresponding data statistical processing to obtain target statistical data includes:
[0027] Execute the database query statement to query the field value corresponding to the target field to be counted based on the target query condition in the database query statement to obtain the target statistical data corresponding to the target data statistical rule; wherein, the target field to be counted is the field in the data table corresponding to the target data table identifier in the database corresponding to the target database identifier.
[0028] Optionally, the method further includes:
[0029] Obtain database connection information corresponding to the target database identifier;
[0030] Based on the database connection information corresponding to the target database identifier, connect to the database corresponding to the target database identifier.
[0031] Optionally, the method further includes:
[0032] The target statistical data is sent to a target user terminal, so that the target user terminal displays the target statistical data.
[0033] Optionally, the target service configuration rule includes a notification method configuration rule; the target configuration information includes target notification method configuration information; the code information includes a calling method of the notification method;
[0034] The configuring the preset code information according to the target configuration information to obtain the target service code includes:
[0035] Determine a calling method of the target notification mode corresponding to the target notification mode configuration information;
[0036] The target notification mode configuration information is encapsulated into the calling method of the target notification mode to obtain the encapsulated calling method of the target notification mode.
[0037] The performing corresponding business processing based on the target business code includes:
[0038] The calling method of the encapsulated target notification mode is called to generate and send a notification message to the receiving user based on the target notification mode.
[0039] Optionally, the calling method of the target notification mode indicates a code for calling a target interface corresponding to the target notification mode to generate and send a notification message;
[0040] The target notification mode configuration information includes target sending information; wherein the target sending information includes target receiving user information;
[0041] The method for calling the encapsulated target notification mode, to generate and send a notification message to a receiving user based on the target notification mode, includes:
[0042] The target interface is called through the calling method of the encapsulated target notification method to generate a corresponding notification message according to the target sending information and send the notification message to the receiving user corresponding to the target receiving user information based on the target notification method; wherein, the target interface includes the interface provided by the service provider corresponding to the target notification method and / or the interface of the server corresponding to the target notification method.
[0043] Optionally, the target sending information further includes target sending user information; wherein the target sending user information includes one or more of a sending user name, a sending user email address, a sending user password, and a sending user number;
[0044] The target notification method includes one or more of an email notification method, a text message notification method, and a designated application notification method.
[0045] Optionally, the target notification mode configuration information includes a target notification mode identifier and / or a target message template identifier;
[0046] The method for determining the calling method of the target notification mode corresponding to the target notification mode configuration information includes:
[0047] Determine a calling method of the target notification mode corresponding to the target notification mode identifier and / or the target message template identifier.
[0048] Optionally, a first page is provided by an electronic device; the first page includes a rule configuration control and a configuration completion control;
[0049] The method further comprises:
[0050] In response to a first triggering operation of the configuration completion control, obtaining configuration information corresponding to the rule configuration control;
[0051] Generate corresponding business configuration rules and rule identifiers corresponding to the business configuration rules according to the configuration information corresponding to the rule configuration control.
[0052] According to a second aspect of an embodiment of this specification, a service processing device is provided, the device including:
[0053] An identifier determination module is used to obtain a pending business request and determine a target rule identifier corresponding to the pending business request;
[0054] A rule determination module, configured to determine a target service configuration rule corresponding to the target rule identifier;
[0055] A rule processing module is used to parse the target business configuration rules to obtain corresponding target configuration information;
[0056] The service processing module is used to perform corresponding service processing according to the target configuration information.
[0057] Optionally, the rule determination module is specifically configured to:
[0058] Determine a service encapsulation interface corresponding to the target rule identifier; wherein the service encapsulation interface indicates at least one service configuration rule;
[0059] The service encapsulation interface is called, and the target service configuration rule corresponding to the target rule identifier is determined according to the service configuration rule indicated by the service encapsulation interface.
[0060] Optionally, the business processing module is specifically configured to:
[0061] A target service code is determined according to the target configuration information, and corresponding service processing is performed based on the target service code.
[0062] Optionally, the service processing module is further configured to:
[0063] The preset code information is configured according to the target configuration information to obtain the target service code.
[0064] Optionally, the target business configuration rule includes a data statistics rule; the target configuration information includes target statistics configuration information; the code information includes a database statement format;
[0065] The business processing module is also used for:
[0066] Generate a corresponding database query statement according to the database statement format and the target statistical configuration information;
[0067] The performing corresponding business processing based on the target business code includes:
[0068] Execute the database query statement to perform corresponding data statistical processing to obtain target statistical data.
[0069] Optionally, the target statistics configuration information includes one or more of a target database identifier, a target data table identifier, a target field name to be counted, and a target query condition;
[0070] The business processing module is also used for:
[0071] Based on the database statement format, one or more of the target database identifier, the target data table identifier, the target field name to be counted, and the target query condition are concatenated to generate a corresponding database query statement.
[0072] Optionally, the service processing module is further configured to:
[0073] Execute the database query statement to query the field value corresponding to the target field to be counted based on the target query condition in the database query statement to obtain the target statistical data corresponding to the target data statistical rule; wherein, the target field to be counted is the field in the data table corresponding to the target data table identifier in the database corresponding to the target database identifier.
[0074] Optionally, the service processing module is further configured to:
[0075] Obtain database connection information corresponding to the target database identifier;
[0076] Based on the database connection information corresponding to the target database identifier, connect to the database corresponding to the target database identifier.
[0077] Optionally, the service processing module is further configured to:
[0078] The target statistical data is sent to a target user terminal, so that the target user terminal displays the target statistical data.
[0079] Optionally, the target service configuration rule includes a notification method configuration rule; the target configuration information includes target notification method configuration information; the code information includes a calling method of the notification method;
[0080] The business processing module is also used for:
[0081] Determine a calling method of the target notification mode corresponding to the target notification mode configuration information;
[0082] The target notification mode configuration information is encapsulated into the calling method of the target notification mode to obtain the encapsulated calling method of the target notification mode.
[0083] The business processing module is also used for:
[0084] The calling method of the encapsulated target notification mode is called to generate and send a notification message to the receiving user based on the target notification mode.
[0085] Optionally, the calling method of the target notification mode indicates a code for calling a target interface corresponding to the target notification mode to generate and send a notification message;
[0086] The target notification mode configuration information includes target sending information; wherein the target sending information includes target receiving user information;
[0087] The business processing module is also used for:
[0088] The target interface is called through the calling method of the encapsulated target notification method to generate a corresponding notification message according to the target sending information and send the notification message to the receiving user corresponding to the target receiving user information based on the target notification method; wherein, the target interface includes the interface provided by the service provider corresponding to the target notification method and / or the interface of the server corresponding to the target notification method.
[0089] Optionally, the target sending information further includes target sending user information; wherein the target sending user information includes one or more of a sending user name, a sending user email address, a sending user password, and a sending user number;
[0090] The target notification method includes one or more of an email notification method, a text message notification method, and a designated application notification method.
[0091] Optionally, the target notification mode configuration information includes a target notification mode identifier and / or a target message template identifier;
[0092] The business processing module is also used for:
[0093] Determine a calling method of the target notification mode corresponding to the target notification mode identifier and / or the target message template identifier.
[0094] Optionally, a first page is provided by an electronic device; the first page includes a rule configuration control and a configuration completion control;
[0095] The service processing device further includes a rule configuration module;
[0096] The rule configuration module is specifically used for:
[0097] In response to a first triggering operation of the configuration completion control, obtaining configuration information corresponding to the rule configuration control;
[0098] Generate corresponding business configuration rules and rule identifiers corresponding to the business configuration rules according to the configuration information corresponding to the rule configuration control.
[0099] According to a third aspect of the embodiments of this specification, there is provided an electronic device, including:
[0100] processor;
[0101] a memory for storing processor-executable instructions;
[0102] Wherein, the processor is configured to:
[0103] Obtaining a pending business request and determining a target rule identifier corresponding to the pending business request;
[0104] Determine the target service configuration rule corresponding to the target rule identifier;
[0105] Parsing the target service configuration rules to obtain corresponding target configuration information;
[0106] Perform corresponding business processing according to the target configuration information.
[0107] According to the fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, in which computer execution instructions are stored. When the processor executes the computer execution instructions, the business processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0108] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the business processing method described in the first aspect and various possible designs of the first aspect.
[0109] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0110] In the embodiment of this specification, when a pending request is obtained, indicating that the demander needs to implement a related business function, the target rule identifier corresponding to the pending request is determined, so that the target rule identifier can be used to determine the business configuration rule corresponding to the business function that the demander needs to implement, that is, to determine the target business configuration rule. The target business configuration rule is parsed to obtain the corresponding target configuration information, and the relevant business processing is performed based on the target configuration information to implement the corresponding business function. The demander does not need to develop the relevant business function, but only needs to input the corresponding pending business request. This greatly shortens the cycle of the demander's development of the business function, and the developed and implemented business function can be used by multiple demanders to achieve the reuse of the business function and improve the reuse rate of the business function.
[0111] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0112] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0113] Figure 1 This is a flowchart of a business processing method according to an exemplary embodiment of this specification.
[0114] Figure 2 is a schematic diagram of a data table according to an exemplary embodiment of this specification.
[0115] Figure 3 It is a flowchart of another business processing method shown in this specification according to an exemplary embodiment.
[0116] Figure 4 This is a schematic diagram of the configuration of data statistical rules according to an exemplary embodiment of this specification.
[0117] Figure 5 FIG. 1 is a schematic diagram of the architecture of a business processing system according to an exemplary embodiment of the present specification.
[0118] Figure 6 It is a schematic diagram of the configuration of notification method rules according to an exemplary embodiment of this specification.
[0119] Figure 7 This is a hardware structure diagram of the electronic device where the service processing device in the embodiment of this specification is located.
[0120] Figure 8 This is a block diagram of a service processing device according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION
[0121] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of this specification, as detailed in the appended claims.
[0122] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. As used in this specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0123] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information without departing from the scope of this specification. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."
[0124] Next, the embodiments of this specification are described in detail.
[0125] like Figure 1 As shown, Figure 1 This is a flowchart of a service processing method according to an exemplary embodiment of this specification. The execution subject of the method is an electronic device, and the method includes the following steps:
[0126] Step 101: Obtain a pending business request and determine a target rule identifier corresponding to the pending business request.
[0127] In this embodiment, when a demander needs to perform relevant business processing to implement a corresponding business function, the corresponding pending business request is input on the corresponding user terminal. When the electronic device obtains the pending business request, it determines the target rule identifier corresponding to the pending business request, and uses the target rule identifier to implement the business function required by the demander.
[0128] Among them, the demander can be an A-end user, a B-end user, and of course a C-end user.
[0129] Among them, A-end users are service developers and technical service providers, such as project managers, product managers or developers; B-end users are corporate users, that is, people who serve the C-end, which corresponds to the merchant side; C-end is individual users, that is, consumers, which corresponds to the client side.
[0130] The electronic device includes a server in the A-end and / or B-end (i.e., a server or a terminal used by a developer). When the demander is a C-end user, the C-end user inputs a corresponding pending service request on the user end, and the user end sends the pending service request to the electronic device, so that the electronic device performs relevant processing using the pending service request.
[0131] Optionally, when determining the target rule identifier corresponding to the pending business request, it can be determined in the following two ways.
[0132] One approach is to obtain the target rule identifier from the pending service request, that is, the pending service request directly includes the target rule identifier. After generating a rule identifier corresponding to the configured service configuration rule, the rule identifier is assigned to the required requester. When the requester needs to implement a service function, the requester directly enters the corresponding rule identifier, i.e., the target rule identifier, to generate a pending service request containing the target rule identifier.
[0133] Another way is to determine the rule identifier corresponding to the pending business request from the preset request identifier mapping table, and use it as the target rule identifier. When the demander needs to implement a certain business function, the corresponding control is triggered to generate a pending business request. Find the rule identifier corresponding to the pending business request from the preset request identifier mapping table. For example, when the demander needs to count the sales volume of model 1 mobile phones, click the model 1 mobile phone sales statistics button displayed on the relevant page to generate a mobile phone sales statistics request, and find the rule identifier corresponding to the mobile phone sales statistics request, and determine it as the target rule identifier.
[0134] Step 102: Determine the target service configuration rule corresponding to the target rule identifier.
[0135] Step 103: parse the target service configuration rules to obtain corresponding target configuration information.
[0136] In this embodiment, the business configuration rule corresponding to the target rule identifier is searched and used as the target business configuration rule. After the target business configuration rule is determined, the target business configuration rule is parsed to extract the target configuration information in the target business configuration rule, and then the target configuration information is used to automatically perform related business processing.
[0137] Among them, the business configuration rules are business rules configured by the A-end user (for example, a product manager) or the B-end user based on business functions, that is, business needs.
[0138] Optionally, the target business configuration rules include data statistics rules and / or notification method configuration rules. Accordingly, the target configuration information includes target statistics configuration information and / or target notification method configuration information. Of course, the target business configuration rules may also include business rules that implement other business functions, i.e., other types of business rules. Accordingly, the target configuration information may also include configuration information corresponding to other types of business rules, without limitation herein.
[0139] Specifically, the target statistics configuration information includes one or more of a target database identifier, a target data table identifier, a target field name to be counted, and a target query condition.
[0140] The target database identifier indicates the identifier of the database where the data to be counted is located when performing data statistical processing. The target database identifier can be information that can uniquely identify the database, such as the name or number of the database.
[0141] The target data table identifier indicates the identifier of the data table where the data to be counted is located when performing data statistical processing. The target data table identifier can be the name, number, or other information that can uniquely represent the data table, for example, Figure 2The data table shown is the product table, and its corresponding data table identifier is Product.
[0142] The target field name to be counted indicates the field name corresponding to the data to be counted when performing data statistics processing. For example, if the sales volume of mobile phones with model 1 needs to be counted, the fields to be counted include the field name corresponding to the product type (such as Figure 2 Sales Volume field as shown).
[0143] The target query condition indicates the relevant information of the condition query that needs to be involved when performing data statistical processing. The target query condition includes the condition field and its corresponding threshold. For example, if the sales volume of mobile phones with model 1 is to be counted, the condition field is the field name corresponding to the product type (such as Figure 2 The product type field shown in the figure) and its corresponding threshold value (i.e., Model 1 mobile phone).
[0144] Specifically, the target notification mode configuration information includes one or more of a target notification mode identifier, a target message template identifier, a target third-party service identifier, and target sending information.
[0145] The target notification method indicates the method used to push the message, and the target notification method includes one or more of an email notification method, a text message notification method, and a specified application notification method.
[0146] The target notification method identifier indicates the identifier of the target notification method, which can be used to determine the corresponding notification method. The target notification method identifier can be information that uniquely identifies the notification method, such as the name or number of the notification method. For example, the identifier for the email notification method is 1, and the identifier for the SMS notification method is 2.
[0147] When pushing messages based on the target notification method, you need to call the service provider's API interface or a custom server interface or other third-party service interface to use the third-party service to push messages. Accordingly, the target notification method configuration information also includes the third-party service identifier.
[0148] Optionally, when there are multiple third-party service interfaces corresponding to the target notification method, the A-end user and / or the B-end user can select a third-party service identifier to determine the third-party service to be used for the push message based on the selected third-party service identifier, i.e., the target third-party service identifier. For example, when pushing a message via email, a mailbox service provider, i.e., an email service provider, can be selected and the identifier of the selected email service provider can be used as the target third-party service identifier.
[0149] The target sending information includes target receiving user information and / or target sending user information; the target receiving user information indicates relevant information of the user receiving the notification message, such as the receiving user's corresponding user terminal identifier, user number, user email address, etc. The target sending user information includes one or more of the sending user name, sending user email address, sending user password, and sending user number.
[0150] Step 104: Perform corresponding business processing according to the target configuration information.
[0151] In this embodiment, after obtaining the target configuration information, relevant business processing is automatically performed according to the target configuration information to realize the corresponding business functions. The demander does not need to develop the corresponding business functions. When the demander needs to realize the business functions, it only needs to input the corresponding pending business request, thereby reducing the workload of the demander.
[0152] From the above description, it can be seen that when a pending request is obtained, it indicates that the demander needs to implement relevant business functions, and then the target rule identifier corresponding to the pending request is determined, so that the target rule identifier can be used to determine the business configuration rules corresponding to the business functions that the demander needs to implement, that is, to determine the target business configuration rules. The target business configuration rules are parsed to obtain the corresponding target configuration information, and the relevant business processing is performed based on the target configuration information to implement the corresponding business functions. The demander does not need to develop the relevant business functions, but only needs to input the corresponding pending business request. This greatly shortens the cycle of the demander's development of business functions and realizes the reuse of business configuration rules, that is, the reuse of business functions. It only needs to be developed once and can be used by multiple demanders, thereby improving the reuse rate of business functions.
[0153] like Figure 3 As shown, Figure 3 This is a flowchart of another service processing method according to an exemplary embodiment. This embodiment, based on the previous embodiment, describes how to automatically perform corresponding service processing according to determined target configuration information. The method includes the following steps:
[0154] Step 301: Obtain a pending business request and determine a target rule identifier corresponding to the pending business request.
[0155] In this embodiment, relevant personnel can configure corresponding service configuration rules through a page provided by the electronic device, that is, the electronic device provides a first page. The first page includes a rule configuration control and a configuration completion control. In response to a first trigger operation of the configuration completion control, configuration information corresponding to the rule configuration control is obtained. Based on the configuration information corresponding to the rule configuration control, a corresponding service configuration rule and a rule identifier corresponding to the service configuration rule are generated.
[0156] Specifically, the relevant personnel enters or selects the corresponding configuration information in the rule configuration control on the displayed page. When the configuration is completed, the relevant personnel triggers the configuration completion control. After detecting the first triggering operation of the configuration completion control, the electronic device obtains the configuration information corresponding to the rule configuration control, that is, the information entered or selected by the relevant personnel in the rule configuration control, generates a business configuration rule including the configuration information corresponding to the rule configuration control, and assigns a corresponding rule identifier to the business configuration rule so that the business configuration rule can be found using the rule identifier.
[0157] Among them, relevant personnel include A-end users (for example, product managers, project managers, etc.) and / or B-end users.
[0158] The first trigger operation includes a click operation. The rule identifier can be a name or number of the business configuration rule. The rule configuration control includes a drop-down box, a button, a radio button, a check box, a text box, and other types of controls.
[0159] Optionally, the number of the first pages is at least one, that is, one first page can display all rule configuration controls, or the rule configuration controls can be displayed via multiple first pages.
[0160] Optionally, when the business configuration rule configured by the relevant personnel is a data statistics rule, the configuration information corresponding to the rule configuration control includes one or more of a database identifier, a data table identifier, a name of a field to be counted, and a query condition.
[0161] Specifically, such as Figure 4 As shown, when configuring data statistics rules, multiple data source identifiers, i.e., database identifiers, are displayed on the first page, and the relevant personnel select the required database identifier. After selecting the database identifier, all data tables in the database corresponding to the database identifier are displayed for the relevant personnel to select the data table. After the relevant personnel select the data table to be counted (i.e., the data table identifier), the field names in the selected data table are loaded for the relevant personnel to select the fields to be counted (i.e., the names of the fields to be counted), the condition fields, and the threshold values (i.e., the query conditions) corresponding to the condition fields are entered or selected. After the configuration is completed, based on the information selected or entered by the relevant personnel, i.e., the configuration information (for example, the database identifier selected by the relevant personnel), a data statistics rule containing the configuration information is generated, and a corresponding rule identifier is assigned to the data statistics rule.
[0162] In the case where the data statistics function to be implemented only involves a single data table, only the required single data table needs to be selected. In the case where the data statistics function to be implemented involves multiple data tables, it indicates that a related table query is required. After selecting a data table, the relevant personnel will continue to select the next data table to be associated. There are associated fields between the associated data tables. Accordingly, the number of data table identifiers included in the configuration information is multiple.
[0163] Among them, when the data statistics function to be implemented only involves statistics of a single field, only one data statistics rule needs to be configured, and the rule identifier corresponds to one data statistics rule. When the data statistics function to be implemented involves multiple fields, multiple data statistics rules need to be configured, that is, the rule identifier actually corresponds to a data statistics rule set, that is, one rule identifier corresponds to multiple data statistics rules. For example, if the data statistics function to be implemented is to count the sales volume of mobile phones within a specified time period, only one data statistics rule needs to be configured; for another example, if the data statistics function to be implemented is to count the sales volume of mobile phones and computers within a specified time period, two data statistics rules need to be configured, one data statistics rule is used to implement the statistics of the sales volume of mobile phones within a specified time period, and the other data statistics rule is used to implement the statistics of the sales volume of computers within a specified time period.
[0164] Optional, such as Figure 4 As shown, the configuration process of the above-mentioned data statistical rules can be provided by the configuration service provided by the electronic device, that is, the relevant personnel perform configuration on the first page provided by the configuration service, and the configuration service stores the configuration information in the database and generates a corresponding rule identifier.
[0165] Optionally, when the business configuration rule configured by the relevant personnel is a notification method configuration rule, the configuration information corresponding to the notification method configuration rule includes one or more of a notification method identifier, a third-party service identifier, a message template identifier, and sending information.
[0166] Among them, sending information includes receiving user information and sending user information.
[0167] The message template identifier indicates the type of the pushed message, which includes a verification code template identifier, an alarm template identifier, and the like.
[0168] Specifically, when the relevant personnel configure the notification method configuration rules, at least one notification method, that is, the identifier corresponding to the notification method, is displayed on the first page. The relevant personnel selects the required notification method identifier and continues to select the integrated third-party service (for example, the service provider identifier), that is, the third-party service identifier. After the notification method selection is completed, you can also select the message type (for example, the verification code type, the alarm type), that is, select the message template identifier. After selecting the message type, continue with the sender and receiver user configuration, that is, enter the sender and receiver user information. After the configuration is completed, based on the information selected or input by the relevant personnel, that is, the configuration information (for example, the notification method identifier selected by the relevant personnel), a notification method configuration rule containing the configuration information is generated, and a corresponding rule identifier is assigned to the notification method configuration rule, so that the notification method configuration rule can be found using the rule identifier, thereby determining the detailed configuration content of the notification method configuration.
[0169] Optionally, when relevant personnel select a third-party email service, if the required service provider or related server does not exist in the inherited third-party service, they can configure a custom email server, that is, the interface of the custom server, that is, the relevant configuration information of the API interface of the third-party service, such as the address and parameter information of the API interface of the custom third-party service (for example, the input parameters of the interface), etc.
[0170] The address of the customized third-party service API interface may be a network address, such as an IP (Internet Protocol) address or a URL (Uniform Resource Locator) address.
[0171] Specifically, such as Figure 5 As shown, after the electronic device obtains the new customized third-party service API interface, that is, after adding new resources, it calls the resource configuration saving interface to save the relevant configuration information of the customized third-party service API interface (for example, the URL of the customized third-party service API interface, parameters, etc.) to the resource pool table, wherein the resource id indicates the third-party service identifier, the resource type is 1 data source, the resource configuration indicates the connection information corresponding to the database, and the resource configuration indicates the customized third-party service API interface, that is, the relevant configuration information of the external API interface.
[0172] Optional, such as Figure 5 As shown, relevant personnel can also edit (e.g., add, delete, modify) the API interface of the third-party service provider through the Web terminal. For example, after the electronic device obtains the API interface of a new third-party service provider, that is, after adding resources, it saves the relevant configuration information of the third-party service provider's API interface to the resource pool table through the resource configuration saving interface.
[0173] Optionally, in order to facilitate the management efficiency of the API interface of a customized third-party service, the API interface of a third-party service provider, or other third-party service, the relevant configuration information of the API interface can be independently managed through the resource integration service. Specifically, after the electronic device obtains the resource integration request, it extracts the resource id in the resource integration request. When the resource id is a third-party service identifier and an external API interface, it calls the resource integration interface to use the resource id as the input parameter of the resource query interface in the data query module, thereby obtaining the relevant configuration information of the API interface of the third-party service corresponding to the resource id from the resource pool table through the resource query interface. Since the format of the relevant configuration information is in JSON format, the json data parsing component is used to parse the relevant configuration information, and the parsed relevant configuration information is saved to the resource to-be-configured item table in the database, so that the relevant configuration information of the API interface of the third-party service can be managed separately using the resource to-be-configured item table.
[0174] Optional, such as Figure 6 As shown, the configuration process of the above notification method configuration rules can be provided by the configuration service provided by the electronic device, that is, the relevant personnel configure on the first page provided by the configuration service, and the configuration service stores the configuration information in the database and generates a corresponding rule identifier.
[0175] Take a specific application scenario as an example, Figure 5 As shown, after the electronic device obtains the data statistics rules configured by the relevant personnel, that is, when adding a new statistical rule, it calls the statistical rule saving interface in the statistical configuration module to generate a corresponding statistical configuration table based on the configuration information corresponding to the data statistics rule through the corresponding configuration service, and saves the statistical configuration table to the database, wherein the configuration id in the statistical configuration table indicates the rule identifier, the resource id indicates the third-party service identifier, the template id indicates the message template identifier, the statistical field is the name of the field to be counted, and the statistical condition indicates the query condition. After the electronic device obtains the notification method configuration rules configured by the relevant personnel, that is, when adding a new notification rule, it calls the notification rule saving interface in the rule configuration module to utilize the corresponding configuration service to generate a corresponding rule configuration table based on the configuration information corresponding to the notification method configuration rule, and saves the rule configuration table to the database, wherein the configuration id in the rule configuration table indicates the rule identifier, the resource id indicates the database identifier, the target table indicates the data table identifier, the statistical field is the name of the field to be counted, and the configuration imagination indicates other relevant configuration information, such as sending information.
[0176] Step 302: Determine the target service configuration rule corresponding to the target rule identifier.
[0177] In this embodiment, a service encapsulation interface corresponding to a target rule identifier is determined. The service encapsulation interface indicates at least one service configuration rule. The service encapsulation interface is called, and a target service configuration rule corresponding to the target rule identifier is determined based on the service configuration rule indicated by the service encapsulation interface.
[0178] In this embodiment, the developer of the A side can encapsulate the business rules configured by the A side user (for example, the project manager in the A side), that is, the business configuration rules, into a unified interface to obtain a business encapsulation interface (such as Figure 6 The statistics interface and notification sending interface shown in the figure are shown in the figure. When developers on the B side need to implement related business functions, they only need to call this business encapsulation interface to utilize the pre-configured business configuration rules without having to redevelop the corresponding business functions. Of course, developers on the A side can also encapsulate other functions (for example, adding new data sources, adding new third-party service API interfaces, etc.) into corresponding service interfaces for developers on the B side to call, so that developers on the B side or users on the B side (for example, project managers on the B side) can perform corresponding operations.
[0179] Optionally, in the case where a business encapsulation interface has been encapsulated, when the user at end A inputs a corresponding pending business request, the electronic device (i.e., the server at end A) can directly determine the target rule identifier based on the pending business request, and perform relevant business processing based on the target rule identifier. Of course, the electronic device can also call the business encapsulation interface to perform relevant business processing. Similarly, in the case where an interface related to business configuration rules (for example, a statistical rule saving interface) has been encapsulated, when the user at end A needs to edit the business configuration rules (for example, add a new business configuration rule), the electronic device (i.e., the server at end A) can directly perform corresponding processing on the edited business configuration rules (for example, save it to a database). Of course, the corresponding interface can also be called for relevant processing, which is not limited here.
[0180] Optionally, when the pending business request is input by the B-end user or the C-end user, since the B-end interacts directly with the C-end, the electronic device is the server in the B-end, and the electronic device calls the business encapsulation interface corresponding to the target rule identifier corresponding to the pending business request, and uses the business encapsulation interface to find the business configuration rule corresponding to the target rule identifier, and uses the found business configuration rule as the target business configuration rule, so as to use the target business configuration rule to perform corresponding business processing and realize related business functions, without the need for the B-end developer to rewrite the relevant code, thereby reducing the workload of the B-end developer.
[0181] The service encapsulation interface corresponding to the target rule identifier indicates an interface that encapsulates the service configuration rule corresponding to the target rule identifier.
[0182] Optionally, when using the business encapsulation interface to find the business configuration rules corresponding to the target rule identifier, the corresponding configuration service can be used to determine it, that is, the target rule identifier is passed to the configuration service (for example, data statistics service, notification sending service) through the business encapsulation interface, so that the configuration service determines the business configuration rules corresponding to the target rule identifier.
[0183] Optionally, B-side users or B-side developers can also customize business configuration rules, databases, API interfaces of third-party services, etc. according to their needs. There is no need for B-side developers to develop related codes. They only need to call the corresponding interfaces provided by A-side, which reduces the workload of B-side developers and improves user experience.
[0184] In this embodiment, the business configuration rules configured by the user on the A side are encapsulated to obtain a business encapsulation interface. The developer on the B side accesses the business encapsulation interface to utilize the encapsulated business configuration rules corresponding to the business encapsulation interface. The developer on the B side does not need to develop the corresponding business functions, but only needs to call the business encapsulation interface, thereby reducing the development cycle of the business functions.
[0185] In this embodiment, when business requirements (for example, query conditions) change, the corresponding business configuration rules are dynamically modified, that is, the rule identifier to be updated and its corresponding latest configuration information (for example, modified query conditions) are obtained, and the business configuration rules corresponding to the rule identifier to be updated are updated according to the latest configuration information, thereby realizing dynamic configuration of business configuration rules and thus realizing the update of business functions. There is no need for developers to rewrite relevant codes to update corresponding business functions, which greatly reduces the manpower investment caused by changes in requirements.
[0186] In this embodiment, the business configuration rules can be of different types, i.e., dimensional rules, that is, different business functions can be implemented. When different business functions need to be implemented, they can be implemented by switching, i.e., using different types of business configuration rules (e.g., data statistics rules).
[0187] Step 303: parse the target service configuration rules to obtain corresponding target configuration information.
[0188] In this embodiment, the target service configuration rule may be in a JSON format. Accordingly, the target service configuration rule is parsed by a JSON data parsing component to extract valid configuration information, thereby obtaining target configuration information.
[0189] Step 304: Determine the target service code according to the target configuration information, and perform corresponding service processing based on the target service code.
[0190] In this embodiment, after obtaining the target configuration information in the target business configuration rule, the target business code corresponding to the relevant business function is automatically determined based on the target configuration information. The target business code is used to implement the corresponding business function, thereby realizing automatic determination of the business code. The demander does not need to write the target business code, reducing the workload of the demander's developers.
[0191] In this embodiment, after obtaining the target business code, the target business code is executed to perform corresponding business processing, so that the demander only needs to know the rule identifier corresponding to the required business function to complete the corresponding business processing, that is, to realize the corresponding business function. The demander does not need to develop the code for the business function, thereby reducing manpower investment.
[0192] Optionally, when determining the target service code based on the target configuration information, the preset code information is configured according to the target configuration information to obtain the target service code.
[0193] Optionally, the code information includes a database statement format and / or a calling method of the notification method, wherein the calling method of the target notification method indicates a code for calling a target interface corresponding to the target notification method to generate and send a notification message.
[0194] Among them, the calling method of the target notification method is the code for calling the target interface (for example, the API (Application Programming Interface) interface of a certain email service provider) written by the developer corresponding to the configuration service after learning how to use the target interface (for example, how to apply for templates and signatures).
[0195] Specifically, when the business function is a data statistics function, that is, when the target business configuration rule is a data statistics rule, a corresponding database query statement is automatically generated based on the target statistics configuration information. That is, based on the database statement format, one or more of the target database identifier, the target data table identifier, the target field name to be counted, and the target query condition are concatenated to generate the corresponding database query statement. For example, the target database statement format is select field to be counted from data table identifier where query condition.
[0196] Accordingly, when performing data statistical processing, database query statements are executed to perform corresponding data statistical processing, obtain target statistical data, and implement corresponding data statistical functions.
[0197] Optionally, when executing a database query statement to perform corresponding data statistical processing, the database query statement is executed to query the field value corresponding to the target field to be counted based on the target query condition in the database query statement to obtain the target statistical data corresponding to the target data statistical rule. For example, the business function to be implemented is to count the sales volume of mobile phones with model 1. Figure 2 As shown, by querying the product table, it is determined that the sales volume of model 1 mobile phone is 2.
[0198] Optionally, after obtaining the required target statistical data, the target statistical data is sent to the target user terminal so that the target user terminal (for example, the user terminal corresponding to the B-end user, the user terminal corresponding to the C-end user) displays the target statistical data.
[0199] Optionally, when the number of data statistical rules corresponding to the rule identifier is multiple, indicating that multiple data statistical rules need to be executed, the target statistical data corresponding to each data statistical rule is determined, and the target statistical data corresponding to all data statistical rules are encapsulated into an object, and the object is sent to the target user end.
[0200] For example, if a demander needs to determine the number of mobile phone sales and returns within a specified time period, the rule identifier may correspond to two data statistics rules: one for counting sales of model 1 mobile phones, and the other for counting returns of model 1 mobile phones. Based on these two data statistics rules, the configuration service determines the number of returns and sales of model 1 mobile phones, encapsulates the return and sales volumes into an object, and sends this object to the demander, who then generates a pie chart based on the return and sales volumes to display the mobile phone sales and returns.
[0201] Take a specific application scenario as an example, Figure 5As shown, when the business configuration rule is a data statistical rule, the business encapsulation interface is a statistical interface in the statistical configuration module in the background external exposure interface service, which is obtained by encapsulating the data statistical service. The data statistical service includes a data query module, a json data parsing component, a query statement splicing module and a data encapsulation module. After obtaining the target rule identifier, the electronic device (for example, the development end corresponding to the B end) calls the statistical interface when the target rule identifier is the rule identifier corresponding to the data statistical rule, and uses the statistical interface to use the target rule identifier as the input parameter in the query statistical configuration details interface in the data query module, so as to query the statistical configuration table corresponding to the target rule identifier from the database through the query statistical configuration details interface, that is, the data statistical rule, which is in json format. The data statistical rule is parsed by the json data parsing component to obtain statistical configuration information, and the statistical configuration information is spliced by the query statement splicing module to obtain the corresponding database query statement, and the corresponding data statistical processing is performed based on the database query statement to obtain statistical data. The data encapsulation module encapsulates the statistical data according to the preset encapsulation format and sends the encapsulated statistical data to the target user end. For example, the encapsulated statistical data is "column": "gender", "value": "1", "count": "50", which means the number of people whose gender is male is counted. Column is the condition field, value is the threshold corresponding to the condition field, and count is the query result of the counting function, that is, the result obtained by executing the database query statement.
[0202] Optionally, before using the data in the database, it is necessary to first connect to the database, and then obtain database connection information corresponding to the target database identifier. Based on the database connection information corresponding to the target database identifier, connect to the database corresponding to the target database identifier.
[0203] The database connection information includes one or more of a database address, a database port, a user name, and a user password. The database address may be a network address, such as an IP address.
[0204] Specifically, the database connection information may be pre-configured by the developer, that is, the developer pre-configures the database to configure the corresponding connection information for the database. Figure 4 As shown, after receiving the connection information corresponding to the database configuration, the electronic device generates a database identifier corresponding to the connection information corresponding to the database, so as to use the database identifier to find the corresponding connection information, thereby successfully connecting to the corresponding database based on the connection information.
[0205] Among them, such as Figure 4 As shown, after obtaining the connection information corresponding to the database, it can be stored in the corresponding database.
[0206] Specifically, such as Figure 5 As shown, after the electronic device obtains the connection information corresponding to the database, that is, after adding new resources, it calls the resource configuration saving interface to save the connection information corresponding to the database to the resource pool table, where the resource id indicates the database identifier, the resource type is 1 data source, and the resource configuration indicates the connection information corresponding to the database.
[0207] Optionally, relevant personnel can also edit the database identifier, that is, perform operations such as adding or deleting the displayed database identifier.
[0208] Optionally, when the service function to be implemented is a notification sending function, that is, when the target service configuration rule is a data statistics rule, the specific process of configuring the preset code information according to the target configuration information to obtain the target service code is as follows:
[0209] Determine the calling method of the target notification method corresponding to the target notification method configuration information.
[0210] The target configuration notification method information is encapsulated into the calling method of the target notification method to obtain the encapsulated calling method of the target notification method.
[0211] Accordingly, corresponding business processing is performed based on the target business code, including:
[0212] The calling method of the encapsulated target notification mode is called to generate and send a notification message to the receiving user based on the target notification mode.
[0213] Specifically, the calling method of the required target notification method is determined based on the target notification method configuration information, and the target notification method configuration information is used as an input parameter of the calling method of the target notification method to pass the target notification method configuration information to, that is, encapsulate it into the calling method of the target notification method. After the target notification method configuration information is passed to the calling method of the target notification method, the calling method of the target notification method is executed to generate a notification message based on the target notification method configuration information, and push the notification message to the receiving user through the target notification method, thereby realizing the push of messages through the target notification method.
[0214] Optionally, calling the encapsulated target notification method to generate and send a notification message to the receiving user based on the target notification method includes:
[0215] The target interface is called by calling the method of the encapsulated target notification method to generate a corresponding notification message based on the target sending information and the target message template identifier, and then send the notification message to the recipient corresponding to the target receiving user information based on the target notification method. The target interface includes an interface provided by the service provider corresponding to the target notification method and / or an interface of the server corresponding to the target notification method.
[0216] Specifically, during the execution of the target notification method's calling method, the target interface is called using the relevant code within the calling method. Using the target interface, a notification message containing the target sending user information is generated based on the template corresponding to the target template identifier. The notification message is then pushed to the recipient user corresponding to the target receiving user information based on the target notification method. For example, if the template corresponding to the target template identifier is a verification code template, and the target sending user information includes the sending user's name, the generated notification message will be a verification code message containing the sending user's name.
[0217] Optionally, when determining the calling method of the target notification mode according to the target notification mode configuration information, the calling method of the target notification mode corresponding to the target notification mode identifier and / or the target message template identifier is determined.
[0218] Optionally, when the target notification method configuration information includes the target third-party service identifier, determine the target notification method calling method corresponding to the target third-party service identifier and the target notification method identifier and / or the target message template identifier. For example, if the target notification method configuration information includes the target third-party service identifier and the target notification method identifier, then the notification method calling method corresponding to the target third-party service identifier and the target notification method identifier, that is, the target notification method calling method, is searched for, so as to call the API interface of the third-party service corresponding to the third-party service identifier based on the calling method, thereby generating a corresponding notification message based on the API interface, and pushing the notification message to the target recipient based on the target notification method.
[0219] Among them, the calling method of the notification method can be through the middleware service (ie Figure 5 The sending notification service in the middleware service is determined. After obtaining the target rule identifier, the middleware service determines the target notification method configuration rule corresponding to the target rule identifier, extracts the target notification method identifier, target message template identifier, third-party service identifier and other identifiers related to the calling method of determining the notification method from the target notification method configuration rule, and routes the calling method of the notification method corresponding to the identifier to obtain the calling method of the target notification method, thereby pushing messages according to the calling method of the target notification method, achieving successful message push, and eliminating the need for B-side developers to learn the relevant notification method calling methods, reducing the workload of B-side developers.
[0220] Take a specific application scenario as an example, Figure 5 As shown, when the business configuration rule is a notification mode configuration rule, the business encapsulation interface is the sending notification interface in the statistics configuration module in the background external exposure interface service, which is obtained by encapsulating the sending notification service. The sending notification service includes a data query module, a json data parsing component and a calling external integration api module. After the electronic device (for example, the server in the B side) obtains the target rule identifier, when the target rule identifier is the identifier corresponding to the notification mode configuration rule, it calls the sending notification interface, and uses the target rule identifier as the input parameter in the query notification rule details interface in the data query module through the sending notification interface, so as to query the rule configuration table corresponding to the target rule identifier from the database through the query notification rule details interface, that is, the notification mode configuration rule, and the notification mode configuration rule is in json format. The notification mode configuration rule is parsed by the json data parsing component to obtain the notification mode configuration information. The notification mode configuration information is encapsulated by calling the external integration api module, and the encapsulated notification mode configuration information is used as the input parameter of the API interface (i.e., external API) of the third-party service to push the message to the user (i.e., the target user end) through the target notification mode. For example, the encapsulated notification mode configuration information is "receiver": "123456789", "template": "1", "sender": "123456789", where receiver is the receiving user, template is the message template identifier, template id, and sender is the sending user.
[0221] In this embodiment, when the demander needs to use the notification method to push a message, the corresponding pending business request can be directly input so that the electronic device can call the calling method of the target notification method according to the target rule identifier corresponding to the pending business request, thereby realizing the use of the target interface. There is no need for developers (i.e., developers on the B side) to learn how to use the target interface, and they can directly use the target interface to push messages, shortening the development time of the message push function and improving the reuse rate of the calling method of the notification method, that is, improving the reuse rate of the code.
[0222] In this embodiment, corresponding database query statements are generated based on the database statement format and the target statistical configuration information, so that data statistical processing can be performed using the database query statements, thereby realizing automatic generation of relevant business codes. There is no need for developers (i.e., developers on the B side) to write relevant database query codes, and when business requirements change, only the corresponding statistical configuration information, i.e., the data statistical rules, needs to be modified, without the need to modify the corresponding business codes, which has high flexibility.
[0223] In this embodiment, after obtaining the rule identifier corresponding to the business configuration rule, the B-end user can assign the rule identifier to the user (for example, the C-end user). The electronic device (i.e., the server in the B-end) calls the relevant interface to implement the corresponding business function based on the rule identifier input by the user. For example, when performing data statistical processing, the obtained target statistical data will be returned to the C-end user. The relevant business processing can be performed without the C-end user developing the relevant business functions, and the time for the B-end developers to develop business functions is shortened, greatly reducing the workload of the B-end developers.
[0224] Corresponding to the aforementioned method embodiments, this specification also provides embodiments of an apparatus and a terminal to which it is applied.
[0225] The embodiments of the file processing device of this specification can be applied to electronic devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor in which the file is processed to read the corresponding computer program instructions in the non-volatile memory into the memory and run them. From the hardware level, if Figure 7 The figure shows a hardware structure diagram of the electronic device where the service processing device of the embodiment of this specification is located. Figure 7 In addition to the processor 710, memory 730, network interface 720, and non-volatile memory 740 shown, the electronic device where the business processing device 731 is located in the embodiment may also include other hardware according to the actual function of the electronic device, which will not be described in detail.
[0226] like Figure 8 As shown, Figure 8 This is a block diagram of a service processing device according to an exemplary embodiment of the present specification, the device including:
[0227] The identifier determination module 810 is used to obtain the pending service request and determine the target rule identifier corresponding to the pending service request.
[0228] The rule determination module 820 is configured to determine the target service configuration rule corresponding to the target rule identifier.
[0229] The rule processing module 830 is used to parse the target service configuration rules to obtain corresponding target configuration information.
[0230] The service processing module 840 is used to perform corresponding service processing according to the target configuration information.
[0231] Optionally, the rule determination module 820 is specifically configured to:
[0232] Determine a service encapsulation interface corresponding to the target rule identifier, wherein the service encapsulation interface indicates at least one service configuration rule.
[0233] The service encapsulation interface is called, and the target service configuration rule corresponding to the target rule identifier is determined according to the service configuration rule indicated by the service encapsulation interface.
[0234] Optionally, the business processing module 840 is specifically configured to:
[0235] The target business code is determined according to the target configuration information, and corresponding business processing is performed based on the target business code.
[0236] Optionally, the service processing module 840 is further configured to:
[0237] Configure the preset code information according to the target configuration information to obtain the target service code.
[0238] Optionally, the target business configuration rules include data statistics rules, the target configuration information includes target statistics configuration information, and the code information includes database statement format.
[0239] The service processing module 840 is further configured to:
[0240] Generate corresponding database query statements based on the database statement format and target statistical configuration information.
[0241] Perform corresponding business processing based on the target business code, including:
[0242] Execute database query statements to perform corresponding data statistical processing and obtain target statistical data.
[0243] Optionally, the target statistics configuration information includes one or more of a target database identifier, a target data table identifier, a target field name to be counted, and a target query condition.
[0244] The service processing module 840 is further configured to:
[0245] Based on the database statement format, one or more of the target database identifier, the target data table identifier, the target field name to be counted, and the target query condition are concatenated to generate a corresponding database query statement.
[0246] Optionally, the service processing module 840 is further configured to:
[0247] Execute a database query statement to query the field value corresponding to the target field to be counted based on the target query condition in the database query statement to obtain target statistical data corresponding to the target data statistical rule. The target field to be counted is a field in the data table corresponding to the target data table identifier in the database corresponding to the target database identifier.
[0248] Optionally, the service processing module 840 is further configured to:
[0249] Get the database connection information corresponding to the target database identifier.
[0250] Based on the database connection information corresponding to the target database identifier, connect to the database corresponding to the target database identifier.
[0251] Optionally, the service processing module 840 is further configured to:
[0252] The target statistical data is sent to the target user terminal so that the target user terminal displays the target statistical data.
[0253] Optionally, the target service configuration rule includes a notification method configuration rule. The target configuration information includes target notification method configuration information. The code information includes a calling method of the notification method.
[0254] The service processing module 840 is further configured to:
[0255] Determine the calling method of the target notification method corresponding to the target notification method configuration information.
[0256] The target notification mode configuration information is encapsulated into the calling method of the target notification mode to obtain the encapsulated calling method of the target notification mode.
[0257] Accordingly, the service processing module 840 is further configured to:
[0258] The calling method of the encapsulated target notification mode is called to generate and send a notification message to the receiving user based on the target notification mode.
[0259] Optionally, the calling method of the target notification mode indicates the code for calling the target interface corresponding to the target notification mode to generate and send the notification message.
[0260] The target notification mode configuration information includes target sending information, wherein the target sending information includes target receiving user information.
[0261] The service processing module 840 is further configured to:
[0262] The target interface is called by calling the method of the encapsulated target notification method to generate a corresponding notification message based on the target sending information and send the notification message to the recipient corresponding to the target receiving user information based on the target notification method. The target interface includes an interface provided by the service provider corresponding to the target notification method and / or an interface of the server corresponding to the target notification method.
[0263] Optionally, the target sending information also includes target sending user information, wherein the target sending user information includes one or more of a sending user name, a sending user email address, a sending user password, and a sending user number.
[0264] The target notification method includes one or more of an email notification method, a text message notification method, and a specified application notification method.
[0265] Optionally, the target notification mode configuration information includes a target notification mode identifier and / or a target message template identifier.
[0266] The service processing module 840 is further configured to:
[0267] Determine a calling method of a target notification mode corresponding to the target notification mode identifier and / or the target message template identifier.
[0268] Optionally, the electronic device provides a first page, wherein the first page includes a rule configuration control and a configuration completion control.
[0269] The service processing device also includes a rule configuration module.
[0270] The rule configuration module is specifically used for:
[0271] In response to the first triggering operation of the configuration completion control, configuration information corresponding to the rule configuration control is obtained.
[0272] Generate corresponding business configuration rules and rule identifiers corresponding to the business configuration rules according to the configuration information corresponding to the rule configuration control.
[0273] Accordingly, this specification also provides an electronic device, comprising a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to:
[0274] Obtaining a pending business request and determining a target rule identifier corresponding to the pending business request;
[0275] Determine the target service configuration rule corresponding to the target rule identifier;
[0276] Parsing the target service configuration rules to obtain corresponding target configuration information;
[0277] Perform corresponding business processing according to the target configuration information.
[0278] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0279] In one embodiment of the present application, the computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the business processing method described above is implemented.
[0280] In one embodiment of the present application, the present application provides a computer program product, including a computer program, which implements the business processing method described above when executed by a processor.
[0281] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0282] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0283] Other embodiments of the present invention will readily occur to those skilled in the art upon consideration of the present invention and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present invention being indicated by the following claims.
[0284] It should be understood that the present description is not limited to the exact structure that has been 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 present description is limited only by the appended claims.
[0285] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A business processing method, characterized in that: include: Obtaining a pending business request and determining a target rule identifier corresponding to the pending business request; Determine the target service configuration rule corresponding to the target rule identifier; Parsing the target service configuration rules to obtain corresponding target configuration information; Perform corresponding business processing according to the target configuration information; The step of determining the target service configuration rule corresponding to the target rule identifier includes: Determine a service encapsulation interface corresponding to the target rule identifier; wherein the service encapsulation interface indicates at least one service configuration rule; Calling the service encapsulation interface, and determining a target service configuration rule corresponding to a target rule identifier according to the service configuration rule indicated by the service encapsulation interface; The performing corresponding service processing according to the target configuration information includes: The preset code information is configured according to the target configuration information to obtain a target service code, and corresponding service processing is performed based on the target service code.
2. The method according to claim 1, characterized in that The target business configuration rules include data statistics rules; the target configuration information includes target statistics configuration information; the code information includes database statement format; The configuring the preset code information according to the target configuration information to obtain the target service code includes: Generate a corresponding database query statement according to the database statement format and the target statistical configuration information; The performing corresponding business processing based on the target business code includes: Execute the database query statement to perform corresponding data statistical processing to obtain target statistical data.
3. The method according to claim 2, characterized in that: The target statistical configuration information includes one or more of a target database identifier, a target data table identifier, a target field name to be counted, and a target query condition; Generating a corresponding database query statement according to the database statement format and the target statistical configuration information includes: Based on the database statement format, one or more of the target database identifier, the target data table identifier, the target field name to be counted, and the target query condition are concatenated to generate a corresponding database query statement.
4. The method according to claim 2, characterized in that The executing the database query statement to perform corresponding data statistical processing to obtain target statistical data includes: Execute the database query statement to query the field value corresponding to the target field to be counted based on the target query condition in the database query statement to obtain the target statistical data corresponding to the data statistical rule; wherein, the target field to be counted is a field in the data table corresponding to the target data table identifier in the database corresponding to the target database identifier.
5. The method according to claim 3 or 4, characterized in that The method further comprises: Obtain database connection information corresponding to the target database identifier; Based on the database connection information corresponding to the target database identifier, connect to the database corresponding to the target database identifier.
6. The method according to any one of claims 2 to 4, characterized in that The method further comprises: The target statistical data is sent to a target user terminal, so that the target user terminal displays the target statistical data.
7. The method according to claim 1, characterized in that The target service configuration rule includes a notification mode configuration rule; the target configuration information includes target notification mode configuration information; the code information includes a notification mode calling method; The configuring the preset code information according to the target configuration information to obtain the target service code includes: Determine a calling method of the target notification mode corresponding to the target notification mode configuration information; Encapsulating the target notification mode configuration information into the calling method of the target notification mode to obtain the encapsulated calling method of the target notification mode; The performing corresponding business processing based on the target business code includes: The calling method of the encapsulated target notification mode is called to generate and send a notification message to the receiving user based on the target notification mode.
8. The method according to claim 7, characterized in that The calling method of the target notification mode indicates the code for calling the target interface corresponding to the target notification mode to generate and send a notification message; The target notification mode configuration information includes target sending information; wherein the target sending information includes target receiving user information; The method for calling the encapsulated target notification mode, to generate and send a notification message to a receiving user based on the target notification mode, includes: The target interface is called through the calling method of the encapsulated target notification method to generate a corresponding notification message according to the target sending information and send the notification message to the receiving user corresponding to the target receiving user information based on the target notification method; wherein, the target interface includes the interface provided by the service provider corresponding to the target notification method and / or the interface of the server corresponding to the target notification method.
9. The method according to claim 8, characterized in that The target sending information also includes target sending user information; wherein the target sending user information includes one or more of a sending user name, a sending user email address, a sending user password, and a sending user number; The target notification method includes one or more of an email notification method, a text message notification method, and a designated application notification method.
10. The method according to claim 7, characterized in that The target notification mode configuration information includes a target notification mode identifier and / or a target message template identifier; The method for determining the calling method of the target notification mode corresponding to the target notification mode configuration information includes: Determine a calling method of the target notification mode corresponding to the target notification mode identifier and / or the target message template identifier.
11. The method according to claim 1, characterized in that Providing a first page via an electronic device; the first page includes a rule configuration control and a configuration completion control; The method further comprises: In response to a first triggering operation of the configuration completion control, obtaining configuration information corresponding to the rule configuration control; Generate corresponding business configuration rules and rule identifiers corresponding to the business configuration rules according to the configuration information corresponding to the rule configuration control.
12. A business processing device, characterized in that: include: An identifier determination module is used to obtain a pending business request and determine a target rule identifier corresponding to the pending business request; A rule determination module, configured to determine a target service configuration rule corresponding to the target rule identifier; A rule processing module is used to parse the target business configuration rules to obtain corresponding target configuration information; A business processing module, configured to perform corresponding business processing according to the target configuration information; The rule determination module is specifically used to: Determining a service encapsulation interface corresponding to the target rule identifier; wherein the service encapsulation interface indicates at least one service configuration rule; Calling the service encapsulation interface, and determining a target service configuration rule corresponding to a target rule identifier according to the service configuration rule indicated by the service encapsulation interface; The service processing module is specifically used to: The preset code information is configured according to the target configuration information to obtain a target service code, and corresponding service processing is performed based on the target service code.
13. An electronic device, characterized in that: The invention comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following method is implemented: Obtaining a pending business request and determining a target rule identifier corresponding to the pending business request; Determine the target service configuration rule corresponding to the target rule identifier; Parsing the target service configuration rules to obtain corresponding target configuration information; Perform corresponding business processing according to the target configuration information; The step of determining the target service configuration rule corresponding to the target rule identifier includes: Determine a service encapsulation interface corresponding to the target rule identifier; wherein the service encapsulation interface indicates at least one service configuration rule; Calling the service encapsulation interface, and determining a target service configuration rule corresponding to a target rule identifier according to the service configuration rule indicated by the service encapsulation interface; The performing corresponding service processing according to the target configuration information includes: The preset code information is configured according to the target configuration information to obtain a target service code, and corresponding service processing is performed based on the target service code.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the business processing method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Method and device of business configuration
CN103095479A