Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
enterprise Resource Planning (ERP), which is an enterprise information management system mainly oriented to the manufacturing industry for integrated management of material resources, capital resources and information resources. ERP is an enterprise management software that can provide integration of real-time information across regions, departments, and even companies, with management accounting as the core. The enterprise management software is integrated aiming at material resource management (logistics), human resource management (people flow), financial resource management (financial flow) and information resource management (information flow).
The spring framework is created due to the complexity of software development, and it uses the basic JavaBean to accomplish what was previously only possible by EJBs. The purpose of spring is not limited to server-side development, and most Java applications can benefit from spring from the viewpoint of simplicity, testability and loose coupling.
A JavaBean (bean for short) is a reusable component written in JAVA language, for which classes must be specific and common and have a constructor without parameters. The JavaBean exposes the internal domain to the member attribute, set and get method acquisition by providing a common method conforming to the consistent design mode.
According to an aspect of embodiments of the present application, a method embodiment of a method for operating a business engine is provided.
Optionally, in this embodiment, the operation method of the service engine may be applied to a hardware environment formed by the service server 101 and the background server 103 as shown in fig. 1. As shown in fig. 1, the backend server 103 is connected to the service server 101 through a network, and may be configured to provide a service engine for the service server 101, and a database 105 may be configured on the backend server 103 or separately from the backend server 103, and is configured to provide a data storage service for the backend server 103, where the network includes but is not limited to: a wide area network, a metropolitan area network, or a local area network.
The operation method of the service engine in the embodiment of the present application may be executed by the background server 103, or may be executed by both the background server 103 and the service server 101. Fig. 2 is a flowchart of an optional operation method of a service engine according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, when configuring a first process for the first business service, selecting a plurality of first sub-processes matched with the service conditions of the first business service from a first set of business engines, wherein the sub-processes in the first set are pre-edited sub-processes used for the business service.
The above flows are some limiting conditions (limiting conditions or rule sets, each rule set includes at least one rule, i.e. at least one sub-flow, in other words, one sub-flow corresponds to one rule) of the service, such as 2 users who invite to open the loan service, consume 3 bills with the loan service, and so on.
Step S204, combining the plurality of first sub-processes into a first process according to configuration information, wherein the configuration information is used for configuring the association relationship of the plurality of first sub-processes in the first process.
Step S206, when the first account requests to acquire the first service, the service engine calls a first process to execute a service condition of the first service, where the service condition of the first service is the acquisition condition of the first service.
The account number (such as the first account number described above, the second account number hereinafter, etc.) is a service account number used in the service.
At present, each time of popularization, steps such as compiling, offline debugging, online testing, formal online and the like of relevant logics of the popularized business service (or called business activity) are needed, and the operation is tedious The operations such as debugging and the like can solve the technical problem that the operation for providing the business service in the related technology is complicated, and further achieve the technical effect of simplifying the operation complexity in the business activity process.
In the technical solution provided in step S202, a decision point (i.e. a rule or a sub-process) may be developed according to a requirement, a decision link (or called decision link, process, which refers to a sequence and a logical relationship between a rule group and a rule, and a specific execution process of a rule is executed by a service engine), decision information is executed, a result is output, a new sub-process is developed as needed (e.g. a sub-process related to a crowd label, and a related sub-process is randomly selected), a first set of sub-processes is formed without concerning the use of the specific sub-process, an operator may select a sub-process according to different scenarios, configure a decision link, and output a desired result, and the sub-process may be repeatedly utilized, so as to implement one-time development and multiple utilization. For example, when configuring a first process for a first business service, a plurality of first sub-processes matching the service conditions of the first business service are selected from a first set of business engines.
For example, if the conditions of the platform participating in the limited purchase are "the age of the user who becomes the platform is greater than or equal to 3 years", "the activity is greater than a certain threshold", and "the identity is a student", then the sub-processes corresponding to the above three conditions can be respectively selected when the sub-processes are selected.
In the technical solution provided in step S204, combining the plurality of first sub-processes into the first process according to the configuration information includes: configuring a logical relationship among the first sub-processes, a positional relationship among the first sub-processes, and an execution order of each first sub-process (or a logical relationship among first rules, a positional relationship among the first rules, and an execution flow of each first rule in the plurality of first rules) according to the configuration information, thereby obtaining a first process, wherein the logical relationship includes a logical or among the plurality of first sub-processes, a logical and, a logical greater than, a logical less than, a logical equal to, and a logical not equal to | among the plurality of first sub-processes! A limited form such as ═ less, ═ greater or equal, or enum enumerated; if the sub-processes 1 to 5 exist, the execution sequence is the sequential execution of the sub-processes 1 to 5, and the sub-process 3 is executed after the sub-process 5 is executed, then the sub-process 1 is positioned at the forefront, then the sub-process 5 is positioned at the rearmost, the sub-process 2 is positioned between the sub-process 1 and the sub-process 3, the sub-process 3 is positioned between the sub-process 2 and the sub-process 4 and connected with the sub-process 5, and so on.
Or taking the condition that a certain platform participates in limited purchasing as "the age of the user who becomes the platform is greater than or equal to 3 years", "the activity is greater than a certain threshold", and "the identity is a student" as an example, the plurality of sub-processes can be in the same position during configuration, and the relationship between the three conditions is logical and (that is, the three conditions need to be satisfied simultaneously).
In the technical solution provided in step S206, the invoking of the first flow by the business engine to execute the service condition of the first business service includes: and calling a first flow through the service engine to process account data of the first account to obtain a processing result of the processing, wherein the first account is an account used in the first service, and the processing result is used for indicating whether the first account is allowed to acquire the first service.
Optionally, the first process is called by the service engine to process the account data of the first account, so as to obtain a processing result, when the interface of the first process is called in the service logic of the first service, the data source address of the account data of the first account is transmitted to the service engine through the parameter of the interface of the first process, and other required data can be transmitted through the parameter of the interface, such as the parameters of the age parameter "3", the threshold parameter "N", the identity parameter "student", and the like, and the sub-process in the first process is operated through the service engine, and the processing result is written into the cache.
Optionally, the invoking, by the service engine, a first process to process the account data of the first account, and obtaining a processing result includes: when the number of the first accounts is multiple, multiple threads are created, the multiple threads are run in parallel, each thread executes an operation of calling the first process to process the account data of at least one first account, for example, the data of each first account can be processed by using a single thread, on one hand, the efficiency can be improved by running in parallel, in addition, the safety of the data can be improved by thread isolation, and the processing results obtained by the multiple threads are placed in a cache shared by the multiple threads so as to read the results.
Optionally, some activities have periodicity or different activities have similarity, and in order to multiplex the flows (or rule sets) of these activities, after combining a plurality of first sub-flows into a first flow according to the configuration information, the first flow may be saved to a second set of the business engines, where the second set is used to save the configured flows so as to select the configured flows from the configured flows for multiplexing when necessary.
After the first flow is stored in the second set of the business engine, when the flow is configured for the second business service, a second flow matched with the service condition of the second business service is selected from the second set of the business engine (the second flow can be combined by a plurality of second sub-flows, and the combination mode is similar to that of the first sub-flow); when the second account (which may be an arbitrary service account, such as the first account) requests to acquire the second service, the service engine calls the second process to execute the service condition of the second service, where the second service may be an arbitrary service, and when the second service is the first service or a service similar to the first service, the selected second process is the first process, which is equivalent to multiplexing the previously set process, and thus, the utilization efficiency may be further improved.
In order to solve the above mentioned problems, the present application provides an alternative embodiment, fig. 3 shows the overall architecture of the solution (including several parts of input, rule engine, engine configuration, and output result), fig. 4 is a schematic diagram of a business engine (or called rule engine, including two aspects of execution and configuration), and the present application provides the following technical solutions: decision points can be developed according to requirements, some rules (namely the sub-flows such as the first sub-flow, the second sub-flow and the like) are extracted in advance, and a calling interface is provided for calling of a business layer; dynamically configuring a decision link, calling corresponding rules through the calling interface, and transmitting parameters such as the number of participating persons, gender and the like; and executing the decision information according to the calling sequence and outputting a result.
An alternative implementation of the above embodiment is as follows:
step 1, firstly configuring a rule (or filter) in a custom rule set, including defining a filter (executing the defining rule, for example, only a specific user id can participate in an activity), selecting the filter (executing the selecting rule, for example, randomly selecting several pieces of data from a result set according to random or proportion), and then configuring the corresponding filter into a corresponding execution engine.
Step 2, configuring basic data of the database: and configuring the filter information into a database, wherein the filter information comprises information such as filter name, description, limiting mode, return value description, service grouping and the like.
Step 3, operation configuration activity: the operation can configure activities in the erp background, select rules (rules configured in the database) corresponding to the activities, set limit values, limit modes, relationships between the rules, and the rules check return information, and the rules pass the information such as the return values. An optional rule configuration of the erp management background is shown in fig. 5, an operator can select different rules and set different limiting modes and limiting values, and a program can automatically compare the imported values with the configured limiting values according to the configured limiting modes and output results.
Step 4, the method is called, call the necessary rule engine (or called rule group, business engine) in the code, put the rule parameter filtered into the expanded information, carry out the rule engine, return the result.
The method invocation may be implemented as follows: assembling request information required by a rule engine, and putting rule additional information into an extension field; an execution engine to start multi-thread processing if parallel operation is configured; acquiring a rule list, rule configuration information and a rule execution sequence and a logic relation thereof according to the activity number; acquiring a specific execution rule filter in a spring instance according to the identification id of the acquired rule bean object (when a spring frame is used in a background for development, the project instantiates and places the bean objects into a spring container during initialization, so that the initialized objects of the bean can be directly acquired through the identification id of the bean object during next use, and repeated creation and destruction of the objects are reduced); executing the filter method and transmitting an extension field; comparing the incoming fields with rule limit values configured in a database (the comparison mode is a limit mode); and finally, outputting the result.
The comparison method comprises the following steps: selecting a mode, namely, the mode is effective only when the rule limiting mode is enumeration; all, i.e. the defined manner is all satisfied; arbitrarily, i.e., any one of the limit values is satisfied.
By adopting the technical scheme, the problems that manpower and material resources are seriously wasted due to repeated development and mistakes are easily caused by the repeated development in the related technology can be solved, the technical effects that operators can select rules according to different scenes, a decision link is configured, a desired result is output, the rules can be repeatedly utilized, and one-time development and repeated utilization are achieved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided an operation device of a business engine for implementing the operation method of the business engine. Fig. 6 is a schematic diagram of an alternative service engine operating apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus may include:
a selecting unit 601, configured to select, when configuring a first flow for a first business service, multiple first sub-flows matched with service conditions of the first business service from a first set of business engines, where the sub-flows in the first set are pre-edited sub-flows used for the business service;
a combining unit 603, configured to combine the plurality of first sub-processes into a first process according to configuration information, where the configuration information is used to configure an association relationship of the plurality of first sub-processes in the first process;
the executing unit 605 is configured to, when the first account requests to acquire the first business service, invoke a first flow through the business engine to execute a service condition of the first business service, where the service condition of the first business service is an acquisition condition of the first business service.
It should be noted that the selecting unit 601 in this embodiment may be configured to execute step S202 in this embodiment, the combining unit 603 in this embodiment may be configured to execute step S204 in this embodiment, and the executing unit 605 in this embodiment may be configured to execute step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, the commonly used sub-processes are extracted and stored in the first set, when the first process is configured for the first business service, a plurality of first sub-processes matched with the service conditions of the first business service are selected from the first set of the business engine, the plurality of first sub-processes are combined into the first process according to the configuration information, under the condition that the first business service is requested to be obtained by the first account, the first process is called by the business engine to execute the service conditions of the first business service, the service conditions of the first business service are the obtaining conditions of the first business service, operations such as writing and debugging are not needed to be executed during each activity, the technical problem that the operation for providing the business service in the related technology is complicated can be solved, and the technical effect of simplifying the operation complexity in the business activity process is achieved.
Optionally, the apparatus of the present application may further comprise: and the storage unit is used for storing the first flow to a second set of the business engine after combining the plurality of first sub-flows into the first flow according to the configuration information, wherein the second set is used for storing the configured flow.
Optionally, the selecting unit may be further configured to: after the first flow is stored in the second set of the business engine, when the flow is configured for the second business service, selecting a second flow matched with the service condition of the second business service from the second set of the business engine; the execution unit may be further to: and under the condition that the second account requests to acquire the second business service, calling a second flow through the business engine to execute the service condition of the second business service.
Optionally, when the execution unit invokes the first process to execute the service condition of the first service through the service engine, the service engine may invoke the first process to process the account data of the first account to obtain a processing result of the processing, where the first account is an account used in the first service, and the processing result is used to indicate whether the first account is allowed to obtain the first service.
Optionally, the execution unit invokes the first flow through the service engine to process the account data of the first account, and when a processing result is obtained, and an interface of the first flow is invoked in the service logic of the first service, the execution unit transfers the data source address of the account data of the first account to the service engine through the parameter of the interface of the first flow, runs the sub-flow in the first flow through the service engine, and writes the processing result into the cache.
Optionally, the execution unit invokes the first process through the service engine to process the account data of the first account, and when a processing result is obtained, a plurality of threads may be created when the first account is multiple, and the operation of invoking the first process to process the account data of the first account is performed in parallel through the plurality of threads, where the processing result obtained by the plurality of threads is placed in a cache shared by the plurality of threads.
Optionally, when the plurality of first sub-processes are combined into the first process according to the configuration information, the combining unit may configure, according to the configuration information, a logical relationship between the first sub-processes in the first process, a positional relationship between the first sub-processes, and an execution order of each first sub-process, where the logical relationship includes a logical or between the plurality of first sub-processes and a logical and between the plurality of first sub-processes.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present application, there is also provided a server or a terminal for implementing the operation method of the service engine.
Fig. 7 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 7, the terminal may include: one or more processors 701 (only one of which is shown in fig. 7), a memory 703, and a transmission means 705. as shown in fig. 7, the terminal may further include an input-output device 707.
The memory 703 may be configured to store software programs and modules, such as program instructions/modules corresponding to the operation method and apparatus of the business engine in the embodiment of the present application, and the processor 701 executes various functional applications and data processing by executing the software programs and modules stored in the memory 703, that is, implements the operation method of the business engine. The memory 703 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 703 may further include memory located remotely from the processor 701, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 705 is used for receiving or transmitting data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 705 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 705 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among other things, the memory 703 is used to store application programs.
The processor 701 may call the application program stored in the memory 703 through the transmission means 705 to perform the following steps:
when a first process is configured for a first business service, selecting a plurality of first sub-processes matched with the service conditions of the first business service from a first set of business engines, wherein the sub-processes in the first set are pre-edited sub-processes used for the business service;
combining the plurality of first sub-processes into a first process according to configuration information, wherein the configuration information is used for configuring the incidence relation of the plurality of first sub-processes in the first process;
under the condition that the first account requests to acquire the first business service, a first process is called by a business engine to execute the service condition of the first business service, and the service condition of the first business service is the acquisition condition of the first business service.
The processor 701 is further configured to perform the following steps:
and configuring a logical relationship among the first sub-processes in the first process, a positional relationship among the first sub-processes and an execution sequence of each first sub-process according to the configuration information, wherein the logical relationship comprises a logical OR among the plurality of first sub-processes and a logical AND among the plurality of first sub-processes.
By adopting the embodiment of the application, the method and the device for configuring the first flow for the first business service are provided, wherein a plurality of first sub-flows matched with the service conditions of the first business service are selected from a first set of a business engine, and the sub-flows in the first set are pre-edited sub-flows used for the business service; combining the plurality of first sub-processes into a first process according to configuration information, wherein the configuration information is used for configuring the incidence relation of the plurality of first sub-processes in the first process; and under the condition that the first account requests to acquire the first business service, calling a first flow through a business engine to execute the service condition of the first business service, wherein the service condition of the first business service is the scheme of the acquisition condition of the first business service. The method comprises the steps of extracting commonly used sub-processes, storing the commonly used sub-processes in a first set, selecting a plurality of first sub-processes matched with service conditions of a first business service from the first set of a business engine when the first flow is configured for the first business service, combining the plurality of first sub-processes into the first flow according to configuration information, calling the first flow through the business engine to execute the service conditions of the first business service under the condition that the first business service is requested to be acquired by a first account, wherein the service conditions of the first business service are the acquisition conditions of the first business service, and operations such as writing and debugging are not required to be executed in each activity, so that the technical problem that the operation for providing the business service in the related technology is complicated can be solved, and the technical effect of simplifying the operation of popularization activity can be achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the storage medium may be used to execute a program code of an operation method of the service engine.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
when a first process is configured for a first business service, selecting a plurality of first sub-processes matched with the service conditions of the first business service from a first set of business engines, wherein the sub-processes in the first set are pre-edited sub-processes used for the business service;
combining the plurality of first sub-processes into a first process according to configuration information, wherein the configuration information is used for configuring the incidence relation of the plurality of first sub-processes in the first process;
under the condition that the first account requests to acquire the first business service, a first process is called by a business engine to execute the service condition of the first business service, and the service condition of the first business service is the acquisition condition of the first business service.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
and configuring a logical relationship among the first sub-processes in the first process, a positional relationship among the first sub-processes and an execution sequence of each first sub-process according to the configuration information, wherein the logical relationship comprises a logical OR among the plurality of first sub-processes and a logical AND among the plurality of first sub-processes.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.