CN106055625B - Method and device for executing service - Google Patents
Method and device for executing service Download PDFInfo
- Publication number
- CN106055625B CN106055625B CN201610363842.2A CN201610363842A CN106055625B CN 106055625 B CN106055625 B CN 106055625B CN 201610363842 A CN201610363842 A CN 201610363842A CN 106055625 B CN106055625 B CN 106055625B
- Authority
- CN
- China
- Prior art keywords
- service
- rule
- processed
- server cluster
- business
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and a device for executing a service. The method for executing the service comprises the following steps: acquiring a service to be processed; analyzing the business rules and business data related to the business to be processed; acquiring a service rule and service data related to the service to be processed; and executing the service to be processed according to the service rule and the service data. The invention can improve the robustness of the service execution system and the independence of each server cluster, and is more convenient for managing and updating the information in each server cluster.
Description
Technical Field
The present invention relates to the field of service operation technologies, and in particular, to a method and an apparatus for executing a service.
Background
When the amount of traffic in a unit time of a business execution system reaches a certain amount of scale, the storage, modification and execution of business rules and business data in the business execution system may additionally consume a large amount of system resources in some cases. Both the business rules and the business data in the business execution system need to be updated and executed by the other business rules and the business data in a strict fit manner, and especially when the data volume reaches a large amount, how to efficiently process the relationship between the business rules and the business data in the business execution system is extremely important. How to properly solve the above problems is an urgent issue to be solved in the industry.
Disclosure of Invention
The invention provides a method and a device for executing a service, which are used for improving the robustness of a service execution system in the aspect of task execution and enhancing the independence of each server cluster of the service execution system.
According to a first aspect of the embodiments of the present invention, there is provided a method for executing a service, including:
acquiring a service to be processed;
analyzing the business rules and business data related to the business to be processed;
acquiring a service rule and service data related to the service to be processed;
and executing the service to be processed according to the service rule and the service data.
In an embodiment, the acquiring the service rule and the service data related to the service to be processed includes:
acquiring a service rule related to the service to be processed from a preset service rule server cluster, wherein the preset service rule server cluster comprises at least one service rule server;
and acquiring the service data related to the service to be processed from a preset service data server cluster, wherein the preset data rule server cluster comprises at least one data rule server.
In one embodiment, the executing the service to be processed according to the service rule and the service data includes:
performing word segmentation processing on the service data to obtain word segmentation data;
analyzing through the service rule according to the word segmentation data to obtain a rule string;
and executing the service to be processed according to the rule string.
In one embodiment, the executing the service to be processed according to the rule string includes:
analyzing the numerical value of the rule string corresponding to the service to be processed;
judging the execution authority of the service to be processed according to the numerical value of the rule string;
and executing the service to be processed according to the execution authority.
In one embodiment, further comprising:
any server in the business rule server cluster does not belong to the business data rule server cluster;
any server in the business data server cluster does not belong to the business rule server cluster;
any server of the business execution server cluster may belong to any one of the business data server cluster and the business rule server cluster.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for executing a service, including:
the first acquisition module is used for acquiring a service to be processed;
the analysis module is used for analyzing the service rule and the service data related to the service to be processed;
the second acquisition module is used for acquiring the service rule and the service data related to the service to be processed;
and the execution module is used for executing the service to be processed according to the service rule and the service data.
In one embodiment, the second obtaining module includes:
the first obtaining submodule is used for obtaining the service rule related to the service to be processed from a preset service rule server cluster, and the preset service rule server cluster comprises at least one service rule server;
and the second obtaining submodule is used for obtaining the service data related to the service to be processed from a preset service data server cluster, and the preset data rule server cluster comprises at least one data rule server.
In one embodiment, the execution module includes:
the word segmentation sub-module is used for carrying out word segmentation processing on the service data to obtain word segmentation data;
the analysis submodule is used for analyzing through the service rule according to the word segmentation data to obtain a rule string;
and the execution submodule is used for executing the service to be processed according to the rule string.
In one embodiment, the execution submodule is further configured to analyze a numerical value of the rule string corresponding to the service to be processed; judging the execution authority of the service to be processed according to the numerical value of the rule string; and executing the service to be processed according to the execution authority.
In one embodiment, further comprising:
an intersection module, configured to prevent any server in the business rule server cluster from belonging to the business data rule server cluster;
any server in the business data server cluster does not belong to the business rule server cluster;
any server of the business execution server cluster may belong to any one of the business data server cluster and the business rule server cluster.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating a method of performing a service in accordance with an exemplary embodiment of the present invention;
fig. 2 is a flowchart illustrating a step S13 of a method of executing a service according to an exemplary embodiment of the present invention;
fig. 3 is a flowchart illustrating a step S14 of a method of executing a service according to an exemplary embodiment of the present invention;
fig. 4 is a flowchart illustrating a step S33 of a method of executing a service according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram illustrating an apparatus for performing a service according to an exemplary embodiment of the present invention;
fig. 6 is a block diagram of a second obtaining module 63 of an apparatus for performing a service according to an exemplary embodiment of the present invention;
fig. 7 is a block diagram illustrating an execution module 64 of an apparatus for executing a service according to an exemplary embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Fig. 1 is a flowchart illustrating a method of performing a service according to an exemplary embodiment, and as shown in fig. 1, the method of performing a service includes the following steps S11-S14:
in step S11, a service to be processed is acquired;
in step S12, analyzing the business rules and business data related to the business to be processed;
in step S13, according to the item image, retrieving a similar item image of the item image in a preset candidate item image database;
in step S14, the service to be processed is executed according to the service rule and the service data.
In one embodiment, the service to be processed is first obtained. And then analyzing the business rules and business data related to the business to be processed. Acquiring a service rule related to the service to be processed from a preset service rule server cluster, wherein the preset service rule server cluster comprises at least one service rule server; and acquiring the service data related to the service to be processed from a preset service data server cluster, wherein the preset data rule server cluster comprises at least one data rule server. Performing word segmentation processing on the service data to obtain word segmentation data; analyzing through the service rule according to the word segmentation data to obtain a rule string; analyzing the numerical value of the rule string corresponding to the service to be processed; judging the execution authority of the service to be processed according to the numerical value of the rule string; and executing the service to be processed according to the execution authority. Any server in the business rule server cluster does not belong to the business data rule server cluster; any server in the business data server cluster does not belong to the business rule server cluster; any server of the business execution server cluster may belong to any one of the business data server cluster and the business rule server cluster.
In one embodiment, as shown in FIG. 2, step S13 includes the following steps S21-S22:
in step S21, acquiring a service rule related to the service to be processed from a preset service rule server cluster, where the preset service rule server cluster includes at least one service rule server;
in step S22, the service data related to the service to be processed is obtained from a preset service data server cluster, where the preset data rule server cluster includes at least one data rule server.
In one embodiment, a preset business rule server cluster is searched for a business rule related to the service to be processed, and then the related business rule is called, wherein the preset business rule server cluster comprises at least one business rule server. Searching business data related to the business to be processed in a preset business data server cluster, and then calling the related business data, wherein the preset data rule server cluster comprises at least one data rule server. Through the steps, the related service rule and the related service data of the service to be processed can be obtained, and preparation is made for executing the service to be processed in a service execution server cluster subsequently.
In one embodiment, as shown in FIG. 3, step S13 includes the following steps S31-S33:
in step S31, performing word segmentation processing on the service data to obtain word segmentation data;
in step S32, analyzing the word segmentation data according to the service rule to obtain a rule string;
in step S33, the service to be processed is executed according to the rule string.
In one embodiment, the business data is participled, for example, the attribute value of the user I in the attribute B is BiThe value in the attribute C is CiThen, the word segmentation data that can be obtained after the word segmentation processing is the user a: bi,ci。
The parsing is performed through the business rule according to the word segmentation data, for example, in the business rule, when the attribute value of the attribute B is α, the Boolean value corresponding to the attribute B in the rule string is 1, and when the attribute value of the attribute C is β, the rule is usedThe boolean value corresponding to that attribute C in the string is 1. Judging the attribute value B of the user I in the attribute BiAttribute value C in attribute C, corresponding to αiIf the rule string matches β, the Boolean values of attribute B and attribute C in the rule string corresponding to user I can be obtained.
The word segmentation data is analyzed through the business rule, and a rule string can be obtained. The process is to judge the value of each attribute of the participle data to be compared with the value in each attribute in the business rule, if the values in a certain attribute are consistent, the value of the attribute corresponding to the rule string is 1.
And executing the service to be processed according to the rule string. For example, the pending service is executed according to boolean values of attribute B and attribute C in the rule string of user I.
In one embodiment, as shown in FIG. 4, step S33 includes the following steps S41-S43:
in step S41, analyzing a numerical value of the rule string corresponding to the service to be processed;
in step S42, determining the execution authority of the service to be processed according to the value of the rule string;
in step S43, the service to be processed is executed according to the execution authority.
In one embodiment, for example, parsing is performed through the business rule according to the participle data, in the business rule, when the attribute value of the attribute B is α, the Boolean value corresponding to the attribute B in the rule string is 1, when the attribute value of the attribute C is β, the Boolean value corresponding to the attribute C in the rule string is 1, and the attribute value B of the user I in the attribute B is determinediAttribute value C in attribute C, corresponding to αiIf the rule string matches β, the Boolean values of attribute B and attribute C in the rule string corresponding to user I can be obtained.
And judging the execution authority of the service to be processed according to the value of the rule string. According to the preset regulation in the service rule, under the condition that the Boolean values corresponding to the attribute B and the attribute C in the rule string are both 1, the service to be processed has an execution authority; and when the Boolean values corresponding to the attribute B and the attribute C in the rule string are not both 1, the service to be processed does not have the execution authority. For example, the execution authority of the service to be processed is determined by determining boolean values of attribute B and attribute C in a certain data string.
And executing the high-pending service according to the execution authority.
In one embodiment, FIG. 5 is a block diagram illustrating an apparatus for performing a service in accordance with an example embodiment. As shown in fig. 5, the apparatus includes a first obtaining module 51, an analyzing module 52, a second obtaining module 53, and an executing module 54.
The first obtaining module 51 is configured to obtain a service to be processed;
the analysis module 52 is configured to analyze the service rule and the service data related to the service to be processed;
the second obtaining module 53 is configured to obtain a service rule and service data related to the service to be processed;
the executing module 54 is configured to execute the service to be processed according to the service rule and the service data.
As shown in fig. 6, the second obtaining module 53 includes a first obtaining submodule 61 and a second obtaining submodule 62.
The first obtaining submodule 61 is configured to obtain a service rule related to the service to be processed from a preset service rule server cluster, where the preset service rule server cluster includes at least one service rule server;
the second obtaining submodule 62 is configured to obtain service data related to the service to be processed from a preset service data server cluster, where the preset data rule server cluster includes at least one data rule server.
As shown in fig. 7, the execution module 54 includes a word segmentation sub-module 71, a parsing sub-module 72, and an execution sub-module 73.
The word segmentation submodule 71 is configured to perform word segmentation processing on the service data to obtain word segmentation data;
the parsing submodule 72 is configured to parse the word segmentation data according to the service rule to obtain a rule string;
the execution submodule 73 is configured to execute the service to be processed according to the rule string.
The execution submodule 73 is further configured to analyze a numerical value of the rule string corresponding to the service to be processed; judging the execution authority of the service to be processed according to the numerical value of the rule string; and executing the service to be processed according to the execution authority.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (2)
1. A method for executing a service, for a service execution server cluster, comprising:
acquiring a service to be processed;
analyzing the business rules and business data related to the business to be processed;
acquiring a service rule and service data related to the service to be processed;
executing the service to be processed according to the service rule and the service data;
the executing the service to be processed according to the service rule and the service data includes:
performing word segmentation processing on the service data to obtain word segmentation data;
analyzing through the service rule according to the word segmentation data to obtain a rule string;
executing the service to be processed according to the rule string;
the executing the service to be processed according to the rule string includes:
analyzing the numerical value of the rule string corresponding to the service to be processed;
judging the execution authority of the service to be processed according to the numerical value of the rule string;
executing the service to be processed according to the execution authority;
the acquiring the service rule and the service data related to the service to be processed includes:
acquiring a service rule related to the service to be processed from a preset service rule server cluster, wherein the preset service rule server cluster comprises at least one service rule server;
acquiring service data related to the service to be processed from a preset service data server cluster, wherein the preset service data server cluster comprises at least one service data server;
further comprising:
any server in the business rule server cluster does not belong to the business rule server cluster;
any server in the business data server cluster does not belong to the business rule server cluster;
any server of the business execution server cluster may belong to any one of the business data server cluster and the business rule server cluster.
2. An apparatus for executing a service, configured to execute a service on a cluster of servers, comprising:
the first acquisition module is used for acquiring a service to be processed;
the analysis module is used for analyzing the service rule and the service data related to the service to be processed;
the second acquisition module is used for acquiring the service rule and the service data related to the service to be processed;
the execution module is used for executing the service to be processed according to the service rule and the service data;
the execution module includes:
the word segmentation sub-module is used for carrying out word segmentation processing on the service data to obtain word segmentation data;
the analysis submodule is used for analyzing through the service rule according to the word segmentation data to obtain a rule string;
the execution submodule is used for executing the service to be processed according to the rule string;
the execution submodule is also used for analyzing the numerical value of the rule string corresponding to the service to be processed; judging the execution authority of the service to be processed according to the numerical value of the rule string; executing the service to be processed according to the execution authority;
the second obtaining module includes:
the first obtaining submodule is used for obtaining the service rule related to the service to be processed from a preset service rule server cluster, and the preset service rule server cluster comprises at least one service rule server;
a second obtaining submodule, configured to obtain service data related to the service to be processed from a preset service data server cluster, where the preset service data server cluster includes at least one service data server;
further comprising:
the intersection module is used for that any server in the business rule server cluster does not belong to the business rule server cluster;
any server in the business data server cluster does not belong to the business rule server cluster;
any server of the business execution server cluster may belong to any one of the business data server cluster and the business rule server cluster.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610363842.2A CN106055625B (en) | 2016-05-26 | 2016-05-26 | Method and device for executing service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610363842.2A CN106055625B (en) | 2016-05-26 | 2016-05-26 | Method and device for executing service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055625A CN106055625A (en) | 2016-10-26 |
CN106055625B true CN106055625B (en) | 2020-02-07 |
Family
ID=57176047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610363842.2A Expired - Fee Related CN106055625B (en) | 2016-05-26 | 2016-05-26 | Method and device for executing service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055625B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107977441A (en) * | 2017-12-08 | 2018-05-01 | 中国银行股份有限公司 | The method for processing business and transaction processing system of rule-based engine |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105450705A (en) * | 2014-08-29 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Service data processing method and apparatus |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8676746B2 (en) * | 2008-01-03 | 2014-03-18 | Microsoft Corporation | Database management system risk assessment |
CN102958017B (en) * | 2011-08-29 | 2015-07-15 | 航天信息软件技术有限公司 | Short message interacting method and device applied to ERP (Enterprise Resource Planning) |
-
2016
- 2016-05-26 CN CN201610363842.2A patent/CN106055625B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105450705A (en) * | 2014-08-29 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Service data processing method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN106055625A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10310969B2 (en) | Systems and methods for test prediction in continuous integration environments | |
CN111061833B (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
US10942733B2 (en) | Open-source-license analyzing method and apparatus | |
CN106293891B (en) | Multidimensional investment index monitoring method | |
US11449488B2 (en) | System and method for processing logs | |
CN107291745B (en) | Data index management method and device | |
CN110515944B (en) | Data storage method based on distributed database, storage medium and electronic equipment | |
US20160019266A1 (en) | Query generating method and query generating device | |
CN109657803B (en) | Construction of machine learning models | |
CN115827895A (en) | Vulnerability knowledge graph processing method, device, equipment and medium | |
CN111181805A (en) | Micro-service test baffle generation method and system based on test case | |
CN109992252B (en) | Data analysis method, terminal, device and storage medium based on Internet of things | |
CN111045916A (en) | Automated software defect verification | |
CN112988776B (en) | Method, device and equipment for updating text parsing rule and readable storage medium | |
CN107330031B (en) | Data storage method and device and electronic equipment | |
CN106055625B (en) | Method and device for executing service | |
CN107291749B (en) | Method and device for determining data index association relation | |
CN106462614B (en) | Information analysis system, information analysis method, and information analysis program | |
CN109284354B (en) | Script searching method and device, computer equipment and storage medium | |
CN110515653B (en) | Document generation method and device, electronic equipment and computer readable storage medium | |
CN114706856A (en) | Fault processing method and device, electronic equipment and computer readable storage medium | |
CN114169318A (en) | Process identification method, apparatus, device, medium, and program | |
KR101673151B1 (en) | Method and Apparatus for Analyzing Relationship Change of Program Source and DB Schema | |
CN112685405A (en) | Data management method, system, equipment and medium based on knowledge graph | |
CN111858963A (en) | Webpage customer service knowledge extraction method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A method and device for executing services Effective date of registration: 20210104 Granted publication date: 20200207 Pledgee: Inner Mongolia Huipu Energy Co.,Ltd. Pledgor: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd. Registration number: Y2020990001527 |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200207 Termination date: 20210526 |