CN113485711A - Task triggering method and device based on dependency relationship, electronic equipment and medium - Google Patents

Task triggering method and device based on dependency relationship, electronic equipment and medium Download PDF

Info

Publication number
CN113485711A
CN113485711A CN202110735400.7A CN202110735400A CN113485711A CN 113485711 A CN113485711 A CN 113485711A CN 202110735400 A CN202110735400 A CN 202110735400A CN 113485711 A CN113485711 A CN 113485711A
Authority
CN
China
Prior art keywords
dependency
data
annotation
task
dependent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110735400.7A
Other languages
Chinese (zh)
Inventor
桂安辉
陆申博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities 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 Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN202110735400.7A priority Critical patent/CN113485711A/en
Publication of CN113485711A publication Critical patent/CN113485711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a data analysis technology, and discloses a task triggering method based on a dependency relationship, which comprises the following steps: acquiring a task code and a dependency annotation corresponding to the task code; analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set; determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier; if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data. Furthermore, the invention also relates to a block chain technology, and the dependency information set can be stored in a node of the block chain. The invention also provides a task triggering device based on the dependency relationship, an electronic device and a computer readable storage medium. The method and the device can solve the problem of low accuracy rate when the task based on the dependency relationship is triggered.

Description

Task triggering method and device based on dependency relationship, electronic equipment and medium
Technical Field
The invention relates to the technical field of data analysis, in particular to a task triggering method and device based on dependency relationship, electronic equipment and a medium.
Background
Generally, in order to complete a certain computer task or project, multiple data packets need to be completed cooperatively, that is, when one data packet is executed, configuration, file, plug-in and the like in other data packets need to be called, and the calling operation is completed through data dependence written into the data packet in advance. The dependency management between data packets is generally defined by a configuration file, and is matched and triggered in a memory according to rules. This approach requires separate custom logic for each dependency, which is quite inconvenient. Namely, each time a dependency is added, relevant modification is needed, which is not beneficial to expansion, and the efficiency of triggering tasks is low. Therefore, the task triggering efficiency based on the dependency relationship is improved, and the problem to be solved urgently is solved.
Disclosure of Invention
The invention provides a task triggering method and device based on dependency relationship and a computer readable storage medium, and mainly aims to solve the problem of low task triggering efficiency.
In order to achieve the above object, the task triggering method based on dependency provided by the present invention includes:
acquiring a task code and a dependency annotation corresponding to the task code;
analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier;
if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
Optionally, the determining the dependency data identifier corresponding to the task code in the dependency information set includes:
forming a plurality of dependent data pairs from the data according to the dependency relationship among the data in the dependent information set;
and traversing the plurality of dependency data pairs to obtain dependency data identifications corresponding to the task codes.
Optionally, after the task code and the dependency annotation corresponding to the task code are obtained, the method further includes:
performing word segmentation processing on the dependent annotation to obtain a plurality of character string combinations;
and converting the dependent annotation into a tree structure annotation according to the plurality of character string combinations, wherein a tree node in the tree structure annotation is a character string matched with a preset keyword in the plurality of character string combinations, and a sub node in the tree structure annotation is a character string not matched with the preset keyword in the plurality of character string combinations.
Optionally, the performing word segmentation processing on the dependent annotation includes:
and dividing the dependent annotations into command statement character string combinations and sub-query statement character string combinations by utilizing a word segmentation program.
Optionally, the parsing the dependent annotation according to a preset annotation parsing rule includes:
extracting a first layer of tree nodes in the tree structure annotation to obtain an execution operation keyword;
and extracting the first layer of tree nodes in the tree structure annotation to obtain an execution operation data table.
Optionally, before parsing the dependent annotation according to a preset annotation parsing rule, the method further includes:
invalid data and definition delimiters in the dependency annotations are deleted.
Optionally, before the task object and the dependency annotation corresponding to the task object are obtained, the method further includes:
generating a calling request of an annotation interface based on java compiling rules;
and acquiring an annotation software package from a programming support library by using the call request, wherein the annotation software package is used for generating an annotation.
In order to solve the above problem, the present invention further provides a dependency-based task triggering apparatus, including:
the data acquisition module is used for acquiring task codes and dependency annotations corresponding to the task codes;
the annotation analysis module is used for analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
the dependent data determining module is used for determining a dependent data identifier corresponding to the task code in the dependent information set and judging whether dependent data exist in a local database according to the dependent data identifier;
and the task triggering module is used for calling the dependency data from a preset data center according to the dependency data identification if the dependency data does not exist in the local database, and executing task triggering operation according to the dependency data.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the task triggering method based on the dependency relationship.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, which stores at least one instruction, where the at least one instruction is executed by a processor in an electronic device to implement the dependency-based task triggering method described above.
According to the method, the task code and the dependent annotation corresponding to the task code are obtained, the dependent annotation contains explanation and remarks of the dependent relationship corresponding to the task code, the dependent annotation is analyzed according to a preset annotation analysis rule to obtain a dependent information set, the dependent information set more visually represents the relationship between data, the dependent data corresponding to the task code in the data dependent set can be directly determined without compiling the dependent relationship between the data in advance, whether the dependent data exist in a local database or not is judged, if the dependent data do not exist in the local database, the dependent data are called from a preset data center, the data center maintains a plurality of data, and the dependent data can be called in an auxiliary mode when missing data exist in the local database. Therefore, the task triggering method, the task triggering device, the electronic equipment and the medium based on the dependency relationship can solve the problem of low efficiency in task triggering.
Drawings
Fig. 1 is a schematic flowchart of a task triggering method based on dependency relationships according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of a task triggering device based on dependency relationships according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device implementing the dependency-based task triggering method according to an embodiment 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
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a task triggering method based on a dependency relationship. The execution subject of the dependency-based task triggering method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the task triggering method based on the dependency relationship may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flowchart of a task triggering method based on dependency relationships according to an embodiment of the present invention. In this embodiment, the task triggering method based on the dependency relationship includes:
and S1, acquiring the task codes and the dependency annotations corresponding to the task codes.
In the embodiment of the invention, the task code comprises a plurality of codes which are written and used for completing the task.
Specifically, a task code may be obtained from a code library corresponding to a task file, and the task code may be annotated according to an annotation software package to obtain a dependent annotation corresponding to the task code.
Before the task object and the dependent annotation corresponding to the task object are obtained, the method further includes:
generating a calling request of an annotation interface based on java compiling rules;
and acquiring an annotation software package from a programming support library by using the call request, wherein the annotation software package is used for generating an annotation.
In detail, in the embodiment of the present invention, the java compilation rule is a syntax rule of java language, the annotation interface is a data transmission interface dedicated to data transmission dependence, the annotation software package is java.
The embodiment of the invention performs dependent annotation processing on the task code through the java.
Further, after the task code and the dependency annotation corresponding to the task code are obtained, the method further includes:
performing word segmentation processing on the dependent annotation to obtain a plurality of character string combinations;
and converting the dependent annotation into a tree structure annotation according to the plurality of character string combinations, wherein a tree node in the tree structure annotation is a character string matched with a preset keyword in the plurality of character string combinations, and a sub node in the tree structure annotation is a character string not matched with the preset keyword in the plurality of character string combinations.
Specifically, the performing word segmentation processing on the dependent annotation includes:
and dividing the dependent annotations into command statement character string combinations and sub-query statement character string combinations by utilizing a word segmentation program.
In detail, the dependency annotations are converted into the tree structure annotations, and the tree structure annotations can intuitively express the relationship between the character strings in the dependency annotations and are better helpful for subsequent parsing and reference.
And S2, analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set.
In the embodiment of the present invention, the parsing the dependent annotation according to a preset annotation parsing rule includes:
extracting a first layer of tree nodes in the tree structure annotation to obtain an execution operation keyword;
and extracting the first layer of tree nodes in the tree structure annotation to obtain an execution operation data table.
In detail, in an embodiment of the present invention, the dependency annotation may be SELECT col3, col4FROM db2.tb WHERE col3 ═ 1990' AND col4> 10000. And if the first layer tree node in the tree structure annotation is a SELECT FROM, the execution operation key word is a SELECT FROM, and if the first layer tree node in the tree structure annotation is db2.tb, the execution operation data table is db 2.tb.
Specifically, before parsing the dependent annotation according to a preset annotation parsing rule, the method further includes:
invalid data and definition delimiters in the dependency annotations are deleted.
In detail, the deleting of invalid data in the dependent note is to skip how many previous lines in the dependent note are skipped according to a preset rule, that is, how many previous lines in the dependent note are not analyzed, and the definition separator is a symbol for defining what symbol the content data in the dependent note is separated according to, for example, csv is a comma separator. The definition separators do not specifically resolve meaning in the dependency annotations, so the definition separators need to be deleted.
S3, determining the dependency data identification corresponding to the task code in the dependency information set, and judging whether the dependency data exists in the local database according to the dependency data identification.
In this embodiment of the present invention, the determining the dependency data identifier corresponding to the task code in the dependency information set includes:
forming a plurality of dependent data pairs from the data according to the dependency relationship among the data in the dependent information set;
and traversing the plurality of dependency data pairs to obtain dependency data identifications corresponding to the task codes.
In detail, the dependency information set has a dependency relationship between data, for example, a dependency relationship between data a and data B, a call relationship between data C and data D, and the like, and it is necessary to form data into a plurality of dependency data pairs and traverse the plurality of dependency data pairs to obtain a dependency data identifier corresponding to the task code. For example, when the task code includes data a, a plurality of dependent data pairs corresponding to the data a are screened out from the plurality of dependent data pairs, and a dependent data identifier is assigned to the dependent data pair corresponding to the data a, wherein the dependent data identifier is used for simply marking out a relationship between data.
In detail, the dependency data identifier corresponding to the task code in the dependency information set is determined, and whether dependency data exist in a local database is judged according to the dependency data identifier. The local database stores a plurality of groups of data, so that the data of the invoked task can be provided when the task is executed.
Optionally, when the dependent data exists in the local database, the dependent data is directly called from the local database.
And S4, if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
In the embodiment of the invention, whether the dependency data exist in the local database is judged, if the dependency data do not exist in the local database, the dependency data are called from a preset data center according to the dependency data identification, wherein the preset data center can be a third-party system for providing data, and task triggering operation is executed according to the data called from the data center.
According to the method, the task code and the dependent annotation corresponding to the task code are obtained, the dependent annotation contains explanation and remarks of the dependent relationship corresponding to the task code, the dependent annotation is analyzed according to a preset annotation analysis rule to obtain a dependent information set, the dependent information set more visually represents the relationship between data, the dependent data corresponding to the task code in the data dependent set can be directly determined without compiling the dependent relationship between the data in advance, whether the dependent data exist in a local database or not is judged, if the dependent data do not exist in the local database, the dependent data are called from a preset data center, the data center maintains a plurality of data, and the dependent data can be called in an auxiliary mode when missing data exist in the local database. Therefore, the task triggering method based on the dependency relationship can solve the problem of low efficiency in task triggering.
Fig. 2 is a functional block diagram of a task triggering device based on dependency relationships according to an embodiment of the present invention.
The dependency-based task triggering apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the task triggering device 100 based on the dependency relationship may include a data obtaining module 101, an annotation parsing module 102, a dependency data determining module 103, and a task triggering module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data acquisition module 101 is configured to acquire a task code and a dependency annotation corresponding to the task code;
the annotation parsing module 102 is configured to parse the dependent annotation according to a preset annotation parsing rule to obtain a dependent information set;
the dependent data determining module 103 is configured to determine a dependent data identifier corresponding to the task code in the dependent information set, and determine whether dependent data exists in a local database according to the dependent data identifier;
and the task triggering module 104 is configured to, if the dependency data does not exist in the local database, invoke the dependency data from a preset data center according to the dependency data identifier, and execute a task triggering operation according to the dependency data.
In detail, the specific implementation of each module of the task triggering device 100 based on the dependency relationship is as follows:
the method comprises the steps of firstly, acquiring a task code and a dependency annotation corresponding to the task code.
In the embodiment of the invention, the task code comprises a plurality of codes which are written and used for completing the task.
Specifically, a task code may be obtained from a code library corresponding to a task file, and the task code may be annotated according to an annotation software package to obtain a dependent annotation corresponding to the task code.
Before the task object and the dependent annotation corresponding to the task object are obtained, the following operations are also executed:
generating a calling request of an annotation interface based on java compiling rules;
and acquiring an annotation software package from a programming support library by using the call request, wherein the annotation software package is used for generating an annotation.
In detail, in the embodiment of the present invention, the java compilation rule is a syntax rule of java language, the annotation interface is a data transmission interface dedicated to data transmission dependence, the annotation software package is java.
The embodiment of the invention performs dependent annotation processing on the task code through the java.
Further, after the task code and the dependency annotation corresponding to the task code are obtained, the following operations are also executed:
performing word segmentation processing on the dependent annotation to obtain a plurality of character string combinations;
and converting the dependent annotation into a tree structure annotation according to the plurality of character string combinations, wherein a tree node in the tree structure annotation is a character string matched with a preset keyword in the plurality of character string combinations, and a sub node in the tree structure annotation is a character string not matched with the preset keyword in the plurality of character string combinations.
Specifically, the performing word segmentation processing on the dependent annotation includes:
and dividing the dependent annotations into command statement character string combinations and sub-query statement character string combinations by utilizing a word segmentation program.
In detail, the dependency annotations are converted into the tree structure annotations, and the tree structure annotations can intuitively express the relationship between the character strings in the dependency annotations and are better helpful for subsequent parsing and reference.
And secondly, analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set.
In the embodiment of the present invention, the parsing the dependent annotation according to a preset annotation parsing rule includes:
extracting a first layer of tree nodes in the tree structure annotation to obtain an execution operation keyword;
and extracting the first layer of tree nodes in the tree structure annotation to obtain an execution operation data table.
In detail, in an embodiment of the present invention, the dependency annotation may be SELECT col3, col4FROM db2.tb WHERE col3 ═ 1990' AND col4> 10000. And if the first layer tree node in the tree structure annotation is a SELECT FROM, the execution operation key word is a SELECT FROM, and if the first layer tree node in the tree structure annotation is db2.tb, the execution operation data table is db 2.tb.
Specifically, before parsing the dependent annotation according to a preset annotation parsing rule, the following operations are further performed:
invalid data and definition delimiters in the dependency annotations are deleted.
In detail, the deleting of invalid data in the dependent note is to skip how many previous lines in the dependent note are skipped according to a preset rule, that is, how many previous lines in the dependent note are not analyzed, and the definition separator is a symbol for defining what symbol the content data in the dependent note is separated according to, for example, csv is a comma separator. The definition separators do not specifically resolve meaning in the dependency annotations, so the definition separators need to be deleted.
And step three, determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier.
In this embodiment of the present invention, the determining the dependency data identifier corresponding to the task code in the dependency information set includes:
forming a plurality of dependent data pairs from the data according to the dependency relationship among the data in the dependent information set;
and traversing the plurality of dependency data pairs to obtain dependency data identifications corresponding to the task codes.
In detail, the dependency information set has a dependency relationship between data, for example, a dependency relationship between data a and data B, a call relationship between data C and data D, and the like, and it is necessary to form data into a plurality of dependency data pairs and traverse the plurality of dependency data pairs to obtain a dependency data identifier corresponding to the task code. For example, when the task code includes data a, a plurality of dependent data pairs corresponding to the data a are screened out from the plurality of dependent data pairs, and a dependent data identifier is assigned to the dependent data pair corresponding to the data a, wherein the dependent data identifier is used for simply marking out a relationship between data.
In detail, the dependency data identifier corresponding to the task code in the dependency information set is determined, and whether dependency data exist in a local database is judged according to the dependency data identifier. The local database stores a plurality of groups of data, so that the data of the invoked task can be provided when the task is executed.
Optionally, when the dependent data exists in the local database, the dependent data is directly called from the local database.
And step four, if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
In the embodiment of the invention, whether the dependency data exist in the local database is judged, if the dependency data do not exist in the local database, the dependency data are called from a preset data center according to the dependency data identification, wherein the preset data center can be a third-party system for providing data, and task triggering operation is executed according to the data called from the data center.
According to the method, the task code and the dependent annotation corresponding to the task code are obtained, the dependent annotation contains explanation and remarks of the dependent relationship corresponding to the task code, the dependent annotation is analyzed according to a preset annotation analysis rule to obtain a dependent information set, the dependent information set more visually represents the relationship between data, the dependent data corresponding to the task code in the data dependent set can be directly determined without compiling the dependent relationship between the data in advance, whether the dependent data exist in a local database or not is judged, if the dependent data do not exist in the local database, the dependent data are called from a preset data center, the data center maintains a plurality of data, and the dependent data can be called in an auxiliary mode when missing data exist in the local database. Therefore, the task triggering method based on the dependency relationship can solve the problem of low efficiency in task triggering.
Fig. 3 is a schematic structural diagram of an electronic device implementing a dependency-based task triggering method according to an embodiment of the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication interface 12 and a bus 13, and may further comprise a computer program, such as a dependency-based task trigger program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile 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. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in the electronic device and various types of data, such as codes of a task trigger program based on dependency relationships, but also temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., task trigger programs based on dependencies, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication interface 12 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the electronic device may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The dependency-based task trigger 12 stored in the memory 11 of the electronic device is a combination of instructions that, when executed in the processor 10, enable:
acquiring a task code and a dependency annotation corresponding to the task code;
analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier;
if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring a task code and a dependency annotation corresponding to the task code;
analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier;
if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A task triggering method based on dependency relationship, the method comprising:
acquiring a task code and a dependency annotation corresponding to the task code;
analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
determining a dependency data identifier corresponding to the task code in the dependency information set, and judging whether dependency data exist in a local database according to the dependency data identifier;
if the dependency data do not exist in the local database, calling the dependency data from a preset data center according to the dependency data identification, and executing task triggering operation according to the dependency data.
2. The dependency-based task triggering method of claim 1, wherein the determining the dependency data identifier in the dependency information set corresponding to the task code comprises:
forming a plurality of dependent data pairs from the data according to the dependency relationship among the data in the dependent information set;
and traversing the plurality of dependency data pairs to obtain dependency data identifications corresponding to the task codes.
3. The dependency-based task triggering method of claim 1, wherein after the task code and the dependency annotation corresponding to the task code are obtained, the method further comprises:
performing word segmentation processing on the dependent annotation to obtain a plurality of character string combinations;
and converting the dependent annotation into a tree structure annotation according to the plurality of character string combinations, wherein a tree node in the tree structure annotation is a character string matched with a preset keyword in the plurality of character string combinations, and a sub node in the tree structure annotation is a character string not matched with the preset keyword in the plurality of character string combinations.
4. The dependency-based task triggering method of claim 3, wherein the tokenizing the dependency annotations comprises:
and dividing the dependent annotations into command statement character string combinations and sub-query statement character string combinations by utilizing a word segmentation program.
5. The task triggering method based on the dependency relationship as claimed in claim 3, wherein the parsing the dependent annotation according to a preset annotation parsing rule comprises:
extracting a first layer of tree nodes in the tree structure annotation to obtain an execution operation keyword;
and extracting the first layer of tree nodes in the tree structure annotation to obtain an execution operation data table.
6. The dependency-based task triggering method of claim 1, wherein before parsing the dependent annotation according to a preset annotation parsing rule, the method further comprises:
invalid data and definition delimiters in the dependency annotations are deleted.
7. The dependency-based task triggering method of claim 1, wherein before obtaining the task object and the dependency annotation corresponding to the task object, the method further comprises:
generating a calling request of an annotation interface based on java compiling rules;
and acquiring an annotation software package from a programming support library by using the call request, wherein the annotation software package is used for generating an annotation.
8. A dependency-based task triggering apparatus, the apparatus comprising:
the data acquisition module is used for acquiring task codes and dependency annotations corresponding to the task codes;
the annotation analysis module is used for analyzing the dependent annotation according to a preset annotation analysis rule to obtain a dependent information set;
the dependent data determining module is used for determining a dependent data identifier corresponding to the task code in the dependent information set and judging whether dependent data exist in a local database according to the dependent data identifier;
and the task triggering module is used for calling the dependency data from a preset data center according to the dependency data identification if the dependency data does not exist in the local database, and executing task triggering operation according to the dependency data.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a dependency-based task triggering method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the dependency-based task triggering method as claimed in any one of claims 1 to 7.
CN202110735400.7A 2021-06-30 2021-06-30 Task triggering method and device based on dependency relationship, electronic equipment and medium Pending CN113485711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110735400.7A CN113485711A (en) 2021-06-30 2021-06-30 Task triggering method and device based on dependency relationship, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110735400.7A CN113485711A (en) 2021-06-30 2021-06-30 Task triggering method and device based on dependency relationship, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113485711A true CN113485711A (en) 2021-10-08

Family

ID=77936969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110735400.7A Pending CN113485711A (en) 2021-06-30 2021-06-30 Task triggering method and device based on dependency relationship, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113485711A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113902567A (en) * 2021-10-12 2022-01-07 工银科技有限公司 Task execution method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113902567A (en) * 2021-10-12 2022-01-07 工银科技有限公司 Task execution method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US10740713B2 (en) Generation of WBS model data
CN111428451B (en) Text online editing method and device, electronic equipment and storage medium
CN112948427B (en) Data query method, device, equipment and storage medium
CN113239106B (en) Excel file export method and device, electronic equipment and storage medium
CN111651453A (en) User historical behavior query method and device, electronic equipment and storage medium
CN112486490A (en) Front-end code packaging method and device, electronic equipment and storage medium
CN114610747A (en) Data query method, device, equipment and storage medium
CN113377661A (en) Interface testing method and device, electronic equipment and storage medium
CN114398194A (en) Data collection method and device, electronic equipment and readable storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN113268500A (en) Service processing method and device and electronic equipment
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN112347126B (en) Big data processing method, device, equipment and medium
CN113485711A (en) Task triggering method and device based on dependency relationship, electronic equipment and medium
CN111538768A (en) Data query method and device based on N-element model, electronic equipment and medium
CN113687827B (en) Data list generation method, device and equipment based on widget and storage medium
CN113254446B (en) Data fusion method, device, electronic equipment and medium
CN114385155A (en) vue project visualization tool generation method, device, equipment and storage medium
CN114625376A (en) Data transfer mode conversion method and device, electronic equipment and readable storage medium
CN113971044A (en) Component document generation method, device, equipment and readable storage medium
CN113297180A (en) Data migration method and device, electronic equipment and storage medium
CN113065086A (en) Webpage text extraction method and device, electronic equipment and storage medium
CN112380820A (en) Automatic data backfilling method and device, electronic equipment and computer storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN111680204A (en) Data acquisition method, data acquisition device and computer readable storage medium

Legal Events

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