CN107967135B - Calculation engine implementation method, electronic device and storage medium - Google Patents

Calculation engine implementation method, electronic device and storage medium Download PDF

Info

Publication number
CN107967135B
CN107967135B CN201711047210.6A CN201711047210A CN107967135B CN 107967135 B CN107967135 B CN 107967135B CN 201711047210 A CN201711047210 A CN 201711047210A CN 107967135 B CN107967135 B CN 107967135B
Authority
CN
China
Prior art keywords
data
operator
library
target
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711047210.6A
Other languages
Chinese (zh)
Other versions
CN107967135A (en
Inventor
韦邕
常河
徐亮
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711047210.6A priority Critical patent/CN107967135B/en
Publication of CN107967135A publication Critical patent/CN107967135A/en
Priority to PCT/CN2018/089884 priority patent/WO2019085474A1/en
Application granted granted Critical
Publication of CN107967135B publication Critical patent/CN107967135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes

Landscapes

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

Abstract

The invention provides a method for realizing a computing engine, which comprises the following steps: a determination step: determining each operator that constitutes a target algorithm chain; a judging step: judging whether the program configuration file contains each operator forming the target algorithm chain, if not, executing a configuration step, and if so, executing a generation step; a configuration step: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step; a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain; a storage step: and storing the algorithm number into a database. The invention also provides an electronic device and a computer readable storage medium. The invention can realize the newly added function for the calculation engine.

Description

Calculation engine implementation method, electronic device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for implementing a computing engine, an electronic device, and a storage medium.
Background
With the development of information technology, more and more computing engines are in operation to meet the increasingly wide and variable demands of users. Existing computing engines can be used to implement a variety of functions, such as keyword search functions, knowledge encyclopedia functions, information prediction functions, etc., for mass data. Typically, the computing function of a single computing engine is relatively simple.
However, in the existing computing engine development process in the industry, the consideration on the universality and the expansibility of the computing engine is insufficient, and when the computing functions supported by the computing engine cannot meet the requirements and new computing functions need to be developed, a large amount of code development and reconfiguration work needs to be performed, so that the code development cost is greatly consumed, and the work efficiency of research and development personnel is reduced.
Disclosure of Invention
In view of the foregoing, there is a need for a computing engine implementation method, an electronic device and a storage medium, which can make the development process of the computing engine more flexible, have wide universality and good scalability, and do not require additional system code and database development.
In order to achieve the above object, the present invention provides a method for implementing a compute engine, the method comprising: a determination step: determining each operator that constitutes a target algorithm chain; a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain; a storage step: and storing the algorithm number into a database.
Preferably, before the generating step, the method further comprises: a judging step: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generation step.
Preferably, the method further comprises: if the result of the judging step is negative, executing a configuration step; a configuration step: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
Optionally, the target operator is an operator that is not included in a program configuration file and constitutes the target algorithm chain.
Preferably, the database includes a local memory cache, a Redis library or a Postgre SQL library.
Optionally, the data access manner of the database is one of the following manners: fetching data from a local memory cache; taking numbers from Redis library only; firstly, taking data from a Redis library, if the data is unsuccessful, taking the data from a Postgre SQL library, and synchronously writing the data back to the Redis library after the data is taken; firstly, taking the data from the Redis library, if the data is unsuccessful, taking the data from the Postgre SQL library, and asynchronously writing the data back to the Redis library after the data is taken; only take numbers from the Postgre SQL library.
To achieve the above object, the present invention further provides an electronic device, which includes a memory and a processor, wherein the memory includes a calculation engine implementation program, and the calculation engine implementation program, when executed by the processor, implements the following steps:
a determination step: determining each operator that constitutes a target algorithm chain; a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain; a storage step: and storing the algorithm number into a database.
Preferably, before the generating step, the method further comprises: a judging step: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generation step.
Preferably, the method further comprises: if the result of the judging step is negative, executing a configuration step; a configuration step: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
Optionally, the target operator is an operator that is not included in a program configuration file and constitutes the target algorithm chain.
Preferably, the database includes a local memory cache, a Redis library or a Postgre SQL library.
Optionally, the data access manner of the database is one of the following manners: fetching data from a local memory cache; taking numbers from Redis library only; firstly, taking data from a Redis library, if the data is unsuccessful, taking the data from a Postgre SQL library, and synchronously writing the data back to the Redis library after the data is taken; firstly, taking the data from the Redis library, if the data is unsuccessful, taking the data from the Postgre SQL library, and asynchronously writing the data back to the Redis library after the data is taken; only take numbers from the Postgre SQL library.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, which includes a computing engine implementation program, and when the computing engine implementation program is executed by a processor, the computing engine implementation program implements any step of the computing engine implementation method described above.
The invention provides a calculation engine implementation method, an electronic device and a computer readable storage medium, which take an algorithm chain and operators as an implementation framework when developing and maintaining a calculation engine, the algorithm chain corresponding to each calculation function is flexibly implemented in the form of the operators, the operators are connected in a loose coupling mode, only information transmission formats and contents among the operators are specified, and the specific implementation method of each operator is not interfered. The method is used for realizing the calculation function in the newly added calculation engine, the development process of the calculation engine can be more flexible, the new function of the calculation engine can be realized only by configuring an algorithm chain according to the existing operator or developing a new operator when necessary, the method has wide universality and good expandability, and additional system codes and database development are not needed.
Drawings
FIG. 1 is a diagram of a computing engine operating environment in accordance with a preferred embodiment.
Fig. 2 is a schematic operating environment diagram of an electronic device according to a preferred embodiment of the invention.
Fig. 3 is a program module diagram of a program for implementing the calculation engine in fig. 2.
FIG. 4 is a flow chart of a preferred embodiment of a computing engine implementation method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The principles and spirit of the present invention will be described with reference to several specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a method, apparatus, device, system, or computer program product. Accordingly, the present invention may be embodied in the form of entirely hardware, entirely software (including firmware, resident software, micro-code, etc.) or a combination of hardware and software.
According to an embodiment of the invention, a computing engine implementation method, an electronic device and a storage medium are provided.
FIG. 1 is a schematic diagram of an operating environment of a preferred embodiment of the computing engine.
In the embodiment, the computing engine is installed in the server 100, and provides services of various computing functions for the user, such as disease prediction, similar case query, related word query, and the like. The various computing functions described in the compute engine are each implemented by a respective chain of algorithms. A user sends a request for using a certain computing function to the server 100 through the client 200, and after receiving the request, the computing engine obtains a corresponding algorithm chain and executes a program corresponding to the algorithm chain, thereby implementing the computing function, obtaining a computing result from the database 300, and returning the computing result to the client 200. The database 300 may include, for example, a local memory cache, a Redis database, or a PostgreSQL (PG) database. In addition, the server 100 may be communicatively connected to the electronic device 1, and the electronic device 1 may also access the database 300. The computing engine developer can develop the computing engine through the electronic device 1, and install the developed computing engine in the server 100 for execution.
Fig. 2 is a block diagram of an electronic device according to a preferred embodiment of the invention.
The electronic apparatus 1 may be a terminal device having a storage and operation function such as a portable computer, a desktop computer, or the like.
The electronic device 1 comprises a memory 11, a processor 12, a network interface 13 and a communication bus 14. The network interface 13 may optionally include standard wired and wireless interfaces (e.g., WI-FI interfaces). The communication bus 14 is used to realize connection communication between the above components.
The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1.
In the present embodiment, the readable storage medium of the memory 11 is generally used for storing the calculation engine implementation program 10 and the program configuration file installed in the electronic device 1, the database 300, and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
Processor 12, which in some embodiments may be a Central Processing Unit (CPU), microprocessor or other data Processing chip, is configured to execute program codes stored in memory 11 or process data, such as executing compute engine implementation 10.
Fig. 2 shows only the electronic device 1 with components 11-14 and a computing engine implementing program 10, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic apparatus 1 may further include a user interface, and the user interface may include an input unit such as a Keyboard (Keyboard), a voice input device such as a microphone (microphone) or other devices having a voice recognition function, a voice output device such as a speaker, an earphone, or other devices. Optionally, the user interface may also include a standard wired interface, a wireless interface.
Optionally, the electronic device 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) display, and the like. The display is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is called a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example. The user may initiate the calculation engine implementation program 10 by touching the touch area.
The area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
The electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described in detail herein.
The calculation engine implementation program 10 is directed to developers of the calculation engine. Specifically, the calculation engine implementation program 10 may be embedded in the calculation engine, or may be a set of application programs independent of the calculation engine, and processes the calculation engine through a preset interface. The computing engine implementer 10 may be implemented using the JAVA language and may employ the Spring MVC framework to manage code. If a developer needs to develop a new computing function for the computing engine, the computing engine implementation program 10 is called to implement the new computing function.
In the operation environment diagram of the preferred embodiment of the electronic device 1 shown in fig. 2, the memory 11 containing the readable storage medium may include an operating system, a computing engine implementation program 10, a program configuration file, a database, and the like. The processor 12, when executing the calculation engine implementation program 10 stored in the memory 11, implements the following steps:
a determination step: determining each operator that constitutes a target algorithm chain;
a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain;
a storage step: and storing the algorithm number into a database.
Optionally, before the generating step, a judging step is further included: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generating step.
Optionally, a configuration step is further included after the determining step, and if the determination result of the determining step is negative, the configuration step is executed.
The configuration step comprises: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
For the details of the principle, reference is made to the following description of fig. 3 regarding a program module diagram of the calculation engine implementation program 10 and fig. 4 regarding a flowchart of a preferred embodiment of the calculation engine implementation method.
Referring to FIG. 3, a program block diagram of the compute engine implementation program 10 of FIG. 2 is shown. In the present embodiment, the calculation engine implementation program 10 is divided into a plurality of modules, which are stored in the memory 11 and executed by the processor 12 to complete the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
The calculation engine implementation program 10 may be divided into: a determination module 110, a generation module 140, and a storage module 150. Optionally, the calculation engine implementation program 10 may further include a determination module 120 and a configuration module 130.
A determining module 110 for determining each operator constituting the target algorithm chain.
In this embodiment, various computing functions in the computing engine are implemented by various algorithm chains (also called workflows), and each algorithm chain is formed by combining a plurality of operators (also called plug-ins), where each operator corresponds to a specific computing requirement. For example, the computing requirement corresponding to the operator CommonHead is defined as obtaining input data from a page and storing the input data into the system common data structure MyTupleList, and the computing requirement corresponding to the operator Hanlp is defined as keyword extraction. Assuming that an algorithm chain for realizing the word segmentation function has the calculation requirements of acquiring input data from a page and storing the input data into a system universal data structure MyTupleList and the calculation requirements of extracting key words, the algorithm chain for realizing the word segmentation function can be composed of a CommonHead operator and a Hanlp operator. The operator combination rules for each algorithm chain may be indicated by the corresponding algorithm number.
The form of an algorithm chain can be as follows:
service number # advertisement site number # policy number;
operator 1 is abbreviated: operator 1 name # table number # version number # weight;
operator 2 is abbreviated as: operator 2 name # table number # version # weight.
Examples are: the algorithm chain for implementing the word segmentation function is as follows:
10001#024#8024;
Com:CommonHeadV2#-1#-1#1。
wherein, the service number # advertisement space number # strategy number and the 10001#024#8024 are the algorithm number.
When a developer adds a new calculation function to the calculation engine, a new algorithm chain needs to be developed, and the new algorithm chain is referred to as a target algorithm chain in this embodiment. In addition, the developer needs to set the operator combination rule of the target algorithm chain. When receiving a development request of a target algorithm chain input by a developer, the determining module 110 analyzes one or more calculation requirements corresponding to the target algorithm chain, and determines an operator corresponding to each calculation requirement, thereby determining each operator constituting the target algorithm chain.
Optionally, the determining module 120 is configured to determine whether each operator constituting the target algorithm chain is included in the program configuration file, if the determination result is negative, trigger the configuring module 130, and if the determination result is positive, trigger the generating module 140.
Specifically, a developer may develop several generic operators in advance for some more common computing needs and pre-configure the generic operators in a program configuration file. In this embodiment, two general operators are listed:
1. operator name: commonhead
Operator abbreviation Com
The functions are as follows: obtaining input data from page and storing the data in MyTupleList
Examples of formats are: CommonHead # -1# -1# 1;
wherein the first 1 represents that the data table number of the pulled data is 1, and-1 represents that the data is not required to be pulled from the PG database; the second 1 represents the algorithm number, and-1 represents no-algorithm number; the last 1 represents a weight.
2. Operator name: retieval
Operator abbreviation: retr
The functions are as follows: data are drawn from PG library or Redis library and stored into system general data structure MyTupleList
Examples of formats are: retr is Retireval #6#1#2_ 2;
wherein 6 represents the data table number of the data pulled from the PG library or the Redis library; 1 represents an algorithm number, and the significance of the algorithm number is consistent with that of the data stored in the database; the first 2 in 2_2 represents the access mode, and the second 2 represents the access type.
Specifically, in this embodiment, a three-layer data storage manner is provided, which is a local memory cache, a Redis data storage, and a PG data storage, respectively. The storage capacities of the three are sequentially increased, and the corresponding storage speeds are sequentially decreased. For the three-layer data storage mode, the access mode of the database can be set as one of the following five modes:
1. preferentially fetching data from a local memory cache, if the data are successfully fetched, returning the data, and if the data are not successfully fetched, fetching the data according to the following four modes;
2. RedisOnly: the mode is suitable for the requirement of taking data with small data volume and high requirement on taking speed, and the premise is that the data already exists in the Redis library;
3. RedispPGSync: firstly, taking data from a Redis library, if the data is not taken, then taking the data from a PG library, and synchronously writing the data back to the Redis library after the data is taken;
4. RedispGAsync: firstly, taking numbers from Redis, if the numbers are not taken, then taking numbers from the PG library, and asynchronously writing the numbers back to the Redis library after the numbers are taken;
5. PGOnly: only the PG library is accessed, and the mode is suitable for the access requirement with large data volume and relatively low access speed requirement.
In addition, the present embodiment further provides a setting of an access type, where the type of data entering the PG library is focused as follows:
1 of the simple type
2 Ordered lists
3 Unordered list
Therefore, in the format example of the operator Retrieval, corresponding to the above-set access manner and access type, in the "2 _ 2", the first 2 represents that the access manner is RedisOnly, and the second 2 represents that the access type is an ordered list.
Optionally, the configuration module 130 is configured to receive a target operator input according to a predetermined format, configure the received target operator in a program configuration file, and then trigger the generation module 140. The target operator is an operator which is not contained in a program configuration file and forms the target algorithm chain.
Specifically, the operator included in the program configuration file may be the general operator, that is, an operator with a high possibility to be used in various general requirements. The target operator is an operator corresponding to special requirements and required by an algorithm chain aiming at certain computing functions. When it is found that it is not enough to configure the target algorithm chain by using only the existing general-purpose operators in the program configuration file, a developer needs to develop new operators for new computing requirements, and such operators may be collectively referred to as functional operators. The functional operator is for example: realizing word segmentation (keyword extraction) operator Hanlp of the functional requirements of word segmentation and similar cases, namely keyword extraction # -1# -1# 1; and Sc: BM25New # -1# -1#1 and Sort: Heapsort # -1# -1#1 operators calculated for realizing the similarity and the sorting of the functional requirements of the similar cases. After the functional operator is configured in the program configuration file, the functional operator can be flexibly used in the subsequent configuration algorithm chain.
And the generating module 140 is configured to generate a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain.
And the storage module 150 is used for storing the algorithm number into a database. When a computing engine needs to execute a certain computing function, an algorithm number corresponding to the computing function is obtained from a database, corresponding operators are called from a program configuration file according to the algorithm number to form an algorithm chain, and a program corresponding to the algorithm chain is executed, so that the computing function is realized.
FIG. 4 is a flow chart of a preferred embodiment of a computing engine implementation method of the present invention. The processor 12 of the electronic device 1, when executing the calculation engine implementation program 10 stored in the memory 11, implements the following steps of the calculation engine implementation method:
at step S10, the determination module 110 determines each operator that makes up the target algorithm chain.
In step S20, the determining module 120 determines whether the program configuration file includes each operator constituting the target algorithm chain, if the determination result is no, step S30 is executed, and if the determination result is yes, step S40 is executed.
In step S30, the configuration module 130 receives the target operator input in the predetermined format, configures the received target operator in the program configuration file, and then performs step S40. The target operator is an operator which is not contained in a program configuration file and forms the target algorithm chain.
In step S40, the generating module 140 generates a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain.
In step S50, the storage module 150 stores the algorithm number in a database. The database comprises a local memory cache, a Redis library or a Postgre SQL library. The data access mode of the database comprises one of the following modes:
fetching data from a local memory cache;
taking numbers from Redis library only;
firstly, taking data from a Redis library, if the data is unsuccessful, taking the data from a Postgre SQL library, and synchronously writing the data back to the Redis library after the data is taken;
firstly, taking the data from the Redis library, if the data is unsuccessful, taking the data from the Postgre SQL library, and asynchronously writing the data back to the Redis library after the data is taken;
only take numbers from the Postgre SQL library.
The method for implementing the computing engine according to this embodiment uses an algorithm chain and operators as an implementation framework when developing and maintaining the computing engine, the algorithm chain corresponding to each computing function is flexibly implemented in the form of operators, the operators are connected in a loose coupling manner, only information transfer formats and contents between the operators are specified, and a specific implementation method of each operator is not interfered. The method is used for realizing the calculation function in the newly added calculation engine, the development process of the calculation engine can be more flexible, the new function of the calculation engine can be realized only by configuring an algorithm chain according to the existing operator or developing a new operator when necessary, the method has wide universality and good expandability, and additional system codes and database development are not needed.
Furthermore, the embodiment of the present invention also provides a computer-readable storage medium, which may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer readable storage medium includes a program configuration file, a database, a computing engine implementation program 10, and the like, and when executed by the processor 12, the computing engine implementation program 10 implements the following operations:
a determination step: determining each operator that constitutes a target algorithm chain;
a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain;
a storage step: and storing the algorithm number into a database.
Optionally, before the generating step, a judging step is further included: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generating step.
Optionally, a configuration step is further included after the determining step, and if the determination result of the determining step is negative, the configuration step is executed.
The configuration step comprises: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
The embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiment of the computing engine implementation method and the electronic device 1, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium as described above and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for implementing a compute engine, the method comprising:
a determination step: determining each operator that constitutes a target algorithm chain;
a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain;
a storage step: storing the algorithm number into a database;
when a computing engine needs to execute a certain computing function, acquiring an algorithm number corresponding to the computing function from the database, calling a corresponding operator from a program configuration file according to the algorithm number to form an algorithm chain, and executing a program corresponding to the algorithm chain, wherein the database comprises a local memory cache, a Redis library or a Postgre SQL library, and the data access mode of the database is one of the following modes:
fetching data from a local memory cache, if the data are successfully fetched, returning the data, and if the data are not successful, fetching the data according to any one of the following modes;
firstly, taking data from a Redis library, if the data is unsuccessful, taking the data from a Postgre SQL library, and synchronously writing the data back to the Redis library after the data is taken;
and firstly, taking the data from the Redis library, if the data is unsuccessful, taking the data from the Postgre SQL library, and asynchronously writing the data back to the Redis library after the data is taken.
2. The compute engine implemented method of claim 1 further comprising, prior to the generating step:
a judging step: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generation step.
3. The compute engine implementation of claim 2, the method further comprising: if the result of the judging step is negative, executing a configuration step;
a configuration step: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
4. A method as defined in claim 3, wherein the target operators are operators that make up the target algorithm chain that are not included in a program configuration file.
5. An electronic device comprising a memory and a processor, wherein the memory includes a compute engine implementation program that when executed by the processor implements the steps of:
a determination step: determining each operator that constitutes a target algorithm chain;
a generation step: generating a corresponding algorithm number according to each determined operator and the set operator combination rule of the target algorithm chain;
a storage step: storing the algorithm number into a database;
when a computing engine needs to execute a certain computing function, acquiring an algorithm number corresponding to the computing function from the database, calling a corresponding operator from a program configuration file according to the algorithm number to form an algorithm chain, and executing a program corresponding to the algorithm chain, wherein the database comprises a local memory cache, a Redis library or a Postgre SQL library, and the data access mode of the database is one of the following modes:
fetching data from a local memory cache, if the data are successfully fetched, returning the data, and if the data are not successful, fetching the data according to any one of the following modes;
firstly, taking data from a Redis library, if the data is unsuccessful, taking the data from a Postgre SQL library, and synchronously writing the data back to the Redis library after the data is taken;
and firstly, taking the data from the Redis library, if the data is unsuccessful, taking the data from the Postgre SQL library, and asynchronously writing the data back to the Redis library after the data is taken.
6. The electronic device of claim 5, further comprising, prior to the generating step:
a judging step: and judging whether the program configuration file contains each operator forming the target algorithm chain or not, and if so, executing the generation step.
7. The electronic device of claim 6, wherein if the result of the determining step is negative, performing a configuring step;
a configuration step: receiving a target operator input according to a preset format, configuring the received target operator in a program configuration file, and then executing the generating step.
8. A computer-readable storage medium, comprising a computing engine implementation program which, when executed by a processor, implements the steps of the computing engine implementation method of any one of claims 1 to 4.
CN201711047210.6A 2017-10-31 2017-10-31 Calculation engine implementation method, electronic device and storage medium Active CN107967135B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711047210.6A CN107967135B (en) 2017-10-31 2017-10-31 Calculation engine implementation method, electronic device and storage medium
PCT/CN2018/089884 WO2019085474A1 (en) 2017-10-31 2018-06-05 Calculation engine implementing method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711047210.6A CN107967135B (en) 2017-10-31 2017-10-31 Calculation engine implementation method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN107967135A CN107967135A (en) 2018-04-27
CN107967135B true CN107967135B (en) 2020-11-13

Family

ID=62000779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711047210.6A Active CN107967135B (en) 2017-10-31 2017-10-31 Calculation engine implementation method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN107967135B (en)
WO (1) WO2019085474A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967135B (en) * 2017-10-31 2020-11-13 平安科技(深圳)有限公司 Calculation engine implementation method, electronic device and storage medium
CN109740730B (en) * 2018-12-14 2020-10-23 安徽寒武纪信息科技有限公司 Operation method, device and related product
CN109711538B (en) * 2018-12-14 2021-01-15 安徽寒武纪信息科技有限公司 Operation method, device and related product
CN109740729B (en) * 2018-12-14 2020-12-22 安徽寒武纪信息科技有限公司 Operation method, device and related product
CN109657782B (en) * 2018-12-14 2020-10-27 安徽寒武纪信息科技有限公司 Operation method, device and related product
CN109726822B (en) * 2018-12-14 2020-10-09 中科寒武纪科技股份有限公司 Operation method, device and related product
CN109685201B (en) * 2018-12-14 2020-10-30 安徽寒武纪信息科技有限公司 Operation method, device and related product
CN110020720B (en) * 2019-04-01 2021-05-11 中科寒武纪科技股份有限公司 Operator splicing method and device
CN113076155B (en) * 2020-01-03 2024-05-03 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and computer storage medium
CN112035537B (en) * 2020-07-10 2023-10-20 北京远景视点科技有限公司 Method for rapidly counting behavior of mobile object monitored by multiple sensors
CN112270399B (en) * 2020-09-29 2022-03-11 北京百度网讯科技有限公司 Operator registration processing method and device based on deep learning and electronic equipment
CN114489850B (en) * 2022-01-20 2023-08-22 中广核工程有限公司 Calling method and device of design software, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838857A (en) * 2014-03-17 2014-06-04 中国科学院软件研究所 Automatic service combination system and method based on semantics
CN105760511A (en) * 2016-02-24 2016-07-13 南京信息职业技术学院 Big data self-adaption topology processing method based on storm
CN106507685A (en) * 2014-05-14 2017-03-15 株式会社理光 Information processing system, information processor and information processing method
CN107729523A (en) * 2017-10-27 2018-02-23 平安科技(深圳)有限公司 Data service method, electronic installation and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721725B2 (en) * 2001-03-29 2004-04-13 Hewlett-Packard Development Company, L.P. Method of parallel trigger execution in an active database
EP1863268A1 (en) * 2006-05-29 2007-12-05 Ricoh Company, Ltd. Combining image processing components using visual programming
US8490072B2 (en) * 2009-06-23 2013-07-16 International Business Machines Corporation Partitioning operator flow graphs
CN102624870A (en) * 2012-02-01 2012-08-01 北京航空航天大学 Intelligent optimization algorithm based cloud manufacturing computing resource reconfigurable collocation method
CN103235974B (en) * 2013-04-25 2015-10-28 中国科学院地理科学与资源研究所 A kind of method improving massive spatial data treatment effeciency
CN105159925B (en) * 2015-08-04 2019-08-30 北京京东尚科信息技术有限公司 A kind of data-base cluster data distributing method and system
CN107967135B (en) * 2017-10-31 2020-11-13 平安科技(深圳)有限公司 Calculation engine implementation method, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838857A (en) * 2014-03-17 2014-06-04 中国科学院软件研究所 Automatic service combination system and method based on semantics
CN106507685A (en) * 2014-05-14 2017-03-15 株式会社理光 Information processing system, information processor and information processing method
CN105760511A (en) * 2016-02-24 2016-07-13 南京信息职业技术学院 Big data self-adaption topology processing method based on storm
CN107729523A (en) * 2017-10-27 2018-02-23 平安科技(深圳)有限公司 Data service method, electronic installation and storage medium

Also Published As

Publication number Publication date
CN107967135A (en) 2018-04-27
WO2019085474A1 (en) 2019-05-09

Similar Documents

Publication Publication Date Title
CN107967135B (en) Calculation engine implementation method, electronic device and storage medium
US10387169B2 (en) Plug-in packaging method, device, terminal and storage media
CN108958844B (en) Application program control method and terminal
US20180196665A1 (en) Managing, using, and updating application resources
CN111566638B (en) Adding descriptive metadata to an application programming interface for use by intelligent agents
CN103092604A (en) Application program classification method and device
CN108431768B (en) Controlled deployment of application features
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
JP2020074193A (en) Search method, device, facility, and non-volatile computer memory
CN109840120B (en) Decoupling micro-service release method, electronic device and computer readable storage medium
US11507549B2 (en) Data normalization system
CN112364083A (en) Data dictionary management method, system and storage medium based on configuration file
US20230244680A1 (en) Systems and methods for expedited large file processing
KR20240055705A (en) Method for recommending designated items
CN112035480A (en) Data table management method, device, equipment and storage medium
CN110688096A (en) Method, device, medium and electronic equipment for constructing application program containing plug-in
CN110727425A (en) Electronic device, form data verification method and computer-readable storage medium
CN107590248B (en) Search method, search device, search terminal and computer-readable storage medium
CN110764913B (en) Data calculation method based on rule calling, client and readable storage medium
WO2021027149A1 (en) Portrait similarity-based information retrieval recommendation method and device and storage medium
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN112416784A (en) Interface checking method, system and device based on configuration center and storage medium
CN106502707B (en) Code generation method and device
WO2019080412A1 (en) Data service method, electronic device and storage medium
CN110647753B (en) Method, device and equipment for acquiring kernel file and storage medium

Legal Events

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