A method, system and medium for selecting business personnel based on weight rules
By establishing rules and business databases when electing business personnel, and dynamically calculating priority and weight values, it solves the problems of complex calculation and time-consuming in the existing technology, realizes the matching of electors that responds quickly to changes in business data, and improves business value. .
Patent Information
- Application Number
- CN202410896875.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-05
AI Technical Summary
When the existing technology elects business personnel, the calculation process is complex, the calculation amount is large, and it takes a long time, and the rule changes are relatively slow, making it difficult to respond to changes in business data in real time.
By establishing a rule database and a business database, analyzing business rules and weight rules, dynamically calculating priority and weight values, integrating the historical records of electors and the latest election time, optimizing the sequence of electors, and realizing real-time updates of preprocessing results.
It improves the matching efficiency of election personnel, enhances business value, can quickly respond to changes in business data and weighting rules, and simplifies the election process.
Smart Images

Figure CN118427235B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method, system and medium for selecting business personnel based on weight rules. Background Art
[0002] In order to improve the company's business value or operational efficiency, it is necessary to reasonably allocate existing or newly entered important business resources and select the most suitable personnel for follow-up. There are usually the following ways to select personnel: 1. Manually designate personnel; 2. Perform fixed order average allocation or election allocation according to certain rules in a fixed election personnel sequence; 3. Dynamically set the election personnel sequence and personnel dynamic weight value according to the rules for election allocation; However, due to the characteristics of corporate business, the rules change relatively slowly, and the election personnel sequence is greatly affected by the company's organizational structure, the complexity of the election personnel scope rules and conditions, and the changes in personnel data. In the allocation process, all election personnel sequences that meet the conditions are calculated in real time, and the calculation process is complex, the calculation amount is large, and it takes a long time. Summary of the invention
[0003] The present invention elects the most suitable person by setting business rules and weight rules, integrating business rule priority, weight rule priority and dynamic weight values of all persons to be elected, historical rounds, most recent election time, person weights and election records.
[0004] The present invention provides a method for selecting business personnel based on weight rules, wherein the method comprises the following steps:
[0005] S1: Establish rule database and business database;
[0006] S2: parse the rule data ID through the rule database and query the business data information through the business database;
[0007] S3: parse the election personnel data range rule expression in the rule data ID through the business data information, and query all the election personnel information that meets the rule expression;
[0008] S4: query the weight rule preprocessing result data through the rule database according to the rule data ID;
[0009] S5: Compare the results of step S3 and step S4, and insert the data that meets the business data information condition into the weight rule preprocessing result data;
[0010] S6: Update the rule database.
[0011] Furthermore, the method further comprises the steps of:
[0012] S7: parsing the business rule expression in the business rule data information, obtaining the business rule with the highest priority according to the rule expression, and obtaining all weight rules in the business rule;
[0013] S8: parsing the weight rule obtained in step S7, and obtaining the weight rule with the highest priority according to the rule expression calculation;
[0014] S9: Obtain the weight rule with the highest priority according to step S8, and calculate the dynamic weight rule value;
[0015] S10: According to the weight rule with the highest priority obtained in step S8, the weight rule preprocessing result data is queried from the rule database, and the data sequence of all persons to be elected is obtained through the rule database;
[0016] S11: According to the data sequence of all persons to be elected in step 10, the election record data is obtained through the rule database;
[0017] S12: According to the weight rule value obtained in step S9 and the election record data obtained in step 11, the best candidate result is selected based on the election weight, election round, recent election time and candidate sequence, and the election history record is saved.
[0018] Further, the step S1 includes establishing a rule database for storing organizational structure data, election personnel data, weight rule data, weight rule preprocessing result data and election record data and establishing a business database for storing business data and business rule data;
[0019] Furthermore, the step S3 comprises:
[0020] (S3-1) Users create or change weight rules;
[0021] (S3-2) Parse the message queue message in the weight rule and obtain the weight rule ID;
[0022] (S3-3) querying rule data from a rule database according to the weight rule ID;
[0023] (S3-4) According to the election personnel range rule expression set in the rule, all election personnel who meet the weight rule are queried;
[0024] Furthermore, step S5 includes performing difference processing on the current weight rule preprocessing result data and the previous weight rule preprocessing result data, deleting unsatisfied voters from the weight rule preprocessing result data, inserting newly added voters into the weight rule preprocessing result data, and updating the weight rule preprocessing result data.
[0025] Furthermore, the priority of the election weight, election round, recent election time and personnel order election in step S12 is election weight > election round > personnel order election > recent election time, and the priority is reduced in sequence. The best person is comprehensively elected and the election history record is updated.
[0026] According to the second aspect of the embodiment of the present application, the present application also provides a business personnel election system based on weight rules, the improvement of which is that it includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor processes the computer program, it implements a business personnel election method based on weight rules as described.
[0027] According to the third aspect of the embodiment of the present application, the present application also provides a storage medium, which is improved in that an executable program is stored thereon, and when the executable program is called, the steps in the business personnel selection method based on weight rules are executed.
[0028] Beneficial effects:
[0029] In view of the fact that the business data change mode is not fixed, the present invention uses a message mechanism to realize the allocation of personnel election when the business data changes; pre-processing calculations are performed on the weight rules, and messages are sent when the weight rules change, and the rule data are called for pre-processing calculations. The rule pre-processing calculation results are saved in the rule database to improve the efficiency of personnel election matching.
[0030] The present invention obtains matching business rules through rule expression calculation according to business rule priority and business rule conditions, and obtains weight rule sequence; obtains matching sequences of all personnel to be elected through rule expression calculation according to weight rule priority and personnel rule; and elects suitable personnel based on personnel weights, personnel election historical rounds, personnel election recent time records, personnel weights and election records of all personnel sequences to be elected. The present invention maximizes the selection of the most suitable personnel for follow-up at the right time according to the business, thereby improving the business value.
[0031] It should be understood that the above general description and the following specific embodiments are only exemplary and illustrative and do not limit the scope of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flow chart of a method for selecting business personnel based on weight rules according to the present invention;
[0033] Figure 2 The figure is a schematic diagram of weight rules in a method for selecting business personnel based on weight rules according to the present invention.
[0034] It should be understood that the drawings are not necessarily drawn to scale, presenting somewhat simplified representations of various features illustrative of the basic principles of the present disclosure. The specific design features of the present invention as disclosed herein, including, for example, specific dimensions, orientations, locations, and shapes will be determined in part by the particular intended application and use environment.
[0035] In the drawings, reference numbers refer to the same or equivalent parts of the present invention throughout the several figures of the drawing. DETAILED DESCRIPTION
[0036] Reference will now be made in detail to various embodiments of the present invention, examples of which are illustrated in the accompanying drawings and described below. Although the present invention will be described in conjunction with exemplary embodiments of the present invention, it should be understood that this specification is not intended to limit the present invention to those exemplary embodiments. On the other hand, the present invention is intended to cover not only the exemplary embodiments of the present invention, but also various alternatives, modifiers, equivalents and other embodiments, which may be included in the spirit and scope of the present invention as defined by the appended claims.
[0037] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The specific structures and functions described in the exemplary embodiments of the present invention are for illustrative purposes only. Embodiments according to the concepts of the present invention can be implemented in various forms, and it should be understood that they should not be interpreted as being limited to the exemplary embodiments described in the exemplary embodiments, but include all modifications, equivalents or substitutes included in the spirit and scope of the present invention.
[0038] Throughout the specification, the professional terms used herein are only for describing various exemplary embodiments and are not intended to be limiting. It will be further understood that the terms "include", "comprising", "having", etc., when used in the exemplary embodiments, specifically refer to the presence of the stated parts, steps, operations or elements, but do not exclude the presence or addition of one or more other parts, steps, operations or elements.
[0039] The present invention pre-processes the weighted election rules and election personnel rules in the weighted rule definition, calculates the election personnel sequence results in advance, and saves them into the rule database for use in the data allocation and acquisition of all election personnel sequence processes.
[0040] like Figure 1 As shown, the present invention provides a method for selecting business personnel based on weight rules, characterized in that the method comprises:
[0041] S1: Establish rule database and business database;
[0042] S2: parse the rule data ID through the rule database and query the business data information through the business database;
[0043] S3: According to the business data information retrieved in step S2, the election personnel data range rule expression in the rule data ID is parsed to retrieve all the election personnel information that meets the rule expression;
[0044] S4: query all weight rule preprocessing result data before the rule change through the rule database according to the rule data ID;
[0045] S5: Compare the results of step S3 and step S4, insert the newly added data that meets the business data information condition into the weight rule preprocessing result data; delete the data that does not meet the condition and is already in the weight rule preprocessing result data and delete it in the election record data;
[0046] S6: Update the rule database; in order to prevent conflicts in the calculation results of business rules, generate new weight rule preprocessing result data for use in rule matching.
[0047] In the above technical solution, the method further comprises:
[0048] S7: Parse the business rule expression in the business rule data information (such as: data status = normal, region = region A, data level = important), calculate the business rule with the highest priority according to the rule expression, and obtain all weight rules in the business rule; wherein the business rule is the rule set by the enterprise according to its own business.
[0049] S8: parsing the weight rule obtained in step S7, and obtaining the weight rule with the highest priority according to the rule expression calculation;
[0050] S9: According to step S8, the weight rule with the highest priority (such as personnel object, weight or personnel object, weight allocation object, weight) is obtained, and a dynamic weight rule value is calculated (the field value on the personnel object or the field value of other objects associated with the personnel object search supported in the calculation rule expression);
[0051] S10: According to the weight rule with the highest priority obtained in step S8, the weight rule preprocessing result data is queried from the rule database, and the data sequence of all persons to be elected is obtained through the rule database;
[0052] S11: According to the data sequence of all candidates to be elected in step 10, the election record data (recording the latest election time, election round, electable weight ratio, and order) is obtained through the rule database;
[0053] S12: According to the weight rule value obtained in step S9 and the election record data obtained in step 11, the best candidate result is selected based on the election weight, election round, recent election time and candidate sequence, and the election history record is saved.
[0054] In the above technical solution, the step S1 includes establishing a rule database for storing organizational structure data, election personnel data, weight rule data, weight rule preprocessing result data and election record data and establishing a business database for storing business data and business rule data;
[0055] In the above technical solution, when the business rule data is changed, the business database provides the function of maintaining the business data, and sends a data change message after the data is successfully changed;
[0056] When a weight rule is changed, the rule database provides the function of maintaining the weight rule. After the weight rule is successfully changed, a rule change message will be sent;
[0057] The present invention performs different calculations on data change messages or rule change messages;
[0058] The present invention stores data change information and rule change messages, and calculates election results after the data change messages are generated; performs preprocessing calculations on weight rules after the rule change messages are generated, and generates weight rule preprocessing result data.
[0059] In the above technical solution, step S3 comprises:
[0060] (S3-1) Users create or change weight rules;
[0061] (S3-2) Parse the message queue message in the weight rule and obtain the weight rule ID;
[0062] (S3-3) querying rule data from a rule database according to the weight rule ID;
[0063] (S3-4) According to the election personnel range rule expression set in the rule (such as: employee level = junior, employment time > 3 months, status = normal), query all election personnel who meet the weight rule;
[0064] (S3-5) Query the data record of the weight rule preprocessing result of the last rule change;
[0065] (S3-6) Perform difference processing on the current weight rule preprocessing result and the previous weight rule preprocessing result, delete the unsatisfied personnel from the weight rule preprocessing result, insert the newly added personnel into the weight rule preprocessing result, and update the weight rule preprocessing result data.
[0066] In the above technical solution, step S5 includes performing difference processing on the current weight rule preprocessing result data and the previous weight rule preprocessing result data, deleting unsatisfied voters from the weight rule preprocessing result data, inserting newly added voters into the weight rule preprocessing result data, and updating the weight rule preprocessing result data.
[0067] In the above technical solution, the priority of the election weight, election round, recent election time and personnel order election in step S12 is election weight > election round > personnel order election > recent election time, and the priority is reduced in sequence. The best person is comprehensively elected and the election history record is updated.
[0068] Example 1
[0069] S-1 When an enterprise adds or modifies rules and rule personnel weight rules, changes the enterprise personnel organizational structure, or changes personnel object data, a change message is sent to the message queue;
[0070] The S-2 message queue receives the message and parses the rule data ID in the message;
[0071] S-3 performs calculations:
[0072] S-3-1. According to the rule data ID, query the rule table to obtain the rule data; for example: ruleA;
[0073] S-3-2. Obtain all personnel weight rules according to the rules queried in S-3-1; for example: personnel weight rules Member-Id1, Member-Id2, Member-Id3 under ruleA;
[0074] S-3-3. According to the conditions in the personnel weight rule expression in S-3-2 and the data in the personnel table, calculate all personnel data that meet the conditions to obtain R1, such as: person-1d1, person-1d3, person-1d10;
[0075] S-3-4. Query the weight rule calculation result table to obtain R2, and compare the difference with the calculation result R1 in S-3-3. According to the data that does not exist in R1 but exists in R2, the result set R3 is obtained; delete R3 from the weight rule calculation result table and save R1 to the weight rule calculation result table;
[0076] S-3-5. Delete the allocation record data corresponding to the allocation history table according to the R3 data set deleted in S-3-4;
[0077] In order to prevent conflicts in business rule calculation results, a new calculation version number is generated, and the corresponding version numbers in the rule table, personnel weight rule table, and weight rule calculation result table are updated.
[0078] Example 2
[0079] S-1 Enterprises add or modify business data that needs to be weighted and send data change messages to the message queue;
[0080] The S-2 message queue receives the message, parses the business data ID in the message, and queries the corresponding data from the business database;
[0081] S-3 queries all weight rule data from the rule database, for example: ruleA, ruleB, ruleC;
[0082] S-4 calculates the weight rules that the matching data satisfies based on the data range conditions in the weight rules in S-3; for example:
[0083] Data A: {"F1":"Region A","F2":"v2"};
[0084] Rule A is:
[0085] ["priority":"1",{"filters":[{"operator":"LIKE","connector":"AND","field_name":"F1","field_values" :["Region A"]},{"operator":"IN","connector":"AND","field_name":"F2","field_values":["v1","v2","v3"]}],
[0086] "connector":"OR"}];
[0087] The rule C is:
[0088] ["priority":"3",{"operator":"IN","connector":"AND","field_name":"F2","field_values":["v1","v2","v3"]}],"connector":"OR"}]; From the rule definition, data A satisfies both ruleA and ruleC, but ruleA has a higher priority, so ruleA is finally selected;
[0089] S-5 queries all personnel weight rules corresponding to the rules selected in S-4 and calculates the optimal elector;
[0090] The calculation steps are as follows:
[0091] S-5-1. According to the personnel weight rule, query all weight calculation result sets corresponding to the personnel weight rule from the weight calculation results; for example:
[0092] [{"Member-Id2","person-1d1","20"},{"Member-Id2","person-1d3","20"},{"Member-Id1","person-1d1","10"}];
[0093] S-5-2. According to the personnel weight rule, query the personnel allocation history record table result set from the allocation history record table; for example: [{"Member-Id2","person-1d1","2014-2-0813:00","2","20"},{"Member-Id1","person-1d3","2014-3-1009:05","1","5"}];
[0094] S-5-3. According to the personnel weight rules and historical distribution information in S-5-1 and S-5-2, the best election personnel are determined in descending order of weight, election round, and most recent election time. The calculation formula is as follows:
[0095] Optimal Person=argmax p ∈Candidates(∑ r ∈Weight Rules wr ⋅ vr ( p ));
[0096] in:
[0097] Optimal Person is the optimal person selected based on calculation;
[0098] Candidates is the collection of all candidates to be elected;
[0099] wr It is the weight rule r The weight value is obtained according to S-5-1;
[0100] vr ( p ) is based on the weight rule r For candidates p The evaluation value depends on p The properties of are derived from S-5-2 (weight value, round, last election time, etc.);
[0101] argmax means choosing the person that maximizes the expression.
[0102] In an exemplary embodiment, based on a weighted rule-based business personnel election method provided in an embodiment of the present application, an embodiment of the present application further provides a weighted rule-based business personnel election system, which includes a memory and a processor coupled to the memory, and the processor is configured to execute a weighted rule-based business personnel election method in any embodiment of the present application based on instructions stored in the memory. The memory may be a system memory or a fixed non-volatile storage medium, etc., and the system memory may store an operating system, an application program, a boot loader, a database, and other programs.
[0103] It should be noted that the above embodiment provides a business personnel election system based on weight rules and a business personnel election method embodiment based on weight rules, which belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0104] In an exemplary embodiment, the embodiment of the present application also provides a computer storage medium, which is a computer-readable storage medium, for example, a memory including a computer program, and the above-mentioned computer program can be executed by a processor to complete a business personnel selection method based on weight rules in any embodiment of the present application.
[0105] The above-mentioned embodiments of the present application can be implemented in various hardware, software coding or a combination of the two. For example, the embodiments of the present application can also represent the program code for executing the above-mentioned method in a data signal processor. The present application can also relate to the various functions performed by a computer processor, a digital signal processor, a microprocessor or a field programmable gate array. The above-mentioned processor can be configured according to the present application to perform specific tasks, which are completed by executing machine-readable software code or firmware code that defines the specific method disclosed by the present application. The software code or firmware code development can represent different programming languages and different formats or forms. Different target platform compiled software codes can also be represented. However, the different code styles, types and languages of the software code for performing tasks according to the present application and other types of configuration codes do not depart from the spirit and scope of the present application.
[0106] The foregoing description of specific exemplary embodiments of the present invention has been presented for the purpose of illustration and description. It is not intended to exclude or limit the present invention to the precise form disclosed, and it is obvious that many modifications and changes are feasible in view of the above teachings. Exemplary embodiments are selected and described to explain certain principles of the present invention and their practical application, so that other technicians in the field can make or use various exemplary embodiments of the present invention, and various alternatives and modifications thereof. It is intended that the scope of the present invention will be defined by the claims attached hereto and their equivalents.
[0107] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for selecting business personnel based on weight rules, characterized in that: The method comprises S1: Establish rule database and business database; The step S1 includes establishing a rule database for storing organizational structure data, election personnel data, weight rule data, weight rule preprocessing result data and election record data, and establishing a business database for storing business data and business rule data; S2: parse the rule data ID through the rule database and query the business data information through the business database; S3: parse the election personnel data range rule expression in the rule data ID through the business data information, and query all the election personnel information that meets the rule expression; (S3-1) Users create or change weight rules; (S3-2) Parse the message queue message in the weight rule and obtain the weight rule ID; (S3-3) querying rule data from a rule database according to the weight rule ID; (S3-4) According to the election personnel range rule expression set in the rule, all election personnel who meet the weight rule are queried; S4: query the weight rule preprocessing result data through the rule database according to the rule data ID; S5: Compare the results of step S3 and step S4, and insert the data that meets the business data information condition into the weight rule preprocessing result data; The step S5 includes performing difference processing on the current weight rule preprocessing result data and the previous weight rule preprocessing result data, deleting the unsatisfied electors from the weight rule preprocessing result data, inserting the newly added electors into the weight rule preprocessing result data, and updating the weight rule preprocessing result data; S6: Update the rule database; S7: parsing the business rule expression in the business rule data information, obtaining the business rule with the highest priority according to the rule expression, and obtaining all weight rules in the business rule; S8: parsing the weight rule obtained in step S7, and obtaining the weight rule with the highest priority according to the rule expression calculation; S9: Obtain the weight rule with the highest priority according to step S8, and calculate the dynamic weight rule value; S10: According to the weight rule with the highest priority obtained in step S8, the weight rule preprocessing result data is queried from the rule database, and the data sequence of all persons to be elected is obtained through the rule database; S11: According to the data sequence of all persons to be elected in step 10, the election record data is obtained through the rule database; S12: According to the weight rule value obtained in step S9 and the election record data obtained in step 11, the best candidate result is selected by comprehensively considering the election weight, election round, recent election time and candidate sequence, and the election history record is saved; The priorities of the election weight, election round, recent election time and personnel order election in step S12 are election weight > election round > personnel order election > recent election time, and the priority is reduced in sequence. The best person is comprehensively elected and the election history record is updated.
2. A business personnel election system based on weight rules, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor. When the processor processes the computer program, the method for selecting business personnel based on weight rules as described in claim 1 is implemented.
3. A storage medium, characterized in that: An executable program is stored thereon, and when the executable program is called, the steps in the method for selecting business personnel based on weight rules as described in claim 1 are executed.
