CN103870285B - Carry out the chain type state transition method of logic flow control - Google Patents

Carry out the chain type state transition method of logic flow control Download PDF

Info

Publication number
CN103870285B
CN103870285B CN201410131187.9A CN201410131187A CN103870285B CN 103870285 B CN103870285 B CN 103870285B CN 201410131187 A CN201410131187 A CN 201410131187A CN 103870285 B CN103870285 B CN 103870285B
Authority
CN
China
Prior art keywords
logic
minimum
chain type
configuration file
flow control
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.)
Active
Application number
CN201410131187.9A
Other languages
Chinese (zh)
Other versions
CN103870285A (en
Inventor
蔡淼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Original Assignee
Chengdu Xishanju Interactive Entertainment 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 Chengdu Xishanju Interactive Entertainment Technology Co Ltd filed Critical Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Priority to CN201410131187.9A priority Critical patent/CN103870285B/en
Publication of CN103870285A publication Critical patent/CN103870285A/en
Application granted granted Critical
Publication of CN103870285B publication Critical patent/CN103870285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of chain type state transition method for carrying out logic flow control, organizational logical decision condition;Logic decision condition is divided into minimum and indivisible logic unit;Minimum and indivisible logic unit is written as minimum autonomous unit;Configure putting in order and syntagmatic composition configuration file for minimum autonomous unit;Configuration file is parsed, the minimum autonomous unit of loading, the minimum autonomous unit for the permutation and combination relational calculus loading formulated according to configuration file is finally drawn a conclusion.The present invention flexibly can freely organize judgement order.The process need not make an amendment to program code, it is only necessary to which the configuration file of chain is judged by adjusting constraint logic can meet the change request of service logic.

Description

Carry out the chain type state transition method of logic flow control
Technical field
This technology belongs to software algorithm and logical process field, in particular for complicated bar in Computer Program Implementation Process Under part, multi-layer, the logic decision process of multi-step.
Background technology
In software development activity, programmer needs frequently to handle logic judgment work according to specific business, to ensure Computer program is run in a controllable, strict execution flow.This perform flow be controlled by input condition, judge according to According to wherein having usually contained the judgement of multi-layer, multi-step, by a series of logical operations, comprehensive various conditions are drawn final Result of determination, instructs the executive plan that computer program is follow-up.Therefore, in actual work, the logic in computer program Judgement shows complexity, multi-level multi-step.Although the logic decision in computer program is clear and definite, orderly, so And greatly change often occurs as needed for the decision mechanism and flow of practical business work.The change of vocational work logic Change, necessarily cause the logic decision flow in Software for Design also to be changed accordingly therewith.In actual applications, we pass through The mechanism come solve play steal-number behavior decision logic unstability.By analyzing the stolen phenomenon of player account in game, We have found that data characteristics when there is steal-number possibility is clear and definite, specific and limited, but it is specific to steal-number behavior and is During no real generation, then need specifically to analyze these characteristics, be related to these characteristics according to certain Order, arrangement judges order, then carries out Multiple Combination, could last total score separate out and judge conclusion.In vocational work This judgement order, judgement combination are often changed due to adjustment, issue of peripheral game activity of tactics of the game etc., such as Fruit changes every time, and we modify from code aspect, then test again, dispose reach the standard grade again, can devote a tremendous amount of time, It is difficult to the need for meeting real work.The judgement of steal-number behavior is judged to constitute by several bases, is problem time judgement, angle respectively Many height such as colour gradation judges, transaction item analyzes judgement, gold coin change judges, the wandering judgement of gold coin, client-side information judgement Process.When judging specific to steal-number behavior, we may use the sub- mistake of whole or a portion according to specific circumstances Journey, coordinates the progress of ludic activity, or even the sequencing that these subprocess judge it can also happen that change.In program development During, it is impossible to all permutation and combination methods of these subprocess are first enumerated, each permutation and combination method is packaged into not Same programmed logic.Reason is that this processing mode drawback is very big, and some permutation and combination order wherein possible first are only deposited It is in theory, may be never used in real work;Secondly, the permutation and combination method meeting of exhaustive all sub- logical processes The extreme redundancy of test activity is caused, and time cost rises sharply;Again, when thering is new sub- deterministic process increase to come in, All decision logics can be caused to modify, great maintenance workload is brought, later maintenance time and maintenance difficulties can be presented Exponential growth.
The content of the invention
The present invention is to solve the above problems there is provided one kind specific business being abstracted into multiple minimum logic decision units, so It is flexibly free afterwards to organize judgement order.The process need not make an amendment to program code, it is only necessary to by adjusting constraint logic The change request of service logic can be met by judging the configuration file of chain.
The chain type state transition method of the carry out logic flow control of the present invention, comprises the following steps:
The first step, organizational logical decision condition;
Second step, logic decision condition is divided into minimum and indivisible logic unit;
3rd step, minimum and indivisible logic unit is written as minimum autonomous unit;
4th step, the minimum autonomous unit of configuration put in order and syntagmatic constitutes configuration file;
5th step, parsing configuration file, the minimum autonomous unit of loading, the permutation and combination relation formulated according to configuration file are transported The minimum autonomous unit of loading is calculated, is finally drawn a conclusion.
Described logic card decision condition changes according to specific business scenario.
Described minimum and indivisible logic unit must is fulfilled for disclosure satisfy that business overall logic after permutation and combination The demand of judgement.
Described minimum autonomous unit include software perform the unique mark of phase, an abstract logic discriminant function and One result triggers function.
The unique mark that described software performs the phase is a logical identifier and a suction parameter storage address.
The abstract logic discriminant function is concrete methods of realizing.
The result triggering function determines triggering following logic for that can call the abstract logic discriminant function of this class automatically The mark of arithmetic element, and return to the pointer for pointing to subsequent logic arithmetic element or the function of function entrance address.
Putting in order in described configuration file and syntagmatic are chain type.
Beneficial effects of the present invention:The method of the present invention flexibly can freely organize judgement order;The process need not Program code is made an amendment, it is only necessary to which the configuration file of chain is judged by adjusting constraint logic can meet the change of service logic More demand.
Embodiment
With reference to specific embodiment, the invention will be further elaborated.
The chain type state transition method of the carry out logic flow control of the present invention, comprises the following steps:The first step, tissue are patrolled Collect decision condition;Second step, logic decision condition is divided into minimum and indivisible logic unit;3rd step, by minimum And indivisible logic unit is written as minimum autonomous unit;4th step, configuration minimum autonomous unit put in order and group Conjunction relation constitutes configuration file;5th step, parsing configuration file, the minimum autonomous unit of loading, the row formulated according to configuration file The minimum autonomous unit of row syntagmatic computing loading, finally draws a conclusion.
Described logic card decision condition changes according to specific business scenario.It is described minimum and indivisible to patrol Unit is collected must to be fulfilled for disclosure satisfy that the demand that business overall logic judges after permutation and combination.Described minimum autonomous unit includes One software performs unique mark, an abstract logic discriminant function and the result triggering function of phase.Described software is held The unique mark on the departure date is a logical identifier and a suction parameter storage address.
The abstract logic discriminant function is concrete methods of realizing.
The result triggering function determines triggering following logic for that can call the abstract logic discriminant function of this class automatically The mark of arithmetic element, and return to the pointer for pointing to subsequent logic arithmetic element or the function of function entrance address.Described matches somebody with somebody It is chain type to put putting in order in file and syntagmatic.
Just it is illustrated as an example with steal-number behavior judgement below, the judgement of steal-number behavior is by several basic decision sets Into being that problem time judges, role hierarchy judges, transaction item analysis judges, gold coin change judges, gold coin is wandering respectively sentences Multiple subprocess such as fixed, client-side information judgement.Several bases that steal-number judges are judged according to foregoing principle, are packaged into most Small logical code unit, makes an autonomous code block, includes the logic judgment of itself, into principle, subsequent triggers Three parts.Each autonomy code block has unique mark, judges that we only need to pin when needing to add when there is newly-increased basis Individually encapsulation code, and distribute unique mark is judged to new basis.
After the minimum autonomous logic unit of code aspect splits and encapsulates and terminate, to the logic decision Row control chain of entirety Configured, concrete mode is to configure unique mark of the means by the autonomous code unit of setting by xml, ini, database Knowledge, the label of overall logic every sub-steps in judging is indicated to program main logic, i.e., each step judges which needs to perform certainly Control code unit, or which autonomous code unit logical combination result.On herein, logic judgment chain can be passed Return nesting, it is possible thereby to support the logic judgment activity of arbitrary structures.Whole logic judgment chain finally returns to one finally Judge conclusion, and used as the result of overall traffic logic decision for software systems.When passing through above-mentioned logic judgment chain When finally returning to a judgement conclusion for confirming steal-number, corresponding closure program will start.When steal-number logic changes, We need the simply configuration file of modification, and when new judgement is added, we only need to do business to new judgement content Disassemble, and be packaged into minimum autonomous logic unit.
One of ordinary skill in the art will be appreciated that embodiment described here is to aid in reader and understands this hair Bright principle, it should be understood that protection scope of the present invention is not limited to such especially statement and embodiment.This area Those of ordinary skill can make according to these technical inspirations disclosed by the invention various does not depart from the other each of essence of the invention Plant specific deformation and combine, these deformations and combination are still within the scope of the present invention.

Claims (6)

1. a kind of chain type state transition method for carrying out logic flow control, it is characterised in that comprise the following steps:
The first step, organizational logical decision condition;
Second step, logic decision condition is divided into minimum and indivisible logic unit;Described is minimum and indivisible Logic unit must be fulfilled for disclosure satisfy that the demand that business overall logic judges after permutation and combination;
3rd step, minimum and indivisible logic unit is written as minimum autonomous unit;
4th step, the minimum autonomous unit of configuration put in order and syntagmatic constitutes configuration file;
5th step, parsing configuration file, the minimum autonomous unit of loading, the permutation and combination relational calculus formulated according to configuration file add The minimum autonomous unit of load, finally draws a conclusion;
Putting in order in described configuration file and syntagmatic are chain type;Logic judgment chain is recursive nestings, is entirely patrolled Collect judgement chain and finally return to a final judgement conclusion, and make as the result of overall traffic logic decision for software systems With.
2. the chain type state transition method of logic flow control is carried out as claimed in claim 1, it is characterised in that:Described patrols Plate decision condition is collected according to specific business scenario to be changed.
3. the chain type state transition method of logic flow control is carried out as claimed in claim 1, it is characterised in that:It is described most Small autonomous unit includes unique mark, an abstract logic discriminant function and the result triggering letter that a software performs the phase Number.
4. the chain type state transition method of logic flow control is carried out as claimed in claim 3, it is characterised in that:Described is soft The unique mark that part performs the phase is a logical identifier and a suction parameter storage address.
5. the chain type state transition method of logic flow control is carried out as claimed in claim 3, it is characterised in that:It is described abstract Logic judgment function is concrete methods of realizing.
6. the chain type state transition method of logic flow control is carried out as claimed in claim 3, it is characterised in that:The result Triggering function determines the mark of triggering following ALU for that can call the abstract logic discriminant function of this class automatically, And return to the pointer for pointing to subsequent logic arithmetic element or the function of function entrance address.
CN201410131187.9A 2014-04-02 2014-04-02 Carry out the chain type state transition method of logic flow control Active CN103870285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410131187.9A CN103870285B (en) 2014-04-02 2014-04-02 Carry out the chain type state transition method of logic flow control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410131187.9A CN103870285B (en) 2014-04-02 2014-04-02 Carry out the chain type state transition method of logic flow control

Publications (2)

Publication Number Publication Date
CN103870285A CN103870285A (en) 2014-06-18
CN103870285B true CN103870285B (en) 2017-10-27

Family

ID=50908855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410131187.9A Active CN103870285B (en) 2014-04-02 2014-04-02 Carry out the chain type state transition method of logic flow control

Country Status (1)

Country Link
CN (1) CN103870285B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068793A (en) * 2015-07-16 2015-11-18 浪潮通用软件有限公司 Method and apparatus for generating business logic relation diagram and realizing business application
CN105607942B (en) * 2015-12-23 2019-01-08 北京京东尚科信息技术有限公司 A kind of method and apparatus that ballot determines

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862520A (en) * 2006-06-09 2006-11-15 北京中星微电子有限公司 Data processing device and set-up method thereof
CN102722372A (en) * 2012-05-25 2012-10-10 上海学智科技有限公司 Method and system for automatically generating codes through classification and configuration
CN102929627A (en) * 2012-10-29 2013-02-13 无锡江南计算技术研究所 Automatic testing program generating method based on ATE (Automatic Test Equipment) and ATE testing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862520A (en) * 2006-06-09 2006-11-15 北京中星微电子有限公司 Data processing device and set-up method thereof
CN102722372A (en) * 2012-05-25 2012-10-10 上海学智科技有限公司 Method and system for automatically generating codes through classification and configuration
CN102929627A (en) * 2012-10-29 2013-02-13 无锡江南计算技术研究所 Automatic testing program generating method based on ATE (Automatic Test Equipment) and ATE testing method

Also Published As

Publication number Publication date
CN103870285A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
Petit Project portfolios in dynamic environments: Organizing for uncertainty
Koh et al. A knowledge management approach for managing uncertainty in manufacturing
Mertins et al. Quality-oriented design of business processes
US9633323B2 (en) Integrated modeling and analysis in a discrete event simulation
Li et al. Resource allocation methodology based on object-oriented discrete event simulation: A production logistics system case study
CN103870285B (en) Carry out the chain type state transition method of logic flow control
Ginzburg et al. Unified resources marking system as a way to develop artificial intelligence in construction
Lastra et al. Production management model based on lean manufacturing for cost reduction in the timber sector in Peru
Kovács Methods for efficiency improvement of production and logistic processes
EP2930577A1 (en) Controlling a manufacturing plant with a MES system
Creighton et al. Application of discrete event simulation for robust system design of a melt facility
Carrillo-Corzo et al. Lean process optimization model for improving processing times and increasing service levels using a deming approach in a fishing net textile company
Sharma et al. 5S housekeeping lean technique by using system dynamics method
Longo et al. Investigating the behavior of a shop order manufacturing sistem by using simulation
Tyagi et al. Towards integrated manufacturing planning and control: A review and classification
Rajagopal et al. Robotic process automation: the key to reviving the supply chain processes
US20080082392A1 (en) System for Carrying Out Industrial Business Process
Lontsikh et al. Project Management in the Website UX/UI Development: System-Oriented Analysis and Business Process Management Principles
Ali et al. Demand-Driven Asset Reutilization Analytics
Jouck et al. A framework to evaluate and compare decision-mining techniques
KR101103928B1 (en) System and method for analysis a load of subcontract company
Tiwari A Transformative and Action Plan-Oriented Approach to Manufacturing Using Artificial Intelligence and Digital Technologies
Vegnerová The simulation utilization for the bottleneck identification
Stadnicka et al. Application of Lean Analyses and Computer Simulation in Complex Product Manufacturing Process
Rukmana The Implementation IT Risk Management of Hardware and Software Obsolescence by using ISO27001/ISO 27002 in Pharmaceutical Industry

Legal Events

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