Computational logic processing method, electronic device and readable storage medium

Decoupling computational logic from application modules through a server-side calculation engine enhances efficiency and maintainability in data processing applications by enabling independent configuration and management of complex insurance business calculations.

JP2024536546AActive Publication Date: 2024-10-04エバオテック コーポレーション
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024523130
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-18
Filing Date
2022-09-01
Publication Date
2024-10-04
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

Existing computational logic in data processing applications, particularly in insurance business calculations, is tightly coupled to application modules, leading to high development difficulty and low efficiency due to diverse implementation needs and complex combinational calculation logics.

Method used

A method that decouples computational logic from application modules by using a server-side calculation engine to process input data and configuration data, generating static and dynamic calculation subgraphs, enabling efficient reuse and maintenance of calculation logic.

Benefits of technology

This approach improves software development efficiency and maintainability by allowing independent configuration, management, and operation of computational logic, reducing errors and simplifying maintenance across multiple applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024536546000001_ABST
    Figure 2024536546000001_ABST
Patent Text Reader

Abstract

This application relates to the field of computer software and discloses a method for processing computational logic, an electronic device and a readable storage medium. The computational logic processing method provided by this application is used in an electronic device including a server side and a client side, in which the client side obtains input data and configuration data and sends them to the server side, the server side analyzes the configuration data, generates a static computation subgraph, connects the input data and the static computation subgraph to generate a dynamic computation subgraph, and finally executes the dynamic computation subgraph to obtain a computation result, thereby realizing the decoupling of the computational logic and the input data, realizing the reuse of the computational logic, and improving the development efficiency of software developers. In addition, the computational logic is realized, configured, managed and operated in an independent manner, so that errors in the realization of the computational logic are independent of the application module, thereby improving the maintainability of the application module.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on October 18, 2021, bearing application number 202111211756.7 and entitled "Computational logic processing method, electronic device and readable storage medium", the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of financial software, and in particular to a method for processing computational logic, an electronic device and a readable storage medium. [Background technology]

[0003] Currently, in both the field of online transaction processing and the field of big data processing, the computational logic used in the data processing process, such as the computational process, the computational rules, and the computational formulas, are often realized by coding in a programming language, and the computational logic developers are highly required to realize the computational logic by the coding method. In addition, the realization of the same computational logic in different data processing applications is diverse, which is disadvantageous to the maintenance of the data processing application.

[0004] In the field of insurance business, some combination calculation logic is relatively complex, for example, it includes various calculation logics such as decision tree calculation, four arithmetic operations, aggregation calculation, calculation condition rules, etc., and the calculation steps of the combination calculation logic may also change according to the rules. In addition, the calculation process of the logical combination calculation logic, for example, when creating a new insurance product, needs to create new calculation logic, etc., and there is a problem that coding such complex combination calculation logic is difficult to develop and has low work efficiency. Summary of the Invention

[0005] The present embodiments provide a method, an electronic device, and a readable storage medium for processing computational logic to solve the problem in the prior art that computational logic must be tightly coupled to an application module and implemented by coding.

[0006] According to a first aspect, embodiments of the present invention provide a method for processing computational logic for use in an electronic device, the method comprising: The client side acquires input data for describing data values ​​necessary for executing the computational logic, and configuration data for describing the placement information of the computational logic during the business process and the relational information between the computational logics, and transmits the input data to the server side; The server side analyzes the configuration data and generates a static computation subgraph, in which the computation logic is a node and the data flow direction between the computation logics is an edge; The server side connects the input data and the static computation subgraph to generate a dynamic computation subgraph; The server side includes executing the dynamic computation sub-graph and obtaining the computation result. In a possible implementation of the first aspect, the server side analyzes the configuration data and generates a static computation subgraph, The server side serializes the computation logic having a hierarchical structure; The server side includes generating a static computation sub-graph based on the serialized result.

[0007] In a possible implementation of the first aspect, the server side generates a static computation subgraph based on the serialized result, The server side involves generating a static computation sub-graph based on the serialized result through a flow-based programming technique.

[0008] In a possible implementation of the first aspect, the server side connects the input data and the static computation subgraph to generate a dynamic computation subgraph, The server side includes: determining, based on the data parameters of the computation logic in the static computation sub-graph, a corresponding data value in the input data, and connecting the data value to the data parameter.

[0009] In a possible implementation of the first aspect, the server side executes the dynamic computation subgraph to obtain a computation result, The server side executes a dynamic computation subgraph to obtain an initial computation result, formats the initial computation result based on the format arrangement information in the configuration data, obtains formatted data, and uses the formatted data as the computation result.

[0010] In a possible implementation according to the first aspect above, the computational logic includes at least one of a computational formula, an extension function, a variable, a filter, and a decision tree.

[0011] In a possible implementation of the first aspect above, the format of the input data is JSON format and the configuration data is described in a combination of YAML and DSL.

[0012] According to a second aspect, embodiments of the present invention provide an electronic device, the electronic device comprising: a memory for storing instructions to be executed by one or more processors of the electronic device; and a processor for executing the processing method of the computational logic of any one of the first aspect and possible realizations according to the first aspect, said processor being one of the processors of an electronic device.

[0013] According to a third aspect, embodiments of the present application provide a readable storage medium having instructions stored thereon which, when executed on an electronic device, cause the electronic device to perform a method of processing computational logic according to any one of the first aspect and possible implementations according to the first aspect.

[0014] According to a fourth aspect, the present embodiment is characterized in that it is a computer program product comprising computer programs / instructions which, when executed by a processor, realise a method for processing computational logic according to the first aspect and any one of the various possible realisations according to the first aspect.

[0015] The computational logic processing method provided in the embodiment of the present application is used in an electronic device including a server side and a client side, in which the client side obtains input data and configuration data and sends them to the server side, the server side analyzes the configuration data to generate a static computation subgraph, then connects the input data and the static computation subgraph to generate a dynamic computation subgraph, and finally executes the dynamic computation subgraph to obtain a computation result, thereby realizing the decoupling of the computational logic and the input data, realizing the reuse of the computational logic, and improving the development efficiency of software developers. In addition, the computational logic is realized, configured, managed and operated in an independent manner, so that errors in the realization of the computational logic are independent of the application module, thereby improving the maintainability of the application module. [Brief description of the drawings]

[0016] [Figure 1] FIG. 1 is a scene diagram illustrating the processing of computational logic according to some embodiments of the present application. [Diagram 2] FIG. 2 is a schematic diagram showing some example computational logic according to some embodiments of the present application. [Diagram 3] FIG. 3 is a diagram illustrating a hardware configuration of an electronic device according to some embodiments of the present application. [Figure 4] FIG. 4 is a flow chart illustrating a method of operation of computational logic according to some embodiments of the present application. [Diagram 5] FIG. 5 is a schematic diagram showing the format of input data according to some embodiments of the present application. [Figure 6]FIG. 6 is a diagram illustrating an example of configuration data for calculating insurance premiums according to some embodiments of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] Exemplary embodiments of the present application include, but are not limited to, computational logic processing methods, electronic devices, and readable storage media.

[0018] As used herein, the term "module" should be understood to refer to or include, or be part of, an application specific integrated circuit (ASIC), electronic circuitry, processor (shared, dedicated, or group) that executes one or more software or firmware programs and / or memory, combinatorial logic circuitry, and / or other suitable hardware components that provide the described functionality.

[0019] In each embodiment of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. It is to be understood that, according to other aspects, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0020] It should be understood that the computational logic processing method of the present application is applicable to a situation where a computational logic flow consisting of various kinds of computational logic is calculated.

[0021] Hereinafter, the embodiments of the present application will be described in more detail with reference to the drawings. Fig. 1 provides a scenario of calculating a calculation logic flow consisting of various calculation logics according to some embodiments of the present application. As shown in Fig. 1, a user 100 provides input data and configuration data to an application module 200, the application module 200 receives the input data and configuration data and transmits them to a calculation engine 300 for calculation, the calculation engine 300 returns the calculation result obtained after the calculation to the application module 200, and the application module 200 performs subsequent processing or presents the calculation result to the user 100 based on the returned calculation result.

[0022] Computational Logic (CL) refers to elements related to calculations required to realize business functions in a business application, and may include, but is not limited to, calculation processes, calculation rules, calculation formulas, etc. Specifically, some basic computational logics include, for example, calculation formulas, extension functions, variables, filters, decision trees, etc. Computational logics usually include data parameters, and the computational logic performs calculations based on the assignment of the data parameters to obtain specific computational logic results.

[0023] The user 100 may be a person familiar with the business of software items or a professional software developer, and the user 100 provides the application module 200 with prepared input data and configuration data. Here, the input data is a specific data value, and is used as a substitution value of a data parameter in a calculation logic. The configuration data is for arranging a complex business process including various calculation logics, and includes related arrangement information and data parameters of various calculation logics, and the configuration data does not include data values ​​used in the specific calculation of the calculation logic. The separation of the configuration data and the input data can realize the decoupling of the calculation logic and the input data, thereby realizing the reuse of the business process, avoiding the repeated development of the same business process, and improving the work efficiency of the software developer.

[0024] The application module 200 is for acquiring input data and configuration data provided by the user 100, and the acquisition method may adopt various methods, including, but not limited to, acquiring by interface method, acquiring in file format, acquiring according to user selection, etc. For example, the application module 200 may provide an input data interface and a configuration data interface to the user 100, and the user 100 may input relevant data through the input data interface and the configuration data interface, and after the input by the user 100 is completed, the input data interface and the configuration data interface may submit the data input by the user to the application module 200. The user 100 may store the input data and configuration data in a data file in advance, and submit the data file to the application module 200, and the application module 200 may obtain the input data and configuration data by analyzing the data file. The application module 200 may provide a plurality of pre-set configuration data templates to the user 100, and the configuration data template selected by the user 100 or the modified configuration data template may be used as the configuration data.

[0025] After acquiring the input data and the configuration data, the application module 200 transmits the input data and the configuration data to the calculation engine 300 for calculation. The calculation engine 300 may perform abstraction processing on various calculation logics, and may obtain a calculation result by substituting the input data into the calculation logic defined in the configuration data. The input data processed by the calculation engine 300 may include different data structures, including, but not limited to, a hierarchical structure, a list structure, and the like.

[0026] 2 shows examples of some calculation logics that can be supported by the calculation engine 300, including List, Item, Filter, Dtree, Var, and Expr, where the calculation logic of the expression may further include function calculation logic such as max, min, sum, sumif, round, etc. The user 100 may use one or more of these calculation logics in the configuration data, and when multiple calculation logics are used, the user 100 may configure the multiple calculation logics in the configuration data in the form of a calculation logic flow.

[0027] Finally, the calculation engine 300 returns the calculation result of the calculation logic to the application module 200, so that the application module 200 performs subsequent processing. The application module 200 may use the calculation result as input data for subsequent processing, or may directly present the calculation result to the user.

[0028] The method provided by the technical means of the present application executes configuration data and input data including computational logic on a separately installed computation engine 300, and realizes centralized execution of computational logic originally distributed among multiple application modules 200 on the computation engine 300, and realizes the calculation of computational logic in a centralized manner in the computation engine 300, which eliminates the need for software developers to repeatedly realize computational logic for each application module 200, thereby reducing the workload of software developers and improving the development efficiency of software applications. In addition, the computation engine 300 centrally manages the realization and execution of computational logic, thereby improving the maintainability of software applications. If an error exists in the realization of computational logic, it is only necessary to correct it in the computation engine 300, and the corrected accurate realization can be applied to multiple application modules 200, which makes the maintenance of the application modules 200 more convenient.

[0029] 3 is a block diagram illustrating a hardware configuration of an electronic device 30 for implementing a method of processing computational logic according to some embodiments of the present application. In the embodiment illustrated in FIG. 2, the electronic device 30 may include one or more processors 301, system control logic 302 coupled to at least one of the processors 301, system memory 303 coupled to the system control logic 302, non-volatile memory (NVM) 304 coupled to the system control logic 302, and a network interface 306 coupled to the system control logic 302.

[0030] In some embodiments, the processor 301 may include one or more single-core or multi-core processors. In some embodiments, the processor 301 may include any combination of general-purpose and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments in which the electronic device 30 employs an Evolved Node B (eNB) or Radio Access Network (RAN) controller, the processor 301 may be configured to perform various applicable embodiments. For example, the processor 301 may be used to execute a method of processing computational logic.

[0031] In some embodiments, the system control logic 302 may include any suitable interface controller to provide any suitable interface to at least one of the processors 301 and / or any suitable device or component that communicates with the system control logic 302.

[0032] In some embodiments, system control logic 302 may include one or more memory controllers to provide an interface connected to system memory 303. System memory 303 may be used to load and store data and / or instructions. For example, system memory 303 may load instructions for parsing computational logic in embodiments of the present disclosure, store input data, configuration data, etc.

[0033] In some embodiments, the system memory 303 of the electronic device 30 may include any suitable volatile memory, such as a suitable Dynamic Random Access Memory (DRAM).

[0034] NVM memory 304 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM memory 304 may include any suitable non-volatile memory, such as flash memory, and / or any suitable non-volatile storage device, such as at least one of a hard disk drive (HDD), a compact disc (CD) drive, and a digital versatile disc (DVD) drive. In some embodiments, NVM memory 304 may be used to store input data and configuration data obtained by application modules.

[0035] NVM memory 304 may comprise a portion of the storage resources on the apparatus in which electronic device 30 is implemented or may be accessed by the device, but is not necessarily part of the device. For example, NVM memory 304 may be accessed over a network via network interface 306.

[0036] In particular, system memory 303 and NVM memory 304 may include temporary and permanent copies, respectively, of instructions 305. Instructions 305 may include instructions that, when executed by at least one of processors 301, cause electronic device 30 to perform the method shown in Figure 3. In some embodiments, instructions 305, hardware, firmware and / or software components thereof may be located in addition to / alternatively to system control logic 302, network interface 306 and / or processor 301.

[0037] The network interface 306 may include a transceiver for providing a wireless interface to the electronic device 30 and may further communicate with any other suitable devices (e.g., a front-end module, an antenna, etc.) via one or more networks. In some embodiments, the network interface 306 may be integrated with other components of the electronic device 30. For example, the network interface 306 may be integrated with at least one of the system memory 303, the NVM memory 304, and a firmware device (not shown) having instructions of the processor 301, and when at least one of the processors 301 executes the instructions, the electronic device 30 may implement the method illustrated in the method embodiment. In this embodiment, the network interface 306 may be used to receive input data and configuration data sent from the application module.

[0038] The network interface 306 may further include any suitable hardware and / or firmware to provide a multiple-input, multiple-output wireless interface. For example, the network interface 306 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0039] In some embodiments, at least one of the processors 301 may be packaged together with one or more controller logic for system control logic 302 to form a System In a Package (SiP). In some embodiments, at least one of the processors 301 may be integrated on the same die as one or more controller logic for system control logic 302 to form a System on Chip (SoC).

[0040] The electronic device 30 may further include an input / output (I / O) device 307. The I / O device 307 may include a user interface that allows a user to interact with the electronic device 30. Peripheral components may also interact with the electronic device 30 depending on the design of the peripheral component interface. 3 may not constitute a specific limitation of electronic device 30. In some other embodiments of the present application, electronic device 30 may include more or fewer components than shown, may combine some components, may separate some components, or may have different component arrangements. The components shown may be implemented in hardware or software, or a combination of software and hardware. Hereinafter, referring to the structure shown in Figure 3 above, the technical means of the present application will be introduced in detail in conjunction with specific scenarios based on Figure 4. As shown in Figure 3, in some embodiments of the present application, the technical means of the computational logic processing method includes the following steps:

[0041] S401: The client side provides input data and configuration data to the server side. The client side is used to obtain input data and configuration data for computing the computation logic, and the client side may be a module or component in a software application. The server side is used to receive the input data and configuration data sent from the client side, and compute the corresponding computation logic according to the input data and configuration data to obtain the computation result. The hardware device corresponding to the server side and the client side may be an electronic device 30.

[0042] In some embodiments of the present application, the user 100 may provide the client side with both the input data and the corresponding configuration data at the same time, or may provide only the input data to the client side and the configuration data is generated by the client side. Here, the client side may generate the configuration data in various ways, for example, the client side may generate the configuration data by using a pre-developed configuration data template as is, or may generate the configuration data based on the result of the modification of the configuration data template by the user 100.

[0043] In addition, the client side may provide a corresponding input interface and configuration interface for the user 100 to facilitate the user 100 to input relevant data. The input interface and configuration interface may be a graphical interface, and may further provide a graphical guide process for the input process of relevant data, which may guide the user 100 to complete the input data and configuration data input, and reduce the possibility of errors occurring in the input process.

[0044] In some embodiments of the present application, the format of the input data may have various formats, including but not limited to XML format, JSON format, etc. After receiving the input data provided by the user 100, the client side may convert the input data into a unified data format used by the client side, for example, the format of the input data provided by the user 100 is XML format, and the client side may convert the input data from XML format to JSON format. The client side may directly use the format of the input data, for example, the format of the input data provided by the user 100 is JSON format, and the client side may use the input data in JSON format as it is.

[0045] FIG. 5 shows an example of the format of input data in some embodiments of the present application. As shown in FIG. 5, [key] represents the name of one specific data parameter in the input data, and the name of the data parameter may be described using any character string, for example, the name of one data parameter is "username". Here, the data parameter corresponds to a data parameter of the same name in the configuration data, and the data value corresponding to the data parameter in the input data is used to substitute for the parameter of the same name in the configuration data in the operation process of the computation logic. [value] represents the data value corresponding to the data parameter, and the data value may be a character string consisting of any letters and numbers.

[0046] A plurality of data parameters and corresponding data values ​​may be defined in the input data. In FIG. 5, it is expressed in the form of "...":"...". "items" is a keyword in the input data, and is used to describe data organized in a hierarchical structure in the input data. "[id]" in "items" is a unique identifier that represents one item, and the corresponding item can be determined by the unique identifier, and the unique identifier may be a string of any letters and numbers. The meaning of "[key]" and "[value]" in "items" is almost the same as the above meaning, except that the scope of action is different, and "[key]" and "[value]" in "items" are used only within the scope of "items", while the above "[key]" and "[value]" are used within the entire scope of the input data.

[0047] The configuration data can be expressed in a variety of formats as well, for example, XML format, JSON format, etc. In order to easily describe the computation logic and the corresponding computation graph, in some embodiments of the present application, the configuration data is described in a combination of YAML and DSL. The YAML language is a data-centric configuration file language that provides a virtually universal data serialization format, which is very convenient for humans to read and write data. YAML can support three data structures, including objects, sequences, and scalars, where an object is a collection of key / value pairs, a sequence is a set of ordered values, and a scalar is a single, non-redecomposable value. The basic grammar rules of the YAML language are that it is case-sensitive, it uses indentation to represent hierarchical relationships, it does not allow the use of the Tab key when indenting, only spaces are allowed, the number of indented spaces is not important, and elements of the same hierarchy are only required to be aligned to the left.

[0048] A Domain Specific Language (DSL) is a computer language that is specialized for a certain business domain, and can only be used in a certain business domain, such as finance or insurance. DSL allows domain experts to describe all business activities and business rules in a business domain in a simple programming style, thereby improving the readability of software code and enabling better communication between software developers and domain experts.

[0049] In this embodiment, configuration data is configured by combining YAML and DSL, providing simple grammar characteristics for the configuration data configuration in the fields of finance and insurance, making it easy to learn and master, reducing the learning curve of the user 100, and improving the efficiency of the user 100 in developing configuration data.

[0050] FIG. 6 shows an example of configuration data for calculating insurance premiums in some embodiments of the present application. As shown in FIG. 6, app is used to describe the name corresponding to the configuration data, i.e., "policy premium calculation", and the name of the configuration data is usually used to support visualization of the calculation process of the calculation logic. The main keyword is used immediately after the app keyword to clearly indicate the start of the calculation process of the calculation logic. The calculation process of the calculation logic may include multiple calculation steps, and the calculation steps are defined using the steps keyword. The calculation step may include various calculation logics, such as the calculation logic list in the figure. The calculation logic has a corresponding name, and in some embodiments of the present application, the name of the calculation logic may be given explicitly or implicitly, for example, the name of the calculation logic list in the figure is displayed as "name:policies", and the name of the calculation logic var in the figure is not given directly but is given implicitly. Similarly, the name of the calculation logic may also be used to support visualization of the calculation process of the calculation logic.

[0051] In some embodiments of the present application, the calculation logic may further include sub-calculation logic, and the sub-calculation logic performs subsequent processing on the output data of the calculation logic. As shown in FIG. 6, the calculation logic list includes sub-calculation logic items, and the items can be processed on the output data of the list. The calculation logic list may also include multiple sub-calculation logic items, and each item may be executed in parallel to improve execution efficiency. Here, in order to specify items involved in parallel calculation, filtering conditions may be performed by the filters keyword, and items that satisfy the filtering conditions will perform corresponding calculations. The name of the filter in FIG. 6 is "calc own damage part", and the filtering condition is whether the data parameter code in the item is equal to a predefined value OD_COMP, and code is a data parameter defined in the input data. If the filtering condition is satisfied, i.e., the code value is OD_COMP, the dynamic calculation graph with the name "own damage part" is executed.

[0052] The dynamic computation graph is defined by the graphs keyword, and the computation logic for completing various insurance premium calculations is defined in the dynamic computation graph, which includes var, decisiontree, and expr, and the computation logic round is further used in expr. As can be seen from the contents in the figure, an insurance premium calculation process includes insurance premium rate calculation and insurance premium calculation, where the insurance premium rate calculation is completed by the computation logic decisiontree, and the insurance premium calculation is completed by the computation logic expr. The value SumInsuredRate corresponding to the computation logic decisiontree is the reference name of the defined data in the external data source. The external data source may be, for example, an Excel file, in which various calculation formulas and corresponding data for calculating insurance premium rates are defined, and for each calculation formula and corresponding result data, a corresponding reference name is provided for external access.

[0053] In some embodiments of the present application, the configuration data may include an operation configuration related to the operation process of the calculation logic, or may include a specific configuration corresponding to a specific calculation logic. The specific configuration corresponds only to a specific calculation logic, and other calculation logics do not correspond to the specific configuration. For example, for the calculation logic decisiontree, a normal configuration method includes configuring it in an Excel file, and the content of the Excel file needs to include a specific configuration required to build a decision tree, and the calculation logic expr does not have a specific configuration for building a decision tree.

[0054] S402: The server side analyzes the configuration data and builds a static computation subgraph. After receiving the configuration data sent from the client side, the server side analyzes the configuration data and constructs a static computation subgraph based on the analysis result.

[0055] In some embodiments of the present application, the server side analyzes the configuration data by serializing the computation logic having a hierarchical structure in the configuration data, and then constructs a static computation subgraph based on the serialization result. The serialization here converts the computation logic having a hierarchical structure into computation logic having a sequence structure. For example, a computation logic list having a hierarchical structure may include a plurality of steps, one of which includes an item computation logic. After the server side analyzes the configuration data, the computation logic list and the item can be serialized into an ordered array (i.e., an actual calculation procedure). The array obtained after serialization constructs a static computation subgraph by a flow-based programming technique (FBP). Flow-based programming is a data flow programming paradigm and is one of the component-based software engineering methods. Flow-based programming regards a software application as a set of processes, and processes communicate with each other through connections, and processes are accessed and connected through ports, and this method is similar to communication through a computer network. Flow-based programming transforms data using different components, which are essentially packaged modules or functions, and data flow is communicated between components by an inter-process communication system. In flow-based programming, a software application is represented as a directed graph, with the processes in it being the nodes of the directed graph and the connections between the processes being the edges of the directed graph.

[0056] Here, the static computation subgraph is a directed graph in which the computation logic is a node and the data flow direction between the computation logics is an edge. The static computation subgraph is not the final computation link and some information is missing. For example, to perform parallel computation on a computation logic item, it is necessary to know the input data corresponding to the item, but the input data is not included in the configuration data. In addition, to execute the computation graph graph by the filter filter, it is necessary to know whether the input data corresponding to the graph includes the data parameter code, and whether the data value of code is equal to the preset value OD_COMP.

[0057] S403: The server side connects the input data with the static computation subgraph and determines the computation links. After obtaining the static computation subgraph on the server side, input data is connected to the static computation subgraph to obtain a dynamic computation subgraph, i.e., a computation link, containing complete information. Here, connecting input data to the static computation subgraph means associating a portion in the static computation subgraph that requires specific data with accurate data among the input data. For example, since a data parameter in the static computation subgraph requires a specific data value, the data specified by the data parameter name among the input data is associated with the position of the data parameter in the static computation subgraph. The input of accurate data is completed by the computation logic in the static computation subgraph. For example, the computation logic item creates a corresponding number of coroutines according to the number of computation logic items, and completes the connection of the static computation subgraph corresponding to the item. In addition, the computation logic filter determines whether the data value of the data parameter in the input data satisfies the filtering condition, and then determines whether to transmit the data value to the next node in the static computation subgraph or to connect to the corresponding static computation subgraph.

[0058] A node in the dynamic computation subgraph obtained on the server side includes one input port and one output port, and the node receives output data from the previous node via the input port and outputs the computation result after completion of the computational logic operation in the node to the next node via the output port, thereby realizing data flow between the nodes.

[0059] S404: The server side executes the calculation link and determines the calculation result. After the server side obtains the calculation link, which is the dynamic calculation subgraph, since the dynamic calculation subgraph already has complete information, there is input data corresponding to the calculation logic in the graph, so that the server side sequentially executes the calculation logic in the nodes according to the node direction in the dynamic calculation subgraph, and after the execution is completed in all nodes of the dynamic calculation subgraph, the final calculation result can be obtained.

[0060] S405: The server side returns the calculation result to the client side. Here, the server side returns the calculation result to the client side, and may return the calculation result to the client side as it is, or may perform a certain process on the calculation result before returning it to the client side. In some embodiments of the present application, the server side may format the calculation result before returning it to the client side. Specifically, the configuration data may include format placement information of the calculation result, and the server side may format the calculation result based on the format placement information in the configuration data. The format process may include, for example, removing intermediate data from the calculation result, converting the names of data parameters in the calculation result, and the like. In an embodiment of the present application, the client side provides input data and configuration data to the server side, and if the specific arrangement corresponding to the computation logic in the configuration data, such as the data organization structure of the input data, data parameter names, etc., meets the corresponding constraints, the computation logic processing process running on the server side is highly suitable for deployment in a serverless architecture mode (serverless) due to its similarity to a stateless application.

[0061] Each embodiment of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a memory system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0062] Program code may be used as input instructions to perform the functions described herein and generate output information. The output information may be provided to one or more output devices, in known fashion. For purposes of this application, a processing system includes any system having a processor, such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.

[0063] The program code may be implemented in a high level or object oriented programming language to communicate with a processing system. If desired, the program code may also be implemented in assembly or machine language. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.

[0064] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media and read and executed by one or more processors. For example, the instructions may be distributed over a network or by other computer-readable media. As such, machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, compact disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROM), random access memories (RAM), erasable programmable read-only memories (EPROM), electrically erasable programmable read-read memories (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information in electrical, optical, acoustic or other forms of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet. As such, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0065] In the figures, certain structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or ordering may not be required. In some embodiments, these features may be arranged in a different manner and / or order than that shown in the example figures. Also, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and some embodiments may not include these features or may be combined with other features.

[0066] In addition, each unit / module mentioned in the embodiment of each device of the present application is a logical unit / module, and physically, one logical unit / module may be one physical unit / module, may be a part of one physical unit / module, or may be realized by a combination of multiple physical units / modules. The physical realization form of these logical units / modules themselves is not the most important, and it is the combination of functions realized by these logical units / modules that is the key to solving the technical problem presented in this application. In addition, in order to highlight the innovation part of this application, the above device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problem presented in this application, which does not mean that there are no other units / modules in the above device embodiments.

[0067] In addition, in the examples and specification of this patent, relational terms such as first, second, etc. are merely intended to distinguish one entity or operation from another, and do not necessarily require or imply that any such actual relationship or sequence exists between these entities or operations. Also, the terms "comprise", "include", or any other variations thereof are intended to cover a non-exclusive inclusion, whereby a process, method, article, or device that includes a set of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent in such process, method, article, or device. In the absence of more limitations, an element limited by the phrase "including a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.

[0068] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made therein without departing from the spirit and scope of the present application.

Claims

1. A method for processing computational logic for use in an electronic device, including a server side and a client side, comprising: The client side acquires input data for describing data values ​​necessary for executing a computational logic, and configuration data for describing arrangement information of the computational logic during business processing and relational information between the computational logics, and transmits the input data to the server side; The server side analyzes the configuration data and generates a static computation subgraph, the static computation subgraph having the computation logic as a node and a data flow direction between the computation logic as an edge; The server side connects input data and a static computation subgraph to generate a dynamic computation subgraph; The server side executes the dynamic computation subgraph to obtain a computation result.

2. The server side analyzes the configuration data and generates a static computation subgraph, The server side serializes a computation logic having a hierarchical structure; The method of claim 1 , further comprising: the server side generating a static computation subgraph based on a serialized result.

3. The server side generates a static computation subgraph based on the serialized result, The method of claim 2 , further comprising: generating a static computation subgraph based on a serialized result on the server side through a flow-based programming technique.

4. The server side connects the input data and the static computation subgraph to generate a dynamic computation subgraph, 2. The method of claim 1 , wherein the server side includes determining a corresponding data value in the input data based on a data parameter of a computation logic in the static computation subgraph, and connecting the data value to the data parameter.

5. The server side executes the dynamic computation subgraph and obtains a computation result, The method according to claim 1, characterized in that the server side executes the dynamic computation subgraph to obtain an initial computation result, formats the initial computation result based on format placement information in the configuration data, obtains formatted data, and sets the formatted data as the computation result.

6. 2. The method of claim 1, wherein the computational logic includes at least one of a computational formula, an extension function, a variable, a filter, and a decision tree.

7. 2. The method according to claim 1, wherein the input data is in a JSON format, and the configuration data is described by a combination of YAML and DSL.

8. In electronic devices, a memory for storing instructions to be executed by one or more processors of the electronic device; An electronic device, characterized in that it comprises one of the processors of the electronic device and a processor for executing the method for processing computational logic according to any one of claims 1 to 7.

9. A readable storage medium having instructions stored therein which, when executed in an electronic device, cause the electronic device to perform the method of processing computational logic according to any one of claims 1 to 7.

10. A computer program product comprising computer programs / instructions which, when executed by a processor, implement the method for processing computational logic according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task processing method and device, electronic equipment and storage medium

    CN111176802A