CN114579215A - Automatic control method for program execution logic and sequence - Google Patents

Automatic control method for program execution logic and sequence Download PDF

Info

Publication number
CN114579215A
CN114579215A CN202210221715.4A CN202210221715A CN114579215A CN 114579215 A CN114579215 A CN 114579215A CN 202210221715 A CN202210221715 A CN 202210221715A CN 114579215 A CN114579215 A CN 114579215A
Authority
CN
China
Prior art keywords
logic
node
sequence
server
nodes
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
CN202210221715.4A
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.)
Shouyue Technology Beijing Co Ltd
Original Assignee
Shouyue Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shouyue Technology Beijing Co Ltd filed Critical Shouyue Technology Beijing Co Ltd
Priority to CN202210221715.4A priority Critical patent/CN114579215A/en
Publication of CN114579215A publication Critical patent/CN114579215A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an automatic control method of program execution logic and sequence, which comprises the following steps: setting a logic node executed by a program to obtain logic node setting; and executing the logic nodes according to the logic node setting in sequence. The processing logic and the execution sequence thereof can be adjusted at any time, and the code reusability is higher; the labor cost is reduced, and the working efficiency is improved.

Description

Automatic control method for program execution logic and sequence
Technical Field
The invention relates to the field of network appointment, in particular to an automatic control method for program execution logic and sequence.
Background
With the rapid development of the network car booking business, companies cooperate with more and more channels, and the valuation services provided for each channel are different, which is mainly reflected in that the processing logics and the sequence of the valuation services are different. The prior art has to modify the program and publish up whenever a company provides rating services for a newly accessed channel or an existing channel requires modification of the rating services. Therefore, how to quickly construct the valuation service for a new channel and quickly and effectively meet the processing logic requirement of modifying the valuation service of the existing channel becomes a problem to be solved by software research and development personnel.
The defects of the prior art can not change at any time along with the requirement change of a channel, and a program must be modified and an online process must be issued; the issue of online would bring the risk of online problems; the manual success is high and the efficiency is low; the execution sequence of the processing logic cannot be adjusted at any time; code reusability is low.
Disclosure of Invention
In view of the above, the present invention has been developed to provide an automatic control method of program execution logic and sequence that overcomes or at least partially solves the above-mentioned problems.
According to one aspect of the present invention, there is provided a method for automatically controlling program execution logic and sequence, comprising:
setting a logic node executed by a program to obtain logic node setting;
and executing the logic nodes according to the logic node setting in sequence.
Optionally, the logic node for setting program execution specifically includes:
acquiring a target channel; acquiring a plurality of expected logical nodes; marking sequence numbers on the selected logic nodes to obtain marked logic nodes; and storing the marking logic node and sending a storage request to a server.
Optionally, after the storing the marking logic node sends the storage request to the server, the method further includes:
the server receives the storage request, and checks whether the channel number, the logic node set are empty or not and whether the execution sequence of the logic nodes is digital or not;
and after the server successfully checks, calling a zigzag command of Redis, and storing the channel number, the logic node set and the execution sequence into the Redis.
Optionally, the executing the logic nodes according to the logic node setting in sequence specifically includes:
a client APP sends an assessment service request to a server, wherein the service request comprises a channel number;
acquiring the channel number from the server request, judging whether the value of the channel number is null, and if so, returning error information of the client;
the server acquires node set information of the channel from Redis through a zscan command according to the channel number;
the zadd of Redis has an automatic sequencing function, and sequences the taken-out logic node sets according to the sequence;
circularly obtaining a logic node set;
executing logic of a node in the set of logical nodes;
when the logic node encounters an exception and/or an error in the execution process, immediately returning error information of the client, if the exception and/or the error is not encountered, judging whether a next logic node exists, and if the exception and/or the error is not encountered, continuing to execute; otherwise, returning success information to the client APP.
The invention provides an automatic control method of program execution logic and sequence, which comprises the following steps: setting a logic node executed by a program to obtain logic node setting; and executing the logic nodes according to the logic node setting in sequence. The processing logic and the execution sequence thereof can be adjusted at any time, and the code reusability is higher; the labor cost is reduced, and the working efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flow chart of a logic node executed by a configuration program according to an embodiment of the present invention;
fig. 2 is a flowchart for sequentially executing the logical nodes according to the logical node setting according to the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terms "comprises" and "comprising," and any variations thereof, in the present description and claims and drawings are intended to cover a non-exclusive inclusion, such as a list of steps or elements.
The technical solution of the present invention is further described in detail with reference to the accompanying drawings and embodiments.
Definition of logical nodes in the invention: in the valuation service, there are many sub logics which are not related to each other, such as judgment of whether a city is closed, judgment of whether a lower single coordinate is within a range of the city, judgment of whether a target vehicle type is opened in the city, luxury vehicle mapping processing, setting of a default vehicle type, inquiry of an estimated time length and mileage, inquiry of a high-speed fee, and the like. The business logics are atomic (can not be further split in business), independent code segments are responsible for processing, the independent code segments are abstracted into interfaces through an Eclipse programming tool, and atomic services with specific calling modes and return value characteristics are formed and are called as logic nodes.
The invention is a scheme capable of automatically controlling the execution logic and sequence of programs. The invention is divided into a logic node setting part and a logic node using part. The logic node setting part mainly has the following functions: defining which logic nodes participate in the processing of the valuation service and defining the processing sequence of the logic nodes for the channel; the logic node use part mainly plays the following roles: and according to the logical node setting of the channel, the logical nodes are flexibly and sequentially executed.
As shown in fig. 1, the logical node setting part includes the following steps:
the method comprises the following steps: selecting a target channel on a page;
step two: selecting a desired plurality of logical nodes on a page;
step three: the sequence number is 1/2/3/4.. the smaller the number, the more preferred the node is to execute;
step four: clicking a storage button, and sending a storage request to a server;
the saving request comprises core parameters such as channel number (channel _ num), logic node sets (members), logic node execution sequence (score) and the like;
step five: the server receives the storage request, and checks whether the channel number, the logic node set are empty or not and whether the execution sequence of the logic nodes is digital or not;
step six: after the server is successfully verified, a zigzag command of the Redis is called, and a channel number, a logic node set and an execution sequence are stored in the Redis, wherein the specific calling mode is as follows: zadd (channel _ num, member, score);
the format of the stored data is as follows:
[
{1, "checkIsCloseCityService", "logical node for judging whether to close city" },
{2, "checkRangeService", "logical node" to judge whether the lower coordinate is within the city range "},
{3, "checkluxurecareservice", "logical node for luxury car mapping process" },
{4, "searchLBSSService", "logical node for inquiring estimated duration and mileage",
.......
]
step seven: and returning success information to the page.
As shown in fig. 2, the steps of the logical node using part are as follows:
the method comprises the following steps: the client APP sends a rating service request to the server, with channel number (channel _ num) core information in the request.
Step two: and the server acquires the channel number from the request, judges whether the value is null or not, and returns error information of the client if the value is null.
Step three: the server acquires node set information of the channel according to a channel number (channel _ num) through a zscan command from the Redis, wherein the specific calling mode is zscan (channel _ num, 0); because the zadd of Redis has an automatic sorting function, the extracted node set has a sequence characteristic.
Step four: and circulating the node set obtained in the last step.
Step five: the logic of the node is executed.
Step six: and the logic node immediately returns client error information once encountering an exception or an error in the execution process, and if not encountering the exception or the error.
Step seven: judging whether a next logic node exists, if so, repeatedly executing the fifth step, the sixth step and the seventh step; otherwise, executing step eight.
Step eight: and returning success information to the client APP.
Has the beneficial effects that:
1. the valuation service can rapidly change the processing logic along with the change of channel requirements without modifying programs;
2. the processing logic and the execution sequence thereof can be adjusted at any time;
3. higher code reusability;
4. the labor cost is reduced, and the working efficiency is improved.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (4)

1. An automatic control method of program execution logic and sequence, the automatic control method comprising:
setting a logic node executed by a program to obtain logic node setting;
and executing the logic nodes according to the logic node setting in sequence.
2. The method according to claim 1, wherein the setting of the logical node for program execution includes:
acquiring a target channel;
acquiring a plurality of expected logical nodes;
marking sequence numbers on the selected logic nodes to obtain marked logic nodes;
and storing the marking logic node and sending a storage request to a server.
3. The method of claim 2, wherein said saving said tagged logical node, after sending a save request to a server, further comprises:
the server receives the storage request, and checks whether the channel number, the logic node set are empty or not and whether the execution sequence of the logic nodes is digital or not;
and after the server successfully checks, calling a zigzag command of Redis, and storing the channel number, the logic node set and the execution sequence into the Redis.
4. The method of claim 1, wherein the executing the logical nodes in order according to the logical node settings specifically comprises:
a client APP sends an assessment service request to a server, wherein the service request comprises a channel number;
acquiring the channel number from the server request, judging whether the value of the channel number is null, and if so, returning error information of the client;
the server acquires node set information of the channel from Redis through a zscan command according to the channel number;
the zadd of Redis has an automatic sequencing function, and sequences the taken-out logic node sets according to the sequence;
circularly obtaining a logic node set;
executing logic of a node in the set of logical nodes;
when the logic node encounters an exception and/or an error in the execution process, immediately returning client error information, if the exception and/or the error is not encountered, judging whether a next logic node exists, and if the exception and/or the error is not encountered, continuing to execute; otherwise, returning success information to the client APP.
CN202210221715.4A 2022-03-07 2022-03-07 Automatic control method for program execution logic and sequence Pending CN114579215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210221715.4A CN114579215A (en) 2022-03-07 2022-03-07 Automatic control method for program execution logic and sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210221715.4A CN114579215A (en) 2022-03-07 2022-03-07 Automatic control method for program execution logic and sequence

Publications (1)

Publication Number Publication Date
CN114579215A true CN114579215A (en) 2022-06-03

Family

ID=81773081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210221715.4A Pending CN114579215A (en) 2022-03-07 2022-03-07 Automatic control method for program execution logic and sequence

Country Status (1)

Country Link
CN (1) CN114579215A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542047A (en) * 2011-12-28 2012-07-04 奇智软件(北京)有限公司 Task logic library generating method, task logic library generating system, data processing method and data processing system
CN104375425A (en) * 2014-09-22 2015-02-25 歌尔声学股份有限公司 Logic configuration method and device of manufacturing execution system procedure based on an expression
WO2018137232A1 (en) * 2017-01-26 2018-08-02 华为技术有限公司 Data processing method, control plane node, and user plane node
CN109218338A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Information processing system, method and apparatus
CN111078315A (en) * 2019-12-12 2020-04-28 拉扎斯网络科技(上海)有限公司 Microservice arranging and executing method and system, architecture, equipment and storage medium
CN111580896A (en) * 2020-05-04 2020-08-25 武汉众邦银行股份有限公司 Link calling method based on atomization service
CN112130838A (en) * 2020-09-27 2020-12-25 中国银行股份有限公司 Transaction data processing method and device
CN113283891A (en) * 2021-05-13 2021-08-20 北京字跳网络技术有限公司 Information processing method and device and electronic equipment
CN113409153A (en) * 2020-03-16 2021-09-17 京东安联财产保险有限公司 Business process management system, business process processing method, equipment and storage medium
CN113780969A (en) * 2021-03-08 2021-12-10 北京京东振世信息技术有限公司 Customs declaration method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542047A (en) * 2011-12-28 2012-07-04 奇智软件(北京)有限公司 Task logic library generating method, task logic library generating system, data processing method and data processing system
CN104375425A (en) * 2014-09-22 2015-02-25 歌尔声学股份有限公司 Logic configuration method and device of manufacturing execution system procedure based on an expression
WO2018137232A1 (en) * 2017-01-26 2018-08-02 华为技术有限公司 Data processing method, control plane node, and user plane node
CN109218338A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Information processing system, method and apparatus
CN111078315A (en) * 2019-12-12 2020-04-28 拉扎斯网络科技(上海)有限公司 Microservice arranging and executing method and system, architecture, equipment and storage medium
CN113409153A (en) * 2020-03-16 2021-09-17 京东安联财产保险有限公司 Business process management system, business process processing method, equipment and storage medium
CN111580896A (en) * 2020-05-04 2020-08-25 武汉众邦银行股份有限公司 Link calling method based on atomization service
CN112130838A (en) * 2020-09-27 2020-12-25 中国银行股份有限公司 Transaction data processing method and device
CN113780969A (en) * 2021-03-08 2021-12-10 北京京东振世信息技术有限公司 Customs declaration method and system
CN113283891A (en) * 2021-05-13 2021-08-20 北京字跳网络技术有限公司 Information processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US6247066B1 (en) Compound document processing method
CN108509556A (en) Data migration method and device, server, storage medium
CN112835714B (en) Container arrangement method, system and medium for CPU heterogeneous clusters in cloud edge environment
CN113760553B (en) Mixed part cluster task scheduling method based on Monte Carlo tree search
CN101887410A (en) File conversion device, document conversion method and file converter
Schimm Generic linear business process modeling
CN111817938A (en) Method, system and storage medium for compiling automobile CAN communication matrix
CN114755984A (en) Dispatching method and system of automatic flow robot and automatic flow robot
US10768974B2 (en) Specifying an order of a plurality of resources in a transaction according to distance
CN115860451A (en) Flow operation method and device, electronic equipment and storage medium
CN114579215A (en) Automatic control method for program execution logic and sequence
CN102214103A (en) Method and system for establishing and performing task program based on functional unit
CN112988280B (en) Configuration data processing method and device
US5907851A (en) Editing nested documents by appointing a portion for insertion with an alternative substitute
CN116661978B (en) Distributed flow processing method and device and distributed business flow engine
CN117369788A (en) Drag type business logic editing system method
CN109144486A (en) A kind of workflow implementation method statelessly changed
CN113051005B (en) Loading method and device
CN101320452B (en) Flow process execution method and apparatus
CN113139022A (en) Enterprise logistics data on-demand fusion method based on mixing rule
CN114911715B (en) Formalized test model modeling method, system, computer and storage medium
KR100323971B1 (en) How to automatically manage document completion and schedule in the project schedule management system
CN110321111A (en) System flow control method, device, equipment and computer storage medium
CN111061233B (en) Design method and device for industrial control system and storage medium
CN116092494B (en) Voice interaction method, server and computer readable storage medium

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