CN113900650A - Data processing method and device, electronic equipment and readable storage medium - Google Patents

Data processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113900650A
CN113900650A CN202111170739.3A CN202111170739A CN113900650A CN 113900650 A CN113900650 A CN 113900650A CN 202111170739 A CN202111170739 A CN 202111170739A CN 113900650 A CN113900650 A CN 113900650A
Authority
CN
China
Prior art keywords
graphic element
attribute information
data
information set
node
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
CN202111170739.3A
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.)
Wuhan Yuexuebang Network Technology Co ltd
Original Assignee
Wuhan Yuexuebang Network Technology 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 Wuhan Yuexuebang Network Technology Co ltd filed Critical Wuhan Yuexuebang Network Technology Co ltd
Priority to CN202111170739.3A priority Critical patent/CN113900650A/en
Publication of CN113900650A publication Critical patent/CN113900650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Abstract

The application belongs to the technical field of data processing, and discloses a data processing method, a data processing device, electronic equipment and a readable storage medium, wherein the method comprises the steps of carrying out format conversion and data analysis on a graphic element when a copying instruction of the graphic element in an application page drawn by a user aiming at a first flow is determined to be received, and obtaining an attribute information set corresponding to the graphic element; storing the acquired attribute information set to a system memory; when a pasting instruction of a user for drawing an application page aiming at a second process is determined to be received, acquiring an attribute information set corresponding to a graphic element from a system memory; drawing a target data format correspondingly set by the application page according to the second flow, and carrying out format conversion on the attribute information set corresponding to the graphic element to obtain a corresponding target node; and displaying the generated target node in the second flow drawing application page. In this way, the user can copy and paste graphical elements between pages of different flow rendering applications.

Description

Data processing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, an electronic device, and a readable storage medium.
Background
In order to analyze and monitor and manage a business process, a user usually draws a business process diagram for a plurality of business activities that need to be executed. The business process diagram is composed of a plurality of graphic elements, and the graphic elements are symbols for abstract description of the business process.
For example, a Business Process Modeling Notation (BPMN) may be used to draw a Business Process diagram.
However, in the prior art, it is difficult for a user to copy and paste graphic elements between flow rendering application pages of different flow rendering applications.
Therefore, how to copy and paste the graphic elements among different process drawing application pages is a technical problem to be solved.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data processing method, an apparatus, an electronic device, and a readable storage medium, which are used for solving the problem that graphic elements cannot be copied and pasted between different process drawing application pages when the graphic elements are copied and pasted.
In one aspect, a method for data processing is provided, including:
when a copy instruction of at least one graphic element in a first flow drawing application page of a user is determined to be received, carrying out format conversion and data analysis on the at least one graphic element to obtain an attribute information set corresponding to the at least one graphic element;
storing the acquired attribute information set to a system memory;
when a pasting instruction of a user for drawing an application page aiming at a second process is determined to be received, acquiring an attribute information set corresponding to at least one graphic element from a system memory;
drawing a target data format correspondingly set by the application page according to the second process, and carrying out format conversion on the attribute information set corresponding to at least one graphic element to obtain a corresponding target node;
and displaying the generated target node in the second flow drawing application page.
In the implementation process, the graphic elements selected by the user in the first process drawing application page are subjected to format conversion and analysis to obtain the attribute information set, the attribute information set is copied to the system pasting board, the attribute information set read from the system pasting board is subjected to format conversion to generate the target node, and the target node is displayed in the second process drawing application page, so that the graphic elements can be copied and pasted among different pages of the same process drawing application program, the graphic elements can be copied and pasted among different pages of different process drawing application programs, the configuration efficiency and reusability of the process drawing application program are improved, the graphic elements do not need to be repeatedly constructed by the user, and the error rate of graphic element construction is reduced.
In one embodiment, performing format conversion and data parsing on at least one graphic element to obtain an attribute information set corresponding to the at least one graphic element includes:
carrying out format conversion on at least one graphic element to obtain conversion data with the format type of extensible markup language;
for each set of node labels in the transformed data, respectively, performing the following steps: acquiring graphic element information in a start label and an end label in a group of node labels, wherein each group of node labels comprises a start label and an end label;
and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
In the implementation process, the format conversion is performed on the graphic elements selected by the user through the first format conversion function to obtain the conversion data in the Extensible Markup Language (XML) format, and each graphic element is analyzed through a double pointer circulation method to obtain the attribute information set of each graphic element. In this way, the graphic element can be subjected to format conversion and analysis, so that the attribute information set obtained by analysis can be pasted in the subsequent steps.
In one embodiment, obtaining graphic element information within a start tag and an end tag in a set of node tags comprises:
controlling a first pointer to point to the start tag and controlling a second pointer to point to the end tag;
circularly executing the following steps until the first pointer points to the end tag pointed to by the second pointer:
analyzing the label to be analyzed to which the first pointer points at present to obtain corresponding analysis information, and controlling the first pointer to point to the next label to be analyzed; wherein the analysis information is composed of the determined analysis content of the graphic element information.
In the implementation process, each graphic element is analyzed in a double-pointer circulation mode, and the graphic element information of each graphic element is obtained respectively. In this way, the graphic element information within the start tag and the end tag of a set of node tags may be obtained.
In one embodiment, the method for obtaining a corresponding target node by performing format conversion on an attribute information set corresponding to at least one graphic element according to a target data format correspondingly set to a second process drawing application page includes:
carrying out format conversion on the attribute information set to obtain conversion data with a format type of extensible markup language;
and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
In the implementation process, the attribute information set is subjected to format conversion to obtain conversion data in an XML format, and the conversion data is converted according to a target data format through a second format conversion function to generate a target node.
In one aspect, an apparatus for data processing is provided, including:
the analysis unit is used for performing format conversion and data analysis on at least one graphic element when a copy instruction of the user for the at least one graphic element in the first process drawing application page is determined to be received, and acquiring an attribute information set corresponding to the at least one graphic element;
the storage unit is used for storing the acquired attribute information set to a system memory;
the obtaining unit is used for obtaining an attribute information set corresponding to at least one graphic element from a system memory when a pasting instruction of a user for drawing an application page aiming at a second process is determined to be received;
the conversion unit is used for drawing a target data format correspondingly set by the application page according to the second flow, and performing format conversion on the attribute information set corresponding to at least one graphic element to obtain a corresponding target node;
and the display unit is used for displaying the generated target node in the second flow drawing application page.
In one embodiment, the parsing unit is specifically configured to:
carrying out format conversion on at least one graphic element to obtain conversion data with the format type of extensible markup language;
for each set of node labels in the transformed data, respectively, performing the following steps: acquiring graphic element information in a start label and an end label in a group of node labels, wherein each group of node labels comprises a start label and an end label;
and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
In one embodiment, the obtaining unit is specifically configured to:
controlling the first pointer to point to a start tag and controlling the second pointer to point to an end tag;
the following steps are executed in a loop until the first pointer points to the end tag pointed to by the second pointer:
analyzing the label to be analyzed to which the first pointer points at present to obtain corresponding analysis information, and controlling the first pointer to point to the next label to be analyzed; wherein the graphic element information is composed of parsed information.
In one embodiment, the conversion unit is specifically configured to:
carrying out format conversion on the attribute information set to obtain conversion data with a format type of extensible markup language;
and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
In one aspect, an electronic device is provided, comprising a processor and a memory, the memory storing computer readable instructions which, when executed by the processor, perform the steps of the method provided in any of the various alternative implementations of data processing described above.
In one aspect, a readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the steps of the method as provided in any of the various alternative implementations of data processing.
In the method, the apparatus, the electronic device and the readable storage medium for data processing provided by the embodiments of the application, carrying out format conversion and analysis on the graphic elements selected by the user in the first flow drawing application page to obtain an attribute information set, copying the attribute information set to a system pasting board, and converting the format of the attribute information set read from the system pasting board to generate a target node, drawing an application page in a second flow and displaying the target node, therefore, the graphic elements can be copied and pasted among different pages of the same process drawing application program, and the graphic elements can be copied and pasted among different pages of different process drawing application programs, so that the configuration efficiency and reusability of the process drawing application program are improved, the graphic elements do not need to be repeatedly constructed by a user, and the error rate of the construction of the graphic elements is reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic view of a process drawing application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of an implementation of a method for data processing according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a detailed implementation of a data processing method according to an embodiment of the present application;
fig. 4 is a block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
First, some terms referred to in the embodiments of the present application will be described to facilitate understanding by those skilled in the art.
The terminal equipment: may be a mobile terminal, a fixed terminal, or a portable terminal such as a mobile handset, station, unit, device, multimedia computer, multimedia tablet, internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system device, personal navigation device, personal digital assistant, audio/video player, digital camera/camcorder, positioning device, television receiver, radio broadcast receiver, electronic book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It is also contemplated that the terminal device can support any type of interface to the user (e.g., wearable device), and the like.
A server: the cloud server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, big data and artificial intelligence platform and the like.
Business Process Management (BPM): the business process management is a systematic method which takes a standardized structure of end-to-end excellent business processes as a center and aims at continuously improving the performance of organization business, and also refers to an informatization system for process management.
BPMN: namely, business process modeling and labeling, the main objective is to provide a set of markup languages understood by all business users, including business analysts, software developers, business managers and supervisors, and to build a standardized bridge between business process design and process implementation.
In order to copy and paste graphic elements between different process drawing application pages when the graphic elements are copied and pasted, embodiments of the present application provide a method and an apparatus for data processing, an electronic device, and a readable storage medium.
Fig. 1 is a schematic view of a process drawing application scene provided in the embodiment of the present application. In a process drawing application scene, performing format conversion and analysis on at least one graphic element selected by a user in a first process drawing application page to obtain an attribute information set, copying the attribute information set to a system pasting board, performing format conversion on the attribute information set read from the system pasting board to generate a target node, and displaying the target node on a second process drawing application page.
For example, fig. 1 includes two pages, a first flow-drawing application page and a second flow-drawing application page. Wherein, the first flow drawing application page comprises three flow chart nodes (namely graphic elements) of 'start meeting', 'meeting communication' and 'meeting end', then according to the copy and paste instruction of the user, format conversion and analysis are carried out on two flow chart nodes of 'start meeting' and 'meeting communication' selected in the first flow drawing application page by the user, a first attribute information set corresponding to 'start meeting' and a second attribute information set corresponding to 'meeting communication' are respectively obtained, the first attribute information set and the second attribute information set are copied to a system pasting board, and converting the format of the first attribute information set and the second attribute information set read from the system pasting board to generate a target node, namely two flow chart nodes of 'start meeting' and 'meeting communication', and finally, an application page is drawn in the second flow to display 'start meeting' and 'meeting communication'.
The first flow drawing application page and the second flow drawing application page can be different pages of the same flow drawing application, and can also be different pages of application programs for different flows.
Therefore, the graphic elements can be copied and pasted between different pages of the same flow drawing application program, and the graphic elements can be copied and pasted between different pages of different flow drawing application programs.
In this embodiment of the application, the execution main body may be an electronic device, and optionally, the electronic device may be a server or a terminal device.
Referring to fig. 2, an implementation flow chart of a data processing method according to an embodiment of the present application is shown, and a specific implementation flow of the method is as follows:
step 200: when the copy instruction of at least one graphic element in the first flow drawing application page of a user is determined to be received, format conversion and data analysis are carried out on the at least one graphic element, and an attribute information set corresponding to the at least one graphic element is obtained.
Specifically, when step 200 is executed, the following steps may be adopted:
s2001: and when the copy instruction of at least one graphic element in the first flow drawing application page by the user is determined to be received, carrying out format conversion on the at least one graphic element to obtain conversion data with the format type of the extensible markup language.
Specifically, the user selects one or more graphic elements in the first flow drawing application page, and sends a copy instruction for copying to the electronic device. The electronic equipment performs format conversion on the graphic element selected by the user through the first format conversion function to obtain converted data with the converted format type being XML.
The first flow drawing application page is a page in the first flow drawing application program. The first flow rendering application is a flow rendering application for building a flow model, for example, the first flow rendering application may be a browser or graphic rendering software (Visio), etc.
The process model may be a model constructed by using a process diagram.
For example, the graphic elements may be a start node (startEvent) and an end node (endevent) in the BPM.
The BPM is a systematic method that aims at continuously improving the performance of the organization business, centering on the standardized structure of the end-to-end excellent business process.
Alternatively, the first format conversion function may be transformXML.
In practical applications, the first format conversion function may also be other functions for format conversion, and is not limited herein.
In this way, the graphical element selected by the user can be converted into XML data.
Further, after the copy instruction of at least one graphic element in the application page drawn by the user aiming at the first flow is determined to be received, whether the graphic element selected by the user meets the preset copy and paste condition can be judged, if yes, the graphic element selected by the user is converted into XML data, and otherwise, prompt information representing that the graphic element cannot be copied and pasted is displayed to the user.
Optionally, the prompt information may be displayed in a form of a pop-up box, or in another form, which is not limited herein.
Furthermore, the prompt information can be displayed in the modes of web pages (web), voice, light, pictures and the like.
For example, when the graphic element selected by the user does not meet the preset copy and paste condition, the electronic device presents the copy failure webpage to the user, and terminates the copy and paste process. Wherein, the copy failure webpage contains prompt information which indicates that the copy is not allowed.
In one embodiment, the preset copy-paste condition is that the first flow drawing application allows copying.
In practical application, the preset copy and paste condition may be set according to an application scene drawn by an actual process, which is not limited herein.
S2002: for each set of node labels in the transformed data, respectively, performing the following steps: and acquiring the graphic element information in a node start label and a node end label in a group of node labels.
Specifically, the conversion data includes at least one set of node labels. Each group of node labels comprises a node start label and a node end label node label corresponding to one node. The node start tag and the node end tag are graphic element information for distinguishing different graphic elements.
When obtaining the graphic element information in the node start label and the node end label in a group of node labels, the following steps can be adopted:
the first step is as follows: the first pointer is controlled to point to the node start tag, and the second pointer is controlled to point to the node end tag.
Thus, the node start label and the node end label of the same node can be respectively pointed to by the two pointers.
The second step is that: and circularly executing the following steps until the first pointer points to the node end label pointed by the second pointer: and analyzing the label to be analyzed pointed by the first pointer at present to obtain analysis content, and controlling the first pointer to point to the next label to be analyzed.
Wherein the graphic element information is composed of the determined parsing contents.
In one embodiment, when the label to be analyzed is analyzed, the label is analyzed according to the specification standard of BPMN 2.0.
The BPMN is a standard graphic annotation of a business process model. This criterion is maintained by the object management group. The 2.0 version of the BPMN specification allows for the addition of precise technical details in the BPMN's graphs and elements, while formulating the execution syntax of the BPMN elements, by specifying the executable syntax of the business process using the XML language.
In an actual process drawing application, the specification standard for analyzing the graphic element information may be other specification standards, and is not limited herein.
A set of attribute tags corresponding to one or more attributes may be included between the node start tag and the node end tag of a node. The set of attribute tags includes an attribute start tag and an attribute end tag. The attribute tag is used for distinguishing attribute information of different attributes. The graphic element information is composed of the determined parsed content. The graphic element information may include attribute information such as a node name, a node size, and a node position.
For example, the attribute tag may be a node location tag (h.address), a node size tag (h.size), a node shape tag (h.shape), a node length tag (h.length), or the like.
Further, when the analysis content includes the node name, the node name is added to a node stack (nodeStack), and after the node end label is analyzed, the node name is deleted from the nodeStack.
Therefore, each graphic element can be analyzed in sequence through the node start label and the node end label to respectively obtain the graphic element information of each graphic element, and the node name of the currently analyzed graphic element is stored in the nodeStack, so that the currently analyzed graphic element can be determined in real time through the nodeStack.
S2003: and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
Specifically, the graphic element information of each graphic element is stored according to a specified data structure, and a corresponding attribute information set is obtained.
Wherein, the specified data structure can be a JSON tree structure.
Specifically, the specified data structure may also be a queue structure and a stack structure.
In one embodiment, the graphic element information of each graphic element is stored according to a JSON tree structure, and a corresponding attribute information set is obtained.
Therefore, data conversion and analysis can be carried out on the graphic element selected by the user, and the attribute information set of the graphic element is obtained.
Further, the first flow rendering application may be initialized prior to performing step 200.
In one embodiment, a code module package is used to access the encapsulated dependency package, initialize the dependency package, and transmit a first format conversion function based on the dependency package to define an adaptation method for converting the graphic elements into the converted data in XML format. And then, based on the second format conversion function transmitted by the dependent packet, defining a method for converting the converted data into a target node according to a target data format.
In this way, the first flow drawing application may be initialized.
Step 201: and storing the acquired attribute information set to a system memory.
Specifically, the acquired attribute information is collected and stored in a system memory through a data copy interface.
The data copying interface is used for copying data. Alternatively, the data copy interface may be navigator.
Optionally, the system memory may adopt a system sticker board.
In one embodiment, a navigator clipboard writetext interface is called to copy the set of attribute information to a sticker board of the system.
In the actual flow rendering application, the interface may also be other interfaces for copying information, and is not limited herein.
Therefore, the attribute information set of the graphic element can be stored in the system memory through the pasting board of the system.
Step 202: and when the pasting instruction of the user for the second process drawing application page is determined to be received, acquiring the attribute information set corresponding to at least one graphic element from the system memory.
Specifically, the user issues a paste instruction for pasting the graphical element selected by the user to the second flow drawing application page in the second flow drawing application page. And after the electronic equipment determines the received pasting instruction, reading the attribute information set of the graphic element selected by the user from the system memory through the data reading interface.
Wherein the second flow drawing application page is a page in the second flow drawing application program. The second flow-drawing application is a flow-drawing application for building a flow model. The first flow drawing application program and the second flow drawing application program may be the same flow drawing application program or different flow drawing application programs, and the first flow drawing application page and the second flow drawing application page are different pages.
For example, the second flow rendering application may be a browser or Visio, etc.
The data reading interface is used for reading data. Optionally, the data reading interface may be navigator.
In the actual flow chart drawing application, the data reading interface may also be other interfaces for reading data, and is not limited herein.
In one embodiment, a navigator.
In this way, the attribute information set of the graphic element in the first flow drawing application page of the first flow drawing application program can be acquired through the sticky board of the system.
Further, before step 202 is executed, the second flow drawing application program may be initialized by using a principle similar to that for initializing the first flow drawing application program, which is not described herein again.
Step 203: and drawing a target data format correspondingly set by the application page according to the second flow, and carrying out format conversion on the attribute information set corresponding to at least one graphic element to obtain a corresponding target node.
Specifically, when step 203 is executed, the following steps may be adopted:
s2031: and carrying out format conversion on the attribute information set to obtain conversion data with the format type of the extensible markup language.
Specifically, the electronic device converts the read attribute information set according to the specification standard of BPMN2.0 to obtain conversion data with the format type of XML.
S2032: and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
Specifically, a target data format supported by the second flow drawing application program is obtained, and the conversion data is converted according to the target data format through the second format conversion function to generate a target node.
Alternatively, the second format conversion function may be transformData.
In practical flow chart rendering applications, the second format conversion function may also be other functions for format conversion, and is not limited herein.
In one embodiment, the obtained conversion data with the format type of XML is converted into a target node of a target data format through transformData.
Thus, the target node can be generated based on the attribute information set in the pasting board of the system.
Step 204: and displaying the generated target node in the second flow drawing application page.
Further, if the graphic element is determined to be copied and pasted successfully, namely the graphic element selected by the user on the first process drawing application page is successfully copied and pasted on the second process drawing application page, the information of the successful copying and pasting is output, and otherwise, the information of the failure of the copying and pasting is output.
In the actual flow drawing application, the copy and paste success information and the copy and paste failure information may be set according to the actual flow drawing application scene, which is not limited herein.
In one embodiment, the copy and paste success information may be set by an onSuccess function, and the copy and paste failure information may be set by an oneerror function.
In the embodiment of the application, the graphic elements selected by the user in the first process drawing application page are subjected to format conversion and analysis to obtain the attribute information set, the attribute information set is copied to the system pasting board, the attribute information set read from the system pasting board is subjected to format conversion to generate the target node, and the target node is displayed in the second process drawing application page, so that the graphic elements can be copied and pasted between different pages of the same process drawing application program, the graphic elements can be copied and pasted between different pages of different process drawing application programs, the configuration efficiency and reusability of the process drawing application program are improved, the graphic elements do not need to be repeatedly constructed by the user, and the error rate of graphic element construction is reduced.
Referring to fig. 3, a detailed implementation flowchart of a data processing method according to an embodiment of the present application is shown, and the detailed implementation flow of the method is as follows:
step 300: when the copy instruction is determined to be received, whether the graphic element is allowed to be copied is judged, if yes, step 301 is executed, and otherwise, step 310 is executed.
Specifically, when it is determined that a copy instruction of a user for at least one graphic element in the first process drawing application page is received, it is determined whether the graphic element is allowed to be copied, if yes, step 301 is executed, and if not, step 310 is executed.
Step 301: and carrying out format conversion on the graphic element selected by the user to obtain conversion data with the format type of XML.
Step 302: and analyzing the converted data to obtain JSON structure data of each graphic element.
The JSON structure data is an attribute information set after the conversion data is analyzed.
Step 303: and copying the obtained JSON structure data to a pasting board of the system through a navigator.
Step 304: and reading the content of the pasting board, and carrying out format conversion on the JSON structure data to obtain conversion data with the format type of XML.
Step 305: and converting the converted data to obtain a target node in a target data format.
Step 306: and generating a target node in the second flow drawing application page, and displaying the generated target node.
Step 307: and judging whether the copying and pasting are successful, if so, executing step 308, otherwise, executing step 309.
Step 308: and displaying first prompt information indicating that the copying and pasting are successful to the user in a frame popping mode.
Step 309: and displaying second prompt information indicating the copy and paste failure to the user in a frame popping mode.
Step 310: and displaying a third prompt message indicating that the copying is not allowed to the user in a pop-up frame mode, and terminating the copying and pasting process.
Specifically, when step 300 to step 310 are executed, the specific steps refer to step 200 to step 204, which are not described herein again.
Based on the same inventive concept, the embodiment of the present application further provides a data processing apparatus, and because the principle of the apparatus and the device for solving the problem is similar to that of a data processing method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 4, which is a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application, including:
the analysis unit 401 is configured to perform format conversion and data analysis on at least one graphic element when determining that a copy instruction of the at least one graphic element in the first process drawing application page is received, and obtain an attribute information set corresponding to the at least one graphic element;
a storage unit 402, configured to store the acquired attribute information set in a system memory;
an obtaining unit 403, configured to obtain, when it is determined that a paste instruction of a user for a second process drawing application page is received, an attribute information set corresponding to at least one graphic element from a system memory;
a conversion unit 404, configured to draw a target data format correspondingly set in the application page according to the second process, and perform format conversion on the attribute information set corresponding to the at least one graphic element to obtain a corresponding target node;
and a display unit 405, configured to display the generated target node in the second flow drawing application page.
In an embodiment, the parsing unit 401 is specifically configured to:
carrying out format conversion on at least one graphic element to obtain conversion data with the format type of extensible markup language;
for each set of node labels in the transformed data, respectively, performing the following steps: acquiring graphic element information in a start label and an end label in a group of node labels, wherein each group of node labels comprises a start label and an end label;
and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
In an embodiment, the obtaining unit 403 is specifically configured to:
controlling the first pointer to point to a start tag and controlling the second pointer to point to an end tag;
the following steps are executed in a loop until the first pointer points to the end tag pointed to by the second pointer:
analyzing the label to be analyzed to which the first pointer points at present to obtain corresponding analysis information, and controlling the first pointer to point to the next label to be analyzed; wherein the graphic element information is composed of parsed information.
In one embodiment, the conversion unit 404 is specifically configured to:
carrying out format conversion on the attribute information set to obtain conversion data with a format type of extensible markup language;
and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
In the method, the apparatus, the electronic device and the readable storage medium for data processing provided by the embodiments of the application, carrying out format conversion and analysis on the graphic elements selected by the user in the first flow drawing application page to obtain an attribute information set, copying the attribute information set to a system pasting board, and converting the format of the attribute information set read from the system pasting board to generate a target node, drawing an application page in a second flow and displaying the target node, therefore, the graphic elements can be copied and pasted among different pages of the same process drawing application program, and the graphic elements can be copied and pasted among different pages of different process drawing application programs, so that the configuration efficiency and reusability of the process drawing application program are improved, the graphic elements do not need to be repeatedly constructed by a user, and the error rate of the construction of the graphic elements is reduced.
Fig. 5 shows a schematic structural diagram of an electronic device 5000. Referring to fig. 5, the electronic device 5000 includes: processor 5010, memory 5020, power supply 5030, display unit 5040, and input unit 5050.
The processor 5010 is a control center of the electronic apparatus 5000, connects various components using various interfaces and lines, and performs various functions of the electronic apparatus 5000 by running or executing software programs and/or data stored in the memory 5020, thereby monitoring the electronic apparatus 5000 as a whole.
In the embodiment of the present application, the processor 5010 executes the method of data processing provided by the embodiment shown in fig. 2 when calling the computer program stored in the memory 5020.
Optionally, the processor 5010 can include one or more processing units; preferably, the processor 5010 may integrate a flow rendering application processor, which mainly handles operating systems, user interfaces, flow rendering applications, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 5010. In some embodiments, the processor, memory, and/or memory may be implemented on a single chip, or in some embodiments, they may be implemented separately on separate chips.
The memory 5020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various process drawing applications, and the like; the storage data area may store data created according to the use of the electronic device 5000, and the like. Further, the memory 5020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The electronic device 5000 also includes a power supply 5030 (e.g., a battery) that provides power to the various components and that may be logically connected to the processor 5010 via a power management system to provide management of charging, discharging, and power consumption via the power management system.
The display unit 5040 may be configured to display information input by a user or information provided to the user, and various menus of the electronic device 5000, and in this embodiment of the present invention, the display unit is mainly configured to display a display interface of each flow drawing application in the electronic device 5000 and objects such as texts and pictures displayed in the display interface. The display unit 5040 may include a display panel 5041. The Display panel 5041 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The input unit 5050 may be used to receive information such as numbers or characters input by a user. Input units 5050 may include touch panel 5051 as well as other input devices 5052. Among other things, the touch panel 5051, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 5051 (e.g., operations by a user on or near the touch panel 5051 using a finger, a stylus, or any other suitable object or attachment).
Specifically, the touch panel 5051 can detect a touch operation by a user, detect signals resulting from the touch operation, convert the signals into touch point coordinates, transmit the touch point coordinates to the processor 5010, and receive and execute a command transmitted from the processor 5010. In addition, the touch panel 5051 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Other input devices 5052 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on/off keys, etc.), a trackball, a mouse, a joystick, and the like.
Of course, the touch panel 5051 may cover the display panel 5041, and when the touch panel 5051 detects a touch operation thereon or thereabout, it is transmitted to the processor 5010 to determine the type of touch event, and then the processor 5010 provides a corresponding visual output on the display panel 5041 according to the type of touch event. Although in fig. 5, the touch panel 5051 and the display panel 5041 are implemented as two separate components to implement input and output functions of the electronic device 5000, in some embodiments, the touch panel 5051 and the display panel 5041 may be integrated to implement input and output functions of the electronic device 5000.
The electronic device 5000 may also include one or more sensors, such as pressure sensors, gravitational acceleration sensors, proximity light sensors, and the like. Of course, the electronic device 5000 may further include other components such as a camera according to the requirements in the specific flow chart application, and these components are not shown in fig. 5 and are not described in detail again since they are not components used in this embodiment of the present application.
Those skilled in the art will appreciate that fig. 5 is merely an example of an electronic device and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components.
In an embodiment of the present application, a readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the communication device may perform the steps in the above embodiments.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same one or more pieces of software or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of data processing, comprising:
when a copy instruction of at least one graphic element in a first flow drawing application page of a user is determined to be received, carrying out format conversion and data analysis on the at least one graphic element to obtain an attribute information set corresponding to the at least one graphic element;
storing the acquired attribute information set to a system memory;
when a pasting instruction of the user for a second process drawing application page is determined to be received, acquiring an attribute information set corresponding to the at least one graphic element from the system memory;
drawing a target data format correspondingly set by the application page according to the second flow, and carrying out format conversion on the attribute information set corresponding to the at least one graphic element to obtain a corresponding target node;
and displaying the generated target node in the second flow drawing application page.
2. The method of claim 1, wherein the performing format conversion and data parsing on the at least one graphic element to obtain a set of attribute information corresponding to the at least one graphic element comprises:
carrying out format conversion on the at least one graphic element to obtain conversion data with a format type of extensible markup language;
for each set of node labels in the transformed data, respectively, performing the following steps: acquiring graphic element information in a start label and an end label in a group of node labels, wherein each group of node labels comprises a start label and an end label;
and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
3. The method of claim 2, wherein obtaining graphic element information within a start tag and an end tag in a set of node tags comprises:
controlling a first pointer to point to the start tag and a second pointer to point to the end tag;
circularly executing the following steps until the first pointer points to the end tag pointed to by the second pointer:
analyzing the label to be analyzed to which the first pointer points at present to obtain corresponding analysis information, and controlling the first pointer to point to the next label to be analyzed; wherein the graphic element information is composed of the parsed information.
4. The method according to any one of claims 1 to 3, wherein the performing format conversion on the attribute information set corresponding to the at least one graphic element according to the target data format correspondingly set to the second process drawing application page to obtain a corresponding target node comprises:
carrying out format conversion on the attribute information set to obtain conversion data with a format type of extensible markup language;
and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
5. An apparatus for data processing, comprising:
the analysis unit is used for performing format conversion and data analysis on at least one graphic element when a copy instruction of the at least one graphic element in a first process drawing application page of a user is determined to be received, and acquiring an attribute information set corresponding to the at least one graphic element;
the storage unit is used for storing the acquired attribute information set to a system memory;
the obtaining unit is used for obtaining an attribute information set corresponding to the at least one graphic element from the system memory when the pasting instruction of the user for the second process drawing application page is determined to be received;
the conversion unit is used for drawing a target data format correspondingly set by the application page according to the second flow, and performing format conversion on the attribute information set corresponding to the at least one graphic element to obtain a corresponding target node;
and the display unit is used for displaying the generated target node in the second flow drawing application page.
6. The apparatus of claim 5, wherein the parsing unit is specifically configured to:
carrying out format conversion on the at least one graphic element to obtain conversion data with a format type of extensible markup language;
for each set of node labels in the transformed data, respectively, performing the following steps: acquiring graphic element information in a start label and an end label in a group of node labels, wherein each group of node labels comprises a start label and an end label;
and respectively generating an attribute information set of each graphic element according to the graphic element information of each graphic element.
7. The apparatus of claim 6, wherein the obtaining unit is specifically configured to:
controlling a first pointer to point to the start tag and a second pointer to point to the end tag;
circularly executing the following steps until the first pointer points to the end tag pointed to by the second pointer:
analyzing the label to be analyzed to which the first pointer points at present to obtain corresponding analysis information, and controlling the first pointer to point to the next label to be analyzed; wherein the graphic element information is composed of the parsed information.
8. The apparatus according to any of claims 5-7, wherein the conversion unit is specifically:
carrying out format conversion on the attribute information set to obtain conversion data with a format type of extensible markup language;
and according to the target data format, carrying out format conversion on the converted data again to obtain a corresponding target node.
9. An electronic device comprising a processor and a memory, the memory storing computer readable instructions that, when executed by the processor, perform the method of any of claims 1-4.
10. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202111170739.3A 2021-10-08 2021-10-08 Data processing method and device, electronic equipment and readable storage medium Pending CN113900650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111170739.3A CN113900650A (en) 2021-10-08 2021-10-08 Data processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111170739.3A CN113900650A (en) 2021-10-08 2021-10-08 Data processing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113900650A true CN113900650A (en) 2022-01-07

Family

ID=79190261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111170739.3A Pending CN113900650A (en) 2021-10-08 2021-10-08 Data processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113900650A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481298A (en) * 2022-11-14 2022-12-16 阿里巴巴(中国)有限公司 Graph data processing method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115481298A (en) * 2022-11-14 2022-12-16 阿里巴巴(中国)有限公司 Graph data processing method and electronic equipment
CN115481298B (en) * 2022-11-14 2023-03-14 阿里巴巴(中国)有限公司 Graph data processing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN111095215B (en) Inter-application delivery format specific data objects
US9495429B2 (en) Automatic synthesis and presentation of OLAP cubes from semantically enriched data sources
US9256583B2 (en) Conversion of a presentation to Darwin Information Typing Architecture (DITA)
US8209598B1 (en) Exporting electronic documents from rich internet applications
US10970052B2 (en) System and method for enhancing component based development models with auto-wiring
US20110022943A1 (en) Document object model (dom) application framework
CN113791765B (en) Resource arrangement method, device and equipment of cloud service and storage medium
CN108804469B (en) Webpage identification method and electronic equipment
US11677807B2 (en) System and method to standardize and improve implementation efficiency of user interface content
CN105027116A (en) Flat book to rich book conversion in e-readers
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN113391808A (en) Page configuration method and device and electronic equipment
CN113900650A (en) Data processing method and device, electronic equipment and readable storage medium
US20150120650A1 (en) Methods and Systems for Utilizing Global Entities In Software Applications
CN112835582A (en) Container engine-based rendering method, device, equipment and storage medium
CN107423291A (en) A kind of data translating method and client device
CN113239670A (en) Method and device for uploading service template, computer equipment and storage medium
CN113378895B (en) Classification model generation method and device, storage medium and electronic equipment
CN116501223B (en) Object display method and device, electronic equipment and storage medium
CN116108814B (en) Gantt chart processing method and device, computer equipment and storage medium
CN115495387A (en) Page testing method and device, electronic equipment and computer readable storage medium
CN114387116A (en) Insurance distribution method and device, electronic equipment and readable storage medium
CN116226563A (en) Rich text editing method, rich text editing device, electronic equipment and computer readable storage medium
CN116662940A (en) Application processing method and device, storage medium and electronic equipment
CN111382999A (en) Product information sending method and device

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