SVG picture remote transmission method and system
By performing differential comparison and compression of SVG pictures, and generating and transmitting fragment pictures, the problem of waste of traffic in SVG pictures transmission in the prior art is solved, and data volume and traffic saving are reduced.
Patent Information
- Application Number
- CN202411270743.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, when remotely transmitting SVG pictures, if there are only partial data differences in the picture, full transmission will still be used, resulting in the problem of waste of traffic.
By comparing the SVG picture to be transmitted with the full SVG picture transmitted in history, we can determine whether the same data reaches the preset ratio. If it is not reached, the full picture will be sent. If it is reached, a fragment picture will be generated and compressed, and the compressed fragment picture will be sent. .
Reduce the amount of data transmitted, save traffic, and send some different pictures through incremental transmission, avoiding the waste of traffic caused by full transmission.
Smart Images

Figure CN119277126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method and system for remotely transmitting SVG images. Background Art
[0002] At present, the common way to transmit SVG (Scalable Vector Graphics) images remotely is to transmit the full SVG images. When transmitting multiple SVG images at the same time, the number of HTTP (request messages from the client to the server) requests is reduced by inlining the SVG or merging multiple SVGs into one file, thereby saving traffic. However, if the SVG images transmitted remotely each time only have partial data differences compared to the SVG images transmitted last time, and the full transmission is still used at this time, there will be a problem of traffic waste. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for remote transmission of SVG images, which can reduce the amount of transmitted data and save traffic.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] A method for remotely transmitting an SVG image comprises the following steps:
[0006] The sender compares the SVG image to be transmitted with the full amount of SVG images transmitted in the past to obtain the same SVG image data and the different SVG image data;
[0007] Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data.
[0008] The sending end compresses the fragment SVG image to obtain a compressed fragment SVG image, and sends the compressed fragment SVG image to the receiving end.
[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0010] A SVG picture remote transmission system includes a sending end and a receiving end, wherein the sending end includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the receiving end includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, wherein the first processor implements the following steps when executing the first computer program;
[0011] Compare the SVG image to be transmitted with the full amount of SVG images transmitted in history to obtain the same SVG image data and different SVG image data;
[0012] Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data.
[0013] The segment SVG image is compressed to obtain a compressed segment SVG image, and the compressed segment SVG image is sent to a receiving end.
[0014] The beneficial effect of the present invention is that: the sending end compares the SVG image to be transmitted with the full SVG image transmitted historically to obtain the same SVG image data and different SVG image data. When the same SVG image data does not reach a preset ratio, the SVG image to be transmitted is sent to the receiving end as a full SVG image. When the same SVG image data reaches a preset ratio, it is too wasteful to transmit the complete SVG image again. Therefore, a fragment SVG image is generated according to the different SVG image data, and after compressing it, the compressed fragment SVG image is sent to the receiving end. In this way, for images that only have partial differences compared with the SVG images transmitted historically, the SVG image is sent in an incremental transmission manner, thereby reducing the amount of transmitted data and saving traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of a method for remotely transmitting an SVG image according to an embodiment of the present invention;
[0016] Figure 2 The figure is a schematic diagram of the structure of a SVG picture remote transmission system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0018] Please refer to Figure 1 , a method for remotely transmitting an SVG image, comprising the steps of:
[0019] The sender compares the SVG image to be transmitted with the full amount of SVG images transmitted in the past to obtain the same SVG image data and the different SVG image data;
[0020] Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data.
[0021] The sending end compresses the fragment SVG image to obtain a compressed fragment SVG image, and sends the compressed fragment SVG image to the receiving end.
[0022] From the above description, it can be seen that the beneficial effect of the present invention is that: the sending end compares the SVG image to be transmitted with the full SVG image transmitted historically to obtain the same SVG image data and different SVG image data. When the same SVG image data does not reach the preset ratio, the SVG image to be transmitted is sent to the receiving end as the full SVG image. When the same SVG image data reaches the preset ratio, it is too wasteful to transmit the complete SVG image again. Therefore, a fragment SVG image is generated according to the different SVG image data, and after compressing it, the compressed fragment SVG image is sent to the receiving end. In this way, for images that only have partial differences compared with the historically transmitted SVG images, the SVG images are sent in an incremental transmission manner, thereby reducing the amount of transmitted data and saving traffic.
[0023] Further,
[0024] The sending the to-be-transmitted SVG picture as a full SVG picture to the receiving end comprises:
[0025] The sending end inserts the ID number corresponding to each element node in each element node of the SVG image to be transmitted, and after the insertion, compresses the SVG image to be transmitted to obtain a compressed SVG image to be transmitted;
[0026] The sending end sends the compressed SVG image to be transmitted as a full SVG image to the receiving end.
[0027] From the above description, it can be seen that the sender inserts the ID number corresponding to each element node in each element node of the SVG image to be transmitted. After the insertion, the SVG image to be transmitted is compressed and then transmitted. By transmitting only incremental images and compression operations, the amount of transmitted data is effectively reduced.
[0028] Furthermore, after sending the SVG image to be transmitted as a full SVG image to the receiving end, the method further includes:
[0029] The receiving end receives the full SVG image;
[0030] The receiving end parses the full SVG image, calculates the MD5 value of the full SVG image after parsing, and saves the ID number corresponding to each element node in the full SVG image and the MD5 value to a cache list.
[0031] From the above description, it can be seen that after the receiving end receives the full SVG image, it calculates the MD5 value of the full SVG image, and saves the ID number and MD5 value corresponding to each element node in the full SVG image to the cache list, so as to compare it with the fragment SVG image sent by the sending end later to achieve more accurate incremental update.
[0032] Furthermore, the sending end compresses the fragment SVG picture, and the compressed fragment SVG picture includes:
[0033] The sending end inserts the MD5 value of the historically transmitted full SVG picture corresponding to the same SVG picture data into the root node of the fragment SVG picture, and inserts the ID number corresponding to each element node into each element node of the fragment SVG picture;
[0034] After the insertion, the sending end compresses the fragment SVG image to obtain a compressed fragment SVG image.
[0035] From the above description, it can be seen that the sending end inserts the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserts the ID number corresponding to each element node in each element node of the fragment SVG image, so that the receiving end can determine the SVG image and the element nodes therein that need to be incrementally updated based on the MD5 value and ID number, thereby improving the reliability of SVG image transmission.
[0036] Furthermore, after sending the compressed SVG image fragment to the receiving end, the method further includes:
[0037] The receiving end parses the compressed SVG image fragment to obtain the SVG image fragment;
[0038] The receiving end obtains the MD5 value and the ID number corresponding to each element node from the fragment SVG image;
[0039] The receiving end determines the corresponding full SVG image from the cache list according to the MD5 value, and determines the element node of the full SVG image from the cache list according to the ID number corresponding to each element node;
[0040] The receiving end updates the element nodes of the full SVG image based on the fragment SVG image.
[0041] From the above description, it can be seen that the receiving end obtains the MD5 value and the ID number corresponding to each element node from the fragment SVG image, determines the corresponding full SVG image from the cache list according to the MD5 value, and determines the element node of the full SVG image from the cache list according to the ID number corresponding to each element node, and updates the element node of the full SVG image based on the fragment SVG image to ensure the reliability of incremental transmission of SVG images.
[0042] Please refer to Figure 2 Another embodiment of the present invention provides an SVG picture remote transmission system, including a sending end and a receiving end, wherein the sending end includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the receiving end includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, and the first processor implements the following steps when executing the first computer program;
[0043] Compare the SVG image to be transmitted with the full amount of SVG images transmitted in history to obtain the same SVG image data and different SVG image data;
[0044] Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data.
[0045] The segment SVG image is compressed to obtain a compressed segment SVG image, and the compressed segment SVG image is sent to a receiving end.
[0046] From the above description, it can be seen that the beneficial effect of the present invention is that: the sending end compares the SVG image to be transmitted with the full SVG image transmitted historically to obtain the same SVG image data and different SVG image data. When the same SVG image data does not reach the preset ratio, the SVG image to be transmitted is sent to the receiving end as the full SVG image. When the same SVG image data reaches the preset ratio, it is too wasteful to transmit the complete SVG image again. Therefore, a fragment SVG image is generated according to the different SVG image data, and after compressing it, the compressed fragment SVG image is sent to the receiving end. In this way, for images that only have partial differences compared with the historically transmitted SVG images, the SVG images are sent in an incremental transmission manner, thereby reducing the amount of transmitted data and saving traffic.
[0047] Furthermore, when the first processor executes the first computer program, the following steps are also implemented:
[0048] Inserting ID numbers corresponding to the respective element nodes of the SVG image to be transmitted into the respective element nodes, and after the insertion, compressing the SVG image to be transmitted to obtain a compressed SVG image to be transmitted;
[0049] The compressed SVG image to be transmitted is sent to the receiving end as a full SVG image.
[0050] From the above description, it can be seen that the sender inserts the ID number corresponding to each element node in each element node of the SVG image to be transmitted. After the insertion, the SVG image to be transmitted is compressed and then transmitted. By transmitting only incremental images and compression operations, the amount of transmitted data is effectively reduced.
[0051] Furthermore, when the second processor executes the second computer program, the second processor further implements the following steps:
[0052] Receiving the full SVG image;
[0053] The full SVG image is parsed, and after parsing, the MD5 value of the full SVG image is calculated, and the ID number corresponding to each element node in the full SVG image and the MD5 value are saved in a cache list.
[0054] From the above description, it can be seen that after the receiving end receives the full SVG image, it calculates the MD5 value of the full SVG image, and saves the ID number and MD5 value corresponding to each element node in the full SVG image to the cache list, so as to compare it with the fragment SVG image sent by the sending end later to achieve more accurate incremental update.
[0055] Furthermore, when the first processor executes the first computer program, the following steps are also implemented:
[0056] Inserting the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserting the ID number corresponding to each element node into each element node of the fragment SVG image;
[0057] After insertion, the fragment SVG image is compressed to obtain a compressed fragment SVG image.
[0058] From the above description, it can be seen that the sending end inserts the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserts the ID number corresponding to each element node in each element node of the fragment SVG image, so that the receiving end can determine the SVG image and the element nodes therein that need to be incrementally updated based on the MD5 value and ID number, thereby improving the reliability of SVG image transmission.
[0059] Furthermore, when the second processor executes the second computer program, the second processor further implements the following steps:
[0060] Parsing the compressed SVG image fragment to obtain the SVG image fragment;
[0061] Obtain the MD5 value and the ID number corresponding to each element node from the fragment SVG image;
[0062] Determine the corresponding full SVG image from the cache list according to the MD5 value, and determine the element node of the full SVG image from the cache list according to the ID number corresponding to each element node;
[0063] The element nodes of the full SVG image are updated based on the fragment SVG image.
[0064] From the above description, it can be seen that the receiving end obtains the MD5 value and the ID number corresponding to each element node from the fragment SVG image, determines the corresponding full SVG image from the cache list according to the MD5 value, and determines the element node of the full SVG image from the cache list according to the ID number corresponding to each element node, and updates the element node of the full SVG image based on the fragment SVG image to ensure the reliability of incremental transmission of SVG images.
[0065] The SVG image remote transmission method and system described above in the present invention can be applied to SVG image transmission scenarios, and are described below through specific implementation methods:
[0066] Please refer to Figure 1 , Embodiment 1 of the present invention is:
[0067] A method for remotely transmitting an SVG image comprises the following steps:
[0068] S1. The sender compares the SVG image to be transmitted with the full amount of SVG images transmitted in the past to obtain the same SVG image data and different SVG image data, specifically including S11-S13:
[0069] S11. The sending end parses the SVG image to be transmitted and the full amount of SVG images transmitted in the past respectively to obtain the parsed SVG image to be transmitted and the parsed full amount of SVG images transmitted in the past, so as to parse the SVG image to be transmitted and the full amount of SVG images transmitted in the past into an operable data structure.
[0070] S12. The sending end extracts element nodes and their attributes from the parsed SVG image to be transmitted and the parsed full SVG image that has been historically transmitted, respectively, and compares the element nodes and their attributes of the parsed SVG image to be transmitted with the element nodes and their attributes of the parsed full SVG image that has been historically transmitted, to obtain the same element nodes and their attributes as well as different element nodes and their attributes.
[0071] The element nodes are different components of the SVG image, such as text, shape, color and other attribute nodes.
[0072] S13. The sending end generates the same SVG picture data according to the same element nodes and their attributes, and generates different SVG picture data according to the different element nodes and their attributes.
[0073] For example, in a C++ environment, the same SVG image data and different SVG image data can be obtained by performing the above parsing and comparison using the third-party library PugiXML library.
[0074] S2. Determine whether the same SVG image data reaches a preset ratio. If not, execute S21. If yes, execute S22-S23.
[0075] In an optional implementation, the preset ratio is 50%.
[0076] S21, sending the SVG image to be transmitted as a full SVG image to the receiving end, specifically including S211-S212:
[0077] S211. The sending end inserts an ID number corresponding to each element node in each element node of the SVG image to be transmitted. After the insertion, the SVG image to be transmitted is compressed to obtain a compressed SVG image to be transmitted.
[0078] In an optional implementation manner, the sending end inserting an ID number corresponding to each element node in each element node of the SVG image to be transmitted includes:
[0079] The transmitting end numbers each element node of the SVG image to be transmitted in sequence, obtains an ID number corresponding to each element node, and inserts the corresponding ID number into each element node of the SVG image to be transmitted. The ID number is a unique identifier of the element node.
[0080] In an optional implementation manner, after the inserting, compressing the SVG image to be transmitted to obtain the compressed SVG image to be transmitted includes:
[0081] After the insertion, the SVG image to be transmitted is compressed using GZIP to obtain a compressed SVG image to be transmitted.
[0082] S212: The sending end sends the compressed SVG image to be transmitted as a full SVG image to the receiving end.
[0083] In an optional implementation manner, after S21, the method further includes:
[0084] The receiving end receives the full SVG image; the receiving end parses the full SVG image, calculates the MD5 value of the full SVG image after parsing, and saves the ID number corresponding to each element node in the full SVG image and the MD5 value to the cache list. In other words, the cache list stores the MD5 value of the full SVG image and the ID number corresponding to each element node of the full SVG image.
[0085] In an optional implementation, calculating the MD5 value of the full SVG image includes:
[0086] The MD5 value of the full SVG image is calculated according to the file path of the full SVG image.
[0087] For example, in a C++ environment, the OpenSSL library (an open source software library package) is used to calculate the file path of the full SVG image passed in by the interface to obtain the MD5 value.
[0088] S22. Generate a fragment SVG image according to the different SVG image data.
[0089] S23. The sending end compresses the fragment SVG image to obtain a compressed fragment SVG image, and sends the compressed fragment SVG image to the receiving end.
[0090] Specifically, the sending end inserts the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserts the ID number corresponding to each element node into each element node of the fragment SVG image; after insertion, the sending end compresses the fragment SVG image to obtain a compressed fragment SVG image.
[0091] For example, if the element node of the fragment SVG image is an element node that does not exist in the full SVG image, it is determined to be an incremental element node, and the corresponding ID number is inserted into the incremental element node, which does not overlap with the previous number.
[0092] In an optional implementation manner, after S23, the method further includes:
[0093] The receiving end parses the compressed SVG image fragment to obtain the SVG image fragment;
[0094] The receiving end obtains the MD5 value and the ID number corresponding to each element node from the fragment SVG image;
[0095] The receiving end determines the corresponding full SVG image from the cache list according to the MD5 value, and determines the element node of the full SVG image from the cache list according to the ID number corresponding to each element node;
[0096] The receiving end updates the element nodes of the full SVG image based on the fragment SVG image.
[0097] An MD5 value is calculated for a full SVG image, and the MD5 value of the corresponding full SVG image is inserted into the subsequent fragment SVG images of the full SVG image. Therefore, when the receiving end receives the fragment SVG image, it can find the corresponding full SVG image according to the MD5 value in it to update it.
[0098] Some controls on the screen of common touch screen devices on the market are drawn with SVG images, such as instruments, bar graphs, etc. When on a remote screen, SVG images need to be transmitted, and the SVG images need to be transmitted in real time according to the state changes of the controls to achieve the effect of remote screen update. This process can apply the above-mentioned SVG image remote transmission method of the present invention. The sending end first transmits the full SVG image of the control to the receiving end for parsing and display. When the state of the control changes subsequently, the sending end only needs to transmit the changed fragment SVG image data to the receiving end for parsing, match the corresponding full SVG image, and perform differentiated data updates, ultimately achieving the effect of updating the remote screen, thereby reducing the amount of transmitted data and saving traffic.
[0099] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0100] A SVG picture remote transmission system includes a sending end and a receiving end, wherein the sending end includes a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the receiving end includes a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, wherein the first processor implements the following steps when executing the first computer program;
[0101] Compare the SVG image to be transmitted with the full SVG image transmitted in history to obtain the same SVG image data and different SVG image data, and determine whether the same SVG image data reaches a preset ratio. If not, send the SVG image to be transmitted as a full SVG image to the receiving end. If yes, generate a fragment SVG image according to the different SVG image data.
[0102] The segment SVG image is compressed to obtain a compressed segment SVG image, and the compressed segment SVG image is sent to a receiving end.
[0103] In an optional implementation, the first processor further implements the following steps when executing the first computer program:
[0104] Determine the ID number corresponding to each element node of the SVG image, and send the ID number corresponding to each element node to the receiving end;
[0105] Inserting ID numbers corresponding to the respective element nodes of the SVG image to be transmitted into the respective element nodes, and after the insertion, compressing the SVG image to be transmitted to obtain a compressed SVG image to be transmitted;
[0106] Sending the compressed SVG image to be transmitted as a full SVG image to a receiving end;
[0107] When the second processor executes the second computer program, the following steps are implemented:
[0108] The ID numbers corresponding to the element nodes are saved.
[0109] In an optional implementation, the second processor further implements the following steps when executing the second computer program:
[0110] Receiving the full SVG image;
[0111] The full SVG image is parsed, and after parsing, the MD5 value of the full SVG image is calculated, and the ID number corresponding to each element node in the full SVG image and the MD5 value are saved in a cache list.
[0112] In an optional implementation, the first processor further implements the following steps when executing the first computer program:
[0113] Inserting the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserting the ID number corresponding to each element node into each element node of the fragment SVG image;
[0114] After insertion, the fragment SVG image is compressed to obtain a compressed fragment SVG image.
[0115] In an optional implementation, the second processor further implements the following steps when executing the second computer program:
[0116] Parsing the compressed SVG image fragment to obtain the SVG image fragment;
[0117] Obtain the MD5 value and the ID number corresponding to each element node from the fragment SVG image;
[0118] Determine the corresponding full SVG image from the cache list according to the MD5 value, and determine the element node of the full SVG image from the cache list according to the ID number corresponding to each element node;
[0119] The element nodes of the full SVG image are updated based on the fragment SVG image.
[0120] In summary, the present invention provides a method and system for remote transmission of SVG images. The sending end compares the SVG image to be transmitted with the full SVG image transmitted historically to obtain the same SVG image data and different SVG image data. When the same SVG image data does not reach a preset ratio, the SVG image to be transmitted is sent to the receiving end as a full SVG image. When the same SVG image data reaches a preset ratio, it is too wasteful to transmit the complete SVG image again. Therefore, a fragment SVG image is generated according to the different SVG image data, and after compressing it, the compressed fragment SVG image is sent to the receiving end. In this way, for images that only have partial differences compared with the SVG images transmitted historically, the SVG image is sent in an incremental transmission manner, thereby reducing the amount of data transmitted and saving traffic. In addition, the sending end inserts the MD5 value of the full SVG image transmitted historically corresponding to the same SVG image data in the root node of the fragment SVG image, and inserts the ID number corresponding to each element node in each element node of the fragment SVG image, so that the receiving end determines the SVG image and the element node therein that need to be incrementally updated according to the MD5 value and the ID number, thereby improving the reliability of SVG image transmission.
[0121] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for remote transmission of SVG images, characterized in that: Includes steps: The sender compares the SVG image to be transmitted with the full amount of SVG images transmitted in the past to obtain the same SVG image data and the different SVG image data; Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data. The sending end compresses the fragment SVG image to obtain a compressed fragment SVG image, and sends the compressed fragment SVG image to the receiving end.
2. A method for remotely transmitting SVG images according to claim 1, characterized in that: The sending the to-be-transmitted SVG picture as a full SVG picture to the receiving end comprises: The sending end inserts the ID number corresponding to each element node in each element node of the SVG image to be transmitted, and after the insertion, compresses the SVG image to be transmitted to obtain a compressed SVG image to be transmitted; The sending end sends the compressed SVG image to be transmitted as a full SVG image to the receiving end.
3. A method for remotely transmitting SVG images according to claim 2, characterized in that: After sending the SVG image to be transmitted as a full SVG image to the receiving end, the method further includes: The receiving end receives the full SVG image; The receiving end parses the full SVG image, calculates the MD5 value of the full SVG image after parsing, and saves the ID number corresponding to each element node in the full SVG image and the MD5 value to a cache list.
4. A method for remotely transmitting SVG images according to claim 3, characterized in that: The sending end compresses the fragment SVG picture, and the compressed fragment SVG picture includes: The sending end inserts the MD5 value of the historically transmitted full SVG picture corresponding to the same SVG picture data into the root node of the fragment SVG picture, and inserts the ID number corresponding to each element node into each element node of the fragment SVG picture; After the insertion, the sending end compresses the fragment SVG image to obtain a compressed fragment SVG image.
5. A method for remotely transmitting SVG images according to claim 4, characterized in that: After sending the compressed SVG image to the receiving end, the method further includes: The receiving end parses the compressed SVG image fragment to obtain the SVG image fragment; The receiving end obtains the MD5 value and the ID number corresponding to each element node from the fragment SVG image; The receiving end determines the corresponding full SVG image from the cache list according to the MD5 value, and determines the element node of the full SVG image from the cache list according to the ID number corresponding to each element node; The receiving end updates the element nodes of the full SVG image based on the fragment SVG image.
6. A SVG picture remote transmission system, comprising a sending end and a receiving end, wherein the sending end comprises a first memory, a first processor, and a first computer program stored in the first memory and executable on the first processor, and the receiving end comprises a second memory, a second processor, and a second computer program stored in the second memory and executable on the second processor, characterized in that: When the first processor executes the first computer program, the following steps are implemented: Compare the SVG image to be transmitted with the full amount of SVG images transmitted in history to obtain the same SVG image data and different SVG image data; Determine whether the same SVG picture data reaches a preset ratio. If not, send the SVG picture to be transmitted as a full SVG picture to the receiving end. If yes, generate a fragment SVG picture according to the different SVG picture data. The segment SVG image is compressed to obtain a compressed segment SVG image, and the compressed segment SVG image is sent to a receiving end.
7. The SVG picture remote transmission system according to claim 6, characterized in that: When the first processor executes the first computer program, the following steps are further implemented: Inserting ID numbers corresponding to the respective element nodes of the SVG image to be transmitted into the respective element nodes, and after the insertion, compressing the SVG image to be transmitted to obtain a compressed SVG image to be transmitted; The compressed SVG image to be transmitted is sent to the receiving end as a full SVG image.
8. The SVG picture remote transmission system according to claim 7, characterized in that: When the second processor executes the second computer program, the following steps are further implemented: Receiving the full SVG image; The full SVG image is parsed, and after parsing, the MD5 value of the full SVG image is calculated, and the ID number corresponding to each element node in the full SVG image and the MD5 value are saved in a cache list.
9. The SVG picture remote transmission system according to claim 8, characterized in that: When the first processor executes the first computer program, the following steps are further implemented: Inserting the MD5 value of the historically transmitted full SVG image corresponding to the same SVG image data into the root node of the fragment SVG image, and inserting the ID number corresponding to each element node into each element node of the fragment SVG image; After insertion, the fragment SVG image is compressed to obtain a compressed fragment SVG image.
10. The SVG picture remote transmission system according to claim 9, characterized in that: When the second processor executes the second computer program, the following steps are further implemented: Parsing the compressed SVG image fragment to obtain the SVG image fragment; Obtain the MD5 value and the ID number corresponding to each element node from the fragment SVG image; Determine the corresponding full SVG image from the cache list according to the MD5 value, and determine the element node of the full SVG image from the cache list according to the ID number corresponding to each element node; The element nodes of the full SVG image are updated based on the fragment SVG image.