CN116302213A - Flow template management method and electronic equipment - Google Patents

Flow template management method and electronic equipment Download PDF

Info

Publication number
CN116302213A
CN116302213A CN202111520560.6A CN202111520560A CN116302213A CN 116302213 A CN116302213 A CN 116302213A CN 202111520560 A CN202111520560 A CN 202111520560A CN 116302213 A CN116302213 A CN 116302213A
Authority
CN
China
Prior art keywords
flow
template
node
value
dependent data
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
CN202111520560.6A
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.)
Nanning Fulian Fugui Precision Industrial Co Ltd
Original Assignee
Nanning Fugui Precision Industrial 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 Nanning Fugui Precision Industrial Co Ltd filed Critical Nanning Fugui Precision Industrial Co Ltd
Priority to CN202111520560.6A priority Critical patent/CN116302213A/en
Publication of CN116302213A publication Critical patent/CN116302213A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application provides a process template management method and electronic equipment. The method comprises the following steps: newly-built flow, the flow includes: extracting node metadata and flow metadata from the flow, storing the node metadata and the flow metadata as JSON format files, filtering the JSON format files to obtain function information of the flow, determining self-defined nodes and flow templates of the flow according to the JSON format files, generating node templates according to the self-defined nodes, checking the dependent data of the flow templates, marking the flow templates as available templates if the dependent data of the flow templates meet preset conditions, and instantiating the available templates. The method and the device can develop the flow template in real time in the development and application process, so that the corresponding flow can be repeatedly applied in similar application scenes, and the development efficiency is improved.

Description

Flow template management method and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method for managing a flow template and an electronic device.
Background
In some application development flows of similar application scenes, some codes in the development process need to be repeatedly written, so that the efficiency of developers is low. When the existing development process generates a flow template, related codes are usually required to be manually extracted for arrangement and assembly, when the codes are too many, important codes are easy to miss, and the manual operation is extremely difficult to form a standard and has low efficiency. In addition, in the process of generating the flow template in the development stage, it is also required to determine whether the development process can produce the flow template according to personal experience, and when the flow template is generated, the generated flow template is not distinguished, and all users can use the flow template, so that information leakage may be caused.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method and related apparatus for managing a flow template, which can solve the problems of irregular and inefficient templates caused by manual generation of a flow template, avoid generating a flow template depending on personal experience, and avoid information leakage.
The application provides a process template management method, which comprises the following steps: creating a flow, wherein the flow comprises a plurality of nodes and dependent data and function information of the flow; extracting node metadata and flow metadata from the flow, and storing the node metadata and the flow metadata as JSON format files; extracting node marks of nodes from the JSON format file, and forming node mark combinations by the node marks of the nodes; the continuous nodes in the node mark combination are arranged and combined to obtain a continuous node combination; obtaining node combinations consistent with combinations stored in a database from the continuous node combinations as target combinations, recording the occurrence times of the target combinations, calculating a first recommended value of the target combinations, and judging whether to convert the flow into a flow template according to the first recommended value; checking the dependent data of the flow template, and marking the flow template as an available template if the dependent data of the flow template meets a preset condition; the available templates are instantiated.
In an alternative embodiment, the method further comprises: obtaining function information of the flow according to the JSON format file, and determining a custom node of the flow, wherein the method comprises the following steps: searching all characteristic words and weights of the flow to form a key value pair table, processing each characteristic word by using a hash algorithm to obtain a first binary value of each characteristic word, performing first positive and negative operation on the weights according to the first binary value to obtain a numerical value of each digit of the first binary value, summing the numerical values of each digit of the first binary values of all the characteristic words to obtain a calculation result, and performing second positive and negative operation on the calculation result to obtain a second binary value; calculating the similarity between the second binary value and the third binary value of the stored characteristic word by utilizing the Hamming distance, if the similarity is smaller than or equal to a first preset threshold value, recording the similarity times of the second binary value and the third binary value of the stored characteristic word, calculating a second recommended value, and judging whether to convert the function information into the custom node according to the second recommended value; and writing the function information in the custom node into a position corresponding to a preset node template to generate the node template.
In an alternative embodiment, said performing a first positive and negative operation on said weights according to said first binary value comprises: if the current digit of the first binary value is 1, determining that the value corresponding to the current digit of the first binary value is a positive value of the weight; if the current digit of the first binary value is 0, determining that the value corresponding to the current digit of the first binary value is a negative value of the weight; performing the second positive and negative operations on the calculation result includes: if the current digit of the calculation result is greater than or equal to 1, determining that the value corresponding to the current digit of the calculation result is 1; and if the current digit of the calculation result is smaller than or equal to 0, determining that the value corresponding to the current digit of the calculation result is 0.
In an optional implementation manner, the calculating a second recommended value, and determining whether to convert the function information into the custom node according to the second recommended value includes: if the similarity is smaller than or equal to a first preset threshold, calculating the second recommended value according to a formula of comment_f= (4-K) = (n), wherein comment_f is the second recommended value, K is the similarity, and n is the number of similarity times of the similarity; and if the second recommended value is greater than or equal to a second preset threshold value, converting the function information into the custom node.
In an optional implementation manner, the writing the function information in the custom node into a position corresponding to a preset node template, and generating the node template includes: and selecting the function information, assembling the function information into node function codes, writing the node function codes into positions corresponding to the preset node templates, and generating the node templates.
In an alternative embodiment, the calculating the first recommended value of the target combination, and determining whether to convert the flow into a flow template according to the first recommended value includes: calculating the first recommended value according to the formula of comment_y= (H-1) ×m, where comment_y is a recommended value of the target combination, H is a length of the target combination, and m is a number of occurrences of the target combination; and if the first recommended value is greater than a third preset threshold value, converting the flow into a flow template.
In an optional implementation manner, if the calculated first recommended value is greater than a third preset threshold, converting the flow into a flow template includes: and selecting the flow, deriving flow metadata and dependency data of the flow, and generating a flow template according to the domain and the function of the flow.
In an optional implementation manner, the checking the dependency data of the flow template, and if the dependency data of the flow template meets a preset condition, marking the flow template as an available template includes: when a database detects a new flow template, acquiring the dependent data of the new flow template; judging whether the database comprises the dependent data of the newly added flow template or not; if the database comprises the dependent data of the newly added flow template, determining to mark the newly added flow template as an available template; if the database does not contain the dependent data of the newly-added flow template, determining that the dependent data of the newly-added flow template is newly-added dependent data, and judging whether the newly-added dependent data is appointed dependent or not; if the newly added dependent data is the appointed dependent, sending an instruction to a server through a message queue telemetry transport protocol (MQTT) to download the latest appointed dependent, and marking the newly added flow template as an available template; and if the newly added dependent data is not the appointed dependent, notifying a user to add a dependent file, and marking the newly added flow template as an available template.
In an alternative embodiment, said instantiating said available templates comprises: determining the process template to be instantiated according to the domain and the function of the process template marked as the available template, and increasing the integral of the process template after the process template is instantiated to generate a process; checking whether the process template meets the dependency data required for generating the process; if the process template meets the dependency data required by the process generation, generating the process; if the process template does not meet the requirement of the process on the dependency data, sending an instruction to a server through a message queue telemetry transport protocol (MQTT) to download the missing dependency data, and generating the process after the downloading is completed.
The application also provides an electronic device comprising a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the flow template management method.
By using the flow template management method and the electronic equipment, a user can develop the flow template in real time in the development and application process, the corresponding flow template can be repeatedly applied in similar application scenes, the completeness of dependent data in the flow template can be ensured, the error of flow deployment caused by the lack of the dependent data is avoided, and the human judgment is not required to be relied on. In addition, the flow template can be divided into a private template and a public template, and the information security can be further determined.
Drawings
Fig. 1 is a flowchart of a method for managing a flow template according to an embodiment of the present application.
Fig. 2 is a schematic diagram of two abstract flow charts provided in this embodiment.
Fig. 3 is a flowchart of generating a node template according to an embodiment of the present application.
Fig. 4 is a flowchart of a generating flow template provided in an embodiment of the present application.
FIG. 5 is a diagram of check dependency data provided by an embodiment of the present application.
Fig. 6 is a flowchart illustrating an example of a flowchart template provided in an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that the specific embodiments described herein are merely illustrative of the application and are not intended to limit the application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, and the described embodiments are merely some, rather than all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
Referring to fig. 1, a flowchart of a method for managing a flow template according to an embodiment of the present application is shown. The method is applied to an electronic device (for example, the electronic device 7 shown in fig. 7), which may be any electronic product capable of performing man-machine interaction with a user, for example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), a game console, an interactive internet protocol television (Internet Protocol Television, IPTV), a smart wearable device, and the like.
The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware of the electronic device includes, but is not limited to: microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital signal processors (Digital Signal Processor, DSP), embedded devices, etc.
The electronic device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The network in which the electronic device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
The method specifically comprises the following steps:
step 101, newly creating a flow. In at least one embodiment of the present application, the process includes: the plurality of nodes and the dependent data of the flow, the nodes including function information. The flow consists of code. For example, when a plurality of application programs are compiled, a large amount of codes need to be reused, and we can form a process by the repeated codes and then convert the process into a process template, so that the same codes can be repeatedly applied, and the manpower is reduced. When creating a new flow, first, two abstract flows of a user config and a main are initialized and generated, as shown in fig. 2, which is a schematic diagram of the two abstract flows provided in this embodiment. The user config abstract flow includes: the main abstract process comprises the following steps of: a start node, a function information node and an end node. It should be noted that the start node, the intermediate node, and the end node in the user config abstract flow do not represent only three nodes in the abstract flow; the main abstract flow is also, and is not described herein. In this embodiment. And the user utilizes the CoreDEC tool to put the nodes required by the configuration process into the intermediate nodes in the user config abstract process, and finally, the process is established. The CoreDEC tool is an edge computing node data switching center, and is an integrated node-red industrial application data management center. node-red is a flow development tool written based on nodejs.
And 102, extracting node metadata and flow metadata from the flow, and storing the node metadata and the flow metadata into a JSON format file. In at least one embodiment of the present application, the node metadata is data of constituent nodes in the flow. The flow metadata is the data of the flow, namely the data forming the flow.
It should be noted that, in the embodiment of the present application, the setting of the template in the development process may at least include setting of the node template and setting of the flow template, as shown in fig. 1, there are two branches after step 102, where steps 103-106 are the flow of generating the node template, and steps 113-120 are the flow of generating the flow template.
Step 103, obtaining function information of the flow.
In at least one embodiment of the present application, the JSON format file is filtered using a regular expression with "function" as a keyword, so as to obtain function information of the flow, where "function" is a function name. In other embodiments of the present application, the function information of the flow may also be obtained in other manners. For example, whether the JSON format file has a corresponding function is directly searched according to the function name.
And 104, calculating a second recommended value of the flow, and judging whether to convert the function information into a custom node according to the second recommended value.
In at least one embodiment of the present application, all feature words and weights of the flow are looked up and a key value pair is formed. The key value table is shown in table 1:
TABLE 1
Key Value
feature1 weight1
feature2 weight2
feature3 weight3
Where feature represents a feature word and weight represents a weight corresponding to the feature word. In at least one embodiment of the present application, the weights are preset values of the system, and different weights are allocated according to different function information in the flow.
In yet another embodiment of the present application, all of the feature words are converted to corresponding first binary values using a hash (hash) algorithm. The hash (hash) algorithm: an arbitrary length input is transformed into a fixed length output by a hashing algorithm. Performing a first positive and negative operation on the weight according to the first binary value to obtain a value corresponding to each digit of the first binary value, wherein performing the first positive and negative operation includes: and if the current digit of the first binary value is 0, determining that the value corresponding to the current digit of the first binary value is a negative value of the weight. For example, if one first binary value is 100110, the weight is represented by W, the positive value of the weight is represented by "W", the negative value of the weight is represented by "-W", and "1" in the first binary value corresponds to "W", "0" corresponds to "-W", so that the first positive and negative operations are performed on the weight according to the first binary value to obtain: W-W-WWW-W.
In this embodiment of the present application, a first positive and negative operation is performed on the weights according to the first binary values to obtain values corresponding to each digit of the first binary values, the values corresponding to each digit of the first binary values of all feature words are summed to obtain a calculation result, and a second positive and negative operation is performed on the calculation result to obtain a second binary value. For example, as shown in table 2. The second positive and negative operation includes: if the current digit of the calculation result is greater than or equal to 1, determining that the value corresponding to the current digit of the calculation result is 1; and if the current digit of the calculation result is smaller than or equal to 0, determining that the value corresponding to the current digit of the calculation result is 0.
TABLE 2
Figure BDA0003407168270000051
In this embodiment, the first positive and negative operations are performed on the weights according to the first binary values to obtain values corresponding to each digit of the first binary values, and the values corresponding to each digit of the first binary values of all feature words are summed to obtain a calculation result. For example, the two first binary values each correspond to a value of 2-1 3-4-1-2 and-5 9-7-9-8 5, and the sum results in the calculation result being: -3 8-4-137 3.
Performing a second positive and negative operation on the calculation result to obtain a second binary value, for example, the calculation result is 31-211-5, and the second binary value obtained by performing the second positive and negative operation on the calculation result is: 10110.
in the embodiment of the present application, the hamming distance is used to calculate the similarity between the second binary value and the third binary value of the stored feature word, if the similarity is smaller than or equal to the first preset threshold, in this embodiment, the first preset threshold is set to 3, the number of times that the second binary value is similar to the third binary value of the stored feature word is recorded, a second recommended value is calculated, and the function information is converted into the custom node according to the second recommended value. The hamming distance is obtained by comparing whether each bit of the numerical value is the same or not, if the bit is different, adding 1 to the hamming distance, and the calculated hamming distance is the similarity between the second binary value and the third binary value. For example, a second binary value is 100101, a third binary value of a stored feature word is 101001, 2 bits of difference exist between the second binary value and the third binary value, the hamming distance is 2, the similarity meets the similarity requirement, the second binary value is recorded once and is similar to the third binary value of the stored feature word, and a second recommended value is calculated.
In one embodiment of the present application, a second recommended value is calculated, and the second recommended value is calculated according to the formula of comment_f= (4-K) = (n), where comment_f is the second recommended value, K is the similarity, and n is the number of times the similarity is similar. For example, if the second binary value is 100101, the third binary value of the stored feature word is 101001, the similarity is 2 calculated by using hamming distance and the number of similarity is 3 by systematic statistics, and the second recommended value is: commemorative_f= (4-2) 3=6.
In this embodiment of the present application, if the second recommended value is calculated to be greater than or equal to a second preset threshold, in this embodiment, the second preset threshold is set to be 4, the function information is converted into a custom node, the second recommended value is stored, and if the second recommended value is calculated to be normalized_f=6 and greater than or equal to 4, the function information is converted into the custom node. If the second recommended value is smaller than 4, the function information is not converted into the custom node, and step 106 is executed to store all the step statistical information.
And 105, writing the function information in the custom node into a position corresponding to a preset node template to generate the node template.
In at least one embodiment of the present application, when the second recommended value meets the second preset threshold, the function information is selected, the function information is written into a position corresponding to the preset node template, and a node template is generated, where the preset node template is composed of JSON files describing node versions, js files describing node function information, html files describing node forms, and the preset node template added with the function information is saved to a node folder, so as to generate the node template. When the node template is generated, the CoreDEC tool needs to be restarted to enable the node template to be checked in a tool panel of the CoreDEC tool, and when the node template can be checked in the tool panel of the CoreDEC tool, the node template generation is successful.
Step 113, obtaining node marks of all nodes in the flow, and forming node mark combinations by the node marks of the nodes.
In at least one embodiment of the present application, node markers of each node connected end to end in the flow are obtained from the JSON format file, and the node markers of the nodes are combined to form a node marker combination. For example, [06,03,07,07,01].
And 114, arranging and combining the node mark combinations to obtain continuous node combinations.
In at least one embodiment of the present application, the node mark combinations are arranged and combined, and each node mark in the node mark combinations after the arrangement and combination is removed, so as to obtain a plurality of sets. For example, if the node mark combination is [06,03,07,07,01], the node mark combination is obtained after permutation and combination: [06,03], [06,03,07], [06,03,07,07], [06,03,07,07,01], [03,07], [03,07,07], [03,07,07,01], [07,07], [07,07,01], [07,01], culling each node marker in the node marker combination, i.e., culling set [06,03,07,07,01], the last plurality of consecutive node combinations being: [06,03],[06,03,07],[06,03,07,07],[03,07],[03,07,07],[03,07,07,01],[07,07],[07,07,01],[07,01].
And step 115, obtaining the node combination consistent with the combination stored in the database from the continuous node combinations as a target combination, and calculating a first recommended value of the target combination.
In at least one embodiment of the present application, the stored list of combinations is a list of combinations set internally by the CoreDEC tool. For example, as shown in table 3.
TABLE 3 Table 3
ID List
1 03,07,07
2 01,02,03,05
3 03,07,07
4 01,05,04,02,05
5 02,06,08,01,02,04
6 03,07,07
7 03,07,07
8 02,05,08,07,03
Specifically, obtaining, as a target combination, a node combination that coincides with a combination stored in a database from the continuous node combinations, including: comparing the continuous node combination with a combination list stored in a database to obtain a target combination consistent with the continuous node combination and the stored combination, and recording the occurrence times of the target combination. For example, the plurality of consecutive nodes are combined as: the combinations in the combination list are compared to obtain the combination of [03,07,07] which is consistent with the combination list, the target combination is obtained to be [03,07,07], and the number of times of the target combination is 4. And calculating a first recommended value of the target combination, and judging to convert the flow into a flow template according to the first recommended value. In this embodiment of the present application, the first recommended value is calculated according to the formula of command_y= (H-1) ×m, where command_y is the recommended value of the target combination, H is the length of the target combination, and m is the number of occurrences of the target combination, for example, in the above example, the target combination is [03,07,07], the number of occurrences is 4, and the length of the target combination may be obtained as 3, and the first recommended value is calculated according to the formula of command_y= (3-1) ×4=8.
And step 116, judging whether to convert the flow into a flow template according to the first recommended value.
In at least one embodiment of the present application, if the first recommended value is calculated to be greater than a third preset threshold, in this embodiment, the third preset threshold is set to 6, the process is converted into a process template, and the first recommended value is stored. For example, in the above example, if the first recommended value is calculated to be 8 and greater than 6, the process is converted into the process template. If the second recommended value is less than or equal to 6, the process is not converted into a process template, and step 106 is executed to store all the step statistics.
Step 117, checking and judging whether the dependent data of the flow template is complete.
In at least one embodiment of the present application, when a new flow template is detected in the database of the CoreDEC tool, the database may obtain the dependency data of the new flow template, and compare the dependency data of the new flow template with the dependency data stored in the database to obtain a comparison result, and if the comparison result shows that the dependency data of the new flow template is incomplete, execute step 120 to mark the new flow template as an unavailable template. And if the comparison result shows that the dependent data of the newly added flow template is complete, determining that the newly added flow template is a usable template.
118, marking the flow template as an available flow template.
In at least one embodiment of the present application, if the comparison result shows that the dependency data of the new flow template is complete, determining to mark the new flow template as an available template.
119 instantiate the available flow templates.
In at least one embodiment of the present application, the required flow templates are determined according to the belonging fields and functions of the flow templates marked as available, after the flow templates are instantiated to generate a flow, the integral of the flow templates is added, and the integral of the flow templates is used for sorting the flow templates according to the integral of the flow templates in a flow template list after determining the belonging fields and functions of the flow templates. Wherein, the belonging field of the flow template comprises: public templates and private templates, the use of the flow templates includes: data collection, data forwarding, data storage, real-time analysis, data statistics, and others. For example, the user needs to select to construct a real-time analysis process, first, the user will determine whether the own private template has a required real-time analysis process template according to the user's own, if so, the user selects the private template, then selects a list of real-time analysis functions, searches the process template, if the private template of the user does not have the required real-time analysis process template, the user selects the public template, then selects the list of real-time analysis functions, and searches the real-time analysis process template.
In one embodiment of the present application, when the user selects a desired process template for instantiation, the database will again check whether the selected process template satisfies the dependency data required for generating a process, and if so, generate the process. If the message queue telemetry transport protocol (MQTT) is not satisfied, sending a command to a server to download missing dependencies, and generating the flow after downloading is completed. MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol), a lightweight communication protocol based on publish/subscribe mode, is built on top of TCP/IP protocol, and has the greatest advantage of providing real-time reliable message service to remote devices with very little code and limited bandwidth.
Referring to fig. 3, fig. 3 is a flowchart of generating a node template according to an embodiment of the present application, which specifically includes the following steps:
step 301, selecting function information in a custom node.
In at least one embodiment of the present application, when the second recommended value is calculated to be greater than or equal to 4, the system reminds the user that the function information in the flow is reused, and the function information can be converted into the custom node. And when the function information is converted into the custom node, selecting the function information in the custom node.
Step 302, writing the function information into a preset node template to generate the node template.
In at least one embodiment of the present application, function information is written into a position corresponding to the preset node template, so as to generate the node template. The preset node template consists of json files describing node versions, js files describing node function information and html files describing node forms, and the function information is written into the js files describing the node function information. And storing the preset node templates added with the function information into a node folder to generate the node templates.
In step 303, the node template is validated.
In at least one embodiment of the present application, when a node template is generated, the CoreDEC tool needs to be restarted to allow the node template to be viewed in the tool panel of the CoreDEC tool, and when the node template is viewable in the tool panel of the CoreDEC tool, the node template generation is indicated to be successful.
See fig. 4. Fig. 4 is a flowchart of a generating flow template provided in an embodiment of the present application, which specifically includes the following steps:
in step 401, a flow converted to a flow template is selected.
In at least one embodiment of the present application, when the first recommended value is calculated to be greater than 6, the system reminds the user that the process is reused, and the process can be converted into a process template. And when the flow is converted into the flow template, selecting the flow converted into the flow template.
Step 402, exporting flow metadata and dependency data of a flow.
In at least one embodiment of the present application, the purpose of exporting flow metadata and dependency data for a flow that is translated into a flow template is to: in order to instantiate the flow template, only the flow metadata of the flow and the dependent data of the flow need to be imported, so that the flow template can be instantiated.
Step 403, determining the domain, function, name and description information of the flow.
In at least one embodiment of the present application, when a flow is converted into a flow template, the domain, function, name of the flow and description information of the flow need to be determined. Wherein the description information includes: a generalized description of the process facilitates better management of process templates. For example, a process meets the conditions for converting to a process template, a user determines the domain to which the process belongs according to needs, makes a selection between a private template and a public template, determines the function of the process, makes a selection among data collection, data forwarding, data storage, real-time analysis, data statistics, and others, and names and composes related descriptive information for the process.
Step 404, storing the information in a database to generate a flow template.
In at least one embodiment of the present application, the information includes: flow metadata derived from the flow, dependent data, flow-affiliated domain, function, name, and description information. And storing the information into a database to generate a flow template.
Referring to fig. 5, a check dependency data graph is provided in an embodiment of the present application. The method is specifically as follows:
in step 501, the database detects a new flow template.
Step 502, determining whether the database includes the dependent data of the new flow template.
In at least one embodiment of the present application, when a new flow template is detected in the database of the CoreDEC tool, the database obtains the dependency data of the new flow template. If the database includes the dependent data of the new flow template, executing step 506 to mark the new flow template as an available template; if the database does not include the dependent data of the newly added flow template, determining that the dependent data of the newly added flow template is the newly added dependent data. Step 503 is executed to determine whether the newly added dependency data is a specified dependency.
503, determining whether the newly added dependent data is specified dependent data.
In at least one embodiment of the present application, the specified dependencies are correct and depend on the data for the most recent version. If the newly added dependent data is the specified dependent data, step 504 is executed to send an instruction to the server through the MQTT protocol to download the latest specified dependent, replacing the original specified dependent data. When the download is complete, step 506 is performed to mark the newly added flow template as an available template. For example, the system sends the module/download partial to the DP service through the MQTT protocol to download the specified dependent data, and after the downloading is completed, the system determines that the newly added flow template is the available flow template.
In this embodiment, if it is determined that the newly added dependent data is not the specified dependent data, step 505 is executed to notify the user to add the dependent data, and determine whether the added dependent data is complete. If the dependent data is complete, step 506 is performed to mark the newly added flow template as an available template. If the dependent data is incomplete, step 507 is performed to mark the newly added flow template as an unavailable template.
Referring to fig. 6, a flowchart of a flowchart template instantiation provided in an embodiment of the present application is shown. The method specifically comprises the following steps:
601, the domain and function of the desired flow template are selected.
In at least one embodiment of the present application, the domain to which the user belongs is determined based on a user selection, i.e., whether a public template list or a private template list is selected. Further, after determining the domain, the user performs function determination of the flow template, namely, selects one function from data acquisition, data forwarding, data storage, real-time analysis, data statistics and other choices, and after determining the function of the flow template, the user enters a flow template list, wherein the templates are ordered according to the integral, and the higher the integral, the more the front the integral is, so that the user can select a more suitable flow template.
602, selecting a flow template, and acquiring flow metadata and dependency data of the flow template.
In at least one embodiment of the present application, when a user selects a flow template, the system automatically exports flow metadata of the flow template and dependency data for generating a flow.
603, determining whether the dependent data of the flow template is complete.
In at least one embodiment of the present application, if the dependent data of the flow template is complete, step 604 is performed to generate a flow, and the selected flow template is incremented by 1 point. If the dependent data of the flow template is incomplete, executing step 605 sends an instruction to the server through the MQTT protocol to download the complete dependent data, and replace the original dependent data. After the dependent data is downloaded, step 604 is performed to generate a flow, and the selected flow template is incremented by 1 point.
While the invention has been described with reference to the specific embodiments thereof, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 7. The electronic device 7 comprises a memory 701, at least one processor 702, a computer program 703 stored in the memory 701 and executable on the at least one processor 702, and at least one communication bus 704.
It will be appreciated by those skilled in the art that the schematic diagram shown in fig. 7 is merely an example of the electronic device 7 and is not limiting of the electronic device 7, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the electronic device 7 may further include an input-output device, a network access device, etc.
The at least one processor 702 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The at least one processor 702 may be a microprocessor or the at least one processor 702 may be any conventional processor or the like, the at least one processor 702 being a control center of the electronic device 7, the various interfaces and lines being utilized to connect various parts of the entire electronic device 7.
The memory 701 may be used to store the computer program 703, and the at least one processor 702 may implement various functions of the electronic device 7 by running or executing the computer program 703 stored in the memory 701 and invoking data stored in the memory 701. The memory 701 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device 7, such as audio data, and the like. In addition, the memory 701 may include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other non-volatile solid state storage device.
The integrated modules/units of the electronic device 7 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each method embodiment described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device, recording medium, USB flash disk, removable hard disk, magnetic disk, optical disk, computer Memory, and Read-Only Memory capable of carrying the computer program code.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application 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.
Finally, it should be noted that the above embodiments are merely for illustrating the technical solution of the present application and not for limiting, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present application may be modified or substituted without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. A process template management method, characterized in that the process template management method comprises:
creating a flow, wherein the flow comprises a plurality of nodes and dependent data and function information of the flow;
Extracting node metadata and flow metadata from the flow, and storing the node metadata and the flow metadata as JSON format files;
extracting node marks of nodes from the JSON format file, and forming node mark combinations by the node marks of the nodes;
the continuous nodes in the node mark combination are arranged and combined to obtain a continuous node combination;
obtaining node combinations consistent with combinations stored in a database from the continuous node combinations as target combinations, recording the occurrence times of the target combinations, calculating a first recommended value of the target combinations, and judging whether to convert the flow into a flow template according to the first recommended value;
checking the dependent data of the flow template, and marking the flow template as an available template if the dependent data of the flow template meets a preset condition;
the available templates are instantiated.
2. The flow template management method according to claim 1, further comprising:
obtaining function information of the flow according to the JSON format file, and determining a custom node of the flow, wherein the method comprises the following steps:
searching all characteristic words and weights of the flow to form a key value pair table, processing each characteristic word by using a hash algorithm to obtain a first binary value of each characteristic word, performing first positive and negative operation on the weights according to the first binary value to obtain a numerical value of each digit of the first binary value, summing the numerical values of each digit of the first binary values of all the characteristic words to obtain a calculation result, and performing second positive and negative operation on the calculation result to obtain a second binary value; a kind of electronic device with high-pressure air-conditioning system
Calculating the similarity between the second binary value and the third binary value of the stored characteristic word by utilizing the Hamming distance, if the similarity is smaller than or equal to a first preset threshold value, recording the similarity times of the second binary value and the third binary value of the stored characteristic word, calculating a second recommended value, and judging whether to convert the function information into the custom node according to the second recommended value;
and writing the function information in the custom node into a position corresponding to a preset node template to generate the node template.
3. The process template management method according to claim 2, wherein performing a first positive and negative operation on the weights according to the first binary value comprises:
if the current digit of the first binary value is 1, determining that the value corresponding to the current digit of the first binary value is a positive value of the weight;
if the current digit of the first binary value is 0, determining that the value corresponding to the current digit of the first binary value is a negative value of the weight;
performing the second positive and negative operations on the calculation result includes:
if the current digit of the calculation result is greater than or equal to 1, determining that the value corresponding to the current digit of the calculation result is 1;
And if the current digit of the calculation result is smaller than or equal to 0, determining that the value corresponding to the current digit of the calculation result is 0.
4. The method of claim 2, wherein calculating a second recommended value, and determining whether to convert the function information into the custom node according to the second recommended value comprises:
if the similarity is smaller than or equal to a first preset threshold, calculating the second recommended value according to a formula of comment_f= (4-K) = (n), wherein comment_f is the second recommended value, K is the similarity, and n is the number of similarity times of the similarity;
and if the second recommended value is greater than or equal to a second preset threshold value, converting the function information into the custom node.
5. The process template management method according to claim 2, wherein writing the function information in the custom node to a position corresponding to a preset node template, and generating the node template comprises:
and selecting the function information, assembling the function information into node function codes, writing the node function codes into positions corresponding to the preset node templates, and generating the node templates.
6. The process template management method according to claim 1, wherein calculating a first recommended value of the target combination, and determining whether to convert the process into a process template according to the first recommended value comprises:
calculating the first recommended value according to the formula of comment_y= (H-1) ×m, where comment_y is a recommended value of the target combination, H is a length of the target combination, and m is a number of occurrences of the target combination;
and if the first recommended value is greater than a third preset threshold value, converting the flow into a flow template.
7. The process template management method according to claim 6, wherein if the calculated first recommended value is greater than a third preset threshold value, converting the process into a process template includes:
and selecting the flow, deriving flow metadata and dependency data of the flow, and generating a flow template according to the domain and the function of the flow.
8. The process template management method according to claim 1, wherein the checking the dependent data of the process template, and if the dependent data of the process template satisfies a preset condition, marking the process template as an available template comprises:
When a database detects a new flow template, acquiring the dependent data of the new flow template; judging whether the database comprises the dependent data of the newly added flow template or not;
if the database comprises the dependent data of the newly added flow template, determining to mark the newly added flow template as an available template;
if the database does not contain the dependent data of the newly-added flow template, determining that the dependent data of the newly-added flow template is newly-added dependent data, and judging whether the newly-added dependent data is appointed dependent or not;
if the newly added dependent data is the appointed dependent, sending an instruction to a server through a message queue telemetry transport protocol (MQTT) to download the latest appointed dependent, and marking the newly added flow template as an available template;
and if the newly added dependent data is not the appointed dependent, notifying a user to add a dependent file, and marking the newly added flow template as an available template.
9. The process template management method according to claim 1, wherein said instantiating the available templates comprises:
determining the process template to be instantiated according to the domain and the function of the process template marked as the available template, and increasing the integral of the process template after the process template is instantiated to generate a process;
Checking whether the process template meets the dependency data required for generating the process;
if the process template meets the dependency data required by the process generation, generating the process;
if the process template does not meet the requirement of the process on the dependency data, sending an instruction to a server through a message queue telemetry transport protocol (MQTT) to download the missing dependency data, and generating the process after the downloading is completed.
10. An electronic device comprising a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the flow template management method of any one of claims 1 to 9.
CN202111520560.6A 2021-12-13 2021-12-13 Flow template management method and electronic equipment Pending CN116302213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111520560.6A CN116302213A (en) 2021-12-13 2021-12-13 Flow template management method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111520560.6A CN116302213A (en) 2021-12-13 2021-12-13 Flow template management method and electronic equipment

Publications (1)

Publication Number Publication Date
CN116302213A true CN116302213A (en) 2023-06-23

Family

ID=86826266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111520560.6A Pending CN116302213A (en) 2021-12-13 2021-12-13 Flow template management method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116302213A (en)

Similar Documents

Publication Publication Date Title
CN108229924A (en) Recruitment information matching process, device and computer readable storage medium
CN109710703A (en) A kind of generation method and device of genetic connection network
CN111782772A (en) Text automatic generation method, device, equipment and medium based on OCR technology
CN111191012B (en) Knowledge graph generation device and method and computer readable storage medium thereof
CN112613917A (en) Information pushing method, device and equipment based on user portrait and storage medium
WO2019061664A1 (en) Electronic device, user's internet surfing data-based product recommendation method, and storage medium
CN111831911A (en) Query information processing method and device, storage medium and electronic device
CN111652468A (en) Business process generation method and device, storage medium and computer equipment
CN110377576A (en) Create method and apparatus, the log analysis method of log template
CN111435367A (en) Knowledge graph construction method, system, equipment and storage medium
CN112001159A (en) Document generation method and device, electronic equipment and storage medium
CN110209780B (en) Question template generation method and device, server and storage medium
CN111932076B (en) Rule configuration and release method and device and computing equipment
CN114281984A (en) Risk detection method, device and equipment and computer readable storage medium
CN113268597A (en) Text classification method, device, equipment and storage medium
CN117520503A (en) Financial customer service dialogue generation method, device, equipment and medium based on LLM model
CN116302213A (en) Flow template management method and electronic equipment
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112836033B (en) Service model management method, device, equipment and storage medium
CN115203435A (en) Entity relation generation method and data query method based on knowledge graph
CN114386853A (en) Data auditing processing method, device and equipment based on universal auditing model
CN109542986B (en) Element normalization method, device, equipment and storage medium of network data
CN113254612A (en) Knowledge question-answering processing method, device, equipment and storage medium
CN111984657A (en) Data collection method and device, storage medium and computer equipment
WO2020017037A1 (en) Log analysis device, log analysis method, and program

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