[go: up one dir, main page]

CN112348193A - Decision method, decision device and terminal equipment - Google Patents

Decision method, decision device and terminal equipment Download PDF

Info

Publication number
CN112348193A
CN112348193A CN202011337131.0A CN202011337131A CN112348193A CN 112348193 A CN112348193 A CN 112348193A CN 202011337131 A CN202011337131 A CN 202011337131A CN 112348193 A CN112348193 A CN 112348193A
Authority
CN
China
Prior art keywords
rule
target
service data
unit
scheduling unit
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.)
Granted
Application number
CN202011337131.0A
Other languages
Chinese (zh)
Other versions
CN112348193B (en
Inventor
刘志海
程移立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Delian Yikong Technology Beijing Co ltd
Original Assignee
Delian Yikong Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Delian Yikong Technology Beijing Co ltd filed Critical Delian Yikong Technology Beijing Co ltd
Priority to CN202011337131.0A priority Critical patent/CN112348193B/en
Publication of CN112348193A publication Critical patent/CN112348193A/en
Application granted granted Critical
Publication of CN112348193B publication Critical patent/CN112348193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/042Backward inferencing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a decision method, which comprises the following steps: if a preset request is received, determining at least two target rule units from at least two rule units according to key field information of service data carried by the preset request; broadcasting the service data to each target rule unit so that each target rule unit processes the service data in parallel; and if a target processing result of at least one target rule unit for the service data is obtained, a decision result for the preset request is obtained according to the target processing result. By the method, the decision efficiency can be improved when the decision is made according to the business rule.

Description

Decision method, decision device and terminal equipment
Technical Field
The present application belongs to the field of information processing technologies, and in particular, relates to a decision method, a decision device, a terminal device, and a computer-readable storage medium.
Background
In business such as risk control, business rules often need to be processed to obtain decision information in a particular business scenario. At present, the decision is usually determined in sequence according to the determination process of the business rule, and a decision result is finally obtained. The traditional decision-making method usually takes a long time and has low decision-making efficiency.
Disclosure of Invention
The embodiment of the application provides a decision method, a decision device, a terminal device and a computer readable storage medium, which can improve decision efficiency when making a decision according to a business rule.
In a first aspect, an embodiment of the present application provides a decision method, including:
if a preset request is received, determining at least two target rule units from at least two rule units according to key field information of service data carried by the preset request;
broadcasting the service data to each target rule unit so that each target rule unit processes the service data in parallel;
and if a target processing result of at least one target rule unit for the service data is obtained, a decision result for the preset request is obtained according to the target processing result.
In a second aspect, an embodiment of the present application provides a decision apparatus, including:
the determining module is used for determining at least two target rule units from at least two rule units according to key field information of service data carried by a preset request if the preset request is received;
the first processing module is used for broadcasting the service data to each target rule unit so that each target rule unit can process the service data in parallel;
and the second processing module is used for obtaining a decision result aiming at the preset request according to a target processing result if the target processing result aiming at the service data of at least one target rule unit is obtained.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, a display, and a computer program stored in the memory and executable on the processor, where the processor implements the decision method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the decision method as described in the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the decision method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, if a preset request is received, at least two target rule units are determined from at least two rule units according to key field information of service data carried by the preset request, so that the target rule units associated with the service data can be obtained by screening from the rule units according to the key field information of the service data, and the number of the rule units to be scheduled is reduced. Then, the service data is broadcasted to each target rule unit, so that each target rule unit processes the service data in parallel, and the processing speed of service data processing can be greatly increased compared with the prior art, so that after a target processing result of at least one of the two target rule units for the service data is obtained, a decision result for the preset request can be efficiently obtained according to the target processing result, and the decision efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of a decision method according to an embodiment of the present application;
FIG. 2 is an exemplary information processing architecture provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a decision device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The decision method provided by the embodiment of the application can be applied to a server, a desktop computer, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA) and other terminal devices, and the embodiment of the application does not limit the specific type of the terminal device.
In business such as risk control, business rules often need to be processed to obtain decision information in a particular business scenario. For example, for application scenarios such as vehicle insurance claim settlement, vehicle insurance data of a user can be acquired, and whether the user meets the vehicle insurance claim settlement rules or not is judged, so that decision information whether to settle claims or not is obtained.
Currently, the judgment can be performed sequentially according to the judgment process of the business rule, but the decision mode has low efficiency. In addition, the existing rule execution scheme based on distributed computing can also be used for obtaining the decision, but the rule execution scheme based on distributed computing is often suitable for a flow computing scene and does not match with a decision scene for a discrete rule.
In the embodiment of the present application, the target rule units associated with the service data can be obtained by screening from the rule units through the key field information of the service data, and then the service data is broadcasted to each target rule unit, so that each target rule unit processes the service data in parallel, which can greatly increase the processing speed of service data processing compared with the prior art, so that after the target processing result of at least one of the two target rule units for the service data is obtained, the decision result for the preset request can be efficiently obtained according to the target processing result, and the decision efficiency is improved.
Specifically, fig. 1 shows a flowchart of a decision method provided in an embodiment of the present application, where the decision method may be applied to a terminal device.
As shown in fig. 1, the decision method may include:
step S101, if a preset request is received, determining at least two target rule units from at least two rule units according to key field information of service data carried by the preset request.
In this embodiment of the application, the key field information may include information of a pre-specified field such as a title, a preset tag, and the like, and may also include field information obtained by extracting a keyword from the service data. For different service scene requirements, the key field information may have different selection modes, and the number of key fields included in the key field information is not limited here.
Illustratively, the key field information may include at least one of a customer name, a service link, and a service type, etc., to which the service data relates. And screening the at least two rule units through the key field information to obtain a target rule unit associated with the preset request so as to reduce the processing amount of subsequent data processing and reduce redundant operation.
Specifically, in some examples, a preset identifier of each rule unit may be predetermined, and then, for each rule unit, the preset identifier of the rule unit is matched with the key field information, and if the matching is successful, the rule unit may be used as the target rule unit. In other examples, the rule unit may be divided in advance, or at least two rule unit sets, where each rule unit set includes at least one rule unit, and the rule unit set corresponds to a set identifier, and for each rule unit set, the set identifier of the rule unit set may be matched with the key field information, and if matching is successful, each rule unit in the rule unit set may be used as the target rule unit. At this time, by dividing the rule unit into a rule unit set, the efficiency of searching for the target rule unit can be improved, and the calculation amount of matching is reduced.
In this embodiment of the application, the rule unit may be a computing unit, and each rule unit may execute respective data processing independently and asynchronously, and may perform message transmission with each other. The deployment mode of each rule unit can be various. For example, each rule unit may be deployed in a distributed system, or may be deployed in one or at least two threads of the same terminal device.
In some embodiments, the rule element may be an Actor in an Actor model. The actors in the Actor model are respectively mutually independent computing units and can be scheduled through the Actor model. The Actor model is different from a thread scheduling system in an operating system and is an independent scheduling system, and the Actor is also different from threads in the operating system. Because the system resources consumed by the Actor are greatly reduced compared with the threads in the operating system, and the scheduling mode is different from the thread scheduling mode, the Actor can be independently scheduled through the Actor model, and at the moment, different actors can be deployed in the same thread of the terminal device and can also be deployed in different threads of the terminal device. Therefore, in some examples, a large number of Actor-based rule elements can be scheduled in a specified number of physical threads of the terminal device, thereby making reasonable use of computing resources and reducing hardware resource consumption.
Therefore, in the embodiment of the application, the rule units are realized through the Actor in the Actor model, so that the deployment of a large number of lightweight rule units which can be dispatched in parallel can be realized, the deployment mode is flexible, and the resource consumption is greatly reduced.
In some embodiments, before determining at least two target rule units from among at least two rule units according to key field information of service data carried by a preset request if the preset request is received, the method further includes:
after at least two groups of preset rule information are obtained, translating the preset rule information for each group of preset rule information to obtain a subprogram corresponding to the preset rule information;
and respectively packaging each subprogram into different rule units.
In the embodiments of the present application, the specific translation manner is not limited herein. For example, the translation may convert the preset rule information based on the first language (e.g., a specific natural language) into an independently executable sub-program (library) based on the second language (e.g., a specific programming language) through a preset conversion manner. The preset conversion mode can be developed by a third party or developed by research personnel. The programming language used by the subroutine is not limited herein, and may be determined according to the application environment such as the operating system of the specific application. The subroutine may be packaged into a different rule unit to enable the rule unit to perform specified rule determination and the like.
In the embodiment of the present application, the rule setting content in each group of preset rule information may be determined according to a specific application scenario. In addition, the number of rules of the rule setting content in each group of preset rule information can be adjusted based on application requirements and experience. In some examples, each rule unit may include a rule, and at this time, a large amount of rule information can be split, and then translated into corresponding subroutines and encapsulated into different rule units, so as to obtain a large amount of lightweight rule units, thereby facilitating subsequent parallel scheduling and efficient execution.
Step S102, broadcasting the service data to each target rule unit, so that each target rule unit processes the service data in parallel.
In this embodiment of the application, the service data may be sent to the target rule units, so that each target rule unit can obtain the service data and process the service data in parallel. For example, for each target rule unit, it may be determined whether the business data conforms to a rule in the target rule unit.
In the prior art, the judgment can be performed in sequence according to the judgment process of the business rule, but the decision mode has low efficiency. In addition, the existing rule execution scheme based on distributed computing can also be used for obtaining the decision, but the rule execution scheme based on distributed computing is often suitable for a flow computing scene and does not match with a decision scene for a discrete rule. The embodiment of the application processes the service data respectively and parallelly through each rule unit, so that the processing speed of the service data processing can be greatly improved.
Step S103, if a target processing result of at least one target rule unit for the service data is obtained, obtaining a decision result for the preset request according to the target processing result.
The processing result obtained by the target rule unit may have various forms.
For example, for each target rule unit, if the service data includes the features described by the rules in the target rule unit, the target rule unit outputs the processing result for the service data and serves as the target processing result for the service data by the target rule unit.
Or, for each target rule unit, the target rule unit outputs a processing result for the business data regardless of whether the business data contains the characteristics described by the rules in the target rule unit. When the business data does not contain the characteristics described by the rules in the target rule unit, the processing result output by the target rule unit for the business data has an invalid label marked as invalid; and when the service data contains the characteristics described by the rules in the target rule unit, the processing result output by the target rule unit and aiming at the service data has a valid tag which is identified as valid. And when the processing result output by the target rule unit and aiming at the service data has the valid label with the valid identification, the processing result is a target processing result.
After the target processing result is obtained, there may be various ways of obtaining the decision result for the preset request according to the target processing result.
For example, in an application scenario of car insurance claims, the preset request is a request to determine whether a specified customer meets the car insurance claim requirements. If 3 target processing results are obtained, the method includes: if the drunk driving, the age of the automobile is less than 60 and the photo of the automobile insurance field is qualified, the decision result aiming at the preset request can be that the automobile insurance claim settlement requirement is met.
In some examples, the decision result may also be obtained by calculating an interval corresponding to the weighted score according to the weight of each target rule unit and each target processing result.
Fig. 2 shows an exemplary information processing architecture in the embodiment of the present application.
The target rule unit 1, the target rule unit 2, the target rule unit 3 and the target rule unit 4 associated with the preset request can be scheduled by the designated scheduling unit, so that the target rule unit 1, the target rule unit 2, the target rule unit 3 and the target rule unit 4 process the service data in parallel and respectively send respective target processing results to the processing result collector, and the processing result collector can obtain and output a decision result for the preset request according to the target processing results.
In the embodiment of the application, if a preset request is received, at least two target rule units are determined from at least two rule units according to key field information of service data carried by the preset request, so that the target rule units associated with the service data can be obtained by screening from the rule units according to the key field information of the service data, and the number of the rule units to be scheduled is reduced. Then, the service data is broadcasted to each target rule unit, so that each target rule unit processes the service data in parallel, and the processing speed of service data processing can be greatly increased compared with the prior art, so that after a target processing result of at least one of the two target rule units for the service data is obtained, a decision result for the preset request can be efficiently obtained according to the target processing result, and the decision efficiency is improved.
On the basis of the foregoing embodiments, in some embodiments, the step S101 specifically includes:
if the first scheduling unit receives a preset request, determining at least one target second scheduling unit according to key field information of service data carried by the preset request, wherein each second scheduling unit is used for scheduling at least two rule units, the target second scheduling unit is a second scheduling unit with a corresponding identifier matched with the key field information, and the rule units scheduled by the target second scheduling unit comprise the target rule units;
the step S102 specifically includes:
sending the service data to the target second scheduling unit through the first scheduling unit;
broadcasting the service data to each rule unit scheduled by the target second scheduling unit through the target second scheduling unit, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel;
the step S103 specifically includes:
if a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is obtained, screening out a first processing result associated with the preset request from the first processing result to serve as the target processing result;
and obtaining a decision result aiming at the preset request according to the target processing result.
In the embodiment of the application, the rule units can be scheduled through two layers of scheduling units, so that the scheduling accuracy is improved, and meanwhile, a large amount of calculation redundancy can be avoided, and a decision can be obtained quickly and efficiently.
For each second scheduling unit, an identifier corresponding to the second scheduling unit may be preset. The specific obtaining manner of the identifier corresponding to the second scheduling unit may be various. For example, the identifier corresponding to the second scheduling unit may be determined according to a keyword of preset rule information corresponding to the rule unit scheduled by the second scheduling unit, a specific classification manner of the service data (e.g., a corresponding client name, etc.), and other information.
For example, in some examples, insurance companies may be used as the identifiers for the car insurance claim services, at this time, the rule units corresponding to the car insurance claim services of the same insurance company may be scheduled by the same second scheduling unit, and the rule units corresponding to different insurance companies are scheduled by different second scheduling units, respectively.
It is understood that the identifier corresponding to the second scheduling unit is used to identify the rule unit scheduled by the second scheduling unit. Therefore, by setting the second scheduling unit and the rule units respectively scheduled by each second scheduling unit, the at least two rule units can be divided, and each rule unit set can be obtained by dividing, and then different rule unit sets are respectively scheduled by different second scheduling units, thereby realizing independent scheduling of the rule units belonging to different categories.
In the embodiment of the present application, the target scheduling unit is determined by matching the identifier of the second scheduling unit with the key field information, and may preliminarily screen the rule units associated with the preset request according to the classification corresponding to the identifier, and then broadcast the service data to each rule unit scheduled by the target second scheduling unit through the target second scheduling unit, and then screen out the first processing result associated with the preset request from the obtained first processing result as the target processing result, so that at least two data screening processes of screening the rule units and screening the first processing result are realized through hierarchical scheduling of at least two layers of scheduling units, compared with the prior art that determines whether each rule unit of the at least two rule units matches the preset request one by one, according to the embodiment of the application, the data processing efficiency can be greatly improved, meanwhile, the completeness and the sufficiency of the processing result required by decision are guaranteed through the first processing result, and the defect of the processing result required by decision caused by judgment errors when each rule unit is judged to be matched with the preset request is avoided.
In some embodiments, a first processing result of the at least one rule unit scheduled by the target second scheduling unit for the business data may be obtained by a processing result collector, and a first processing result associated with the preset request may be screened from the first processing result as the target processing result.
In some embodiments, the broadcasting, by the target second scheduling unit, the service data to each rule unit scheduled by the target second scheduling unit, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel, includes:
sending the service data to an information queue in the target second scheduling unit through the first scheduling unit and storing the service data as a to-be-processed item in the information queue;
if the to-be-processed item corresponding to the service data is the to-be-processed item in the information queue, after the second scheduling unit receives a preset instruction, broadcasting the service data to each rule unit scheduled by the target second scheduling unit respectively, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel, wherein the to-be-processed item with the earliest storage time in the information queue.
In the embodiment of the application, the service data is stored through the information queue in the target second scheduling unit, and the service data is broadcasted to each rule unit scheduled by the target second scheduling unit after the preset instruction is received, so that scheduling can be performed on each preset request in order, and therefore, when a plurality of preset requests exist, due to the difference of processing speeds of each rule unit, the output time of the processing result output on the same preset request is different, and subsequent processing result collection and the process of obtaining the decision result according to the target processing result are disordered in time sequence. Therefore, according to the embodiment of the application, the processing result of the corresponding rule unit for each item to be processed can be clearly and orderly acquired in sequence according to the storage time of each item to be processed in the information queue, so that operations such as re-matching the processing result and the preset request are avoided, and the data processing efficiency is improved.
In some embodiments, after broadcasting the service data to each rule unit scheduled by the target second scheduling unit, the method further includes:
deleting the items to be processed corresponding to the service data from the information queue so as to update the items to be processed in the information queue;
if a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is received within a preset time period, or if any first processing result is not received after the preset time period, returning the preset instruction to the second scheduling unit, where the preset instruction is used to instruct the target second scheduling unit to send the item to be sent to the scheduled rule unit when the item to be sent in the information queue is not empty.
In this embodiment of the application, after an item to be sent is sent from the information queue, the item to be sent is updated, and after a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is received within the preset time period, the preset instruction is returned to the second scheduling unit, so that when the item to be sent in the information queue is not empty, the target second scheduling unit is instructed to send the item to be sent to the scheduled rule unit, and thus, the preset instruction triggers the second scheduling unit to broadcast the items to be processed stored in the information queue in sequence according to a storage time sequence. The preset time period may be predetermined according to information such as the expected processing time of the rule unit.
In some embodiments, each of the rule units is an Actor in an Actor model, and for each second scheduling unit, the rule unit corresponding to the second scheduling unit is deployed in the same physical thread of the terminal device.
In the embodiment of the application, for each second scheduling unit, the rule unit corresponding to the second scheduling unit is deployed in the same physical thread of the terminal device, so that each Actor scheduled by the second scheduling unit can be managed conveniently, processing operations such as scheduling, processing result acquisition and decision result acquisition of the rule unit of the same preset request are realized in one physical thread, and the system communication cost is reduced. In addition, the rule units scheduled by the second scheduling units are deployed in different physical threads of the same terminal device, a parallel scheduling system for a large-scale Actor can be realized through a single terminal device, the deployment efficiency is high, and meanwhile, the hardware cost is greatly improved compared with that of a distributed system and the like. However, because the system resources consumed by the Actor are very small, the decision speed of the decision system implemented by the deployment method is obviously improved compared with the prior art, and in specific application, the application of 3 ten thousand + rule units can be implemented on a single machine (i.e. a single terminal device) within hundreds of milliseconds, and a decision result is obtained, so that real-time decision can be realized.
In some embodiments, the decision method further comprises:
sending test service data to the second scheduling unit through the first scheduling unit at a preset period, wherein the test service data is used for acquiring a test processing result of each rule unit scheduled by the second scheduling unit;
for each period, recording the sending time of the test service data in the period, and if the test processing result of the rule unit scheduled by any one of the second scheduling units for the test service data of the period is received, recording the receiving time of the test processing result;
and detecting the processing performance of each rule unit in the second scheduling unit and the second scheduling unit according to the sending time and the receiving time.
In the embodiment of the present application, to-be-processed items in the information queue are sequentially sent to the corresponding rule units according to the storage sequence to be processed, and the rule units do not necessarily output the first processing result for each to-be-processed item, so that there may be a case where the rule units are abnormal but cannot be perceived in the application process, which affects the accuracy of the decision result. Therefore, in this embodiment of the present application, test service data may be preset, where the test service data may obtain a test processing result of each rule unit scheduled by the second scheduling unit, that is, the test service data may include features related to rules in each rule unit scheduled by the second scheduling unit. Then, periodically sending test service data to the second scheduling unit through the first scheduling unit, and recording the sending time of the test service data in each period, and if a test processing result of a rule unit scheduled by any one of the second scheduling units for the test service data in the period is received, recording the receiving time of the test processing result, so as to measure the processing performance of each rule unit in the second scheduling unit and the second scheduling unit in the period through the sending time and the receiving time.
In one embodiment, a time difference between the reception time and the transmission time may be calculated for each reception time;
and determining the processing performance of each rule unit in the second scheduling unit and the second scheduling unit according to each time difference.
For example, if each of the time differences is greater than a preset time difference threshold, it may be considered that there are more to-be-processed items accumulated in the second scheduling unit, and the waiting time of the test service data in the second scheduling unit is longer. If the difference between the maximum value and the minimum value in each time difference is large, the processing performance of each rule unit in the second scheduling unit may be checked according to the time difference, for example, whether the processing speed of the rule unit corresponding to the maximum value in the time difference needs to be optimized may be further detected.
Therefore, through the embodiment of the application, the periodic detection of the processing performance of each rule unit in the second scheduling unit and the second scheduling unit can be realized, the processing performance of each rule unit in the second scheduling unit and the second scheduling unit can be efficiently evaluated, and the exception in the rule unit and the second scheduling unit can be quickly found and positioned.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 shows a structural block diagram of a decision device provided in the embodiment of the present application, which corresponds to the above-described decision method of the embodiment, and only shows the relevant parts of the embodiment of the present application for convenience of description.
Referring to fig. 3, the decision device 3 includes:
a determining module 301, configured to determine, if a preset request is received, at least two target rule units from among at least two rule units according to key field information of service data carried in the preset request;
a first processing module 302, configured to broadcast the service data to each target rule unit, so that each target rule unit processes the service data in parallel;
the second processing module 303 is configured to, if a target processing result of the at least one target rule unit for the service data is obtained, obtain a decision result for the preset request according to the target processing result.
In some embodiments, the decision device 3 further comprises:
the translation module is used for translating the preset rule information according to each group of preset rule information after at least two groups of preset rule information are obtained, and obtaining the subprogram corresponding to the preset rule information;
and the packaging module is used for packaging each subprogram into different rule units respectively.
In some embodiments, the determining module 301 is specifically configured to:
if the first scheduling unit receives a preset request, determining at least one target second scheduling unit according to key field information of service data carried by the preset request, wherein each second scheduling unit is used for scheduling at least two rule units, the target second scheduling unit is a second scheduling unit with a corresponding identifier matched with the key field information, and the rule units scheduled by the target second scheduling unit comprise the target rule units;
the first processing module 302 specifically includes:
a sending submodule, configured to send the service data to the target second scheduling unit through the first scheduling unit;
the broadcasting sub-module is used for broadcasting the service data to each rule unit scheduled by the target second scheduling unit through the target second scheduling unit respectively so as to enable each rule unit scheduled by the target second scheduling unit to process the service data in parallel;
the second processing module 303 specifically includes:
the screening submodule is used for screening out a first processing result associated with the preset request from the first processing result to serve as the target processing result if the first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is obtained;
and the processing submodule is used for obtaining a decision result aiming at the preset request according to the target processing result.
Optionally, the broadcast sub-module is specifically configured to:
sending the service data to an information queue in the target second scheduling unit through the first scheduling unit and storing the service data as a to-be-processed item in the information queue;
if the to-be-processed item corresponding to the service data is the to-be-processed item in the information queue, after the second scheduling unit receives a preset instruction, broadcasting the service data to each rule unit scheduled by the target second scheduling unit respectively, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel, wherein the to-be-processed item with the earliest storage time in the information queue.
Optionally, the decision device 3 further includes:
a deleting module, configured to delete the to-be-processed item corresponding to the service data from the information queue, so as to update the to-be-processed item in the information queue;
a returning module, configured to, if a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is received within a preset time period, or if any first processing result is not received after the preset time period, return the preset instruction to the second scheduling unit, where the preset instruction is used to instruct the target second scheduling unit to send the item to be sent to the scheduled rule unit when the item to be sent in the information queue is not empty.
Optionally, each rule unit is an Actor in an Actor model, and for each second scheduling unit, the rule unit corresponding to the second scheduling unit is deployed in the same physical thread of the terminal device.
Optionally, the decision device 3 further includes:
the sending module is used for sending test service data to the second scheduling unit through the first scheduling unit in a preset period, wherein the test service data is used for acquiring a test processing result of each rule unit scheduled by the second scheduling unit;
the recording module is used for recording the sending time of the test service data in each period, and recording the receiving time of the test processing result if the test processing result of the rule unit scheduled by any one second scheduling unit for the test service data in the period is received;
and the detection module is used for detecting the processing performance of each rule unit in the second scheduling unit and the second scheduling unit according to the sending time and the receiving time.
In the embodiment of the application, if a preset request is received, at least two target rule units are determined from at least two rule units according to key field information of service data carried by the preset request, so that the target rule units associated with the service data can be obtained by screening from the rule units according to the key field information of the service data, and the number of the rule units to be scheduled is reduced. Then, the service data is broadcasted to each target rule unit, so that each target rule unit processes the service data in parallel, and the processing speed of service data processing can be greatly increased compared with the prior art, so that after a target processing result of at least one of the two target rule units for the service data is obtained, a decision result for the preset request can be efficiently obtained according to the target processing result, and the decision efficiency is improved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: at least one processor 40 (only one shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the processor 40 implements the steps of any of the various decision method embodiments when the computer program 42 is executed.
The terminal device 4 may be a server, a mobile phone, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a desktop computer, a notebook, a desktop computer, a palmtop computer, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the terminal device 4, and does not constitute a limitation of the terminal device 4, and may include more or less components than those shown, or combine some of the components, or different components, such as may also include input devices, output devices, network access devices, etc. The input device may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of a fingerprint), a microphone, a camera, and the like, and the output device may include a display, a speaker, and the like.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the terminal device 4. Further, the memory 41 may include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The above-mentioned memory 41 may also be used to temporarily store data that has been output or is to be output.
In addition, although not shown, the terminal device 4 may further include a network connection module, such as a bluetooth module Wi-Fi module, a cellular network module, and the like, which is not described herein again.
In this embodiment of the application, when the processor 40 executes the computer program 42 to implement the steps in any of the decision method embodiments, if a preset request is received, at least two target rule units are determined from at least two rule units according to key field information of service data carried by the preset request, so that the target rule units associated with the service data can be obtained by screening from the rule units according to the key field information of the service data, and the number of the rule units to be scheduled is reduced. Then, the service data is broadcasted to each target rule unit, so that each target rule unit processes the service data in parallel, and the processing speed of service data processing can be greatly increased compared with the prior art, so that after a target processing result of at least one of the two target rule units for the service data is obtained, a decision result for the preset request can be efficiently obtained according to the target processing result, and the decision efficiency is improved.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or 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, devices or units, and may be in an electrical, mechanical 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.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of decision making, comprising:
if a preset request is received, determining at least two target rule units from at least two rule units according to key field information of service data carried by the preset request;
broadcasting the service data to each target rule unit so that each target rule unit processes the service data in parallel;
and if a target processing result of at least one target rule unit for the service data is obtained, a decision result for the preset request is obtained according to the target processing result.
2. The decision method according to claim 1, wherein before determining at least two target rule units from among at least two rule units according to key field information of service data carried in a preset request if the preset request is received, further comprising:
after at least two groups of preset rule information are obtained, translating the preset rule information for each group of preset rule information to obtain a subprogram corresponding to the preset rule information;
and respectively packaging each subprogram into different rule units.
3. The decision method according to claim 1 or 2, wherein the determining at least two target rule units from at least two rule units according to key field information of service data carried by a preset request if the preset request is received comprises:
if the first scheduling unit receives a preset request, determining at least one target second scheduling unit according to key field information of service data carried by the preset request, wherein each second scheduling unit is used for scheduling at least two rule units, the target second scheduling unit is a second scheduling unit with a corresponding identifier matched with the key field information, and the rule units scheduled by the target second scheduling unit comprise the target rule units;
the broadcasting the service data to each target rule unit so that each target rule unit processes the service data in parallel includes:
sending the service data to the target second scheduling unit through the first scheduling unit;
broadcasting the service data to each rule unit scheduled by the target second scheduling unit through the target second scheduling unit, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel;
if the target processing result of at least one target rule unit for the service data is obtained, obtaining a decision result for the preset request according to the target processing result includes:
if a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is obtained, screening out a first processing result associated with the preset request from the first processing result to serve as the target processing result;
and obtaining a decision result aiming at the preset request according to the target processing result.
4. The decision method according to claim 3, wherein the broadcasting, by the target second scheduling unit, the service data to the rule units scheduled by the target second scheduling unit, respectively, so that the rule units scheduled by the target second scheduling unit process the service data in parallel, comprises:
sending the service data to an information queue in the target second scheduling unit through the first scheduling unit and storing the service data as a to-be-processed item in the information queue;
if the to-be-processed item corresponding to the service data is the to-be-processed item in the information queue, after the second scheduling unit receives a preset instruction, broadcasting the service data to each rule unit scheduled by the target second scheduling unit respectively, so that each rule unit scheduled by the target second scheduling unit processes the service data in parallel, wherein the to-be-processed item with the earliest storage time in the information queue.
5. The decision method of claim 4, further comprising, after broadcasting the service data to each rule unit scheduled by the target second scheduling unit, respectively:
deleting the items to be processed corresponding to the service data from the information queue so as to update the items to be processed in the information queue;
if a first processing result of at least one rule unit scheduled by the target second scheduling unit for the service data is received within a preset time period, or if any first processing result is not received after the preset time period, returning the preset instruction to the second scheduling unit, where the preset instruction is used to instruct the target second scheduling unit to send the item to be sent to the scheduled rule unit when the item to be sent in the information queue is not empty.
6. The decision method according to claim 3, wherein each of the rule units is an Actor in an Actor model, and for each of the second scheduling units, the rule unit corresponding to the second scheduling unit is deployed in a same physical thread of a terminal device.
7. The decision method of claim 3, further comprising:
sending test service data to the second scheduling unit through the first scheduling unit at a preset period, wherein the test service data is used for acquiring a test processing result of each rule unit scheduled by the second scheduling unit;
for each period, recording the sending time of the test service data in the period, and if the test processing result of the rule unit scheduled by any one of the second scheduling units for the test service data of the period is received, recording the receiving time of the test processing result;
and detecting the processing performance of each rule unit in the second scheduling unit and the second scheduling unit according to the sending time and the receiving time.
8. A decision-making apparatus, comprising:
the determining module is used for determining at least two target rule units from at least two rule units according to key field information of service data carried by a preset request if the preset request is received;
the first processing module is used for broadcasting the service data to each target rule unit so that each target rule unit can process the service data in parallel;
and the second processing module is used for obtaining a decision result aiming at the preset request according to a target processing result if the target processing result aiming at the service data of at least one target rule unit is obtained.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the decision method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the decision method according to any one of claims 1 to 7.
CN202011337131.0A 2020-11-25 2020-11-25 Decision method, decision device and terminal equipment Active CN112348193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011337131.0A CN112348193B (en) 2020-11-25 2020-11-25 Decision method, decision device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011337131.0A CN112348193B (en) 2020-11-25 2020-11-25 Decision method, decision device and terminal equipment

Publications (2)

Publication Number Publication Date
CN112348193A true CN112348193A (en) 2021-02-09
CN112348193B CN112348193B (en) 2021-09-07

Family

ID=74364847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011337131.0A Active CN112348193B (en) 2020-11-25 2020-11-25 Decision method, decision device and terminal equipment

Country Status (1)

Country Link
CN (1) CN112348193B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396435A (en) * 2022-08-22 2022-11-25 平安壹钱包电子商务有限公司 Distributed service processing method and device and electronic equipment
CN115860737A (en) * 2022-11-30 2023-03-28 唯阜德(武汉)科技有限公司 A processing method, device and processing equipment for parking lot business

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707993A (en) * 2012-04-11 2012-10-03 招商银行股份有限公司 System and method for centralized processing of service
CN104123395A (en) * 2014-08-13 2014-10-29 北京赛科世纪数码科技有限公司 Decision making method and system based on big data
US20150088556A1 (en) * 2013-09-25 2015-03-26 State Farm Mutual Automobile Insurance Company Systems and methods for processing property insurance
US20160012541A1 (en) * 2014-07-11 2016-01-14 The Travelers Indemnity Company Systems and methods for business reclassification tiebreaking
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN110457277A (en) * 2019-08-19 2019-11-15 北京博睿宏远数据科技股份有限公司 Service process performance analysis method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707993A (en) * 2012-04-11 2012-10-03 招商银行股份有限公司 System and method for centralized processing of service
US20150088556A1 (en) * 2013-09-25 2015-03-26 State Farm Mutual Automobile Insurance Company Systems and methods for processing property insurance
US20160012541A1 (en) * 2014-07-11 2016-01-14 The Travelers Indemnity Company Systems and methods for business reclassification tiebreaking
CN104123395A (en) * 2014-08-13 2014-10-29 北京赛科世纪数码科技有限公司 Decision making method and system based on big data
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN110457277A (en) * 2019-08-19 2019-11-15 北京博睿宏远数据科技股份有限公司 Service process performance analysis method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396435A (en) * 2022-08-22 2022-11-25 平安壹钱包电子商务有限公司 Distributed service processing method and device and electronic equipment
CN115860737A (en) * 2022-11-30 2023-03-28 唯阜德(武汉)科技有限公司 A processing method, device and processing equipment for parking lot business

Also Published As

Publication number Publication date
CN112348193B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN110321958B (en) Training method of neural network model and video similarity determination method
CN112182098B (en) Information push method and information push server based on cloud computing and big data
CN112348193B (en) Decision method, decision device and terminal equipment
CN111104426B (en) Data query method and system
CN119312219B (en) Method for constructing hardware abstraction layer of chip platform
CN110598993B (en) Data processing method and device
CN110309848A (en) The method that off-line data and stream data real time fusion calculate
CN119477610B (en) Artificial intelligence-assisted trial methods, systems, equipment, storage media and products
US20110040887A1 (en) Processing of streaming data with a keyed join
CN111679919B (en) Data interaction method, device, equipment and storage medium
CN116820714A (en) Scheduling method, device, equipment and storage medium of computing equipment
CN117093619A (en) Rule engine processing method and device, electronic equipment and storage medium
CN112187890B (en) Information distribution method and blockchain financial cloud center based on cloud computing and big data
CN113010116A (en) Data processing method and device, terminal equipment and readable storage medium
CN110908958B (en) File processing method, device, terminal and storage medium
CN115269712A (en) User interest mining method and system combined with meta-universe interaction service
CN119474341A (en) Multimodal risk content identification method, device, system, and storage medium
CN112347201B (en) Information processing method, information processing device and terminal equipment
CN113064984A (en) Intention recognition method and device, electronic equipment and readable storage medium
CN111552827B (en) Labeling method and device, behavior willingness prediction model training method and device
CN116975118A (en) Data query method and device, electronic equipment and storage medium
CN112927004A (en) Information cloud computing analysis method and information push server for big data portrait
CN114584616B (en) Message pushing method and device, electronic equipment and storage medium
CN111222739A (en) Task allocation method and task allocation system of nuclear power station
CN114911939B (en) Hot spot mining method, hot spot mining device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant