Method, device and terminal equipment for converting SVG image to Visio image

By identifying and parsing file types, converting data streams, and realizing the interchange of svg and vision graphs, the problem of inefficiency in the existing technology is solved, and the graphs are quickly acquired and edited, which improves work efficiency and flexibility.

CN117910417BActive Publication Date: 2024-11-19SHENZHEN HANGSHUN CHIP TECH DEV CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410083076.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2024-11-19
Estimated Expiration
2044-01-19

AI Technical Summary

Technical Problem

The prior art cannot realize the interchange between the Visio diagram in the Visio format and the svg diagram in the svg format, resulting in manual redrawing and updating, which is inefficient, low flexibility, and cannot respond quickly.

Method used

By identifying the imported file type, parsing and generating data streams, converting them into graph data streams in the corresponding format, editing and generating target graphics, realizing the interconversion of svg graphs and vision graphs, including obtaining model data, analyzing and converting data streams, Display and edit graphics, generate svg or vision graphics.

Benefits of technology

The interchange between the svg graph and the visual graph is realized, which avoids manual drawing, improves work efficiency, reduces the error rate, and improves flexibility and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117910417B_ABST
    Figure CN117910417B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and terminal equipment for converting between SVG and Visio graphics. The method comprises: identifying the type of an imported file; when the type of the imported file is an SVG graphic, parsing the SVG graphic and generating a first SVG data stream; when the type of the imported file is a Visio graphic, parsing the Visio graphic and generating a Visio data stream, and converting the Visio data stream into a first SVG data stream, editing the first SVG graphic to obtain a target SVG graphic, thereby obtaining a second SVG data stream, and then generating an SVG graphic according to the second SVG data stream, or generating a Visio graphic according to the second SVG data stream. The present invention realizes the conversion between SVG graphics and Visio graphics, which can not only improve work efficiency, but also avoid the error rate caused by manually drawing graphics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of SVG and Visio conversion, and in particular to a method, device, terminal equipment and storage medium for converting SVG and Visio images. Background Art

[0002] The existing solution can convert an SVG image in SVG format into a Visio image in Visio format. However, a Visio image in Visio format cannot be converted into an SVG image in SVG format. If the conversion needs to be completed, the Visio image needs to be redrawn manually, and the corresponding SVG graphics in SVG format also need to be updated. This series of operations requires manual updating, which is cumbersome, inefficient, and inflexible, and cannot respond quickly. For example, in the design process of MCU, it is usually necessary to obtain the pin information of the MCU chip, and then manually draw the pinMap diagram in svg format corresponding to all models of MCU (the pinMap diagram is the pin mapping diagram of the MCU chip), and then draw the pinOut diagram in visio format based on the pinMap diagram (the pinOut diagram is the pin mapping export diagram of the MCU chip). These pinOut diagrams can be applied to different documents that need to be used. Because the pinOut diagram in visio format cannot be converted into a pinMap diagram in svg format, if the pinOut diagram needs to be edited, it is necessary to manually redraw the pinOut diagram, and the pinMap diagram in svg format of the corresponding graphic also needs to be updated. This series of operations requires manual updating, and the process is cumbersome, inefficient, and inflexible. It is impossible to respond quickly and quickly generate the latest pinMap diagram and the latest pinOut diagram.

[0003] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a method, device, terminal device and storage medium for converting between SVG and Visio images, so as to solve the problem that the existing Visio images in Visio format and SVG images in SVG format cannot be converted into each other.

[0005] The technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for converting between an SVG image and a Visio image, which comprises:

[0007] Identify the imported file types, which include svg graphics and visio graphics;

[0008] When the imported file type is an svg graphic, the svg graphic is parsed and a first svg data stream is generated; when the imported file type is a visio graphic, the visio graphic is parsed and a visio data stream is generated, and the visio data stream is converted into the first svg data stream;

[0009] Convert the first SVG data stream into a first SVG graphic and display the first SVG graphic, edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic;

[0010] Generate an SVG graphic according to the second SVG data stream, or obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0011] According to a further configuration of the present invention, the method for converting between an SVG image and a Visio image further includes:

[0012] Get the generated svg graphics and visio graphics.

[0013] According to a further configuration of the present invention, the step of obtaining the generated svg graphics and visio graphics comprises:

[0014] Get the model data and parse it to get the first svg data stream;

[0015] Convert the first SVG data stream into a first SVG graphic and display the first SVG graphic, edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic;

[0016] An SVG graphic is generated according to the second SVG data stream, and a Visio data stream is obtained according to the second SVG data stream, and a Visio graphic is generated according to the Visio data stream.

[0017] In a further configuration of the present invention, the steps of converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic include:

[0018] Convert the SVG data stream into a first SVG graphic and display it;

[0019] Obtain a first SVG graphic, and edit the sub-graphic modules in the SVG graphic so that the sub-graphic modules are assembled into a target SVG graphic;

[0020] Convert the target svg graphic into the second svg data stream to update the first svg data stream.

[0021] A further configuration of the present invention includes adding or deleting sub-graphic modules and text in the SVG graphic, and modifying sub-graphic modules and text in the SVG graphic when editing the sub-graphic modules and text in the SVG graphic.

[0022] According to a further configuration of the present invention, the step of obtaining a Visio data stream according to the second SVG data stream and generating a Visio graphic according to the Visio data stream comprises:

[0023] Convert svg data stream into visio graphic data and export it to the specified directory to form visio graphics.

[0024] According to a further configuration of the present invention, the first SVG data stream and the second SVG data stream are binary data streams.

[0025] In a second aspect, the present invention further provides a device for converting between an SVG image and a Visio image, which comprises:

[0026] An identification module, the identification module is used to identify the imported file type, the file type includes svg graphics and visio graphics;

[0027] A parsing module, wherein the parsing module is used to parse the SVG graphic and generate a first SVG data stream when the imported file type is an SVG graphic, and to parse the Visio graphic and generate a Visio data stream when the imported file type is a Visio graphic, and convert the Visio data stream into the first SVG data stream;

[0028] A graphics operation module, the graphics operation module is used to convert the first SVG data stream into a first SVG graphic and display it, and to edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic;

[0029] A generation module, the generation module is used to generate an SVG graphic according to the second SVG data stream, and is used to obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0030] In a third aspect, the present invention further provides a terminal device, comprising a memory and a processor, characterized in that a computer program is stored in the memory, and when the computer program is executed by the processor, it is used to implement the steps in the above-mentioned method for converting SVG images to Visio images.

[0031] In a fourth aspect, the present invention further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it is used to implement the steps in the above-mentioned method for converting between SVG images and Visio images.

[0032] The present invention provides a method, device, terminal device and storage medium for converting between SVG and Visio graphics. The method comprises: identifying the type of imported file, wherein the file type comprises SVG graphics and Visio graphics; when the imported file type is SVG graphics, parsing the SVG graphics and generating a first SVG data stream; when the imported file type is Visio graphics, parsing the Visio graphics and generating a Visio data stream, and converting the Visio data stream into a first SVG data stream; converting the first SVG data stream into a first SVG graphics and displaying it, editing the first SVG graphics to obtain a target SVG graphics, and obtaining a second SVG data stream according to the target SVG graphics; generating an SVG graphics according to the second SVG data stream, or obtaining a Visio data stream according to the second SVG data stream, and generating a Visio graphics according to the Visio data stream. The present invention can realize the mutual conversion between SVG graphics and Visio graphics, and can quickly obtain SVG graphics or Visio graphics without manual drawing of graphics. It has high flexibility and simple process, which can not only improve work efficiency but also avoid the error rate caused by manual drawing of graphics. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary personnel in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0034] Figure 1 It is a flow chart of the method for converting between SVG and Visio diagrams in the present invention.

[0035] Figure 2 It is a schematic diagram of the conversion between SVG diagram and Visio diagram in the present invention.

[0036] Figure 3 It is a display interface diagram of a pin multiplexing table and svg graphics in one embodiment of the present invention.

[0037] Figure 4 It is a display interface diagram of Visio graphics in one embodiment of the present invention.

[0038] Figure 5 It is a functional module architecture diagram of the SVG image and Visio image conversion device in the present invention. DETAILED DESCRIPTION

[0039] The present invention provides a method, device, terminal device and storage medium for converting between SVG and Visio. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0040] In the embodiments and the scope of the patent application, unless the text specifically defines the article, "a", "an", "the" and "the" may also include plural forms. If there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

[0041] It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when an element is said to be "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can also be intermediate elements. In addition, the "connection" or "coupling" used herein can include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0042] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0043] In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0044] Please also see Figures 1 to 4 The present invention provides a preferred embodiment of a method for converting between an SVG image and a Visio image.

[0045] In some embodiments, the present invention provides a method for converting between SVG and Visio images. Figure 1 As shown, it includes the steps of:

[0046] S100, obtaining the generated svg graphics and visio graphics;

[0047] S200, identifying the imported file type, wherein the file type includes svg graphics and visio graphics;

[0048] S300, when the imported file type is an svg graphic, parsing the svg graphic and generating a first svg data stream; when the imported file type is a visio graphic, parsing the visio graphic and generating a visio data stream, and converting the visio data stream into the first svg data stream;

[0049] S400, converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic;

[0050] S500: Generate an SVG graphic according to the second SVG data stream, or obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0051] In this embodiment, after obtaining the Visio graphics and the SVG graphics, the conversion between the Visio graphics and the SVG graphics can be realized. Taking the Visio graphics and the SVG graphics of the MCU chip as an example, please combine Figures 2 to 4 , by importing the pin multiplexing table of the MCU chip, that is, the I / O mux table, and analyzing the pin multiplexing table of the MCU chip, the pin correspondence of the corresponding MCU model is obtained, and then after editing and processing through the graphic operation module, SVG graphics and Visio graphics can be further generated through the SVG graphics generation module and the Visio graphics generation module.

[0052] When it is necessary to convert between Visio graphics and SVG graphics, the category of the graphic file to be converted can be identified through the identification module. If it is identified as an SVG graphic, that is, the generated SVG graphic needs to be converted into a Visio graphic. First, the SVG graphic is parsed by the parsing module and a first SVG data stream is generated. The first SVG data stream is converted into a first SVG graphic and displayed. The first SVG graphic is edited to obtain a target SVG graphic, and a second SVG data stream is obtained according to the target SVG graphic. The conversion of the SVG graphic to the Visio graphic can be completed by converting the second SVG data stream into a Visio data stream and then generating a Visio graphic from the Visio data stream through the generation module.

[0053] When it is recognized that the imported file is a Visio file, it is necessary to convert the Visio graphic into an SVG graphic. First, the Visio graphic is parsed by the parsing module and a Visio data stream is generated, and the Visio data stream is converted into a first SVG data stream. Thereafter, the first SVG data stream is converted into a first SVG graphic and displayed by the graphics operation module. The first SVG graphic is edited to obtain a target SVG graphic, and a second SVG data stream is obtained based on the target SVG graphic. Then, the second SVG data stream is generated into an SVG graphic by the generation module, and the conversion of the Visio graphic to the SVG graphic can be completed.

[0054] It can be seen that the present invention can export and generate SVG graphics in SVG format, and can also export Visio graphics in Visio format. It can also realize the generation of Visio graphics from SVG graphics, and the generation of SVG graphics from Visio graphics, that is, it can realize the conversion between SVG graphics and Visio graphics, and can quickly obtain SVG graphics and Visio graphics without manual drawing of graphics, which not only improves work efficiency, but also avoids the occurrence of errors caused by manual drawing of graphics.

[0055] In some embodiments, the step of obtaining the generated svg graphics and visio graphics includes:

[0056] S110, acquiring model data and parsing it to obtain a first svg data stream;

[0057] S120, converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic;

[0058] S130, generating an SVG graphic according to the second SVG data stream, and obtaining a Visio data stream according to the second SVG data stream, and generating a Visio graphic according to the Visio data stream.

[0059] Please combine Figure 2 , taking the MCU chip as an example, the multiplexing pin table of the MCU chip is imported in the form of an Excel table. The pin multiplexing table of the MCU chip can be analyzed by the model data acquisition module to obtain the MCU type model data, and the MCU type model data can be parsed to obtain the first SVG data stream. After obtaining the first SVG data stream, the binary first SVG data stream is converted into an operable first SVG graphic through the graphics operation module, and the first SVG graphic is displayed on the page. Thereafter, the graphics operation module takes the current first SVG graphic as the object, performs an editing operation on the first SVG graphic to obtain the required target SVG graphic, and then converts the target SVG graphic into an SVG data stream to obtain a binary second SVG data stream. When it is necessary to obtain an SVG graphic, the second SVG data stream can be exported to an SVG graphic through the SVG graphic generation module. When it is necessary to obtain a Visio graphic, the second SVG data stream can be converted into a Visio data stream through the Visio graphic generation module, and then the Visio data can be exported to a Visio graphic.

[0060] In some embodiments, the steps of converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic include:

[0061] S410, converting the SVG data stream into a first SVG graphic and displaying the first SVG graphic;

[0062] S420, obtaining a first SVG graphic, and editing sub-graphic modules in the SVG graphic, so that each sub-graphic module is assembled into a target SVG graphic;

[0063] S430: Convert the target SVG graphic into a second SVG data stream to update the first SVG data stream.

[0064] In this embodiment, after the imported SVG graphics and Visio graphics are parsed and a first SVG data stream is generated, the binary first SVG data stream is converted into an operable first SVG graphic through a graphics operation module, and the first SVG graphic is displayed on the page. Afterwards, the graphics operation module takes the current first SVG graphic as an object, performs an editing operation on the first SVG graphic to obtain the required target SVG graphic, and then converts the target SVG graphic into an SVG data stream to obtain a second SVG data stream to update the first SVG data stream.

[0065] Furthermore, when editing sub-graphic modules and text in an SVG graphic, the editing includes but is not limited to adding or deleting sub-graphic modules and text in the SVG graphic, and modifying sub-graphic modules and text in the SVG graphic, such as renaming text in the SVG graphic.

[0066] In some embodiments, the step of obtaining a Visio data stream according to the second SVG data stream and generating a Visio graphic according to the Visio data stream includes:

[0067] S510, converting the svg data stream into visio graphic data, and exporting it to a designated directory to form a visio graphic.

[0068] In this embodiment, after converting the second svg data stream into the visio data stream, the visio graphic generation module first converts the visio data stream into visio graphic data, and then exports the obtained visio graphic data to a specified directory, thereby obtaining a new visio graphic.

[0069] In some embodiments, Figure 5As shown, the present invention also provides a device for converting between SVG and Visio graphics, which includes: a model data acquisition module, an identification module, a parsing module, a graphics operation module and a generation module. The model data acquisition module is used to parse the imported data content to obtain a first SVG data stream; the identification module is used to identify the imported file type, and the file type includes SVG graphics and Visio graphics; the parsing module includes an SVG graphics parsing unit and a Visio graphics parsing unit. The SVG graphics parsing unit is used to parse the SVG graphics and generate a first SVG data stream when the imported file type is an SVG graphic. The Visio graphics parsing unit is used to parse the Visio graphics and generate a Visio data stream when the imported file type is a Visio graphic, and convert the Visio data stream into a SVG data stream. The graphics operation module is used to convert the first SVG data stream into a first SVG graphic and display it, and to edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic; the generation module includes an SVG graphic generation unit and a Visio graphic generation unit, the SVG graphic generation unit is used to generate an SVG graphic according to the second SVG data stream, the Visio graphic generation unit is used to obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0070] In some embodiments, the present invention further provides a terminal device, including a memory and a processor, wherein a computer program is stored on the memory, and when the computer program is executed by the processor, it is used to implement the following steps:

[0071] S100, obtaining the generated svg graphics and visio graphics;

[0072] S200, identifying the imported file type, wherein the file type includes svg graphics and visio graphics;

[0073] S300, when the imported file type is an svg graphic, parsing the svg graphic and generating a first svg data stream; when the imported file type is a visio graphic, parsing the visio graphic and generating a visio data stream, and converting the visio data stream into the first svg data stream;

[0074] S400, converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic;

[0075] S500: Generate an SVG graphic according to the second SVG data stream, or obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0076] In some embodiments, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program is used to implement the following steps when executed by a processor:

[0077] S100, obtaining the generated svg graphics and visio graphics;

[0078] S200, identifying the imported file type, wherein the file type includes svg graphics and visio graphics;

[0079] S300, when the imported file type is an svg graphic, parsing the svg graphic and generating a first svg data stream; when the imported file type is a visio graphic, parsing the visio graphic and generating a visio data stream, and converting the visio data stream into the first svg data stream;

[0080] S400, converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic;

[0081] S500: Generate an SVG graphic according to the second SVG data stream, or obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

[0082] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0083] In summary, the method, device, terminal device and storage medium for converting SVG images to Visio images provided by the present invention have the following beneficial effects:

[0084] The present invention can export and generate SVG graphics in SVG format, and can also export Visio graphics in Visio format. It can also realize the generation of Visio graphics from SVG graphics, and the generation of SVG graphics from Visio graphics, that is, it can realize the mutual conversion between SVG graphics and Visio graphics, and can quickly obtain SVG graphics and Visio graphics without manual drawing of graphics, which not only improves work efficiency, but also avoids the occurrence of errors caused by manual drawing of graphics, has high flexibility and simple process.

[0085] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for converting between SVG and Visio diagrams, characterized in that: include: Identify the imported file types, which include svg graphics and visio graphics; When the imported file type is an svg graphic, the svg graphic is parsed and a first svg data stream is generated; when the imported file type is a visio graphic, the visio graphic is parsed and a visio data stream is generated, and the visio data stream is converted into the first svg data stream; Convert the first SVG data stream into a first SVG graphic and display the first SVG graphic, edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic; Generate an SVG graphic according to the second SVG data stream, or obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

2. The method for converting between SVG and Visio diagrams according to claim 1, characterized in that: Also includes: Get the generated svg graphics and visio graphics.

3. The method for converting between SVG and Visio diagrams according to claim 2, characterized in that: The steps of obtaining the generated svg graphics and visio graphics include: Get the model data and parse it to get the first svg data stream; Convert the first SVG data stream into a first SVG graphic and display the first SVG graphic, edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic; An SVG graphic is generated according to the second SVG data stream, and a Visio data stream is obtained according to the second SVG data stream, and a Visio graphic is generated according to the Visio data stream.

4. The method for converting between SVG and Visio diagrams according to claim 1, characterized in that: The steps of converting the first SVG data stream into a first SVG graphic and displaying the first SVG graphic, editing the first SVG graphic to obtain a target SVG graphic, and obtaining a second SVG data stream according to the target SVG graphic include: Convert the SVG data stream into a first SVG graphic and display it; Obtain a first SVG graphic, and edit the sub-graphic modules in the SVG graphic so that the sub-graphic modules are assembled into a target SVG graphic; Convert the target svg graphic into the second svg data stream to update the first svg data stream.

5. The method for converting between SVG and Visio diagrams according to claim 4, characterized in that: When editing the sub-graphic modules and text in the SVG graphic, it includes adding or deleting the sub-graphic modules and text in the SVG graphic, and modifying the sub-graphic modules and text in the SVG graphic.

6. The method for converting between SVG and Visio diagrams according to claim 1, characterized in that: The step of obtaining a Visio data stream according to the second SVG data stream and generating a Visio graphic according to the Visio data stream comprises: Convert svg data stream into visio graphic data and export it to the specified directory to form visio graphics.

7. The method for converting between SVG and Visio diagrams according to claim 3, characterized in that: The first SVG data stream and the second SVG data stream are binary data streams.

8. A device for converting SVG images to Visio images, characterized in that: include: An identification module, the identification module is used to identify the imported file type, the file type includes svg graphics and visio graphics; A parsing module, wherein the parsing module is used to parse the SVG graphic and generate a first SVG data stream when the imported file type is an SVG graphic, and to parse the Visio graphic and generate a Visio data stream when the imported file type is a Visio graphic, and convert the Visio data stream into the first SVG data stream; A graphics operation module, the graphics operation module is used to convert the first SVG data stream into a first SVG graphic and display it, and to edit the first SVG graphic to obtain a target SVG graphic, and obtain a second SVG data stream according to the target SVG graphic; A generation module, the generation module is used to generate an SVG graphic according to the second SVG data stream, and is used to obtain a Visio data stream according to the second SVG data stream, and generate a Visio graphic according to the Visio data stream.

9. A terminal device, comprising a memory and a processor, characterized in that: The memory stores a computer program, which, when executed by the processor, is used to implement the steps in the method for converting SVG drawings to Visio drawings as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the steps in the method for converting SVG drawings to Visio drawings as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Customizing system and customizing method for graph real-time monitoring interface based on SVG (Scalable Vector Graphics)

    CN103473068A

  • Method for converting SVG image into Visio image

    CN103793365A

  • Visio file conversion method and system

    CN107229503A

  • Graph processing method and device and electronic equipment

    CN113360148A

  • Visio graphic file online editing method, device and equipment and storage medium

    CN113961751A