Consumption logic execution method, apparatus, device, medium, and program product

By injecting constraint logic into redundant consumption logic within the distributed framework, the problem of job state inheritance is solved, the operation process is simplified, and the accuracy of the calculation results is maintained.

CN117271592BActive Publication Date: 2026-02-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311266087.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2026-02-06
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

In a distributed framework, when redeploying a job to add consumption logic, the original job's state information cannot be inherited, leading to incorrect calculation results and complex operation procedures.

Method used

By receiving modified parameters, the system finds jobs with reserved redundant consumption logic and injects the limiting logic into the redundant consumption logic to complete the modification and execution of the jobs, ensuring that the state of the original jobs is inherited without changing the original logical framework.

Benefits of technology

It simplifies the operation process without affecting the original calculation results and can directly inherit the status information of the original job.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271592B_ABST
    Figure CN117271592B_ABST
Patent Text Reader

Abstract

The disclosure provides an execution method of consumption logic, which can be applied to the technical field of big data. The execution method of consumption logic comprises the following steps: receiving a modification parameter, wherein the modification parameter comprises a job identifier and a limit logic; searching for a first job based on the job identifier, wherein a redundant consumption logic is reserved in the first job; injecting the limit logic into the redundant consumption logic, completing modification of the consumption logic of the first job; and executing the first job according to the consumption logic after the injection of the limit logic. The disclosure further provides an execution device of consumption logic, equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of big data, in particular to a consumption logic execution method, device, equipment, medium and program product. BACKGROUND

[0002] In the field of big data, there is a need for further logical limitation of the consumption logic of a certain running job. In general, to meet this need, a new job with new logical modification limitation is modified and republished based on the original job's consumption logic, and is published.

[0003] Due to the characteristics of the distributed framework, the newly published job cannot inherit the state information of the original job, thereby causing the calculated result to be incorrect. Moreover, the way of republishing a new job greatly increases the difficulty of the operation process. SUMMARY

[0004] In view of the above problems, the present disclosure provides a consumption logic execution method, device, equipment, medium and program product for improving the execution correctness of the consumption logic and simplifying the operation process.

[0005] According to a first aspect of the present disclosure, a consumption logic execution method is provided, comprising: receiving a modification parameter, the modification parameter comprising a job identifier and a limitation logic; searching for a first job based on the job identifier, wherein the first job has a reserved redundant consumption logic; injecting the limitation logic into the redundant consumption logic to complete the modification of the consumption logic of the first job; and executing the first job according to the consumption logic after injecting the limitation logic.

[0006] According to an embodiment of the present disclosure, the creation method of the first job comprises: receiving a configuration logic, the configuration logic comprising a first configuration logic and a second configuration logic, the first configuration logic being an actual consumption logic, and the second configuration logic being a redundant consumption logic; allocating a first computing node based on the first configuration logic; and allocating a redundant computing node based on the second configuration logic.

[0007] According to an embodiment of the present disclosure, the allocation of the first computing node based on the first configuration logic comprises: identifying a configuration sub-logic in the first configuration logic to obtain a number of sub-logics; and allocating a corresponding first computing node according to the number of sub-logics.

[0008] According to an embodiment of the present disclosure, the second configuration logic comprises a number of redundant computing nodes, and the allocation of the redundant computing node based on the second configuration logic comprises: allocating a corresponding redundant computing node according to the number of redundant computing nodes.

[0009] According to an embodiment of the present disclosure, wherein the injecting the limited logic into the redundant consumption logic to complete the modification of the consumption logic of the first job comprises: parsing the limited logic to obtain a number of sub-logics of the limited logic; determining whether the number of sub-logics of the limited logic is less than the number of the reserved redundant consumption logic; and in the case that the number of sub-logics of the limited logic is less than the number of the reserved redundant consumption logic, injecting the limited logic into the redundant consumption logic.

[0010] According to an embodiment of the present disclosure, wherein the limited logic comprises consumption data logic and / or consumption time logic, the consumption data logic comprises consumption logic for preset data, and the consumption time logic comprises consumption logic for a preset time period, and the executing the first job according to the consumption logic after the injection of the limited logic comprises: in the case that the limited logic comprises the consumption data logic and the consumption time logic, determining whether the preset data is consumed before the preset time period; in the case that the preset data is consumed before the preset time period, determining whether the preset data is updated; and in the case that the preset data is not updated, not consuming the preset data.

[0011] According to an embodiment of the present disclosure, wherein after the determining whether the preset data is updated, the method further comprises: in the case that the preset data is updated, consuming the updated preset data.

[0012] A second aspect of the present disclosure provides an execution device of consumption logic, comprising: a modification parameter receiving module configured to receive a modification parameter, the modification parameter comprising a job identifier and limited logic; a query module configured to search for a first job based on the job identifier, wherein the first job reserves redundant consumption logic; a limited logic injection module configured to inject the limited logic into the redundant consumption logic to complete the modification of the consumption logic of the first job; and a job execution module configured to execute the first job according to the consumption logic after the injection of the limited logic.

[0013] According to an embodiment of the present disclosure, wherein the device further comprises a job creation module, the job creation module comprising a configuration logic receiving unit, a first computing node allocation unit and a redundant computing node allocation unit, the configuration logic receiving unit configured to receive configuration logic, the configuration logic comprising first configuration logic and second configuration logic, the first configuration logic being actual consumption logic, and the second configuration logic being redundant consumption logic; the first computing node allocation unit configured to allocate a first computing node based on the first configuration logic; and the redundant computing node allocation unit configured to allocate a redundant computing node based on the second configuration logic.

[0014] According to an embodiment of the present disclosure, the first computing node allocation unit comprises a first sub-logic number identification sub-unit and a first computing node allocation sub-unit. The first sub-logic number identification sub-unit is configured to identify configuration sub-logics in the first configuration logic to obtain a sub-logic number. The first computing node allocation sub-unit is configured to allocate corresponding first computing nodes according to the sub-logic number.

[0015] According to an embodiment of the present disclosure, the second configuration logic comprises a redundant computing node number, and the redundant computing node allocation unit comprises a redundant computing node allocation sub-unit. The redundant computing node allocation sub-unit is configured to allocate corresponding redundant computing nodes according to the redundant computing node number.

[0016] According to an embodiment of the present disclosure, the limited logic injection module comprises a limited sub-logic number analysis sub-unit, a limited sub-logic comparison sub-unit and a limited logic injection sub-unit. The limited sub-logic number analysis sub-unit is configured to analyze the limited logic to obtain a sub-logic number of the limited logic. The limited sub-logic comparison sub-unit is configured to determine whether the sub-logic number of the limited logic is less than the number of the reserved redundant consumption logic. The limited logic injection sub-unit is configured to inject the limited logic into the redundant consumption logic when the sub-logic number of the limited logic is less than the number of the reserved redundant consumption logic.

[0017] According to an embodiment of the present disclosure, the limited logic comprises consumption data logic and / or consumption time logic. The consumption data logic comprises consumption logic for preset data, and the consumption time logic comprises consumption logic for a preset time period. The job execution module comprises a consumption determination sub-unit, an update determination sub-unit and a consumption sub-unit. The consumption determination sub-unit is configured to determine whether the preset data is consumed before the preset time period when the limited logic comprises the consumption data logic and the consumption time logic. The update determination sub-unit is configured to determine whether the preset data is updated when the preset data is consumed before the preset time period. The consumption sub-unit is configured not to consume the preset data when the preset data is not updated.

[0018] According to an embodiment of the present disclosure, the consumption sub-unit is further configured to consume the updated preset data when the preset data is updated.

[0019] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the above-mentioned consumption logic execution method.

[0020] The fourth aspect of the present disclosure also provides a computer readable storage medium, having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the execution method of the consumption logic.

[0021] The fifth aspect of the present disclosure also provides a computer program product, comprising a computer program which, when executed by a processor, implements the execution method of the consumption logic.

[0022] In the embodiments of the present disclosure, by injecting the received modification parameter into the reserved redundant consumption logic, it is ensured that the modified new job still uses the original logic framework, and on the basis of unchanged code logic framework, the limiting logic is added, and the modified job can directly inherit the state of the original job, so as to not affect the results / state of the original job which has been calculated. BRIEF DESCRIPTION OF DRAWINGS

[0023] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of the embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:

[0024] Figure 1 A diagram schematically shows an application scenario of the execution method of the consumption logic according to the embodiments of the present disclosure;

[0025] Figure 2 A flowchart schematically shows the execution method of the consumption logic according to the embodiments of the present disclosure;

[0026] Figure 3 A flowchart schematically shows the job creation method according to the embodiments of the present disclosure;

[0027] Figure 4 A flowchart schematically shows the limiting logic injection method according to the embodiments of the present disclosure;

[0028] Figure 5 A flowchart schematically shows the job execution method according to the embodiments of the present disclosure;

[0029] Figure 6 A block diagram schematically shows the structure of the execution device of the consumption logic according to the embodiments of the present disclosure;

[0030] Figure 7 A block diagram schematically shows the structure of the execution device of the consumption logic according to the embodiments of the present disclosure; DETAILED DESCRIPTION

[0031] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description is merely exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it would be apparent to those skilled in the art that the embodiments of the present disclosure can be practiced without these specific details. In other instances, well-known structures and methods are not described in detail in order to avoid obscuring the concepts of the present disclosure.

[0032] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components but do not preclude the presence or addition of one or more other features, steps, operations, or components.

[0033] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or excessively formal manner.

[0034] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include at least one of the items enumerated, but not limited to the items enumerated (e.g., "a system having at least one of A, B, and C" should include a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.).

[0035] Before the embodiments of the present disclosure are disclosed in detail, key technical terms related to the embodiments of the present disclosure are explained one by one as follows.

[0036] Flink: Apache Flink is a stream processing framework whose core is a distributed stream data flow engine written in Java and Scala. Flink executes arbitrary stream data programs in a data-parallel and pipeline manner, and Flink's pipeline runtime system can execute batch processing and stream processing programs. In addition, Flink's runtime itself also supports the execution of iterative algorithms. Flink provides a high-throughput, low-latency stream data engine and support for event-time processing and state management. Flink applications have fault tolerance capabilities when machine failures occur, and support exactly-once semantics. Programs can be written in languages such as Java, Scala, Python, and SQL, and are automatically compiled and optimized to data stream programs running in a cluster or cloud environment.

[0037] Zeppelin: Apache Zeppelin is a web-based open source framework that makes interactive data analysis possible. Zeppelin provides data analysis, data visualization, and other functions. Zeppelin is an interactive data analysis notebook based on the Web. It makes it easy to create data-driven, interactive, and collaborative beautiful documents, and supports multiple languages, including Scala (using Apache Spark), Python (Apache Spark), SparkSQL, Hive, Markdown, and Shell, etc.

[0038] FlinkSql: Flink SQL is a set of standard SQL semantics designed to simplify the computing model and reduce the threshold for users to use real-time computing. Since 2015, Alibaba has begun to research open source stream computing engines, and finally decided to build a new generation of computing engines based on Flink, optimize and improve the shortcomings of Flink, and open source the final code in early 2019, which is the Blink we are familiar with. The most significant contribution of Blink on the basis of the original Flink is the implementation of FlinkSQL. Flink SQL is a user-oriented API layer. In the traditional field of stream computing, such as Storm and Spark Streaming, some Function or Datastream API will be provided, and users can write business logic through Java or Scala. This approach is flexible, but it has some shortcomings, such as certain threshold and difficult to tune, and with the continuous update of the version, there are many incompatible places in the API. In this background, there is no doubt that SQL is our best choice.

[0039] State: In Flink, state is called State, which is used to save intermediate results or some cache data. For many DataStream operators in Flink, they need to rely on certain intermediate results, i.e. state, to perform calculations. For example, deduplication operations, CEP detection operations, and Exactly Once, etc. Therefore, state is an important part of Flink processing system.

[0040] In order to realize that the job state can be inherited while the limiting logic is added on the original job, for example, to realize the consumption of data at a specific time, the existing adjustment needs to republish a new job to consume from a specific time for the FlinkSQL job published through zeppelin. In the existing adjustment, the original SQL statement needs to be modified and a new job needs to be republished to consume from a specific time, so as to filter out the related data.

[0041] The Flink job changes each processing logic into an independent computing node at runtime, and each node records its own running state information. The existing adjustment consumes from a specific time, and the newly submitted job changes the original processing logic, so that the processing node changes and cannot inherit the state information of the previous job running, thereby causing the calculated result to be wrong. In addition, a new job needs to be republished every time the time is modified, which is very troublesome.

[0042] In order to solve the technical problems existing in the prior art, an embodiment of the present disclosure provides an execution method of consumption logic, comprising: receiving a modification parameter, the modification parameter comprising a job identifier and a limiting logic; searching for a first job based on the job identifier, wherein the first job reserves a redundant consumption logic; injecting the limiting logic into the redundant consumption logic to complete the modification of the consumption logic of the first job; and executing the first job according to the consumption logic after the injection of the limiting logic.

[0043] In the embodiment of the present disclosure, by injecting the received modification parameter into the reserved redundant consumption logic, it is ensured that the new job after modification still uses the original logic framework, and the limiting logic is added on the basis that the code logic framework does not change, and the modified job can directly inherit the state of the original job, so as to not affect the results / state that have been calculated.

[0044] Figure 1 An application scenario diagram of the execution method of consumption logic according to an embodiment of the present disclosure is schematically shown.

[0045] As shown in Figure 1 The application scenario 100 according to the embodiment can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a communication link medium between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0046] The user can use the terminal devices 101, 102, and 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0047] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc.

[0048] The server 105 can be a server providing various services, such as a background management server providing support for websites browsed by users using the terminal devices 101, 102, and 103 (only as an example). The background management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data, etc. obtained or generated according to user requests) to the terminal devices.

[0049] It should be noted that the execution method of the consumption logic provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the execution device of the consumption logic provided by the embodiments of the present disclosure can generally be arranged in the server 105. The execution method of the consumption logic provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, and 103 and / or the server 105. Accordingly, the execution device of the consumption logic provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, and 103 and / or the server 105.

[0050] It should be understood that the number of terminal devices, networks, and servers in the above description is only illustrative. Any number of terminal devices, networks, and servers can be provided according to the needs of implementation. Figure 1

[0051] The execution method of the consumption logic provided by the embodiments of the present disclosure will be described in detail below based on the scenarios described above. Figure 1 Figures 2 to 5 The execution method of the consumption logic provided by the embodiments of the present disclosure will be described in detail below based on the scenarios described above.

[0052] Figure 2 An execution method of the consumption logic according to an embodiment of the present disclosure is schematically shown in a flowchart.

[0053] As shown in Figure 2 The execution method of the consumption logic of this embodiment includes operations S210-S240, which can be executed by the server 105. ​​

[0054] In operation S210, modified parameters are received, which include job identifier and limiting logic.

[0055] Specifically, consumption logic refers to the logic of selecting and consuming data from the database. Each consumption logic corresponds to a consumption condition, which can be, for example, a specified consumption table, specified consumption data, and a specified consumption time. In the Flink system, consumption logic is executed in the form of FlinkSQL statements. Each FlinkSQL statement contains multiple segments of consumption logic that need to be processed, and each segment corresponds to a compute node; in other words, one consumption logic corresponds to one compute node.

[0056] The job identifier can be used to find jobs that are not running or are currently running on the Flink system. The constraint logic refers to the consumption logic that further restricts one or more existing consumption logics in FlinkSQL. This constraint logic only constitutes a further restriction on the original consumption logic; it cannot modify the fundamental logic of the original consumption logic. For example, if the original consumption logic is "query table A", the constraint logic can only further restrict "query table A" to "query data 'a' in table A", but it cannot change "query table A" to "query table B".

[0057] In operation S220, a first job is found based on the job identifier, wherein redundant consumption logic is reserved in the first job.

[0058] The first job can be either running or not running. The aforementioned reserved redundant consumption logic refers to the practice in FlinkSQL where, during the initial job configuration, some meaningless consumption logic is pre-entered. The main purpose of this meaningless logic is to occupy one or more consumption logics, thereby consuming the resources of one or more computing nodes, for later adjustments. For example, this redundant consumption logic could be logic that executes correctly without errors, such as "1=1" or "2=2," and it will not affect the normal consumption logic.

[0059] In operation S230, the limiting logic is injected into the redundant consumption logic to complete the modification of the consumption logic of the first job.

[0060] In operation S240, the first job is executed according to the consumption logic after the injection of the defined logic.

[0061] Specifically, the operations S230 to S240 correspond to replacing the redundant consumption logic with the limited logic, realizing the inheritance of the state without changing the preceding and subsequent operations, and ensuring that the newly injected limited logic uses the computing nodes reserved by the original redundant consumption logic, so that the overall structural framework of the consumption logic remains unchanged.

[0062] In a typical scenario, the original processing logic in FlinkSQL is: select * from aaa, that is, to select all data in the data table "aaa". Based on business needs, the data "123" in the data table "aaa" is consumed in a specific time period, and the original processing logic is added with limited logic, that is: select * from aaa where name='123' and date_format(timestring, 'YYYY-MM-DD HH:mm:ss')>to_date('2023-01-01 00:00:00', 'YYYY-MM-DD HH:mm:ss'), which selects the consumption of data "123" after 00:00:00 on January 1, 2023.

[0063] It should be noted that in the embodiments of the present disclosure, all the operations performed can be implemented based on Zeppelin, which will not be described here.

[0064] In the embodiments of the present disclosure, by injecting the received modified parameters into the reserved redundant consumption logic, it is ensured that the modified new job still uses the original logic framework, and on the basis of unchanged code logic framework, the limited logic is added, and the modified job can directly inherit the state of the original job, so as to not affect the results / state that have been calculated.

[0065] It can be understood that in the embodiments of the present disclosure, the configuration process of the consumption logic is also part of the inventive concept, and is specifically as follows:

[0066] Figure 3 A flowchart of a job creation method according to an embodiment of the present disclosure is schematically shown.

[0067] As Figure 3 shown, the job creation method of this embodiment includes operations S310 to S330.

[0068] In operation S310, a configuration logic is received, the configuration logic including a first configuration logic and a second configuration logic, the first configuration logic being an actual consumption logic, and the second configuration logic being a redundant consumption logic.

[0069] Among them, actual consumption logic and redundant consumption logic are opposite concepts. The former is the consumption logic that relevant personnel hope to achieve, and it is the logic that relevant personnel configure to perform specific consumption behaviors. The latter is the consumption logic used to occupy computing node resources in advance, and it is the invalid / blank logic configured by relevant personnel that will not affect other logics.

[0070] In operation S320, a first computing node is allocated based on the first configuration logic.

[0071] According to an embodiment of this disclosure, the step of allocating a first computing node based on the first configuration logic includes: identifying configuration sub-logic in the first configuration logic to obtain the number of sub-logic; and allocating a corresponding first computing node according to the number of sub-logic.

[0072] The number of sub-logic mentioned above is the same as the number of consumption logics, and different sub-logic impose different consumption conditions.

[0073] In operation S330, redundant computing nodes are allocated based on the second configuration logic.

[0074] According to an embodiment of this disclosure, the second configuration logic includes the number of redundant computing nodes, and the allocation of redundant computing nodes based on the second configuration logic includes: allocating corresponding redundant computing nodes according to the number of redundant computing nodes.

[0075] Specifically, the first configuration logic mentioned above may include one or more consumption logics, and thus, the first configuration logic may occupy one or more computing nodes. The second configuration logic mentioned above may also include one or more consumption logics. The number of redundant consumption logics in the second configuration logic is preset by relevant personnel according to the actual business situation, and will not be elaborated here.

[0076] Figure 4 A flowchart illustrating a defined logic injection method according to an embodiment of the present disclosure is shown schematically.

[0077] like Figure 4 As shown, the limited logic injection method of this embodiment includes operations S410 to S430, which can at least partially execute the above-mentioned operation S230.

[0078] In operation S410, the limiting logic is parsed to obtain the number of sub-logic of the limiting logic.

[0079] In operation S420, it is determined whether the number of sub-logic of the limited logic is less than the number of reserved redundant consumption logic.

[0080] In operation S430, in a case where the number of sub-logics of the defined logic is less than the number of the reserved redundant consuming logics, the defined logic is injected into the redundant consuming logics.

[0081] As shown in the above example, in select * from aaa where name='123' and date_format(timestring, 'YYYY-MM-DD HH:mm:ss')>to_date('2023-01-01 00:00:00', 'YYYY-MM-DD HH:mm:ss'), both the data specifically selected for consumption and the consumption time of the data are limited as two sub-logics. The different sub-logics are connected by an and relationship of "and". Of course, other logical operators representing relationships are also included between different sub-logics, such as or and other logical operators, which are not described herein again. By identifying the number of logical operators, the number of sub-logics in the redundant consuming logic can be determined.

[0082] It should be noted that in the financial field, each job performed is a link in a specific financial business, and therefore, in general, each job is not executed once, but many times in a specific period or time period. Therefore, for the same consuming logic, although the consuming logic does not change, the business will be affected by whether the data in the source database is updated. Therefore, appropriate measures need to be taken to ensure the timeliness of the data, as follows:

[0083] Figure 5 A flowchart of a job execution method according to an embodiment of the present disclosure is schematically shown.

[0084] As Figure 5 shown, the job execution method of this embodiment includes operations S510-S540, which can at least partially perform the above operation S240.

[0085] According to an embodiment of the present disclosure, the defined logic includes consuming data logic and / or consuming time logic, the consuming data logic includes consuming logic for a preset data, and the consuming time logic includes consuming logic for a preset time period.

[0086] In operation S510, in a case where the defined logic includes the consuming data logic and the consuming time logic, it is determined whether the preset data is consumed before the preset time period.

[0087] In operation S520, in a case where the preset data is consumed before the preset time period, it is determined whether the preset data is updated.

[0088] Specifically, in the case of limiting the logic for consuming the data at a future time, it is determined whether the data is consumed before the future time, and if not, the normal consumption logic is performed, and if so, it is determined whether the data has been updated.

[0089] In operation S530, in the case of the preset data not being updated, the preset data is not consumed.

[0090] In operation S540, in the case of the preset data being updated, the updated preset data is consumed.

[0091] Specifically, in the case of the data not being updated before a future time, it is selected not to be consumed, and in the case of being updated, it is re-consumed at the future time.

[0092] It can be understood that due to the characteristics of financial business, in the case of the data having been consumed, in order to ensure the timeliness of data update, the data is re-consumed.

[0093] Based on the execution method of the consumption logic described above, the disclosure also provides an execution device of the consumption logic. The following will be described in detail Figure 6 The device is described in detail.

[0094] Figure 6 The structure block diagram of the execution device of the consumption logic according to the embodiment of the disclosure is schematically shown.

[0095] As Figure 6 shown, the execution device 600 of the consumption logic of the embodiment includes a modification parameter receiving module 610, a query module 620, a limiting logic injection module 630, and a job execution module 640.

[0096] The modification parameter receiving module 610 is configured to receive a modification parameter, and the modification parameter includes a job identifier and a limiting logic. In an embodiment, the modification parameter receiving module 610 can be configured to perform the operation S210 described above, and details are not repeated here.

[0097] The query module 620 is configured to query a first job based on the job identifier, and the first job reserves a redundant consumption logic. In an embodiment, the query module 620 can be configured to perform the operation S220 described above, and details are not repeated here.

[0098] The limiting logic injection module 630 is configured to inject the limiting logic into the redundant consumption logic, and complete the modification of the consumption logic of the first job. In an embodiment, the limiting logic injection module 630 can be configured to perform the operation S230 described above, and details are not repeated here.

[0099] The job execution module 640 is configured to execute the first job according to the consumption logic after the injection of the defined logic. In an embodiment, the job execution module 640 can be configured to perform the operation S240 described above, and details are not repeated here.

[0100] In an embodiment of the present disclosure, by injecting the received modification parameter into the reserved redundant consumption logic, it is ensured that the new job after modification still uses the original logic framework, the defined logic is added on the basis of unchanged code logic framework, and the modified job can directly inherit the state of the original job, thereby not affecting the results / state that have been calculated.

[0101] According to an embodiment of the present disclosure, the apparatus further comprises a job creation module, which comprises a configuration logic receiving unit, a first computing node allocating unit, and a redundant computing node allocating unit. The configuration logic receiving unit is configured to receive configuration logic, the configuration logic comprising first configuration logic and second configuration logic, the first configuration logic being actual consumption logic, and the second configuration logic being redundant consumption logic. The first computing node allocating unit is configured to allocate first computing nodes based on the first configuration logic. The redundant computing node allocating unit is configured to allocate redundant computing nodes based on the second configuration logic.

[0102] According to an embodiment of the present disclosure, the first computing node allocating unit comprises a first sub-logic number identifying sub-unit and a first computing node allocating sub-unit. The first sub-logic number identifying sub-unit is configured to identify configuration sub-logics in the first configuration logic to obtain a sub-logic number. The first computing node allocating sub-unit is configured to allocate corresponding first computing nodes according to the sub-logic number.

[0103] According to an embodiment of the present disclosure, the second configuration logic comprises a redundant computing node number, and the redundant computing node allocating unit comprises a redundant computing node allocating sub-unit. The redundant computing node allocating sub-unit is configured to allocate corresponding redundant computing nodes according to the redundant computing node number.

[0104] According to an embodiment of the present disclosure, the defined logic injection module comprises a defined sub-logic number analyzing unit, a defined sub-logic comparing unit, and a defined logic injection unit. The defined sub-logic number analyzing unit is configured to analyze the defined logic to obtain a sub-logic number of the defined logic. The defined sub-logic comparing unit is configured to determine whether the sub-logic number of the defined logic is less than the number of the reserved redundant consumption logic. The defined logic injection unit is configured to inject the defined logic into the redundant consumption logic in a case where the sub-logic number of the defined logic is less than the number of the reserved redundant consumption logic.

[0105] According to an embodiment of the present disclosure, wherein the limiting logic comprises consumption data logic and / or consumption time logic, the consumption data logic comprises consumption logic for preset data, and the consumption time logic comprises consumption logic for a preset time period, the job execution module comprises a consumption judging unit, an update judging unit, and a consumption unit, the consumption judging unit is configured to, in a case where the limiting logic comprises the consumption data logic and the consumption time logic, judge whether the preset data is consumed before the preset time period; the update judging unit is configured to, in a case where the preset data is consumed before the preset time period, judge whether the preset data is updated; and the consumption unit is configured to, in a case where the preset data is not updated, not consume the preset data.

[0106] According to an embodiment of the present disclosure, wherein the consumption unit is further configured to, in a case where the preset data is updated, consume the updated preset data.

[0107] According to an embodiment of the present disclosure, any of the modification parameter receiving module 610, the query module 620, the limiting logic injection module 630, and the job execution module 640 can be combined in one module for implementation, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the modification parameter receiving module 610, the query module 620, the limiting logic injection module 630, and the job execution module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of hardware or firmware that can be integrated or packaged with a circuit, or any one of software, hardware, and firmware or any appropriate combination of any of them. Alternatively, at least one of the modification parameter receiving module 610, the query module 620, the limiting logic injection module 630, and the job execution module 640 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.

[0108] Figure 7 A block diagram of an electronic device suitable for implementing the execution method of consumption logic according to an embodiment of the present disclosure is schematically shown.

[0109] As Figure 7As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0110] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0111] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0112] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0113] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include but not limited to: 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), a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories such as the ROM 702 and / or the RAM 703 described above and / or one or more memory other than the ROM 702 and the RAM 703.

[0114] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the item recommendation method provided by the embodiments of the present disclosure.

[0115] The above functions defined in the system / device of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. According to an embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by computer program modules.

[0116] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of signals on network media. The computer program containing program codes can be transmitted by any appropriate network media, including but not limited to: wireless, wired, etc., or any appropriate combination thereof.

[0117] In such an embodiment, the computer program can be downloaded and installed from the network by the communication part 709, and / or installed from the detachable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0118] According to embodiments of the present disclosure, program code of the computer program for performing the methods provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and can be implemented in a computer program product. Specifically, the computer program can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. The programming language includes, but is not limited to, Java, C++, python, “C” language, or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, and partly on a remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).

[0119] The computer program product of the present disclosure can be a computer program product, which is a machine-readable medium (or computer readable medium) having stored therein a sequence of instructions readable by a machine (e.g., a computer). The instructions in the machine-readable medium focus on the function of the computer program (e.g., in the form of a computer program product). The instructions can be executed by one or more processors to produce a computer-implemented process, such as the one(s) described above. The instructions can be stored in a computer memory, which can be a single memory or spread out over multiple memories. The machine-readable medium can be a magnetic or optical disk, a magnetic tape, a semiconductor memory, a computer disk, or any other suitable medium. The machine-readable medium can be loaded into the computer memory, or the computer memory can access the machine-readable medium through a connection, such as a communication network. The instructions represent examples of the program code means adapted to carry out the steps of the disclosed methods.

[0120] Those skilled in the art will understand that features of the various embodiments and / or claims of the present disclosure can be combined or / and integrated with one another, even though such a combination or integration is not expressly disclosed in the present disclosure. In particular, the features of the various embodiments and / or claims of the present disclosure can be combined or / and integrated with one another in any combination, without departing from the spirit and scope of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.

[0121] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims

1. A method for executing consumption logic, comprising: Receive modified parameters, which include job identifier and limiting logic; The first job is located based on the job identifier, wherein the first job has reserved redundant consumption logic; wherein the redundant consumption logic includes meaningless logic that is executed correctly and does not report errors, and the redundant consumption logic is used to occupy the resources of one or more computing nodes. The limiting logic is injected into the redundant consumption logic to modify the consumption logic of the first job; and The first job is executed according to the consumption logic after the aforementioned limited logic is injected.

2. The method according to claim 1, wherein, The method for creating the first job includes: The configuration logic includes a first configuration logic and a second configuration logic, wherein the first configuration logic is the actual consumption logic and the second configuration logic is the redundant consumption logic. The first computing node is allocated based on the first configuration logic; and Redundant computing nodes are allocated based on the second configuration logic.

3. The method according to claim 2, wherein, The allocation of the first computing node based on the first configuration logic includes: Identify the configuration sub-logic in the first configuration logic to obtain the number of sub-logic; and Assign the corresponding first computing node according to the number of sub-logic items.

4. The method according to claim 2, wherein, The second configuration logic includes the number of redundant computing nodes. The allocation of redundant computing nodes based on the second configuration logic includes: The corresponding redundant computing nodes are allocated according to the number of redundant computing nodes.

5. The method according to any one of claims 2 to 4, wherein, The step of injecting the limiting logic into the redundant consumption logic to modify the consumption logic of the first job includes: Parse the constraint logic to obtain the number of sub-logic of the constraint logic; Determine whether the number of sub-logic of the defined logic is less than the number of reserved redundant consumption logic; and If the number of sub-logic of the defined logic is less than the number of reserved redundant consumption logic, the defined logic is injected into the redundant consumption logic.

6. The method according to claim 1, wherein, The limiting logic includes consumption data logic and / or consumption time logic. The consumption data logic includes consumption logic for preset data, and the consumption time logic includes consumption logic for preset time periods. The step of executing the first job according to the consumption logic after injecting the defined logic includes: When the limiting logic includes the consumption data logic and the consumption time logic, it is determined whether the preset data was consumed before the preset time period; If the preset data is consumed before the preset time period, determine whether the preset data should be updated; and If the preset data is not updated, the preset data will not be consumed.

7. The method according to claim 6, wherein, After determining whether the preset data has been updated, the method further includes: In the event of a preset data update, consume the updated preset data.

8. An execution device for consumption logic, comprising: A parameter modification receiving module is used to receive modified parameters, which include job identifiers and limiting logic; The query module is used to find the first job based on the job identifier, wherein the first job has reserved redundant consumption logic; wherein the redundant consumption logic includes meaningless logic that is executed correctly and does not report errors, and the redundant consumption logic is used to occupy the resources of one or more computing nodes; A constraint logic injection module is used to inject the constraint logic into the redundant consumption logic, thereby modifying the consumption logic of the first job; and The job execution module is used to execute the first job according to the consumption logic after the injection of the defined logic.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dynamic rule updating method and device and storage medium

    CN112000350A