[go: up one dir, main page]

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.一种基于依赖关系的任务触发方法,其特征在于,所述方法包括:1. A task triggering method based on a dependency relationship, wherein the method comprises: 获取任务代码和所述任务代码对应的依赖注解;Obtain the task code and the dependency annotation corresponding to the task code; 根据预设的注解解析规则对所述依赖注解进行解析,得到依赖信息集;Parse the dependency annotation according to the preset annotation parsing rule to obtain a dependency information set; 确定所述依赖信息集中与所述任务代码对应的依赖数据标识,并根据所述依赖数据标识判别本地数据库中是否存在依赖数据;Determine the dependent data identifier corresponding to the task code in the dependent information set, and determine whether there is dependent data in the local database according to the dependent data identifier; 若本地数据库中不存在所述依赖数据,则根据所述依赖数据标识从预设的数据中心调用所述依赖数据,并根据所述依赖数据执行任务触发操作。If the dependent data does not exist in the local database, the dependent data is called from a preset data center according to the dependent data identifier, and a task triggering operation is performed according to the dependent data. 2.如权利要求1所述的基于依赖关系的任务触发方法,其特征在于,所述确定所述依赖信息集中与所述任务代码对应的依赖数据标识,包括:2. The method for triggering a task based on a dependency relationship according to claim 1, wherein the determining the dependency data identifier corresponding to the task code in the dependency information set comprises: 根据所述依赖信息集中各个数据之间的依赖关系,将数据组成多个依赖数据对;According to the dependency relationship between each data in the dependency information set, the data is formed into a plurality of dependency data pairs; 遍历所述多个依赖数据对获取与所述任务代码对应的依赖数据标识。Traverse the plurality of dependent data pairs to obtain a dependent data identifier corresponding to the task code. 3.如权利要求1所述的基于依赖关系的任务触发方法,其特征在于,所述获取任务代码和所述任务代码对应的依赖注解之后,所述方法还包括:3. The method for triggering a task based on a dependency relationship according to claim 1, characterized in that, after the acquiring task code and the dependency annotation corresponding to the task code, the method further comprises: 对所述依赖注解进行分词处理,得到多个字符串组合;Perform word segmentation processing on the dependency annotation to obtain multiple string combinations; 根据所述多个字符串组合将所述依赖注解转换为树状结构注解,其中,所述树状结构注解中树状节点为所述多个字符串组合中与预设关键词匹配的字符串,所述树状结构注解中中子节点为所述多个字符串组合中与预设关键词不匹配的字符串。Convert the dependency annotation into a tree structure annotation according to the multiple string combinations, wherein the tree node in the tree structure annotation is a string matching a preset keyword in the multiple string combinations , the neutron node in the tree structure annotation is the character string that does not match the preset keyword in the multiple character string combinations. 4.如权利要求3所述的基于依赖关系的任务触发方法,其特征在于,所述对所述依赖注解进行分词处理,包括:4. The method for triggering a task based on a dependency relationship according to claim 3, wherein the step of performing word segmentation processing on the dependency annotation comprises: 利用分词程序将所述依赖注解划分为命令语句字符串组合和子查询语句字符串组合。The dependency annotation is divided into a command statement string combination and a subquery statement string combination using a word segmentation program. 5.如权利要求3所述的基于依赖关系的任务触发方法,其特征在于,所述根据预设的注解解析规则对所述依赖注解进行解析,包括:5. The method for triggering a task based on a dependency relationship according to claim 3, wherein the parsing of the dependency annotation according to a preset annotation parsing rule comprises: 提取所述树状结构注解中第一层树状节点得到执行操作关键词;Extracting the first layer tree node in the tree structure annotation to obtain the execution operation keyword; 提取所述树状结构注解中第一层个树状节点得到执行操作数据表。Extracting the first-level tree-like nodes in the tree-like structure annotation to obtain an execution operation data table. 6.如权利要求1所述的基于依赖关系的任务触发方法,其特征在于,所述根据预设的注解解析规则对所述依赖注解进行解析之前,所述方法还包括:6. The method for triggering a task based on a dependency relationship according to claim 1, wherein before the dependency annotation is parsed according to a preset annotation parsing rule, the method further comprises: 删除所述依赖注解中的无效数据和定义分隔符。Remove invalid data and definition separators in said dependency annotations. 7.如权利要求1所述的基于依赖关系的任务触发方法,其特征在于,所述获取任务对象和所述任务对象对应的依赖注解之前,所述方法还包括:7. The method for triggering a task based on a dependency relationship according to claim 1, wherein before the acquiring the task object and the dependency annotation corresponding to the task object, the method further comprises: 基于java编译规则生成注解接口的调用请求;Generate the call request of the annotation interface based on the java compilation rules; 利用所述调用请求从编程支持库中获取注释软件包,所述注释软件包用于生成注解。An annotation package is obtained from a programming support library using the call request, and the annotation package is used to generate annotations. 8.一种基于依赖关系的任务触发装置,其特征在于,所述装置包括:8. A device for triggering tasks based on dependencies, wherein the device comprises: 数据获取模块,用于获取任务代码和所述任务代码对应的依赖注解;a data acquisition module for acquiring task codes and dependency annotations corresponding to the task codes; 注解解析模块,用于根据预设的注解解析规则对所述依赖注解进行解析,得到依赖信息集;An annotation parsing module, configured to parse the dependency annotation according to a preset annotation parsing rule to obtain a dependency information set; 依赖数据确定模块,用于确定所述依赖信息集中与所述任务代码对应的依赖数据标识,并根据所述依赖数据标识判别本地数据库中是否存在依赖数据;A dependency data determination module, configured to determine the dependency data identifier corresponding to the task code in the dependency information set, and determine whether there is dependency data in the local database according to the dependency data identifier; 任务触发模块,用于若本地数据库中不存在所述依赖数据,则根据所述依赖数据标识从预设的数据中心调用所述依赖数据,并根据所述依赖数据执行任务触发操作。A task triggering module, configured to call the dependent data from a preset data center according to the dependent data identifier if the dependent data does not exist in the local database, and perform a task triggering operation according to the dependent data. 9.一种电子设备,其特征在于,所述电子设备包括:9. An electronic device, characterized in that the electronic device comprises: 至少一个处理器;以及,at least one processor; and, 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任意一项所述的基于依赖关系的任务触发方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the execution of any one of claims 1 to 7 The described dependency-based task triggering method. 10.一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任意一项所述的基于依赖关系的任务触发方法。10 . A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for triggering a task based on a dependency relationship according to any one of claims 1 to 7 is implemented. 11 .
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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126540A (en) * 2016-06-15 2016-11-16 中国传媒大学 Data base access system and access method thereof
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium
CN109388403A (en) * 2018-09-26 2019-02-26 广州视源电子科技股份有限公司 Dependency injection method, device, equipment and storage medium
CN111651167A (en) * 2020-05-29 2020-09-11 中国平安财产保险股份有限公司 Scheduling task dependency identification method, device and computer-readable storage medium
CN112015534A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Configurated platform scheduling method, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126540A (en) * 2016-06-15 2016-11-16 中国传媒大学 Data base access system and access method thereof
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium
CN109388403A (en) * 2018-09-26 2019-02-26 广州视源电子科技股份有限公司 Dependency injection method, device, equipment and storage medium
CN111651167A (en) * 2020-05-29 2020-09-11 中国平安财产保险股份有限公司 Scheduling task dependency identification method, device and computer-readable storage medium
CN112015534A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Configurated platform scheduling method, system and storage medium

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
CN112948427B (en) Data query method, device, equipment and storage medium
CN113961584A (en) Method and device for analyzing field blood relationship, electronic equipment and storage medium
CN111428451B (en) Text online editing method and device, electronic equipment and storage medium
CN114610747A (en) Data query method, device, equipment and storage medium
CN111651453A (en) User historical behavior query method and device, electronic equipment and storage medium
CN112528307A (en) Service request checking method and device, electronic equipment and storage medium
CN112347126B (en) Big data processing method, device, equipment and medium
CN111538573A (en) Asynchronous task processing method, device and computer-readable storage medium
CN112528633B (en) Text error correction method, apparatus, electronic device and computer readable storage medium
CN113971044A (en) Component document generation method, apparatus, device, and readable storage medium
CN113282854A (en) Data request response method and device, electronic equipment and storage medium
CN112486490A (en) Front-end code packaging method and device, electronic equipment and storage medium
CN112506931A (en) Data query method and device, electronic equipment and storage medium
CN114138243B (en) Function calling method, device, equipment and storage medium based on development platform
CN113687827B (en) Data list generation method, device and equipment based on widget and storage medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN113254446B (en) Data fusion method, device, electronic equipment and medium
CN113485711A (en) Task triggering method and device based on dependency relationship, electronic equipment and medium
CN114357337A (en) Cache management method, device, device and storage medium
CN114385155A (en) Vue project visualization tool generation method, device, equipment and storage medium
CN112685384A (en) Data migration method and device, electronic equipment and storage medium
CN111651167A (en) Scheduling task dependency identification method, device and computer-readable storage medium
CN115033489A (en) Code resource detection method and device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration

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