CN113239670A - Method and device for uploading service template, computer equipment and storage medium - Google Patents

Method and device for uploading service template, computer equipment and storage medium Download PDF

Info

Publication number
CN113239670A
CN113239670A CN202110511113.8A CN202110511113A CN113239670A CN 113239670 A CN113239670 A CN 113239670A CN 202110511113 A CN202110511113 A CN 202110511113A CN 113239670 A CN113239670 A CN 113239670A
Authority
CN
China
Prior art keywords
template
nodes
initial
service
uploading
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
CN202110511113.8A
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.)
Cormorant Technology Shenzhen Co ltd
Original Assignee
Cormorant Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cormorant Technology Shenzhen Co ltd filed Critical Cormorant Technology Shenzhen Co ltd
Priority to CN202110511113.8A priority Critical patent/CN113239670A/en
Publication of CN113239670A publication Critical patent/CN113239670A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/149Adaptation of the text data for streaming purposes, e.g. Efficient XML Interchange [EXI] format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method and a device for uploading a service template, computer equipment and a storage medium, and belongs to the technical field of computer software. The method comprises the steps of analyzing and identifying an initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes, converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes, and uploading the XML file generated by conversion to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.

Description

Method and device for uploading service template, computer equipment and storage medium
Technical Field
The present application belongs to the technical field of computer software, and more particularly, to a method and an apparatus for uploading a service template, a computer device, and a storage medium.
Background
With the enhancement of the enterprise on the flow management, the application of the business flow is more and more extensive. Based on the execution state of the service flow, the user can well know the processing condition of the service and realize the real-time follow-up of the service.
Generally, a business flow system of an enterprise needs to preset a plurality of business templates to meet the blind business requirements. In the existing service template uploading mode, developers create each function of a service template step by step according to service requirements, and write corresponding execution condition information for each function of the service template in the process of creating each function through code writing and updating. However, the creation and uploading of the service template by developers are often complicated, which not only wastes human resources, but also is prone to errors when writing condition information, resulting in inaccurate generated service templates.
Disclosure of Invention
An embodiment of the present application provides a method, an apparatus, a computer device, and a storage medium for uploading a service template, so as to solve technical problems of artificial resource waste and service template data upload errors in an existing service template uploading manner.
In order to solve the above technical problem, an embodiment of the present application provides a method for uploading a service template, which adopts the following technical scheme:
a method for uploading a service template comprises the following steps:
receiving a service template uploading instruction, and acquiring an initial template corresponding to the service template uploading instruction;
analyzing and identifying the initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes;
converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and uploading the XML file generated by conversion to a corresponding service flow system.
Further, the step of receiving a service template uploading instruction and acquiring an initial template corresponding to the service template uploading instruction specifically includes:
receiving a service template uploading instruction, and acquiring all service requirement parameters related to the service template and execution condition information of each service requirement parameter;
and importing all the service requirement parameters related to the service template and the execution condition information of each service requirement parameter into a preset visual graphic tool to generate an initial template corresponding to the service template uploading instruction.
Still further, the visualization graphical tool is a GraphX visualization component.
Further, the step of analyzing and identifying the initial template to obtain the types of all the nodes in the initial template and the association relationship between the nodes specifically includes:
analyzing and identifying the initial template to obtain position information of all nodes in the initial template and connection information among the nodes;
determining the type of each node according to the node position information;
and determining the association relation between the nodes according to the types of the nodes and the connection information between the nodes.
Further, the step of converting the initial template into an XML file according to the types of all the nodes in the initial template and the association relationship between the nodes specifically includes:
constructing an initial tree structure of the XML file;
according to the types of all the nodes in the initial template and the incidence relation among all the nodes, sequentially importing all the nodes in the initial template into the initial tree structure;
and formatting the initial tree structure after all the nodes are imported to obtain an XML file corresponding to the initial template.
Further, the step of sequentially importing all the nodes in the initial template into the initial tree structure according to the types of all the nodes in the initial template and the association relationship among the nodes specifically includes:
determining a root element of the XML file according to the types of all nodes in the initial template;
filling a root element of the XML file into the position of a root node in the initial tree structure;
and sequentially importing all the nodes into the initial tree structure according to the root element and the incidence relation among the nodes.
Further, before the step of uploading the XML file generated by the conversion to the corresponding service flow system, the method further includes:
and carrying out syntax check on the XML file.
In order to solve the above technical problem, an embodiment of the present application further provides a device for uploading a service template, which adopts the following technical scheme:
an apparatus for uploading a service template, comprising:
the receiving module is used for receiving a service template uploading instruction and acquiring an initial template corresponding to the service template uploading instruction;
the identification module is used for analyzing and identifying the initial template to obtain the types of all the nodes in the initial template and the incidence relation among the nodes;
the conversion module is used for converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and the uploading module is used for uploading the XML file generated by conversion to a corresponding service flow system.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor executes the computer readable instructions to implement the steps of the method for uploading the service template as described above.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor, implement the steps of the method of service template upload as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the application discloses a method and a device for uploading a service template, computer equipment and a storage medium, and belongs to the technical field of computer software. The method comprises the steps of receiving a service template uploading instruction, obtaining an initial template corresponding to the service template uploading instruction, analyzing and identifying the initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes, converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes, and uploading the XML file generated by conversion to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 illustrates an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 illustrates a flow diagram of one embodiment of a method of traffic template upload according to the present application;
FIG. 3 illustrates a flowchart according to one embodiment of step S201 of FIG. 2 of the present application;
FIG. 4 illustrates a flowchart according to one embodiment of step S202 of FIG. 2 of the present application;
FIG. 5 shows a flowchart in accordance with one embodiment of step S203 of FIG. 2 of the present application;
FIG. 6 illustrates a flowchart according to one embodiment of step S232 of FIG. 5 of the present application;
FIG. 7 is a block diagram illustrating an embodiment of a device for uploading a traffic template according to the present application;
FIG. 8 shows a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
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 in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for uploading the service template provided in the embodiment of the present application is generally executed by a server, and accordingly, the device for uploading the service template is generally disposed in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to fig. 2, a flow diagram of one embodiment of a method for service template upload according to the present application is shown. The method for uploading the service template comprises the following steps:
s201, receiving a service template uploading instruction, and acquiring an initial template corresponding to the service template uploading instruction;
s202, analyzing and identifying the initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes;
s203, converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and S204, uploading the XML file generated by conversion to a corresponding service flow system.
Among them, an abbreviation of XML (extensible Markup Language) is a meta Language used to define other languages, and its predecessor is SGML (standard generalized Markup Language). It has no tag set (tag set) nor syntactic rule (syntax rule), but it has syntax rule (syntax rule). Any XML document must be well-formed for any type of application and for proper parsing, i.e. every open tag must have a matching end tag, must not contain tags out of order, and must meet the requirements of the technical specification in terms of statement formation. An XML document may be valid (valid), but is not necessarily required to be valid. By valid document is meant a document that conforms to its Document Type Definition (DTD). If a document conforms to the specification of a schema (schema), then the document is "schema valid".
Specifically, after receiving a service template uploading instruction, the server acquires an initial template corresponding to the service template uploading instruction, where the initial template may be a visual initial service template constructed by a user according to service demand data and service execution conditions. And then the server analyzes and identifies the visualized initial template, and obtains the types of all nodes and the association relation among the nodes according to the positions and the connection information of all the nodes in the initial template. And then the server converts the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes, and the initial template is converted into the XML file in a mode of constructing an initial tree structure of the XML file and then sequentially importing all the nodes in the initial template into the initial tree structure. And finally, uploading the XML file generated by conversion to a corresponding service flow system through a server.
In this embodiment, an electronic device (for example, the server/terminal device shown in fig. 1) on which the method for uploading the service template operates may receive the service template uploading instruction through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The application discloses a method for uploading a service template, and belongs to the technical field of computer software. The method comprises the steps of receiving a service template uploading instruction, obtaining an initial template corresponding to the service template uploading instruction, analyzing and identifying the initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes, converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes, and uploading the XML file generated by conversion to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.
Further, with reference to fig. 3, the step of receiving the service template uploading instruction and acquiring the initial template corresponding to the service template uploading instruction in step S201 specifically includes:
s211, receiving a service template uploading instruction, and acquiring all service requirement parameters related to the service template and execution condition information of each service requirement parameter;
and S212, importing all the service requirement parameters related to the service template and the execution condition information of each service requirement parameter into a preset visual graphic tool, and generating an initial template corresponding to the service template uploading instruction.
Specifically, after receiving a service template uploading instruction, the server acquires all service requirement parameters related to the service template and execution condition information of each service requirement parameter, wherein the service requirement parameters and the execution condition information are input by a user from a user terminal. Then, the server imports all the service requirement parameters related to the service template and the execution condition information of each service requirement parameter into a preset visual graphic tool, and the visual graphic tool automatically generates a visual initial template corresponding to the service template uploading instruction, wherein the visual graphic tool is a GraphX visual component. And finally, the server acquires an initial template corresponding to the service template uploading instruction so as to carry out subsequent operation.
Where GraphX is an advanced graphics visualization software that is an open source project or part of the Apache Spark engine. Because it is open source, there is room to customize specific functions. Spark's computing technology is also employed, allowing visual and graphical data to be captured and stored in memory. It supports built-in layout algorithms, advanced graphics edge and vertex functionality by default. GraphX also includes visual preview functionality for all controls as well as rich ease of use documents and user support.
In the embodiment, the visual initial template generation is performed on the business requirement parameters related to the business template and the execution condition information of each business requirement parameter through the visual graphic tool, so that the difficulty of building the business template is greatly reduced, non-developers can independently perform visual template generation according to business requirements, the pressure of the developers is effectively reduced, and the problem of inaccurate business template generation caused by human errors is solved.
Further, with reference to fig. 4, the step S202 of analyzing and identifying the initial template to obtain the types of all the nodes in the initial template and the association relationship between the nodes specifically includes:
s221, analyzing and identifying the initial template to obtain position information of all nodes in the initial template and connection information among the nodes;
s222, determining the type of each node according to the node position information;
and S223, determining the association relation between the nodes according to the types of the nodes and the connection information between the nodes.
Specifically, the initial template is divided into a plurality of regions, each region is preset with a hierarchical relationship, such as a parent hierarchy and a child hierarchy, each region includes a plurality of nodes, and the nodes are connected through connecting lines. And the server analyzes and identifies the initial template, identifies the area position of each node to obtain the position information of all nodes in the initial template, and identifies the nodes to obtain the connection information of the nodes by connecting lines. And the server determines the type of each node according to the node position information, wherein if the node in a father level is determined as a father node, and if the node in a child level is determined as a child node, the server determines the type of each node. And the server determines the association relationship among the nodes according to the types of the nodes and the connection information among the nodes, wherein the association relationship comprises a parent-child relationship and an affiliation relationship.
In the above embodiment, a plurality of regions are divided in the initial template, then when the initial template is generated, the nodes are respectively stored in different regions according to service requirements, and a hierarchical relationship is preset before each region, so as to obtain the types and the association relationships of the nodes, so that the initial template is converted into an XML file according to the types of all the nodes in the initial template and the association relationships among the nodes in the subsequent step.
Further, with reference to fig. 5, the step S203 of converting the initial template into an XML file according to the types of all the nodes in the initial template and the association relationship between the nodes specifically includes:
s231, constructing an initial tree structure of the XML file;
s232, sequentially importing all the nodes in the initial template into the initial tree structure according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and S233, formatting the initial tree structure after all the nodes are imported, and obtaining an XML file corresponding to the initial template.
Further, with reference to fig. 6, the step S232 of sequentially importing all the nodes in the initial template into the initial tree structure according to the types of all the nodes in the initial template and the association relationship between the nodes specifically includes:
s2321, determining a root element of the XML file according to the types of all nodes in the initial template;
s2322, filling the root element of the XML file into the position of the root node in the initial tree structure;
s2323, according to the root element and the incidence relation among the nodes, all the nodes are sequentially imported into the initial tree structure.
Wherein the XML file includes a declaration of XML, an XML root element, and an XML element, the first line of the XML file must be a declaration that the file is an XML file and the version of the XML specification it uses, and there can be no other elements or annotations in front of the file, for example, a declaration of XML is as follows:
<?xml version=”1.0”standalone=”yes”encoding=”UTF-8”?>
this is an XML processing instruction. Processing instructions to <? To begin with? And > end. <? The first word after is an instruction name, such as XML, representing an XML statement.
The XML root element and the XML element are combined to form a tree structure, and the tree structure of the XML document requires that one root element is required. The start marker of the root element is to be placed before the start markers of all other elements, the end marker of the root element is to be placed after the end markers of all other elements, and the basic structure of the element is composed of the start marker, the data content, and the end marker, for example:
<?xml version=”1.0”standalone=”yes”encoding=”UTF-8”?>
<Settings>
<Person>Zhang San</Person>
</Settings>
in the above embodiment, "< Settings >" is a root element mark, and "</Person >" is an element mark.
Specifically, the server pre-constructs an initial tree structure of the XML file, then sequentially imports all nodes in the initial template into the initial tree structure according to types of all nodes in the initial template and association relations among the nodes, for example, determines a root element and a sum element according to the types of all nodes and the association relations among the nodes, and finally, the server sequentially imports all nodes into the initial tree structure according to the root element and the association relations among the nodes, and formats the initial tree structure after importation of all nodes to obtain the XML file corresponding to the initial template.
In the embodiment, all the nodes in the initial template are led into the initial tree structure of the XML file to generate the XML file through the types of all the nodes in the initial template and the association relationship among all the nodes, the visual initial service template is converted into the XML file, and then the XML file is uploaded to realize uploading of the service template.
Further, before the step of uploading the XML file generated by the conversion to the corresponding service flow system, the method further includes:
and carrying out syntax check on the XML file.
Specifically, an XML language check rule document is preset in the server, the XML language check rule document is configured in advance by developers, after the initial template is converted into the XML file, the server performs syntax check on the XML file by using the XML language check rule, if a syntax error exists in the XML file, prompt information that the syntax is wrong is output, and the prompt information that the syntax is wrong is pushed to the user terminal, and if the syntax is wrong, the XML file generated by conversion is uploaded to a corresponding service flow system for storage.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 7, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an apparatus for uploading a service template, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 7, the apparatus for uploading a service template according to this embodiment includes:
a receiving module 301, configured to receive a service template uploading instruction, and obtain an initial template corresponding to the service template uploading instruction;
an identifying module 302, configured to analyze and identify the initial template to obtain types of all nodes in the initial template and an association relationship between the nodes;
a conversion module 303, configured to convert the initial template into an XML file according to the types of all nodes in the initial template and the association relationship between the nodes;
and the uploading module 304 is configured to upload the XML file generated by the conversion to a corresponding service flow system.
Further, the receiving module 301 specifically includes:
the information receiving unit is used for receiving a service template uploading instruction and acquiring all service requirement parameters related to the service template and execution condition information of each service requirement parameter;
the information import unit is used for importing all the service requirement parameters related to the service template and the execution condition information of each service requirement parameter into a preset visual graphic tool and generating an initial template corresponding to the service template uploading instruction;
and the template acquisition unit is used for acquiring an initial template corresponding to the service template uploading instruction.
Still further, the visualization graphical tool is a GraphX visualization component.
Further, the identification module 302 specifically includes:
the template identification unit is used for analyzing and identifying the initial template to obtain the position information of all nodes in the initial template and the connection information among all the nodes;
the type confirmation unit is used for determining the type of each node according to the node position information;
and the relationship confirmation unit is used for determining the association relationship among the nodes according to the types of the nodes and the connection information among the nodes.
Further, the conversion module 303 specifically includes:
the structure construction unit is used for constructing an initial tree structure of the XML file;
a node importing unit, configured to import all nodes in the initial template into the initial tree structure in sequence according to types of all nodes in the initial template and an association relationship between the nodes;
and the formatting unit is used for formatting the initial tree structure after all the nodes are imported to obtain an XML file corresponding to the initial template.
Further, the node importing unit specifically includes:
a root element determining subunit, configured to determine a root element of the XML file according to the types of all nodes in the initial template;
a root element import subunit, configured to fill a root element of the XML file into a position of a root node in the initial tree structure;
and the node importing subunit is used for sequentially importing all the nodes into the initial tree structure according to the root element and the incidence relation among the nodes.
Further, the device for uploading the service template further comprises:
and the checking module 305 is configured to perform syntax checking on the XML file.
The application discloses a device for uploading a service template, and belongs to the technical field of computer software. The device comprises a receiving module 301, a processing module and a processing module, wherein the receiving module 301 is used for receiving a service template uploading instruction and acquiring an initial template corresponding to the service template uploading instruction; an identifying module 302, configured to analyze and identify the initial template to obtain types of all nodes in the initial template and an association relationship between the nodes; a conversion module 303, configured to convert the initial template into an XML file according to the types of all nodes in the initial template and the association relationship between the nodes; and the uploading module 304 is configured to upload the XML file generated by the conversion to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 8, fig. 8 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as computer readable instructions of a method for uploading a service template. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, execute computer readable instructions of the method for uploading the service template.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The application discloses computer equipment belongs to computer software technical field. According to the method and the device, an initial template corresponding to a service template uploading instruction is obtained by receiving the service template uploading instruction, the initial template is analyzed and identified, the types and the association relations among all nodes in the initial template are obtained, the initial template is converted into an XML file according to the types and the association relations among all nodes in the initial template, and the XML file generated by conversion is uploaded to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.
The present application further provides another embodiment, which is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, which can be executed by at least one processor, so as to cause the at least one processor to execute the steps of the method for uploading the service template as described above.
The application discloses a storage medium, and belongs to the technical field of computer software. According to the method and the device, an initial template corresponding to a service template uploading instruction is obtained by receiving the service template uploading instruction, the initial template is analyzed and identified, the types and the association relations among all nodes in the initial template are obtained, the initial template is converted into an XML file according to the types and the association relations among all nodes in the initial template, and the XML file generated by conversion is uploaded to a corresponding service flow system. The method and the device have the advantages that the visual initial service template is converted into the XML file, then the XML file is uploaded, and the uploading of the service template is realized.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for uploading a service template is characterized by comprising the following steps:
receiving a service template uploading instruction, and acquiring an initial template corresponding to the service template uploading instruction;
analyzing and identifying the initial template to obtain the types of all nodes in the initial template and the incidence relation among all the nodes;
converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and uploading the XML file generated by conversion to a corresponding service flow system.
2. The method for uploading a service template according to claim 1, wherein the step of receiving a service template upload instruction and acquiring an initial template corresponding to the service template upload instruction specifically comprises:
receiving a service template uploading instruction, and acquiring all service requirement parameters related to the service template and execution condition information of each service requirement parameter;
and importing all the service requirement parameters related to the service template and the execution condition information of each service requirement parameter into a preset visual graphic tool to generate an initial template corresponding to the service template uploading instruction.
3. The method for uploading business templates of claim 2, wherein the visual graphical tool is a graphX visual component.
4. The method for uploading the service template according to any one of claims 1 to 3, wherein the step of analyzing and identifying the initial template to obtain the types of all the nodes in the initial template and the association relationship between the nodes specifically comprises:
analyzing and identifying the initial template to obtain position information of all nodes in the initial template and connection information among the nodes;
determining the type of each node according to the node position information;
and determining the association relation between the nodes according to the types of the nodes and the connection information between the nodes.
5. The method for uploading the service template according to claim 4, wherein the step of converting the initial template into the XML file according to the types of all the nodes in the initial template and the association relationship between the nodes specifically comprises:
constructing an initial tree structure of the XML file;
according to the types of all the nodes in the initial template and the incidence relation among all the nodes, sequentially importing all the nodes in the initial template into the initial tree structure;
and formatting the initial tree structure after all the nodes are imported to obtain an XML file corresponding to the initial template.
6. The method for uploading a service template according to claim 5, wherein the step of sequentially importing all the nodes in the initial template into the initial tree structure according to the types of all the nodes in the initial template and the association relationship between the nodes specifically comprises:
determining a root element of the XML file according to the types of all nodes in the initial template;
filling a root element of the XML file into the position of a root node in the initial tree structure;
and sequentially importing all the nodes into the initial tree structure according to the root element and the incidence relation among the nodes.
7. The method for uploading service template according to claim 4, wherein before the step of uploading the XML file generated by the conversion to the corresponding service flow system, further comprising:
and carrying out syntax check on the XML file.
8. An apparatus for uploading a service template, comprising:
the receiving module is used for receiving a service template uploading instruction and acquiring an initial template corresponding to the service template uploading instruction;
the identification module is used for analyzing and identifying the initial template to obtain the types of all the nodes in the initial template and the incidence relation among the nodes;
the conversion module is used for converting the initial template into an XML file according to the types of all the nodes in the initial template and the incidence relation among all the nodes;
and the uploading module is used for uploading the XML file generated by conversion to a corresponding service flow system.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the method of traffic template upload according to any of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the method for service template upload according to any of claims 1 to 7.
CN202110511113.8A 2021-05-11 2021-05-11 Method and device for uploading service template, computer equipment and storage medium Pending CN113239670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110511113.8A CN113239670A (en) 2021-05-11 2021-05-11 Method and device for uploading service template, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110511113.8A CN113239670A (en) 2021-05-11 2021-05-11 Method and device for uploading service template, computer equipment and storage medium

Publications (1)

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

Family

ID=77133302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110511113.8A Pending CN113239670A (en) 2021-05-11 2021-05-11 Method and device for uploading service template, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113239670A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115935722A (en) * 2023-03-09 2023-04-07 北京集度科技有限公司 Process failure mode and impact analysis method, equipment and computer program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256492A (en) * 2008-03-31 2008-09-03 宋乃辉 Software development method and system for executing model drive structure
CN106845744A (en) * 2015-12-04 2017-06-13 北大医疗信息技术有限公司 The generation method and generating means of operation flow template
CN109308602A (en) * 2018-08-15 2019-02-05 平安科技(深圳)有限公司 Operation flow data processing method, device, computer equipment and storage medium
CN111208992A (en) * 2020-01-10 2020-05-29 深圳壹账通智能科技有限公司 System scheduling workflow generation method and system
CN112085087A (en) * 2020-09-04 2020-12-15 中国平安财产保险股份有限公司 Method and device for generating business rules, computer equipment and storage medium
CN112328224A (en) * 2021-01-06 2021-02-05 广州市玄武无线科技股份有限公司 Service interface docking method and device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256492A (en) * 2008-03-31 2008-09-03 宋乃辉 Software development method and system for executing model drive structure
CN106845744A (en) * 2015-12-04 2017-06-13 北大医疗信息技术有限公司 The generation method and generating means of operation flow template
CN109308602A (en) * 2018-08-15 2019-02-05 平安科技(深圳)有限公司 Operation flow data processing method, device, computer equipment and storage medium
CN111208992A (en) * 2020-01-10 2020-05-29 深圳壹账通智能科技有限公司 System scheduling workflow generation method and system
CN112085087A (en) * 2020-09-04 2020-12-15 中国平安财产保险股份有限公司 Method and device for generating business rules, computer equipment and storage medium
CN112328224A (en) * 2021-01-06 2021-02-05 广州市玄武无线科技股份有限公司 Service interface docking method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115935722A (en) * 2023-03-09 2023-04-07 北京集度科技有限公司 Process failure mode and impact analysis method, equipment and computer program product

Similar Documents

Publication Publication Date Title
CN111639287A (en) Page processing method and device, terminal equipment and readable storage medium
CN102929867A (en) Technology used for automatically translating a document
CN112671734B (en) Message processing method for multiple data sources and related equipment thereof
CN114996619A (en) Page display method and device, computer equipment and storage medium
CN113626223A (en) Interface calling method and device
CN111553556A (en) Business data analysis method and device, computer equipment and storage medium
CN113052262A (en) Form generation method and device, computer equipment and storage medium
CN110308907B (en) Data conversion method and device, storage medium and electronic equipment
CN116644213A (en) XML file reading method, device, equipment and storage medium
CN113239670A (en) Method and device for uploading service template, computer equipment and storage medium
CN116774973A (en) Data rendering method, device, computer equipment and storage medium
US20140198111A1 (en) Method and system for preserving a graphics file
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN112182157A (en) Training method of online sequence labeling model, online labeling method and related equipment
CN107423271B (en) Document generation method and device
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN116453125A (en) Data input method, device, equipment and storage medium based on artificial intelligence
CN115758018A (en) Grid-based page layout method and device, computer equipment and storage medium
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN115730603A (en) Information extraction method, device, equipment and storage medium based on artificial intelligence
CN114637831A (en) Data query method based on semantic analysis and related equipment thereof
CN116108814B (en) Gantt chart processing method and device, computer equipment and storage medium
CN115168299A (en) Multilingual entry document reading method and device, computer equipment and storage medium
CN113743367A (en) Form application method and device, computer equipment and storage medium
CN117421233A (en) Annotation-based code generation method, annotation-based code generation device, computer equipment and storage medium

Legal Events

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