CN113760297A - Strategic shift method, system, computer equipment and medium - Google Patents

Strategic shift method, system, computer equipment and medium Download PDF

Info

Publication number
CN113760297A
CN113760297A CN202111030849.XA CN202111030849A CN113760297A CN 113760297 A CN113760297 A CN 113760297A CN 202111030849 A CN202111030849 A CN 202111030849A CN 113760297 A CN113760297 A CN 113760297A
Authority
CN
China
Prior art keywords
shift
strategy
sub
policy
order
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.)
Pending
Application number
CN202111030849.XA
Other languages
Chinese (zh)
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.)
Beijing Siming Qichuang Technology Co ltd
Original Assignee
Beijing Siming Qichuang Technology 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 Beijing Siming Qichuang Technology Co ltd filed Critical Beijing Siming Qichuang Technology Co ltd
Priority to CN202111030849.XA priority Critical patent/CN113760297A/en
Publication of CN113760297A publication Critical patent/CN113760297A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a strategic shift method, a strategic shift system, computer equipment and a medium, wherein the shift method comprises the following steps: acquiring a shift request; determining order context information according to the shift request; determining at least one shift strategy configuration list according to a preset strategy routing rule and order context information; analyzing the at least one shift-dividing strategy configuration list, and determining at least one shift-dividing strategy execution list, wherein the at least one shift-dividing strategy execution list corresponds to the at least one shift-dividing strategy configuration list one to one; and performing the shift according to at least one shift strategy execution list until a shift result is obtained. The invention realizes the decoupling of the shift strategy selection and the shift strategy execution through the strategy routing mode, expands the shift rule through the strategy combination, is beneficial to reducing the development and test cost of the shift system, and improves the flexibility and the shift efficiency of the shift system.

Description

Strategic shift method, system, computer equipment and medium
Technical Field
The invention relates to the technical field of computers, in particular to a strategic scheduling method, a strategic scheduling system, computer equipment and a medium.
Background
With the development of internet technology and the popularization of intelligent electronic products, internet-based online education is rapidly developed, and when network education is performed, shifts are required according to individual levels and demand differences of students.
In the prior art, a complete shift function is developed for a shift system, and different code blocks are run according to different branches of the shift service logic. In the shift-dividing system, a front-end page is provided, different parameters are configured for different enrollment scholars, when a shift-dividing request is received, the enrollment scholars are inquired, the configuration parameters are acquired through the shift-dividing scholars, and the shift-dividing function executes the shift division.
The existing shift system adopts a fixed shift function, and has the following problems:
firstly, parameters need to be configured on the same front-end page aiming at different modes of different service scenes, so that the program logic is complex, the correlation between the parameters is unclear, and the shift result deviation is easily caused;
secondly, the parameters of the function can only be configured on the enrollment schdule, the parameters need to be configured repeatedly for each schdule, the parameter configuration can only be carried out through the enrollment schdule, and only fixed parameters can be used for operating the shift function, so that the flexibility is poor;
thirdly, when a shift service scene is expanded, the shift function codes need to be modified integrally, when new judgment codes and execution logics are added, the operation of old logics is easily influenced, the support of newly added logics is slow, and the development and test time is long.
Disclosure of Invention
The invention provides a strategic shift method, which realizes the decoupling of shift strategy selection and shift strategy execution through a strategy routing mode, expands a service scene through strategy combination and is beneficial to reducing the development cost of a shift system.
In a first aspect, an embodiment of the present invention provides a strategic scheduling method, including the following steps:
acquiring a shift request;
determining order context information according to the shift request;
determining at least one shift strategy configuration list according to a preset strategy routing rule and the order context information;
analyzing the at least one shift strategy configuration list, and determining at least one shift strategy execution list, wherein the at least one shift strategy execution list corresponds to the at least one shift strategy configuration list in a one-to-one manner;
and performing the shift according to the at least one shift strategy execution list until a shift result is obtained.
Optionally, the preset policy routing rule includes a preset policy formula, where the preset policy formula includes at least one logic judgment sub-formula and a shift policy configuration list corresponding to the logic judgment sub-formula one to one; and the preset policy routing rule is used for substituting the order context information into the at least one logic judgment sub-formula and determining at least one shift policy configuration list according to a judgment result.
Optionally, the substituting the order context information into the at least one logic judgment sub-formula and determining at least one shift-dividing policy configuration list according to a judgment result includes the following steps: obtaining at least one order attribute in the order context information; judging whether the order attributes are matched with preset order attributes in the logic judgment sub-formula or not; and determining the shift-dividing strategy configuration list according to the judgment result.
Optionally, the shift strategy configuration list includes at least one shift sub-strategy configuration parameter, and the shift sub-strategy configuration parameter is used for determining a shift sub-strategy;
the class-dividing strategy execution list comprises at least one class-dividing sub-strategy executor, and the class-dividing sub-strategy executor corresponds to the class-dividing sub-strategy configuration parameters one to one.
Optionally, the shift sub-policy includes: any one of a joint branch sub-policy, a hierarchical in-shift sub-policy, a go-to sub-policy, a base branch sub-policy, a delay sub-policy, a wait sub-policy, a block sub-policy, a filter sub-policy, or an alert sub-policy.
Optionally, the determining order context information according to the shift request includes the following steps:
establishing an order context mapping table based on the order requirement expansion field;
acquiring order data of the shift request;
and performing table lookup on the order context mapping table according to the order data, and determining the order context information according to a table lookup result.
Optionally, the performing the shift according to the at least one shift strategy execution list until a shift result is obtained includes the following steps:
sequentially calling the sub-class strategy executors in the class-dividing strategy execution list to operate the class-dividing function;
obtaining an operation result of the shift function, wherein the operation result comprises any one of a matching return value, a blocking return value or a releasing return value;
determining the class of the shift according to the matching return value;
or, according to the blocking return value, waiting and obtaining the next shift request are executed;
or calling the next shift sub-strategy executor in the shift strategy execution list to operate the shift function according to the release return value.
In a second aspect, an embodiment of the present invention further provides a strategic shift system, including:
the instruction receiving unit is used for acquiring a shift request;
the order analysis unit is used for determining order context information according to the shift request;
the policy routing unit is used for determining at least one shift-dividing policy configuration list according to a preset policy routing rule and the order context information;
the strategy analysis unit is used for analyzing the at least one shift-dividing strategy configuration list and determining at least one shift-dividing strategy execution list, and the at least one shift-dividing strategy execution list is in one-to-one correspondence with the at least one shift-dividing strategy configuration list;
and the strategy execution unit is used for performing shift division according to the at least one shift division strategy execution list until a shift division result is obtained.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the above-mentioned strategic scheduling method when executing the program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above-mentioned strategic scheduling method.
The strategic shift system, the computer equipment and the medium provided by the embodiment of the invention execute the strategic shift method, the method determines order context information through a shift request, and determines at least one shift strategy configuration list according to a preset strategy routing rule and the order context information; the method comprises the steps of analyzing at least one shift strategy configuration list, determining at least one shift strategy execution list, performing shift according to the at least one shift strategy execution list until a shift result is obtained, achieving decoupling of shift strategy selection and shift strategy execution through a strategy routing mode, solving the problems of poor compatibility and high development cost of the existing shift system, expanding shift rules through strategy combination, being beneficial to reducing shift system development and test cost, and improving shift system flexibility and shift efficiency.
Drawings
Fig. 1 is a flowchart of a strategic scheduling method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another strategic scheduling method provided by the first embodiment of the invention;
FIG. 3 is a flow chart of another strategic scheduling method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a strategic shift system according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a strategic shift method according to an embodiment of the present invention, where the embodiment is applicable to an application scenario where a shift rule is established based on a strategic mode, and the method may be executed by a specific shift system and a function module, and specifically includes the following steps:
step S1: and acquiring a shift request.
The shift request refers to a request instruction sent to the shift system after the user buys a class, and the shift system can give a specific shift result according to each shift request.
Optionally, the shift request may be issued to the shift system by any one of the client, the institution end or the teacher end, which is not limited in this respect.
Illustratively, the shift request may be instruction code including an order number.
Step S2: and determining order context information according to the shift request.
The order context information, or context information, includes the schooling date and order attribute associated with the shift, and the order context information can be used to provide an access path for the shift system to the order attribute, through which the shift system can access specific data in the order context.
In this step, each shift request corresponds to a shift order number one to one, and after receiving the shift request, the shift system can obtain an access path of the order attribute by loading the order number, and query the order context information attribute through the access path. Typically, the order context information includes order attribute information such as order source, order subject, order price, etc.
Illustratively, the order property access path may be "root.
Step S3: and determining at least one shift strategy configuration list according to a preset strategy routing rule and the order context information.
The shift distribution system selects order attributes in the order context information to carry out logic judgment by operating the preset strategy routing rule, and matches the specific shift distribution strategy configuration list.
Alternatively, the shift strategy configuration lists may be in the form of lists, for example, each shift strategy configuration list may be represented by "[ ]", and the different shift strategy configuration lists may be separated by a line feed symbol. Each sub-class strategy configuration list comprises at least one sub-class strategy configuration parameter, each sub-class strategy configuration parameter forms one element of the sub-class strategy configuration list, one sub-class strategy configuration parameter can be identified by adopting double quotation marks, each element is used and separated, and the sub-class strategy configuration parameters are used for determining the unique sub-class strategy, wherein each sub-class strategy independently solves a target problem in a one-to-one correspondence mode, and for example, the target problem can be any one of waiting, delaying, blocking, grading or filtering.
Illustratively, the defined class division policy configuration list includes three class division sub-policy configuration parameters, and the class division policy configuration list may have the following structure:
"first class sub-policy name (configuration parameter)", "second class sub-policy name (configuration parameter)", "third class sub-policy name (configuration parameter)" ].
In this step, the combination of different sub-class strategies can be realized by adjusting the preset strategy routing rule.
Step S4: and analyzing the at least one shift-dividing strategy configuration list, and determining the at least one shift-dividing strategy execution list, wherein the at least one shift-dividing strategy execution list corresponds to the at least one shift-dividing strategy configuration list one to one.
The executive list of the shift-dividing strategy is used for defining an executor for realizing the shift-dividing strategy.
Optionally, the shift strategy execution list includes at least one shift sub-strategy executor, and the shift sub-strategy executors correspond to the shift sub-strategy configuration parameters one to one.
In this step, the strategy factory may be adopted to analyze the shift strategy configuration list, create an executor of the shift sub-strategy, and then the shift function executes the shift sub-strategy according to the shift strategy execution list, thereby implementing decoupling between strategy selection and strategy implementation.
Step S5: and performing the shift according to at least one shift strategy execution list until a shift result is obtained.
The executive persons of the sub-class strategies in the class-dividing strategy executive list can queue up to generate an executive person queue, and class-dividing functions (including source codes) are called one by using the executive person queue to carry out class division when class division is carried out.
In this step, the shift result may be any one of a shift class, a block, or a release.
Specifically, the preset policy routing rule may be configured according to the shift-dividing service requirement, and after receiving the shift-dividing request, the shift system inquires corresponding order context information according to the order number in the shift request, the shift system runs a preset strategy routing rule to match the order attributes in the order context information with a specific shift strategy configuration list, if a plurality of order attributes in the order context information are selected, the preset strategy routing rule can obtain a plurality of shift strategy configuration lists through the selected order attribute matching, each shift strategy configuration list is sent to the strategy factory, the strategy factory is adopted to create shift sub-strategy executors according to shift sub-strategy configuration parameters in the shift strategy configuration lists, the executors of the shift sub-strategies in each shift strategy configuration list can queue to generate an executor queue, and the executor queue is sequentially called by using a shift function to carry out shift. When the shift system shifts, the selection of the shift sub-strategy is not realized in the code, the execution of the shift sub-strategy is only realized in the code, the order context and the shift strategy do not generate a direct causal relationship in the code, the decoupling of the shift strategy selection and the shift strategy execution is realized through a strategy routing mode, the problems of poor compatibility and high development cost of the conventional shift system are solved, the shift rule is expanded through strategy combination, the development and test cost of the shift system is favorably reduced, and the flexibility and the shift efficiency of the shift system are improved.
Optionally, the preset policy routing rule includes a preset policy formula, and the preset policy formula includes at least one logic judgment sub-formula and a shift policy configuration list corresponding to the logic judgment sub-formula one to one; the preset strategy routing rule is used for substituting the order context information into at least one logic judgment sub-formula, and determining at least one shift strategy configuration list according to the judgment result of the logic judgment sub-formula.
The preset strategy formula is used for defining a logic corresponding relation between a logic judgment sub-formula and a shift strategy configuration list and a combined relation of a plurality of logic judgment sub-formulas, wherein each logic judgment sub-formula can correspond to a specific shift service scene, and each shift strategy configuration list can be combined with different shift sub-strategies. Typically, a shift business scenario may include: according to the class of the school date, the source of the order, the price of the order, the subject of the order, etc.
Specifically, a preset policy formula can be specified according to the shift service scenario, a plurality of sequentially executed logic judgment sub-formulas are set in the preset policy formula, a group of shift sub-policies are defined in each logic judgment sub-formula, when the preset policy routing rule substitutes the order context information into the preset policy formula, a group of shift sub-policies matched with the order context information are determined by sequentially executing the logic judgment sub-formulas, the group of shift sub-policies form a shift policy configuration list, and different shift sub-policies are combined, so that shift service scenarios can be performed on different shift service scenarios without modifying program source codes.
Optionally, the preset policy formula may include a first logic judgment sub-formula, a first shift policy configuration list corresponding to and matching the first logic judgment sub-formula, a second shift policy configuration list corresponding to and matching the second logic judgment sub-formula, a third shift policy configuration list corresponding to and matching the third logic judgment sub-formula, and a bottom-of-the-pocket shift policy configuration list, and the preset policy formula may adopt the following format:
if the order context information meets the judgment condition of the first logic judgment sub-formula, returning to a first shift strategy configuration list;
if the order context information meets the judgment condition of the second logic judgment sub-formula, returning to a second shift strategy configuration list;
if the order context information meets the judgment condition of the third logic judgment sub-formula, returning to a third shift strategy configuration list;
and if the conditions are not met, returning to the bottom-of-the-bag shift-dividing strategy configuration list.
The specific sub-shift strategies in the first shift strategy configuration list, the second shift strategy configuration list, the third shift strategy configuration list and the bottom shift strategy configuration list can be adjusted according to the actual shift service requirement, and the adjustment is not limited to this.
Optionally, substituting the order context information into at least one logic judgment sub-formula, and determining at least one shift strategy configuration list according to a judgment result of the logic judgment sub-formula, including the following steps: obtaining at least one order attribute in the order context information; judging whether the order attributes are matched with the preset order attributes in the logic judgment sub-formula or not; and determining a shift strategy configuration list according to the judgment result.
Each logic judgment sub-formula corresponds to a preset order attribute, the preset order attributes include but are not limited to a preset order schooling period, a preset order source, a preset order price and a preset order subject, and the logic judgment sub-formula matches the preset order attributes through the order attributes in the order context information to realize the shift-dividing strategy selection.
Specifically, the order context information includes a plurality of order attributes, one or more order attributes can be selected according to a preset policy routing rule set according to the shift service requirement, a logic judgment sub-formula in the preset policy formula is sequentially executed, whether the order attributes in the order context information are matched with the preset order attributes in the executed logic judgment sub-formula is judged, if the order attributes are successfully matched with the preset order attributes, the current order attributes are judged to meet the judgment condition of the currently executed logic judgment sub-formula, and a shift policy configuration list corresponding to the currently executed logic judgment sub-formula is returned; and if the order attributes are successfully matched with the preset order attributes, judging that the current order attributes do not meet the judgment conditions of the currently executed logic judgment sub-formula, and selecting the next order attributes to execute the next logic judgment sub-formula until a shift result is obtained.
It should be noted that, the preset policy formula may define different sub-class policy combinations for different sub-class service scenarios by adjusting the logic judgment sub-formula and the sub-class sub-policy defined by the corresponding sub-class policy configuration list, which is not specifically limited in this respect.
Therefore, the invention divides the shift function into independent shift sub-strategies, and carries out different combinations on the shift sub-strategies to realize the extension of the shift rule when executing the shift program, thereby being beneficial to improving the flexibility and the shift efficiency of the shift system.
Optionally, fig. 2 is a flowchart of another strategic shift method provided in the first embodiment of the present invention, and on the basis of fig. 1, a specific implementation of determining an order context is exemplarily shown, but not limited to the method.
Referring to fig. 2, determining order context information according to a shift request includes the following steps:
step S201: an order context mapping table is established based on the order requirement extension field.
Optionally, the order requirement extension field may adopt a MAP data structure, and the MAP data structure stores a mapping relationship between preset order data and an order context information access path in a key-value pair manner, where the preset order data includes a preset order number.
Step S202: and acquiring order data in the shift request.
Wherein the order data includes an order number.
Step S203: and looking up the order context mapping table according to the order data, and determining order context information according to the table look-up result.
Specifically, after receiving a shift request, the shift system loads order data by identifying the shift request, compares the order data with preset order data in an order context mapping table, and determines an access path corresponding to the preset order data in the order context mapping table, which is the same as current order data, as a final access path.
Optionally, fig. 3 is a flowchart of another strategic shift scheduling method provided in an embodiment of the present invention, and on the basis of fig. 1, a specific implementation manner of performing shift scheduling according to a shift scheduling policy execution list is exemplarily shown, without limitation to the specific method in step S5 described above.
Referring to fig. 3, the strategic shift method specifically includes the following steps:
step S1: and acquiring a shift request.
Step S2: and determining order context information according to the shift request.
Step S3: and determining at least one shift strategy configuration list according to a preset strategy routing rule and the order context information.
Step S4: and analyzing the at least one shift-dividing strategy configuration list, and determining the at least one shift-dividing strategy execution list, wherein the at least one shift-dividing strategy execution list corresponds to the at least one shift-dividing strategy configuration list one to one.
Step S501: and sequentially calling the sub-class strategy executors in the class-dividing strategy execution list to operate the class-dividing function.
Each shift strategy execution list comprises one or more shift sub-strategy executors, the shift sub-strategy executors access order context information when executing corresponding shift sub-strategies, and when capturing the context information required by executing the current shift sub-strategies, the shift function gives an operation result, wherein the operation result is the strategy behavior corresponding to the shift sub-strategies.
Step S502: and acquiring the operation result of the shift-dividing function, wherein the operation result comprises any one of a matching return value, a blocking return value or a releasing return value.
If the function operation result is the matching return value, executing step S503; if the function operation result is the blocking return value, executing step S504; if the function operation result is the release return value, step S505 is executed.
Step S503: and determining the class of the shift according to the matched return value.
Step S504: and waiting and acquiring the next shift request according to the blocking return value.
Step S505: and releasing the shift permission according to the release return value, returning to the execution step S501, and calling a next shift sub-strategy executor in the shift strategy execution list to operate a shift function.
In this embodiment, it may be defined through the interface that each shift sub-policy only receives order context information, and each shift sub-policy only returns a specific policy operation result.
Illustratively, the matching return value can be defined as a positive integer, the blocking return value is 0, the releasing return value is-1, and if the operation result of the function is a positive integer, it represents that the current sub-class strategy matches the class that can be entered; if the operation result of the function is 0, the current shift sub-strategy is blocked, namely, the shift cannot be temporarily allocated, and after waiting for a certain time, the current shift sub-strategy is operated again for shift; and if the operation result of the function is-1, releasing the current shift sub-strategy, namely the current shift sub-strategy cannot process the current shift request and hands over to the next shift sub-strategy for shift.
Specifically, after receiving a shift request, a shift system inquires corresponding order context information according to an order number in the shift request, the shift system runs a preset strategy routing rule to match a specific shift strategy configuration list with order attributes in the order context information, then the shift strategy configuration list is delivered to a strategy factory, an executable shift strategy execution list is created, different shift sub-strategies are combined in each shift strategy execution list, a shift program calls and executes each shift sub-strategy executor to run a shift function in sequence, and if an operation result returned by the shift function is a positive integer, the returned positive integer is determined to be an allocated shift ID, and shift is completed; if the operation result returned by the shift-dividing function is '0' (namely blocking), pausing the shift-dividing, waiting for the next shift-dividing request, and still operating the shift-dividing function by the current shift-dividing sub strategy after receiving the next shift-dividing request; and if the operation result returned by the shift distributing function is '-1' (namely release), executing the shift distributing by the next shift distributing sub-strategy according to the current shift distributing request. And repeating the steps until the class ID is blocked or obtained, and expanding the shift flexibility by combining the existing shift strategies.
Alternatively, if the last shift sub-policy executor runs the shift function back with a "1" (i.e., release) result, the shift request sender is notified that "this shift request was not processed by me".
Optionally, the sub-class sub-strategy includes but is not limited to: any one of a joint shift sub-strategy, a hierarchical shift-in sub-strategy, a reach sub-strategy, a basic shift sub-strategy, a delay sub-strategy, a wait sub-strategy, a block sub-strategy, a filter sub-strategy or an alarm sub-strategy, wherein each shift sub-strategy correspondingly solves a simple independent target problem.
The joint report class division sub-strategy is a strategy for judging whether a user selects a joint report course according to order context information of a class division request and distributing the same teacher class with teaching to the class division request of the selected joint report course, and typically, the joint report class division sub-strategy comprises a numbering and same band strategy, namely, a simultaneous registration programming class and a mathematical class are distributed to the same teacher class with teaching.
The grading class-advance strategy is a strategy for grading users according to the order context information of the class-advance request and distributing classes to the class-advance request according to the grading result.
The sub-strategy means that whether the program triggers the target node is judged according to the order context information of the shift request, and the bottom shift sub-strategy is executed when the program triggers the target node.
The basic shift sub-strategy refers to a strategy of polling all classes according to the order context information of the shift request to obtain a shift result.
The delay sub-strategy refers to a strategy for performing delay processing on the shift request.
The waiting sub-policy refers to a policy for waiting for the shift request.
The blocking sub-policy refers to a policy of stopping a shift and waiting for the next shift request.
The filtering sub-strategy refers to a strategy for filtering the shift result.
The warning sub-strategy is a strategy for sending warning information to the user when the shift result cannot be obtained through matching.
Specifically, the same input and output structure is adopted for the sub-strategies in the shift, so that the combination of different sub-strategies is facilitated, rich shift strategies are provided, and the flexibility of strategy configuration is improved.
Illustratively, the predefined policy formula includes an order scholarly period logic judgment sub-formula and an order source logic judgment sub-formula, and the predefined policy formula is configured as follows:
if the order schdule is [ "first schdule", "second schdule" ], then [ "delay (1 h)", "build number same band (parameter)", "block (parameter)" ]
If the order source is [ "V2" ], then [ "the same number band (parameter)", "up to (3 d)", "bottom shift (parameter)" ]
[ "Release" ]
Wherein, [ "first school date", "second school date" ] is a preset order attribute in the order school date logic judgment sub-formula, and "v 2" is a preset order attribute in the order source logic judgment sub-formula, [ "delay (1 h)", "order tape (parameter)", "block (parameter)" ] is a shift strategy configuration list matched with the order school date logic judgment sub-formula, [ "order tape (parameter)", "till (3 d)", and "bottom shift (parameter)" ] is a shift strategy configuration list matched with the order source logic judgment sub-formula; and [ "release" ] is a list of bottom-of-the-pocket shift strategy configurations.
Specifically, the shift program configures the preset policy formula in the above format, after receiving the shift request, the shift system obtains order context information of the shift request, and if the order schdule attribute specified in the order context information is "first schdule" or "second schdule", the shift policy configuration list [ "delay (1 h)", "order number with (parameter)", "block (parameter)" ] in the first row is returned, a shift policy executor queue is created according to the shift policy configuration list, and the executed shift policy has the following meaning: the delay sub-strategy is executed first. If the delay is less than 1 hour, blocking the shift procedure; and if the delay reaches 1 hour, delaying the release of the sub-strategy, and performing the shift by using the numbering and same-band strategy. And if the scheduling number and band strategy cannot be used for the shift distribution, releasing the scheduling number and band strategy, and using a blocking sub-strategy to carry out the shift distribution, wherein the blocking sub-strategy blocks the shift distribution flow and waits for the next shift distribution request.
If the order context information specifies that the order schooling date is not the first schooling date and is not the second schooling date, judging whether an order source attribute in the order context information is ' v2 ', if the order source attribute in the order context information is ' v2 ', returning a shift strategy configuration list [ ' numbered bands (parameters) ", ' up to (3 d)", and ' bottom-of-the-book shifts (parameters) "] of the second row, creating a shift strategy executor queue according to the shift strategy configuration list, wherein the meaning of a finally executed shift strategy is as follows: the scheduling is carried out by using the scheduling same-band strategy, if the scheduling same-band strategy cannot be used for scheduling, the scheduling same-band strategy is released and used until the sub-strategy is used for scheduling, the sub-strategy is released when a program triggers a target node (for example, the program waits for 3 days and is not successfully scheduled), and the scheduling is carried out by using the bottom-of-the-pocket scheduling sub-strategy.
If the order context information specifies that the order schooling date is not the first schooling date and is not the second schooling date, and the order source attribute in the order context information is not 'v 2', namely the order context information does not satisfy the two routing conditions, the shift strategy configuration list [ 'release' ] of the third row is returned, and the shift permission is released.
Therefore, in the strategic shift method provided by the embodiment of the invention, the order context information is determined through the shift request, and at least one shift strategy configuration list is determined according to the preset strategy routing rule and the order context information; the method comprises the steps of resolving at least one class-dividing strategy configuration list, determining at least one class-dividing strategy execution list, performing class division according to the at least one class-dividing strategy execution list until a class-dividing result is obtained, achieving decoupling of class-dividing strategy selection and class-dividing strategy execution through a strategy routing mode, expanding a service scene through strategy combination, solving the problems that an existing class-dividing system is poor in compatibility and high in development cost, being beneficial to reducing the development and test cost of the class-dividing system, expanding class-dividing rules and improving the class-dividing efficiency.
Example two
Based on the above embodiments, the second embodiment of the present invention provides a strategic shift system, which can execute the strategic shift method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of a strategic shift system according to a second embodiment of the present invention.
As shown in fig. 4, the strategic shift system 00 includes: the system comprises an instruction receiving unit 101, an order analyzing unit 102, a policy routing unit 103, a policy analyzing unit 104 and a policy executing unit 105, wherein the instruction receiving unit 101 is used for acquiring a shift request; the order analysis unit 102 is configured to determine order context information according to the shift request; the policy routing unit 103 is configured to determine at least one shift-dividing policy configuration list according to a preset policy routing rule and order context information; a policy analysis unit 104, configured to analyze the at least one shift-dividing policy configuration list, and determine at least one shift-dividing policy execution list, where the at least one shift-dividing policy execution list corresponds to the at least one shift-dividing policy configuration list one to one; and the policy execution unit 105 is configured to perform shift sharing according to at least one shift sharing policy execution list until a shift sharing result is obtained.
Optionally, the preset policy routing rule includes a preset policy formula, and the preset policy formula includes at least one logic judgment sub-formula and a shift policy configuration list corresponding to the logic judgment sub-formula one to one; the preset strategy routing rule is used for substituting the order context information into at least one logic judgment sub-formula, and determining at least one shift strategy configuration list according to the judgment result of the logic judgment sub-formula.
Optionally, the policy routing unit 103 is configured to obtain at least one order attribute in the order context information; judging whether any order attribute is matched with a preset order attribute in the logic judgment sub-formula or not; and determining a shift strategy configuration list according to the judgment result.
Optionally, the shift-dividing policy configuration list includes at least one shift-dividing sub-policy configuration parameter, and the shift-dividing sub-policy configuration parameter is used for determining a shift-dividing sub-policy; the class-dividing strategy execution list comprises at least one class-dividing sub-strategy executor, and the class-dividing sub-strategy executors correspond to the class-dividing sub-strategy configuration parameters one to one.
Optionally, the shift sub-policy includes: any one of a joint branch sub-policy, a hierarchical in-shift sub-policy, a go-to sub-policy, a base branch sub-policy, a delay sub-policy, a wait sub-policy, a block sub-policy, a filter sub-policy, or an alert sub-policy.
Optionally, the order analysis unit 102 is configured to store an order context mapping table established based on the order requirement expansion field, obtain an order number of the shift-dividing request, perform table lookup on the order context mapping table according to the order number, and determine order context information according to a table lookup result.
Optionally, the policy executing unit 105 is configured to sequentially call the shift sub-policy executors in the shift policy executing list to run the shift function; obtaining an operation result of the shift function, wherein the operation result comprises any one of a matching return value, a blocking return value or a releasing return value; determining the class of the shift according to the matching return value; or, according to the blocking return value, waiting and obtaining the next shift request; or releasing the shift authority according to the release return value and calling the next shift sub-strategy executor in the shift strategy execution list.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. Computer devices 12 include, but are not limited to: one or more processors 16, a system memory 28, a bus 18 connecting the various system components (including the system memory 28 and the processors 16), and a computer program stored on the memory and executable on the processors which, when executing the program, implements the above-described strategic scheduling method.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 16 executes programs stored in the system memory 28 to perform various functional applications and data processing, such as implementing the strategic scheduling approach provided by embodiments of the invention.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above-mentioned strategic scheduling method.
Optionally, the strategic shift method includes: acquiring a shift request; determining order context information according to the shift request; determining at least one shift strategy configuration list according to a preset strategy routing rule and order context information; analyzing the at least one shift-dividing strategy configuration list, and determining at least one shift-dividing strategy execution list, wherein the at least one shift-dividing strategy execution list corresponds to the at least one shift-dividing strategy configuration list one to one; and performing the shift according to at least one shift strategy execution list until a shift result is obtained.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A strategic scheduling method is characterized by comprising the following steps:
acquiring a shift request;
determining order context information according to the shift request;
determining at least one shift strategy configuration list according to a preset strategy routing rule and the order context information;
analyzing the at least one shift strategy configuration list, and determining at least one shift strategy execution list, wherein the at least one shift strategy execution list corresponds to the at least one shift strategy configuration list in a one-to-one manner;
and performing the shift according to the at least one shift strategy execution list until a shift result is obtained.
2. The strategic shift distribution method of claim 1, wherein the predetermined policy routing rule comprises a predetermined policy formula, the predetermined policy formula comprises at least one logic judgment sub-formula, and a shift distribution policy configuration list corresponding to the logic judgment sub-formula one-to-one;
and the preset policy routing rule is used for substituting the order context information into the at least one logic judgment sub-formula and determining at least one shift policy configuration list according to a judgment result.
3. The strategic shift distribution method of claim 2, wherein said substituting said order context information into said at least one logical decision sub-formula and determining at least one shift strategy configuration list based on the decision result comprises the steps of:
obtaining at least one order attribute in the order context information;
judging whether the order attributes are matched with preset order attributes in the logic judgment sub-formula or not;
and determining the shift-dividing strategy configuration list according to the judgment result.
4. The strategic shifting method of claim 1, wherein the shift strategy configuration list comprises at least one shift sub-strategy configuration parameter, the shift sub-strategy configuration parameter being used to determine a shift sub-strategy;
the class-dividing strategy execution list comprises at least one class-dividing sub-strategy executor, and the class-dividing sub-strategy executor corresponds to the class-dividing sub-strategy configuration parameters one to one.
5. The strategic shift distribution method of claim 4, wherein the shift distribution sub-strategy comprises: any one of a joint branch sub-policy, a hierarchical in-shift sub-policy, a go-to sub-policy, a base branch sub-policy, a delay sub-policy, a wait sub-policy, a block sub-policy, a filter sub-policy, or an alert sub-policy.
6. The strategic shift method of claim 1, wherein said determining order context information based on said shift request comprises the steps of:
establishing an order context mapping table based on the order requirement expansion field;
acquiring order data of the shift request;
and performing table lookup on the order context mapping table according to the order data, and determining the order context information according to a table lookup result.
7. The strategic shift distribution method according to claim 1, wherein said performing shift distribution according to said at least one shift distribution strategy execution list until a shift distribution result is obtained comprises the steps of:
sequentially calling the sub-class strategy executors in the class-dividing strategy execution list to operate the class-dividing function;
obtaining an operation result of the shift function, wherein the operation result comprises any one of a matching return value, a blocking return value or a releasing return value;
determining the class of the shift according to the matching return value;
or, according to the blocking return value, waiting and obtaining the next shift request are executed;
or calling the next shift sub-strategy executor in the shift strategy execution list to operate the shift function according to the release return value.
8. A strategic shift system, comprising:
the instruction receiving unit is used for acquiring a shift request;
the order analysis unit is used for determining order context information according to the shift request;
the policy routing unit is used for determining at least one shift-dividing policy configuration list according to a preset policy routing rule and the order context information;
the strategy analysis unit is used for analyzing the at least one shift-dividing strategy configuration list and determining at least one shift-dividing strategy execution list, and the at least one shift-dividing strategy execution list is in one-to-one correspondence with the at least one shift-dividing strategy configuration list;
and the strategy execution unit is used for performing shift division according to the at least one shift division strategy execution list until a shift division result is obtained.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the strategic scheduling method of any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a strategic scheduling method as claimed in any one of claims 1-7.
CN202111030849.XA 2021-09-03 2021-09-03 Strategic shift method, system, computer equipment and medium Pending CN113760297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111030849.XA CN113760297A (en) 2021-09-03 2021-09-03 Strategic shift method, system, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111030849.XA CN113760297A (en) 2021-09-03 2021-09-03 Strategic shift method, system, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN113760297A true CN113760297A (en) 2021-12-07

Family

ID=78792770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111030849.XA Pending CN113760297A (en) 2021-09-03 2021-09-03 Strategic shift method, system, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN113760297A (en)

Similar Documents

Publication Publication Date Title
CN102971711B (en) For processing the Apparatus for () and method therefor of batch working cell
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN110569298B (en) Data docking and visualization method and system
US20070157088A1 (en) Method and apparatus for graphically displaying compatible workflow steps
CN108492005B (en) Project data processing method and device, computer equipment and storage medium
CN114595343B (en) Map display method and device, storage medium and electronic equipment
CN111913738A (en) Access request processing method, device, computing equipment and medium
US7885906B2 (en) Problem solving system and method
CN115048254B (en) Simulation test method, system, equipment and readable medium for data distribution strategy
US20060212568A1 (en) System and method for managing a computer network
CN110083536B (en) Test resource allocation method and device, electronic equipment and storage medium
CN115357350A (en) Task configuration method and device, electronic equipment and computer readable medium
CN114416049A (en) Configuration method and device of service interface combining RPA and AI
CN113419719A (en) Interface case generation method and system based on business scene
CN104599092A (en) Order business monitoring method and equipment
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN113760297A (en) Strategic shift method, system, computer equipment and medium
CN107784548B (en) Order processing method and device
CN115237931A (en) Method and system for updating sub-service processing result of service arrangement
CN111859985B (en) AI customer service model test method and device, electronic equipment and storage medium
CN114064678A (en) Event data processing method and device and terminal equipment
CN110780859B (en) Method for realizing service architecture based on user-defined form
CN113535318A (en) Information reply method and device, storage medium and electronic equipment
CN112308074A (en) Method and device for generating thumbnail
CN111552715A (en) User query method and device

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