Vector picture display method, electronic equipment and computer readable storage medium
By separating the analysis and drawing processes of vector images, using high-performance chips to parse and generate an instruction set, and then drawing vector images from low-performance but low-power chips, the problem that poor performance devices cannot display vector images, and reduce the power consumption and storage pressure of electronic devices.
Patent Information
- Application Number
- CN202311170529.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
Existing electronic devices require high performance when displaying vector images, resulting in poor performance devices being unable to display vector images, while higher performance devices consume higher power when displaying.
By completing the parsing process of vector images by the first chip with high computing performance, an instruction set is obtained, and then the second chip with low computing performance but low power consumption is drawn based on the instruction set, realizing the display of vector images.
This enables electronic devices with lower performance to display vector images, while reducing the power consumption of electronic devices and saving storage space.
Smart Images

Figure CN119597235A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and in particular to a vector image display method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the increasing abundance of image resources, mobile phones, watches, bracelets and other electronic devices can display images in different formats, such as Joint Photographic Expert Group (JPG) images, portable network graphics (PNG) images, bitmap (BMP) and other non-vector images. However, these non-vector images are easily distorted when scaled, resulting in blurred images, while vector images will not be distorted when scaled, and the clarity of the original images can be maintained.
[0003] However, displaying vector images requires electronic devices to have higher performance. This is because vector images are not saved in image format. For example, scalable vector graphics (SVG) images are saved in extensible markup language (XML) files. When displaying vector images, electronic devices need to first parse the files corresponding to the vector images, obtain the parameter information of the vector images, and then draw the vector images according to the parameter information. Among them, the parameter parsing process consumes a lot of computing power. Therefore, some electronic devices with poor performance (such as sports watches) cannot display vector images. For electronic devices with higher performance (such as smart watches), although vector images can be displayed, the display power consumption is high. Summary of the invention
[0004] Some embodiments of the present application provide a vector image display method, an electronic device, and a computer-readable storage medium. The present application is introduced from multiple aspects below, and the implementation methods and beneficial effects of the following aspects can be referenced to each other.
[0005] In a first aspect, the present application provides a vector image display method for an electronic device, the electronic device comprising a first chip and a second chip, the method comprising: downloading first vector image data of a first vector image to be displayed; using the first chip to parse and process the first vector image data to obtain a first instruction set, wherein the first instruction set is used to describe the first vector image; using the second chip to draw the first vector image based on instructions in the first instruction set, wherein the computing performance of the second chip is lower than the computing performance of the first chip; and displaying the first vector image.
[0006] The first chip may be an application processor (AP) chip, and the second chip may be a micro controller unit (MCU) chip. The computing performance of the MCU chip is lower than that of the AP chip. The first vector image may be a vector image mentioned in the present application, such as an SVG image. The first instruction set may be an instruction set mentioned in the present application. The first vector image data may be the SVG image data mentioned in the present application.
[0007] According to the implementation mode of the present application, the MCU chip has low computing performance and cannot directly draw vector images. The AP chip with higher computing performance can first parse and process the vector images to obtain an instruction set for describing the vector images, and then the MCU chip can draw the vector images based on the instruction set. In this way, electronic devices that only include MCU chips, such as sports watches, can also display vector images. For electronic devices that include both AP chips and MCU chips, such as smart watches, since the power consumption of AP chips is higher and the power consumption of MCU chips is lower, the AP chip performs the parsing process with higher computing performance requirements, and the MCU chip performs the display process with lower performance requirements, which can reduce the power consumption of electronic devices.
[0008] In some embodiments, the first chip is used to parse the data of the first vector image to obtain a first instruction set, including: using the first chip to extract parameters of the first vector image from the first vector image data to obtain a first parameter set; using the first chip to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set.
[0009] The first parameter set may include attributes (attr) and attribute values (value) of the vector image. The attributes of the vector image may include width, height, fill color, stroke (color of the outline), transparency, path (enclosed area), viewport (visible area), etc. Each attribute corresponds to an attribute value. For example, the attribute value of transparency may be 0, indicating that the SVG image is opaque.
[0010] The instructions in the first instruction set may be general intermediate format drawing instructions that can be recognized by a graphics processing unit (GPU).
[0011] According to the implementation mode of the present application, since the storage space occupied by the instruction set is smaller than the storage space occupied by the vector image, the vector image is converted into an instruction set for storage, which can save storage space and reduce storage pressure. In addition, the instructions in the instruction set are instructions that can be directly recognized by the GPU, and the MCU chip is integrated with the GPU. The GPU of the MCU chip can recognize the instructions in the instruction set to draw the corresponding vector image according to the instructions in the instruction set.
[0012] In some embodiments, the first instruction set includes curve instructions; and the first chip is used to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set, including: using the first chip to convert the graphic contour parameters in the first parameter set into curve instructions, and the curve instructions are used to describe the graphic contour of the first vector image in the form of a curve.
[0013] The curve instruction may be the cubic instruction mentioned in this application.
[0014] According to the implementation mode of the present application, since any graphics can be described in the form of a Bezier curve, the graphic outline in the SVG picture can be converted into the form of a Bezier curve, that is, the graphic outline parameters in the SVG picture are converted into instructions in the form of a Bezier curve, so as to describe the graphic outline in the SVG picture through instructions in the form of a Bezier curve. Since the data volume of the instruction is small, the data volume can be reduced by converting the SVG picture into the instruction form of a Bezier curve. Among them, the shape of the Bezier curve is determined by the starting point, the control point and the end point. The starting point is the starting drawing point of the Bezier curve, the end point is the end drawing point of the Bezier curve, and the control point is used to control the shape of the Bezier curve. When the coordinate parameters of the starting point, the control point and the end point are determined, the Bezier curve is determined. Therefore, converting the graphic outline in the SVG picture into a Bezier curve is actually converting the graphic outline in the SVG picture into the coordinate parameters of the starting point, the control point and the end point.
[0015] In some embodiments, the first instruction set includes point set instructions; and the first chip is used to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set, including: using the first chip to convert the graphic contour parameters in the first parameter set into point set instructions, and the point set instruction set is used to describe the graphic contour of the first vector image in the form of a set of coordinate points.
[0016] Among them, the point set instruction can be the move instruction and end instruction mentioned in this application.
[0017] According to an implementation of the present application, the outline of a graphic in an SVG image can be described as a set of points, that is, the outline parameters of the graphic in the SVG image are converted into instructions in the form of a point set, so as to describe the outline of the graphic in the SVG image through instructions in the form of a point set. When describing the outline of the graphic in the form of a point set, the degree of discreteness between each coordinate point in the point set can be controlled, and then the drawing of the graphic can be achieved by connecting each coordinate point in the point set. Describing the outline of the graphic in the SVG image in the form of a point set can improve the accuracy of the graphic description.
[0018] In some embodiments, the method further includes: receiving a first operation for the first vector image, the first operation being used to change the first vector image; based on the first operation, modifying the parameters of the first vector image in the first instruction set to obtain a modified first vector image; and displaying the modified first vector image.
[0019] The first operation may include a color setting operation, a size setting operation, a scaling operation, etc.
[0020] In a second aspect, the present application provides a vector image display method for a first electronic device, the method comprising: downloading second vector image data of a second vector image to be displayed; parsing and processing the second vector image data to obtain a second instruction set, wherein the second instruction set is used to instruct a second electronic device to draw a second vector image; wherein the performance of the second electronic device is lower than that of the first electronic device.
[0021] The first electronic device may be a mobile phone, a tablet computer, a laptop computer or other high-performance electronic device. The second electronic device may be a smart watch, a sports watch, a bracelet or other electronic device.
[0022] The second vector image may be a vector image mentioned in this application, such as an SVG image, etc. The second instruction set may be an instruction set mentioned in this application. The second vector image data may be the SVG image data mentioned in this application.
[0023] According to the implementation mode of the present application, a higher-performance electronic device can parse and process the vector image data to obtain a corresponding instruction set, and then a lower-performance electronic device can display the vector image based on the instruction set, so that the lower-performance electronic device can display the vector image.
[0024] In some embodiments, the second vector image data of the second vector image is parsed to obtain a second instruction set, including: extracting parameters of the second vector image from the second vector image data to obtain a second parameter set; and performing instruction conversion processing on the parameters in the second parameter set to obtain a second instruction set.
[0025] In some embodiments, the second instruction set includes curve instructions; and the parameters in the second parameter set are subjected to instruction conversion processing to obtain the second instruction set, including: converting the graphic contour parameters in the second parameter set into curve instructions, and the curve instructions are used to describe the graphic contour of the second vector image in the form of a curve.
[0026] In some embodiments, the second instruction set includes point set instructions; and the parameters in the second parameter set are subjected to instruction conversion processing to obtain the second instruction set, including: converting the graphic contour parameters in the second parameter set into point set instructions, and the point set instruction set is used to describe the graphic contour of the second vector image in the form of a set of coordinate points.
[0027] In some implementations, the first electronic device includes an AP chip or a central processing unit (CPU).
[0028] In a third aspect, the present application provides a vector image display method for a second electronic device, the method comprising: receiving a third instruction set for a third vector image, wherein the third instruction set is used to describe the third vector image; displaying the third vector image based on instructions in the third instruction set; in response to receiving a second operation for the third vector image, changing the third vector image according to the second operation; and displaying the modified third vector image.
[0029] The second electronic device may be an electronic device including only an MCU chip, such as a sports watch or a bracelet. The third vector image may be a vector image mentioned in the present application, such as an SVG image. The third instruction set may be an instruction set mentioned in the present application. The third vector image data may be the SVG image data mentioned in the present application. The second operation may be a color setting operation, a size setting operation, a zooming operation, etc.
[0030] According to the implementation of the present application, the electronic device can directly display the vector image by receiving the instruction set of the vector image. Since the instruction set can be directly recognized by the GPU, for electronic devices with lower performance, such as sports watches, the vector image can be directly drawn according to the instructions in the instruction set, and then the vector image can be displayed. In this way, the vector image can also be displayed for electronic devices with lower performance. In addition, since the vector image will not be distorted when it is scaled, the electronic device can maintain the original clarity when it is scaled when displaying the vector image.
[0031] In some embodiments, corresponding to receiving a second operation for the third vector image, changing the third vector image according to the second operation includes: based on the second operation, modifying the parameters of the third vector image in the third instruction set to obtain a modified third vector image; and displaying the modified third vector image.
[0032] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a first chip, and a second chip; wherein the memory is used to store instructions executed by the first chip and the second chip; the first chip and the second chip are used to enable the electronic device to execute the method described in any embodiment of the first aspect of the present application when executing the instructions in the memory. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.
[0033] In a fifth aspect, an embodiment of the present application provides an electronic device, including: a memory and a chip; wherein the memory is used to store instructions executed by the chip; the chip is used to enable the electronic device to execute the method described in any implementation method of the second aspect of the present application when executing the instructions in the memory. The beneficial effects that can be achieved in the fifth aspect can refer to the beneficial effects of the method provided in any embodiment of the second aspect, and will not be repeated here.
[0034] In a sixth aspect, an embodiment of the present application provides an electronic device, including: a memory and a chip; wherein the memory is used to store instructions executed by the chip; the chip is used to enable the electronic device to execute the method described in any implementation method of the third aspect of the present application when executing the instructions in the memory. The beneficial effects that can be achieved in the sixth aspect can refer to the beneficial effects of the method provided in any embodiment of the third aspect, and will not be repeated here.
[0035] In a seventh aspect, an embodiment of the present application provides a picture display system, the system comprising a first electronic device and a second electronic device, wherein the first electronic device is used to execute the method described in any embodiment of the second aspect. The second electronic device is used to execute the method described in any embodiment of the third aspect.
[0036] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed on a computer, the computer can execute the method described in any one of the first aspect, the second aspect, or the third aspect. The beneficial effects that can be achieved in the eighth aspect can refer to the beneficial effects of the method provided in any one of the first aspect, the second aspect, or the third aspect, and will not be repeated here.
[0037] In a ninth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed, causes a computer to execute the method described in any one of the first aspect, the second aspect, or the third aspect. The beneficial effects that can be achieved in the ninth aspect can refer to the beneficial effects of the method provided in any one of the first aspect, the second aspect, or the third aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1Examples of pictures of different formats provided in the embodiments of the present application;
[0039] Figure 2 Examples of sports watches provided in embodiments of the present application Figure 1 ;
[0040] Figure 3 Examples of sports watches provided in embodiments of the present application Figure 2 ;
[0041] Figure 4 An example of a vector image display method provided in the present application Figure 1 ;
[0042] Figure 5A An example diagram of the connection between a mobile phone and a sports watch provided in an embodiment of the present application;
[0043] Figure 5B An example diagram of opening the dial interface provided in an embodiment of the present application;
[0044] Figure 5C Example of downloading a watch face provided for an embodiment of the present application Figure 1 ;
[0045] Figure 5D An example diagram of an SVG image provided in an embodiment of the present application;
[0046] Figure 5E Example of replacing the dial provided in the embodiment of the present application Figure 1 ;
[0047] Figure 6 Principle example of the vector image display method provided in the embodiment of the present application Figure 1 ;
[0048] Figure 7 An example of a vector image display method provided in the present application Figure 2 ;
[0049] Fig. 8A An example diagram of the interface of a smart watch provided in an embodiment of the present application;
[0050] Figure 8B Example of downloading a watch face provided for an embodiment of the present application Figure 2 ;
[0051] Figure 8C Example of replacing the dial provided in the embodiment of the present application Figure 2 ;
[0052] Fig. 9 Principle example of the vector image display method provided in the embodiment of the present application Figure 2 ;
[0053] Fig.10 An example diagram of the process of changing the color of a dial provided in an embodiment of the present application;
[0054] Fig.11A Example of a scenario for changing the dial color provided in an embodiment of the present application Figure 1 ;
[0055] Fig. 11B Example of a scenario for changing the dial color provided in an embodiment of the present application Figure 2 ;
[0056] Fig.12 An example flow chart of the SVG image scaling process provided in an embodiment of the present application;
[0057] Fig.13 This is a scene example diagram of the SVG image scaling process provided in the embodiment of the present application;
[0058] Fig.14 An example diagram of the display process of a non-vector image provided in an embodiment of the present application;
[0059] Fig.15 A block diagram of an electronic device provided by an embodiment of the present application is shown;
[0060] Fig.16 A schematic diagram of the structure of a system on chip (SoC) provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0061] The embodiment of the present application is used to provide a method for displaying a vector image. The method provided by the present application can reduce the display power consumption of the vector image and enable electronic devices with poor performance to display the vector image.
[0062] The present application does not limit the specific form of the electronic device. The electronic device may be a mobile phone, a laptop computer, a tablet, a wearable device (for example, a sports watch, a smart watch, a smart glasses, a helmet), an augmented reality (AR) / virtual reality (VR) device, a personal digital assistant (PDA), etc.
[0063] This article refers to electronic watches that only include MCU chips as "sports watches", and electronic watches that include both AP chips and MCU chips as "smart watches".
[0064] The MCU chip has low power consumption and is mainly responsible for time display, motion monitoring, health monitoring and other functions, such as monitoring the number of steps, monitoring exercise distance, monitoring heart rate, monitoring blood oxygen saturation, etc.
[0065] The AP chip has strong performance and is mainly responsible for running various applications, such as social media applications, weather applications, map navigation applications, payment applications, etc., which can meet the various application usage needs of users.
[0066] To facilitate understanding, the format of the pictures involved in this application is first introduced below.
[0067] The images in this application include vector images and non-vector images. Vector images are images described using data formulas, such as SVG images, encapsulated postscript (EPS) images, portable document format (PDF) images, etc. Vector images are not composed of pixels, but of data objects such as paths, line segments, curves, and polygons. Since vector images are based on data objects, vector images have infinite resolution. In other words, when a vector image is scaled, it will not be distorted or blurred.
[0068] Non-vector images are also called pixel images, such as JPG images, PNG images, BMP images, etc. Non-vector images are grid images composed of pixels (image units). Since the resolution of non-vector images is fixed, when non-vector images are enlarged, the pixels of non-vector images will become more obvious, resulting in a decrease in image quality, that is, it will become blurred.
[0069] It is understandable that for the same image, the size will be different when it is saved in different formats. The size of a vector image is smaller than that of a non-vector image. Figure 1 As shown in the figure, for the same image of a quarter circle with a resolution of 362*362, when the image is saved in BMP format, its size is 256KB. When the image is saved in PNG format, its size is 12.2KB. When the image is saved in SVG format, its size is 1.57KB.
[0070] Figure 2 This is an example diagram of a sports watch provided by an embodiment of the present application. Figure 2 The sports watch 100A includes a display screen 10. The display screen 10 can display time in the form of a virtual dial. In order to facilitate the user to view the current time more clearly, when the minute hand indicates a certain number on the dial, the number can be enlarged and displayed. For example, Figure 2As shown in the figure, when the minute hand points to the number 12 on the dial, the number 12 can be magnified. However, the number 12 uses a non-vector image. When the image of the number 12 is enlarged, the image will be distorted, resulting in a blurred number 12, which affects the user experience.
[0071] To avoid distortion of the numbers on the dial when zooming in, Figure 3 As shown, the non-vector image of the numbers in the dial can be replaced with a vector image, so that the numbers in the dial will not be distorted when scaled, thereby avoiding blurry display of the numbers.
[0072] However, the sports watch 100A only includes an MCU chip, and the performance of the MCU chip is poor and cannot run the application program. To display a vector image, it is necessary to run a parsing application for parsing the vector image to parse the file of the vector image to obtain the graphic elements, path, color and other parameter information of the vector image, and then draw the vector image based on these parameter information. For example, when an electronic device displays an SVG image, it is necessary to run an XML parser to parse the XML file of the SVG image to obtain the parameter information of the SVG image, and then draw the SVG image based on the parameter information of the SVG image. Since the MCU chip of the sports watch 100A cannot run a parsing application for parsing vector images, it cannot display vector images.
[0073] For electronic devices with better performance, such as smart watches, although they include AP chips, they can run the analysis application for parsing vector images through the AP chip to realize the display of vector images. However, the power consumption of AP chips is relatively high. Parsing and drawing vector images through AP chips will result in high power consumption of display and reduce battery life.
[0074] In order to solve the above technical problems, an embodiment of the present application provides a method for displaying a vector image. In the method of the embodiment of the present application, the parsing process of the vector image data and the display process of the vector image are respectively completed by different chips. Among them, the parsing process consumes high computing power and is completed by a first chip with higher performance. The display process consumes low computing power and is completed by a second chip with lower power consumption. In this way, the display power consumption of the vector image can be reduced, and the vector image can also be displayed on a device with lower performance. For example, the first chip can first perform parameter extraction processing on the vector image to obtain a parameter set of the vector image, and then perform instruction conversion processing on each parameter in the parameter set to obtain a corresponding instruction set. Among them, the instructions in the instruction set are used to describe the vector image. After the first chip obtains the instruction set of the vector image, the instruction set of the vector image can be sent to the second chip, and the second chip recognizes the instructions in the instruction set and draws the corresponding vector image according to the instructions in the instruction set.
[0075] It is understandable that the first chip may be an AP chip or a CPU chip, and the second chip may be an MCU chip. The computing performance of the second chip is lower than that of the first chip. The first chip and the second chip may be provided in the same device or in different devices.
[0076] For example, both the AP chip and the MCU chip are set in a smart watch. In the case of a smart watch displaying a vector image, the AP chip of the smart watch can first extract parameters and perform instruction conversion processing on the vector image to obtain a corresponding instruction set, and then send the instruction set to the MCU chip of the smart watch. Then the MCU chip draws the vector image according to the instructions in the instruction set. In this way, it is possible to avoid displaying the vector image only by the AP chip, thereby reducing display power consumption.
[0077] For another example, the CPU chip is set in a mobile phone, and the MCU chip is set in a sports watch. In the case of a sports watch displaying a vector image, the CPU chip of the mobile phone can first extract parameters and perform instruction conversion processing on the vector image to obtain a corresponding instruction set. Then the mobile phone sends the instruction set to the sports watch, and the MCU chip of the sports watch draws the vector image according to the instructions in the instruction set. In this way, a sports watch with poor performance can also display vector images.
[0078] It can be understood that vector images take up less storage space, and electronic devices displaying vector images can save storage space and reduce the storage pressure of electronic devices. In addition, since the storage space occupied by instruction sets is smaller than that occupied by vector images, converting vector images into instruction sets can further save storage space of electronic devices.
[0079] The following is a detailed introduction to the embodiments of the present application.
[0080] Figure 4 An example of a vector image display method provided in the present application Figure 1 In this embodiment, the CPU chip of the mobile phone can perform parameter extraction and instruction conversion processing on the SVG image to obtain an instruction set corresponding to the SVG image. The instructions in the instruction set are general intermediate format drawing instructions that can be directly recognized by the GPU. After the mobile phone obtains the instruction set, it sends the instruction set to the sports watch, and the GPU integrated in the MCU chip of the sports watch directly recognizes the instructions in the instruction set and draws the SVG image according to the instructions.
[0081] In the embodiment of the present application, the mobile phone can also be a tablet computer, a laptop computer, a smart watch or other electronic device. The sports watch can also be an electronic device with only an MCU chip, such as a smart bracelet. The SVG image can also be a vector image such as an EPS image, a PDF image, etc.
[0082] refer to Figure 4 , the vector picture display method comprises the following steps:
[0083] S101: The mobile phone 200 downloads SVG picture data of an SVG picture to be displayed.
[0084] Since the SVG image is stored in the form of an XML file, the SVG image data may be an XML file corresponding to the SVG image.
[0085] For example, reference Figure 5A , the mobile phone 200 is connected to the sports watch 100A. A sports health application (not shown in the figure) is installed on the mobile phone 200. The user can open the sports watch interface 20 of the sports health application to view the status information and sports health information of the sports watch 100A in the sports watch interface 20. The status information may include connection status, power level and other information. The sports health information may include the user's steps (such as 3673 steps), calories (such as 160 kcal), exercise distance (2.98 kilometers) and other information. Figure 5A As shown in FIG. 1 , the sports watch 100A currently displays the dial H1. Figure 5B As shown, when the user wants to change the dial of the sports watch 100A, the user can click on the more controls 21 on the sports watch 20 interface to enter the dial market interface 30. The dial market interface 30 includes multiple dials.
[0086] In this embodiment, the dial in the dial market application can be a complete SVG image. When the mobile phone 200 downloads a certain dial, the SVG image data corresponding to the dial can be downloaded. Figure 5C As shown, when the user clicks the download button 31 on the dial market interface 30, the mobile phone 200 can download the SVG image data corresponding to the dial H2.
[0087] In some other embodiments, the dial in the dial market application may also be a picture composed of multiple SVG pictures, that is, each element in the dial is an SVG picture. When the mobile phone 200 downloads this type of dial, it can download the SVG picture data set corresponding to the dial, and the SVG picture data set includes the SVG picture data corresponding to each element in the dial. For example, Figure 5C As shown, when the user clicks the download button 31 on the dial market interface 30, the mobile phone 200 can download the SVG image data set corresponding to the dial H2.
[0088] It should be noted that SVG images can be applied to not only dials, but also text, numbers, icons, symbols and other elements, without limitation. For example, the text, numbers, icons, symbols and other elements on the UI interface of the sports watch 100A can be SVG images, and users can zoom in, zoom out, modify the color and other operations on these elements.
[0089] S102: The CPU chip of the mobile phone 200 performs parameter extraction processing on the SVG image data to obtain a parameter set of the SVG image.
[0090] Exemplarily, after the mobile phone 200 downloads the SVG image data corresponding to the dial H2 (i.e., the SVG image), the CPU chip of the mobile phone 100 runs the XML parser. The XML parser performs parameter parsing on the SVG image data corresponding to the dial H2 to extract the parameter information of the dial H2 and obtain the parameter set of the dial H2. The parameter set may include attributes (attr) and attribute values (value) of the dial H2. Among them, the attributes may include width, height, fill color, stroke (outline color), transparency, path (enclosed area), viewport (visible area), etc. Each attribute corresponds to an attribute value. For example, the attribute value of transparency may be 0, indicating that the SVG image is opaque.
[0091] S103: The CPU chip of the mobile phone 200 performs instruction conversion processing on the parameters in the parameter set to obtain an instruction set.
[0092] For example, after the CPU chip of the mobile phone 200 performs parameter extraction processing on the SVG image data of the dial H1 to obtain a corresponding parameter set, the CPU chip of the mobile phone 200 can describe each parameter in the parameter set as a universal intermediate format drawing instruction to obtain a corresponding instruction set, that is, a temporary SVG resource. Among them, the universal intermediate format drawing instruction is an instruction that can be directly recognized by the GPU in the MCU chip.
[0093] In some embodiments, since any graphics can be described in the form of a Bezier curve, the graphic outline in the SVG image can be converted into the form of a Bezier curve, that is, the graphic outline parameters in the SVG image are converted into instructions in the form of a Bezier curve, so as to describe the graphic outline in the SVG image through instructions in the form of a Bezier curve. Since the data volume of the instruction is small, the data volume can be reduced by converting the SVG image into the instruction form of a Bezier curve. Among them, the shape of the Bezier curve is determined by the starting point, the control point and the end point. The starting point is the starting drawing point of the Bezier curve, the end point is the end drawing point of the Bezier curve, and the control point is used to control the shape of the Bezier curve. When the coordinate parameters of the starting point, the control point and the end point are determined, the Bezier curve is determined. Therefore, converting the graphic outline in the SVG image into a Bezier curve is actually converting the graphic outline in the SVG image into the coordinate parameters of the starting point, the control point and the end point.
[0094] It can be understood that when the outline of a graphic in an SVG image is relatively complex, especially when the curves in the graphic are relatively complex, describing the outline of the graphic in the SVG image in the form of a Bezier curve will reduce the accuracy of the graphic description.
[0095] In order to improve the accuracy of the graphic description, in other embodiments, the graphic outline in the SVG image can be described as a set of points, that is, the graphic outline parameters in the SVG image are converted into instructions in the form of a point set, so as to describe the graphic outline in the SVG image through instructions in the form of a point set. When describing the graphic outline in the form of a point set, the degree of discreteness between each coordinate point in the point set can be controlled, and then the drawing of the graphic can be achieved by connecting each coordinate point in the point set. Describing the graphic outline in the SVG image in the form of a point set can improve the accuracy of the graphic description.
[0096] The instruction set of this embodiment includes instruction statements and instruction parameters. Among them, the instruction statements may include move instructions, line instructions, cubic instructions, end instructions, color instructions, viewbox instructions, etc. The move instruction is used to determine the starting point of the drawing. The line instruction is used to draw a straight line. The cubic instruction is used to draw a curve. The end instruction is used to determine the end point of the drawing. The color instruction is used to determine the color of the drawing. The viewbox instruction is used to determine the view area, that is, the visible range of the SVG image. One move instruction can correspond to 2 points. One line instruction can correspond to 2 points, and one cubic instruction can correspond to 6 points. The instruction parameters may include point coordinate parameters, color parameters, view box parameters, etc.
[0097] It can be understood that each complete instruction can be composed of an instruction statement and at least one instruction parameter. For example, for an instruction to set color, that is, the format of the color instruction can be "COLOR: xxxxxxxx (color attribute value)", where "COLOR:" is the instruction statement corresponding to the color instruction.
[0098] In the embodiment of the present application, the SVG image is stored in the form of an XML file, and the XML file includes instructions for describing the SVG image, but the instructions in the XML file cannot be recognized by the GPU, and the GPU cannot directly draw the SVG image according to the instructions in the XML file. However, the instructions in the instruction set of the embodiment of the present application can be directly recognized by the GPU, and the GPU can directly draw the SVG image according to the instructions in the instruction set.
[0099] For example, Figure 5D An SVG image described in the form of an XML file is shown. The SVG image includes a circle, which is divided into three sector-shaped areas, each of which corresponds to a color. The instruction set of the embodiment of the present application can first describe the three sector-shaped areas in the form of Bezier curves or point sets through instructions such as move instructions, line instructions, cubic instructions, end instructions, viewbox instructions, etc., and then determine the color of each area through color instructions. Since move instructions, line instructions, cubic instructions, end instructions, viewbox instructions and color instructions are all general intermediate format drawing instructions that can be recognized by the GPU, the GPU can directly draw by recognizing these instructions. Figure 5D The SVG image shown.
[0100] S104: The mobile phone 200 sends a command set to the sports watch 100A.
[0101] In some embodiments, after the CPU chip of the mobile phone 200 performs instruction conversion processing on the parameters in the parameter set to obtain the corresponding instruction set, the mobile phone 200 can use communication methods such as Bluetooth (BT), wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks) to directly send the instruction set to the sports watch 100A.
[0102] In other embodiments, after the CPU chip of the mobile phone 200 performs instruction conversion processing on the parameters in the parameter set to obtain a corresponding instruction set, the mobile phone 200 can first store the instruction set in a storage space such as a flash memory, and then send the instruction set to the sports watch 100A when the sports watch 100A needs to display an SVG image.
[0103] For example, Figure 5E As shown, after the mobile phone 200 downloads the SVG image data of the dial H2, a pop-up window 31 may pop up to prompt the user "The dial has been downloaded, please confirm whether to apply it immediately". When the user clicks the confirmation button M1 in the pop-up window 31, the mobile phone 200 can send the instruction set corresponding to the dial H2 to the sports watch 100A, and the sports watch 100A displays the dial H2 based on the instruction set.
[0104] S105: The sports watch 100A displays the SVG image.
[0105] In some embodiments, the MCU chip of the sports watch 100A is integrated with a GPU, and the GPU can directly recognize the instructions in the instruction set. After the sports watch 100A receives the instruction set sent by the mobile phone 200, the GPU in the MCU chip of the sports watch 100A can directly read the instructions in the instruction set, and then draw the corresponding SVG picture according to the instructions in the instruction set.
[0106] For example, Figure 5E As shown, after the sports watch 100A receives the instruction set corresponding to the dial H2 sent by the mobile phone 200, the GPU in the MCU chip of the sports watch 100A can draw the dial H2 according to the instructions in the instruction set, and then the sports watch 100A displays the dial H2.
[0107] In the embodiment of the present application, the sports watch only includes an MCU chip, which has poor performance and cannot directly display SVG images. The SVG image can be subjected to parameter extraction and instruction conversion processing by the mobile phone to obtain an instruction set that can be directly recognized by the GPU. The mobile phone then sends the instruction set to the sports watch, and the GPU in the MCU chip of the sports watch directly recognizes the instructions in the instruction set and draws the SVG image according to the instructions. In this way, a sports watch with poor performance can also display SVG images. Since SVG images will not be distorted when scaled, when the sports watch displays the SVG image being enlarged, the SVG image will not become blurred, thereby improving the user experience. In addition, the sports watch only needs to store the instruction set of the SVG image, and the data volume of the instruction set is small, which can save the storage space of the sports watch.
[0108] It should be noted that Figure 4The embodiment shown is that a mobile phone is connected to a sports watch, and the CPU chip of the mobile phone executes the parsing process of the SVG image data to obtain the instruction set of the SVG image, and then sends the instruction set to the sports watch, and the GPU integrated in the MCU chip of the sports watch draws the SVG image. After the SVG image is drawn, the sports watch displays the SVG image. In other embodiments, the mobile phone can also be connected to a smart watch, and the CPU chip of the mobile phone executes the parsing process of the SVG image data to obtain the instruction set of the SVG image, and then sends the instruction set to the smart watch, and the GPU integrated in the MCU chip of the smart watch draws the SVG image. After the SVG image is drawn, the smart watch displays the SVG image.
[0109] Figure 6 This is a first principle example of a vector image display method provided in an embodiment of the present application.
[0110] like Figure 6 As shown, the mobile phone and the sports watch can be connected via communication methods such as Bluetooth or WIFI. When the sports watch needs to display a dial in SVG format, the mobile phone can download the dial in SVG format from the dial market application. After the mobile phone downloads the dial in SVG format, the CPU chip of the mobile phone can run the format processing and data extraction system, and the format processing and data extraction system performs parameter parsing and instruction conversion processing on the dial to obtain a temporary SVG resource, that is, an instruction set. Then, the mobile phone can send the temporary SVG resource to the sports watch, and the GPU integrated in the MCU chip of the sports watch directly recognizes the instructions in the temporary SVG resource, and draws the dial on the user interface (UI) of the sports watch according to the instructions for display. In this way, the sports watch can display the dial in SVG format. After the sports watch displays the dial in SVG format, the user can personalize the dial, for example, the elements in the dial such as numbers, pointers, etc. can be enlarged or reduced. For another example, the color of certain elements in the dial can also be modified, such as the color of pointers, numbers, icons and other elements.
[0111] In the above Figures 4 to 6 In the above-described embodiment, the SVG image data parsing process (including parameter parsing and instruction conversion process) and the SVG image display process are respectively completed by different electronic devices (such as a mobile phone and a sports watch). In some cases, the SVG image data parsing process and the SVG image display process can also be completed by the same electronic device (such as a smart watch).
[0112] Figure 7 An example of a vector image display method provided in the present application Figure 2In this embodiment, the smart watch includes an AP chip and an MCU chip. The AP chip of the smart watch can extract parameters of the SVG image and obtain an instruction set corresponding to the SVG image. The instructions in the instruction set are general intermediate format drawing instructions that can be recognized by the GPU. Then, the GPU integrated inside the MCU chip of the smart watch can directly recognize the instructions in the instruction set and draw the SVG image according to the instructions.
[0113] In the embodiment of the present application, the smart watch can also be a mobile phone, a tablet computer, a laptop computer or other electronic device with an AP chip and an MCU chip, and there is no limitation on this. The SVG image can also be a vector image such as an EPS image, a PDF image, etc.
[0114] refer to Figure 7 , the vector picture display method comprises the following steps:
[0115] S201: The smart watch 100B downloads SVG image data of an SVG image to be displayed.
[0116] For example, Fig. 8A As shown, the user can open the dial market interface 40 on the smart watch 100B. The dial market interface 40 can display different types of dials in the dial market application, such as dial H2. The dial in the dial market application can be a complete SVG image or a picture composed of multiple SVG images. The user can slide on the dial market interface 40, such as sliding left, up, down, etc., to switch to the next dial. Fig. 8A As shown, when the user slides left on the dial market interface 40, the dial market interface 40 can display the next dial H1. In other embodiments, the user can also switch to the next dial through other operations, such as long press, double click, single click, etc., which are not limited to this.
[0117] like Figure 8B As shown, the dial currently displayed on the smart watch 100B is dial H1. When the user wants to change the dial of the smart watch 100B to dial H2, the user can open the dial market interface 40 of the smart watch 100B and click the download button 41 on the dial market interface 40 to download the SVG image data corresponding to dial H2.
[0118] S202: The AP chip of the smart watch 100B performs parameter extraction processing on the SVG image data to obtain a parameter set of the SVG image.
[0119] Exemplarily, after the smart watch 100B downloads the SVG image data corresponding to the dial H2, the AP chip of the smart watch 100B can run an XML parser. The XML parser parses the SVG image data of the dial H2 to extract the parameter information of the dial H2. The parameter set may include attributes (attr) and attribute values (value). Among them, the attributes may include width, height, fill color, stroke (outline color), transparency, path (enclosed area), viewport (visible area), etc. Each attribute corresponds to an attribute value. For example, the attribute value of transparency may be 0, indicating that the SVG image is opaque.
[0120] S203: The AP chip of the smart watch 100B performs instruction conversion processing on the parameters in the parameter set to obtain an instruction set.
[0121] In some embodiments, the AP chip of the smart watch can describe the parameters in the parameter set of the SVG image as universal intermediate format drawing instructions to obtain a corresponding instruction set, that is, a temporary SVG resource.
[0122] S204: The AP chip of the smart watch 100B sends an instruction set to the MCU chip of the smart watch 100B.
[0123] After the AP chip of the smart watch 100B performs instruction conversion processing on the parameters in the parameter set of the SVG image to obtain a corresponding instruction set, the instruction set can be sent to the MCU chip of the smart watch.
[0124] For example, Figure 8C As shown, after the smart watch 100B downloads the SVG image data corresponding to the dial H2, the dial market interface 40 can display an application button 41. When the user clicks the application button 41, the AP chip of the smart watch 100B can send the instruction set corresponding to the dial H2 to the MCU chip, and the GPU in the MCU chip draws the dial H2 based on the instruction set.
[0125] S205: The smart watch 100B displays an SVG image.
[0126] The GPU is integrated in the MCU chip of the smart watch 100B. After receiving the instruction set sent by the AP chip, the MCU of the smart watch 100B can directly identify the instructions in the instruction set and draw the SVG image according to the instructions in the instruction set, and then the smart watch 100B displays the SVG image.
[0127] For example, Figure 8CAs shown, after the MCU chip of the smart watch 100B receives the instruction set corresponding to the dial H2 sent by the AP chip, the GPU in the MCU chip can draw the dial H2 according to the instructions in the instruction set, and then the smart watch 100B displays the dial H2.
[0128] In the embodiment of the present application, since the parsing process of SVG image data (that is, the process of parameter extraction and instruction conversion) consumes high computing power, it can be executed by a higher-performance AP chip. Since the display process of SVG images consumes low computing power, it can be executed by a MCU chip with low power consumption, rather than a higher-performance AP chip to execute the entire process of SVG image display. In this way, the power consumption of smart watches displaying SVG images can be reduced.
[0129] Fig. 9 This is a second principle example of the vector image display method provided in the embodiment of the present application.
[0130] like Fig. 9 As shown, the smart watch includes an AP chip and an MCU chip. The MCU chip is integrated with a GPU. When the smart watch displays an SVG image, the AP chip of the smart watch can run a format processing and data extraction system, and perform parameter extraction and instruction conversion processing on the SVG image through the format processing and data extraction system to obtain a temporary SVG resource, that is, an instruction set for describing the SVG image. The temporary SVG resource is then sent to the MCU chip. The GPU of the MCU chip can directly recognize the instructions in the temporary SVG resource, and draw and display the corresponding SVG image on the UI interface of the smart watch according to the instructions in the temporary SVG resource.
[0131] Download the image data of the SVG image Download the image data of the SVG image Download the image data of the SVG image Download the image data of the SVG image It can be understood that non-vector images are pixel images. When coloring a closed area in a non-vector image, it is necessary to first traverse each pixel in the area, and then color each pixel in the area. This method consumes high performance. Vector images are composed of data objects such as paths, line segments, curves, and polygons. When coloring a closed area in a vector image, it is only necessary to modify the color parameters corresponding to the area, without traversing each pixel in the area, so this method consumes less performance.
[0132] Since the color rendering of vector images consumes less power, when electronic devices with lower performance display vector images, the color of the images can also be changed. For example, when the sports watch 100A displays a dial in SVG format, the user can customize the color of the dial, such as changing the color of the pointer on the dial.
[0133] Fig.10This is an example diagram of the process of changing the dial color provided in the embodiment of the present application. Fig.10 As shown, changing the dial color includes the following steps:
[0134] S301: Receive a dial setting instruction.
[0135] To facilitate understanding, the following description will continue using a sports watch as an example.
[0136] In some embodiments, when the watch face displayed by the sports watch 100B is in SVG format, the user can set the color of each element in the watch face on the sports watch 100B, such as the pointer color, background color, etc.
[0137] Exemplarily, as shown in FIG11 , the sports watch 100B displays a dial in the form of a pointer. When the user wants to change the color of the minute hand L1 on the dial of the sports watch 100B from gray to white, the color of the minute hand L1 on the dial of the sports watch 100B can be set to white. For example, when the user performs long press, double click, single click, etc. on the minute hand L1, the sports watch 100B can display the setting interface F1. The setting interface F1 includes setting items such as color and size. When the user clicks the color button 15, the sports watch 100B can display the color setting interface F2, and the color setting interface F2 includes various color options, such as white, red, gray, blue, green, etc. When the user clicks the white button 16, the sports watch 100B can receive a dial setting instruction to set the minute hand L1 to white, and set the minute hand L1 to white according to the instruction.
[0138] It should be noted that the setting of the dial pointer color in this embodiment is only for illustrative purposes and is not intended to be a limitation of the present application. In other embodiments, the dial pointer color may be set in other ways.
[0139] S302: Determine the re-dyed area and color.
[0140] For example, when the sports watch 100B receives a dial setting instruction from the user to set the color of the minute hand on the dial to white, it can determine that the minute hand area is a re-dyed area, and determine that the re-dyed color is white.
[0141] S303: Determine the path index corresponding to the area.
[0142] Each closed area in an SVG image is composed of closed paths (points, lines, curves, etc.), for example, Fig.12 The minute hand L1 in is a closed area composed of multiple straight lines. Each closed area corresponds to a path index.
[0143] Exemplarily, after determining that the re-colored area is the minute hand area, the path index corresponding to the minute hand area may be determined, so as to search for the color parameters corresponding to the minute hand area through the path index.
[0144] S304: Searching for the color parameter of the area in the original packaged data according to the path index.
[0145] The original packaged data is the compressed and packaged data of the instruction set corresponding to the dial in the SVG format, and the data includes the color parameters of each closed area in the SVG image.
[0146] Exemplarily, after determining the path index corresponding to the minute hand area, the color parameter corresponding to the minute hand area can be searched in the original packaged data according to the path index to modify the color parameter, for example, changing the color parameter from gray to white to change the color of the minute hand L1 from gray to white.
[0147] S305: Modify the color parameters of the area to re-color the area.
[0148] For example, after finding the color parameter of the minute hand L1, the color parameter can be changed to white. Then the GPU of the sports watch 100B renders the color of the minute hand L1 to white according to the modified color parameter. In this way, the color of the minute hand L1 can be modified.
[0149] S306: Displaying the re-dyed dial.
[0150] Exemplarily, as shown in FIG. 11 , after the minute hand of the sports watch is re-rendered in white, the sports watch may display the re-colored dial.
[0151] In the embodiment of the present application, after the electronic device displays a vector image, the color of the vector image can be changed. Compared with a non-vector image, when changing the color of a vector image, it is not necessary to traverse each pixel point of the area whose color is to be changed, but only to modify the color parameters of the area to be changed, and its power consumption is low. In this way, for electronic devices with lower performance, such as sports watches, customized modification of the display screen can also be achieved to meet more user needs and improve the user experience.
[0152] exist Fig.10 In the embodiment described above, the user changes the dial color of the sports watch 100B on the sports watch 100B. In other embodiments, the user can also change the dial color of the sports watch 100B through the mobile phone 200.
[0153] For example, Fig. 11BAs shown, the sports watch interface 20 of the mobile phone 200 displays a picture A1 of the sports watch 100B. According to the picture A1, the sports watch currently uses the dial H1. When the user performs long press, double click, single click and other operations on the minute hand L1 on the dial H1 displayed in the picture A1, the mobile phone 200 can display the setting interface F3. The setting interface F3 includes setting items such as color and size. When the user clicks the color button 18, the mobile phone 200 can display the color setting interface F4, and the color setting interface F4 includes various color options, such as white, green, red, etc. When the user clicks the white button 19, the mobile phone 200 can receive the dial setting instruction to set the minute hand L1 to white, and according to the instruction, the color parameter of the minute hand L1 in the instruction set of the dial H1 is modified to white. Then, the mobile phone 200 can send the modified instruction set to the sports watch 100B. After receiving the instruction set, the sports watch 100B displays the dial H1 with the pointer L1 as white based on the instruction set.
[0154] In the scenario where the sports watch 100B displays a dial in SVG format, the user can not only change the color of the dial, but also make other customized settings for the dial, such as enlarging or reducing the elements in the dial. It should be noted that the size of the elements in the dial can be set (enlarged or reduced) in the same way as the color setting, or in other ways. For example, the user can directly change the size of an element on the dial by scaling the element. The size setting method is introduced below.
[0155] Fig.12 This is an example flowchart of the SVG image scaling process provided in an embodiment of the present application.
[0156] like Fig.12 As shown, the process includes the following steps:
[0157] S401: A zooming operation on a target element in a dial is detected.
[0158] The target element is the element in the dial to be zoomed in and out, and the element may include a pointer, a number, a text, a symbol, etc. The zooming operation includes a zoom-in operation and a zoom-out operation.
[0159] For ease of understanding, the following description will be given by taking the sports watch 100B as an example.
[0160] For example, Fig.13As shown, the sports watch 100B currently displays the digital dial H3. The digital dial H3 includes the element L2 (as an example of the target primary color), and the element L2 can be an SVG picture corresponding to the digital time (such as "10:01"). When the user zooms in on the element L2 with a zoom-in gesture, the sports watch 100B can detect the user's zoom-in operation on the element L2.
[0161] S402: Based on the scaling operation, determine the size parameters of the target element after scaling.
[0162] For example, when the sports watch 100B detects the user's zoom operation on the element L2, the sports watch 100B can determine the size parameter of the enlarged element L2 based on the sliding distance between the two fingers of the user. It can be understood that the larger the sliding distance, the larger the enlarged size of the element L2, and the smaller the sliding distance, the smaller the enlarged size of the element L2.
[0163] S403: Based on the scaled size parameter of the target element, modify the size parameter of the target element in the instruction set to obtain a modified instruction set.
[0164] Exemplarily, after the sports watch 100B determines the size parameters of the enlarged element L2, the size parameters of the element L2 in the instruction set corresponding to the dial H3 can be modified to the size parameters determined based on the enlargement operation to obtain a modified instruction set.
[0165] S404: Displaying the scaled target element based on the modified instruction set.
[0166] For example, Fig.13 As shown, after the sports watch 100B modifies the size parameters of the element L2 in the instruction set corresponding to the dial H3 and obtains the modified instruction set, the enlarged element L2 can be displayed according to the modified instruction set.
[0167] In the embodiment of the present application, since the vector image will not be distorted when it is enlarged, when the user enlarges the digital time displayed on the dial, the digital time can maintain its original clarity and will not become blurred due to the enlargement.
[0168] The electronic devices of the present application (eg, smart watches, sports watches, etc.) can also display non-vector images. Fig.14 This is an example diagram of the non-vector image display process provided in the embodiment of the present application. Fig.14 As shown, the process includes the following steps:
[0169] S501: Download non-vector images.
[0170] The following description is given by taking a smart watch as an example.
[0171] When the smart watch needs to display non-vector images, the smart watch can download non-vector images such as BMP images and PNG images from the Internet.
[0172] S502: Calling a compression algorithm.
[0173] After the smart watch downloads the non-vector image, it can call an image compression algorithm such as run-length encoding (RLE) or new encoder one (NEO) to subsequently compress the non-vector image.
[0174] S503: Pack and compress.
[0175] Smart watches can use image compression algorithms to package and compress non-vector images to save storage space.
[0176] S504: Decompress for use.
[0177] When the smart watch displays a non-vector image, the packaged non-vector image can be decompressed and displayed after the decompression is completed.
[0178] In the embodiment of the present application, although the non-vector image is compressed when it is used, the volume after compression is still relatively large, and there is still a certain storage pressure for devices with small storage space. However, the volume of the vector image is small, and the corresponding instruction set is obtained after parameter extraction and instruction conversion of the vector image. Storing the vector image in the form of an instruction set can further reduce the volume, thereby reducing the storage pressure. In addition, the vector image will not be distorted when it is scaled, which can ensure the clarity of the display screen and improve the user experience.
[0179] Fig.154 is a block diagram of an electronic device 400 according to an embodiment of the present application. The electronic device 400 may be a sports watch, a smart watch, a mobile phone, etc. mentioned in the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. The one or more processors 401 may include an AP chip and an MCU chip mentioned in the present application. For at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-branch bus such as a front side bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 406. The processor 401 executes instructions that control general types of data processing operations. In one embodiment, the controller hub 403 includes, but is not limited to, a graphics memory controller hub (Graphics & Memory Controller Hub, GMCH) (not shown) and an input / output hub (Input Output Hub, IOH) (which may be on a separate chip) (not shown), wherein the GMCH includes a memory and a graphics controller and is coupled to the IOH.
[0180] The electronic device 400 may also include a coprocessor 402 and a memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and the GMCH may be integrated within the processor (as described in this application), with the memory 404 and the coprocessor 402 being directly coupled to the processor 401 and the controller hub 403, with the controller hub 403 being in a single chip with the IOH.
[0181] The memory 404 may be, for example, a dynamic random access memory (DRAM), a phase change memory (PCM), or a combination of the two. The memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the electronic device 400 to implement the following: Figure 4 , Figure 7 , Fig.10 , Fig.14 When the instructions are executed on a computer, the computer executes the vector image display method disclosed in the embodiment of the present application.
[0182] In one embodiment, the coprocessor 402 is a special-purpose processor, such as, for example, a high-throughput Many Integrated Core (MIC) processor, a network or communication processor, a compression engine, a GPU, a general-purpose computing on graphics processing units (GPGPU), or an embedded processor. The optional nature of the coprocessor 402 is indicated by a dashed line in FIG. Fig.15 middle.
[0183] In one embodiment, the electronic device 400 may further include a network interface (Network Interface Controller, NIC) 406. The network interface 406 may include a transceiver for providing a radio interface for the electronic device 400, and then communicating with any other suitable device (such as a front-end module, an antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of the electronic device 400. The network interface 406 may implement the functions of the communication unit in the above-mentioned embodiments.
[0184] The electronic device 400 may further include an input / output (I / O) 405. The I / O 405 may include: a user interface designed to enable a user to interact with the electronic device 400; a peripheral component interface designed to enable peripheral components to interact with the electronic device 400; and / or a sensor designed to determine environmental conditions and / or location information related to the electronic device 400.
[0185] It is worth noting that Fig.15 This is for illustrative purposes only. Fig.15 It is shown that the electronic device 400 includes multiple devices such as a processor 401, a controller hub 403, a memory 404, etc.; however, in actual applications, the device using the methods of the present application may include only a portion of the devices in the electronic device 400, for example, it may include only the processor 401 and the network interface 406. Fig.15 The properties of optional devices are shown with dotted lines.
[0186] Fig.16 FIG. 1 is a block diagram of a system on chip (SoC) 500 according to an embodiment of the present application. Fig.16 In the FIG, similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SoCs. Fig.16In the embodiment, SoC 500 includes: an interconnect unit 550 coupled to processor 510; a system agent unit 580; a bus controller unit 590; an integrated memory controller unit 540; a group or one or more coprocessors 520, which may include integrated graphics logic, image processors, audio processors, and video processors; a static random access memory (SRAM) unit 530; and a direct memory access (DMA) unit 560. In one embodiment, coprocessor 520 includes a special-purpose processor, such as, for example, a network or communication processor, a compression engine, general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor.
[0187] Static random access memory (SRAM) unit 530 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, and more specifically, stores temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the SoC to implement the following: Figure 4 , Figure 7 , Fig.10 , Fig.14 When the instructions are executed on a computer, the computer executes the vector image display method disclosed in the embodiment of the present application.
[0188] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in this embodiment, the value of each data range includes the end value. For example, A=10-50 means that A can be 10 or 50.
[0189] Each method implementation mode of the present application can be implemented in the form of software, magnetic components, firmware, etc.
[0190] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0191] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0192] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logics in a processor, and when the instructions are read by a machine, the machine makes logic for performing the techniques described herein. These representations, known as "Intellectual Property (IP) cores," may be stored on tangible computer-readable storage media and provided to multiple customers or production facilities to be loaded into a manufacturing machine that actually manufactures the logic or processor.
[0193] In some cases, the instruction converter can be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter can transform (e.g., using static binary transformation, dynamic binary transformation including dynamic compilation), deform, simulate, or otherwise convert instructions into one or more other instructions to be processed by the core. The instruction converter can be implemented in software, hardware, firmware, or a combination thereof. The instruction converter can be on the processor, outside the processor, or partially on the processor and partially outside the processor.
Claims
1. A vector image display method, used in electronic equipment, characterized in that: The electronic device includes a first chip and a second chip, and the method includes: Downloading first vector picture data of a first vector picture to be displayed; Using the first chip to parse and process the first vector picture data to obtain a first instruction set, wherein the first instruction set is used to describe the first vector picture; Using the second chip to draw the first vector picture based on instructions in the first instruction set, wherein the computing performance of the second chip is lower than the computing performance of the first chip; The first vector image is displayed.
2. The method according to claim 1, characterized in that The using the first chip to parse and process the data of the first vector image to obtain a first instruction set includes: Using the first chip to extract parameters of the first vector picture from the first vector picture data to obtain a first parameter set; The first chip is used to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set.
3. The method according to claim 2, characterized in that The first instruction set includes curve instructions; and The using the first chip to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set includes: The graphic outline parameters in the first parameter set are converted into the curve instructions using the first chip, and the curve instructions are used to describe the graphic outline of the first vector picture in the form of a curve.
4. The method according to claim 2, characterized in that: The first instruction set includes point set instructions; and The using the first chip to perform instruction conversion processing on the parameters in the first parameter set to obtain the first instruction set includes: The graphic outline parameters in the first parameter set are converted into the point set instruction using the first chip, and the point set instruction set is used to describe the graphic outline of the first vector picture in the form of a set of coordinate points.
5. The method according to claim 1, characterized in that The method further comprises: receiving a first operation for the first vector picture, where the first operation is used to change the first vector picture; Based on the first operation, modify the parameters of the first vector picture in the first instruction set to obtain a modified first vector picture; The modified first vector picture is displayed.
6. The method according to claim 1, characterized in that The first chip includes an application processor AP chip, and the second chip includes a microcontroller unit MCU chip.
7. A vector image display method, used in a first electronic device, characterized in that: The method comprises: Downloading second vector picture data of a second vector picture to be displayed; Parsing the second vector picture data to obtain a second instruction set, wherein the second instruction set is used to instruct the second electronic device to draw the second vector picture; The performance of the second electronic device is lower than the performance of the first electronic device.
8. The method according to claim 7, characterized in that The parsing and processing the second vector picture data of the second vector picture to obtain a second instruction set includes: Extracting parameters of the second vector picture from the second vector picture data to obtain a second parameter set; Perform instruction conversion processing on the parameters in the second parameter set to obtain the second instruction set.
9. The method according to claim 8, characterized in that The second instruction set includes curve instructions; and Performing instruction conversion processing on the parameters in the second parameter set to obtain the second instruction set includes: The graphic outline parameters in the second parameter set are converted into the curve instructions, where the curve instructions are used to describe the graphic outline of the second vector picture in the form of a curve.
10. The method according to claim 8, characterized in that The second instruction set includes point set instructions; and Performing instruction conversion processing on the parameters in the second parameter set to obtain the second instruction set includes: The graphic outline parameters in the second parameter set are converted into the point set instruction, where the point set instruction set is used to describe the graphic outline of the second vector picture in the form of a set of coordinate points.
11. The method according to claim 7, characterized in that The first electronic device includes an AP chip or a central processing unit CPU chip.
12. A vector image display method, used in a second electronic device, characterized in that: The method comprises: receiving a third instruction set of a third vector picture, wherein the third instruction set is used to describe the third vector picture; Based on the instructions in the third instruction set, display the third vector picture; In response to receiving a second operation directed to the third vector picture, modifying the third vector picture according to the second operation; The modified third vector picture is displayed.
13. The method according to claim 12, characterized in that The step corresponding to receiving a second operation directed to the third vector image, changing the third vector image according to the second operation includes: Based on the second operation, modify the parameters of the third vector picture in the third instruction set to obtain the modified third vector picture; The modified third vector picture is displayed.
14. An electronic device, characterized in that: include: A memory, a first chip and a second chip; wherein, The memory is used to store instructions executed by the first chip and the second chip; The first chip and the second chip are used to enable the electronic device to execute the picture generation method according to any one of claims 1 to 6 when executing the instructions in the memory.
15. An electronic device, characterized in that: include: Memory and chips; among them, The memory is used to store instructions executed by the chip; The chip is used to execute the picture generation method according to any one of claims 7 to 11 when executing the instructions in the memory.
16. An electronic device, characterized in that: include: Memory and chips; among them, The memory is used to store instructions executed by the chip; The chip is used to execute the image generation method according to any one of claims 12 to 13 when executing the instructions in the memory.
17. A picture display system, characterized in that: The system comprises a first electronic device and a second electronic device, wherein the first electronic device executes the methods of claims 7 to 11, and the second electronic device is used to execute the methods of claims 12 to 13.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the vector picture display method described in any one of claims 1 to 6, claims 7 to 11, or claims 12 to 13.