CN115145436A - Icon processing method and electronic equipment - Google Patents

Icon processing method and electronic equipment Download PDF

Info

Publication number
CN115145436A
CN115145436A CN202110346370.0A CN202110346370A CN115145436A CN 115145436 A CN115145436 A CN 115145436A CN 202110346370 A CN202110346370 A CN 202110346370A CN 115145436 A CN115145436 A CN 115145436A
Authority
CN
China
Prior art keywords
icon
vector diagram
line
electronic device
weight
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110346370.0A
Other languages
Chinese (zh)
Other versions
CN115145436B (en
Inventor
刘爱兵
罗义
陈翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110346370.0A priority Critical patent/CN115145436B/en
Priority claimed from CN202110346370.0A external-priority patent/CN115145436B/en
Publication of CN115145436A publication Critical patent/CN115145436A/en
Application granted granted Critical
Publication of CN115145436B publication Critical patent/CN115145436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Abstract

The application discloses an icon processing method and electronic equipment, which are used for solving the problem of split display appearance caused by the fact that the thickness degree of an icon line in a display interface is not consistent with the thickness degree of a text font. The method comprises the step that when the electronic equipment detects that the font weight of the current text is the first font weight, the lines of the first icon correspondingly display the first thickness degree. The displayed line is a first icon with a first thickness degree, and the line is generated by the electronic equipment according to the first word weight, the first icon with the thinnest line and the first icon with the thickest line. The thickness degree presented by the line of the displayed first icon is positively correlated with the font thickness degree of the current text. By implementing the method, the system can enable the icon to be generated in a richer way based on different character weights, the display effect of the icon is more flexible and attractive, the display effects of the character style and the icon are more uniform and harmonious, the interface display effect is improved, and the impression experience of a user is better.

Description

Icon processing method and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an icon processing method and an electronic device.
Background
During the operation of the terminal devices such as mobile phones and computers, various elements such as characters, backgrounds and icons are displayed on the display interface, wherein the icons can be function identification controls such as home page icons, return icons and bluetooth icons indicating corresponding functions.
Generally, according to usage requirements, a user may set some elements displayed on a display interface to present different display effects, such as personalized setting on font size, font thickness, font type, font color, and the like. However, the same icon is often displayed in a fixed image or shape, and does not support variable icons. Especially, when the characters and the icons are adjacent, the characters and the icons have only one display effect under the condition that the fonts can be adjusted, so that the icons are not beautiful and flexible enough to be displayed, and the user experience is not good.
Disclosure of Invention
The application provides an icon processing method and related electronic equipment, which are used for solving the problem of split display appearance caused by the fact that the thickness degree of an icon line is inconsistent with the thickness degree of a text font in a display interface of the electronic equipment.
The above and other objects are achieved by the features of the independent claims. Further implementations are presented in the dependent claims, the description and the drawings.
In a first aspect, an embodiment of the present application provides an icon processing method, where the method may include:
the electronic equipment displays the text, and the word weight of the text is the first word weight, wherein the word weight represents the degree of the font weight. The electronic equipment displays a first vector diagram of the first icon, a line of the first icon presents a first thickness degree in the first vector diagram, and the thickness degree presented by the line of the first icon in the vector diagram is positively correlated with the thickness degree of a font represented by the character repetition.
The electronic device detects a first operation of changing the word weight. The electronic device displays the text with the word weight of the text being the second word weight. The electronic device displays a second vector map of the first icon, the line of the first icon presenting a second degree of thickness in the second vector map.
The second depth level is finer than the first depth level if the second weight is less than the first weight. The second level of coarseness is coarser than the first level of coarseness if the second word is more significant than the first word.
By implementing the method of the first aspect, the electronic device can support the icon to automatically generate the variable models with different thickness degrees on the basis of the same line profile based on different character weights, the thickness degrees of the character and the icon are more consistent, the display effect is more uniform and harmonious, the interface display effect is improved, and the user experience is better.
In some embodiments, when the word weight of the text is a first word weight, the first icon is displayed as a first vector diagram. When the character weight of the text is the second character weight, the first icon is displayed as a second vector diagram.
In combination with the first aspect, in some embodiments, the first vector diagram is obtained by the electronic device according to the first word weight, the third vector diagram of the first icon, and the fourth vector diagram of the first icon, wherein a thickness degree of a line of the first icon appearing in the first vector diagram is greater than or equal to a thickness degree of a line of the first icon appearing in the third vector diagram, and a thickness degree of a line of the first icon appearing in the fourth vector diagram is less than or equal to the thickness degree of the line of the first icon. The second vector diagram is obtained by the electronic equipment according to the second word weight, the third vector diagram of the first icon and the fourth vector diagram of the first icon, wherein the thickness degree of the line of the first icon presented in the second vector diagram is larger than or equal to that of the line of the first icon presented in the third vector diagram, and the thickness degree of the line of the first icon presented in the fourth vector diagram is smaller than or equal to that of the line of the first icon.
With reference to the first aspect, in some embodiments, the word weight of the text includes a third word weight and a fourth word weight, and a degree of a font weight represented by the first word weight or the second word weight is greater than or equal to a thickness degree represented by the third word weight and less than or equal to a thickness degree represented by the fourth word weight.
In some embodiments, when the word weight of the text is a third word weight, the first icon is displayed as a third vector image. When the character weight of the text is a fourth character weight, the first icon is displayed as a fourth vector diagram.
With reference to the first aspect, in some embodiments, the first vector diagram includes a first path, the second vector diagram includes a second path, the third vector diagram includes a third path, and the fourth vector diagram includes a fourth path, where the first path, the second path, the third path, and the fourth path correspond to a same line in the first icon, the first path is calculated by the electronic device according to the first word weight, the third path, and the fourth path, and the second path is calculated by the electronic device according to the second word weight, the third path, and the fourth path.
In some embodiments in combination with the first aspect, the electronic device displays a user interface, the user interface including a status bar having first text for indicating the mobile operator and a first vector map of a first icon for indicating a wireless communication signal strength, the first text having a first font weight, a line of the first icon presenting a first degree of coarseness in the first vector map. After the electronic equipment detects the first operation of changing the word weight, the electronic equipment displays another user interface, the user interface comprises a status bar, second text used for indicating the mobile operator and a second vector diagram of a first icon used for indicating the strength of the wireless communication signal are displayed in the status bar, the word weight of the second text is the second word weight, and a line of the first icon presents a second thickness degree in the second vector diagram.
In a second aspect, an embodiment of the present application provides an electronic device, which may include: a communication device, a display screen, a memory, and a processor coupled to the memory, a plurality of applications, and one or more programs. The memory has stored therein computer-executable instructions that, when executed by the processor, enable the electronic device to carry out any of the functions of the electronic device as in the method of the first aspect.
In a third aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored in the storage medium, where the computer program includes executable instructions, and when the executable instructions are executed by a processor, the processor is caused to perform operations corresponding to the method provided in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product, which, when run on an electronic device, causes the electronic device to perform any one of the possible implementation manners as in the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip system, where the chip system may be applied to an electronic device, and the chip includes one or more processors, where the processors are configured to invoke computer instructions to enable the electronic device to implement any implementation manner as in the first aspect.
By implementing the method provided by the application, the electronic equipment can support the icon to automatically generate the variable shapes with different thickness degrees on the basis of the same line profile based on different character weights, the display effect of the icon is more flexible and attractive, the display effects of the font and the icon are more uniform and harmonious, the interface display effect is improved, the better visual display is achieved, the browsing habit of the user is better met, and the impression experience of the user is further improved.
Drawings
Fig. 1 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating a software architecture according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a technical solution provided in an embodiment of the present application;
FIG. 4 is a schematic illustration of an embodiment of the present application;
FIG. 5 is a schematic view of a user interface provided by an embodiment of the present application;
FIG. 6 is a schematic view of a user interface provided by an embodiment of the present application;
FIG. 7 is a schematic view of a user interface provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a user interface provided by an embodiment of the present application;
FIG. 9 is a schematic diagram of a user interface provided by an embodiment of the present application;
fig. 10 is a flowchart of an icon processing method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; the "and/or" in the text is only an association relation describing the association object, and indicates that three relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature and, in addition, in the description of embodiments of the present application, "plurality" means two or more than two.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for performing interaction and information exchange between an Application (APP) or an Operating System (OS) and a user, and it implements conversion between an internal form of information and a form acceptable to the user. The user interface is source code written by java, extensible markup language (XML) and other specific computer languages, and the interface source code is analyzed and rendered on the electronic device and finally presented as content which can be identified by the user. A common presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc. displayed in the display of the electronic device.
The term "font (typeface)" in the embodiments of the present application refers to a set consisting of one or more fonts (font), each composed of glyphs (glyphs) having common design features, each font containing common design elements.
A font refers to the form of a single character (letter, chinese character, symbol, number, etc.).
The font refers to a set of fonts with the same style and size (size), such as '12 # conventional Song font character'. Each font type of a font may have a specific font height (height), font weight (weight), font width (width), style (style), slant (slope), italics (italicization), decoration (organization), etc. The character height represents the height degree of the character form, the character weight represents the thickness degree of the character form, and the character width represents the width degree of the character form.
Font design types may include dot matrix words/bitmap words, vector words/vector words, and the like.
The variable font is a font containing a plurality of fonts, supports automatic generation of rich variable shapes on the basis of an initial font outline, enables a user to freely adjust the appearance of the fonts in one or more dimensions, such as the weight, height and width of the fonts, realizes stepless adjustment in each dimension, and can superpose the variable effects of the dimensions, so that the font has a more free variable space, different requirements of different users on display effects can be met, and browsing habits of different users are better met.
In one example, for a conventional standard font library, the more common font character recombination method can have six character weights of thin font thin, thin font light, standard regular font, semi-bold font, bold font and thick font, and exist in the form of six independent font libraries. If each file organizes fonts according to the GB18030-2000 standard, the font file size corresponding to each character weight is more than 8MB, and the total font file size corresponding to 6 character weights is close to 50MB. However, a variable font supporting the change of the word weight axis can provide 800 word weights by only one font file, and the file size is about 20MB under the condition of meeting the coding standard of GB 18030-2000. Thus, variable fonts not only have a space for variation that is much larger than conventional fonts, but also have a file size that is much smaller than that of conventional fonts. Variable fonts allow more font changes while saving more storage space than conventional fonts.
The term "icon" in the embodiments of the present application refers to a mark having an indicating function, and has the characteristics of being highly condensed and capable of quickly conveying information, being easily recognized and being easily memorized. The display of characters may be assisted. Icons are typically presented in the form of images or graphics in the display interface of an electronic device, which may be represented as pictures, graphics, or other objects, and have a standard set of size and attribute formats, and are typically small in size. The display effect of the icon can be changed by changing the color, saturation, transparency, etc. of the icon.
The icon helps a user to quickly identify an object, quickly access an object or quickly execute a command, the icon can be used for indicating a file, a program, a state, a webpage or a command, and the like, for example, for a bluetooth (bluetooth) icon in a toolbar of a mobile phone, the user can quickly identify that the icon corresponds to an indication bluetooth function when seeing the bluetooth icon, and the user can click the bluetooth icon to perform an operation of quickly opening or closing the bluetooth function. The icon attribute types may include color, size, transparency, shadow, and the like, and the parameters of the corresponding icon attribute types are color value (such as RGB), icon size value, transparency value, shadow effect identifier, and the like.
The icon design types may include pixel (pixel) icons, vector (vector) icons, and the like.
The pixel icon, which may also be called bitmap icon or dot matrix icon, uses a dot matrix/bitmap as an icon, and the dot matrix is a pixel array image formed by arranging a plurality of pixel points, and has rich color gradation expression and distortion in scaling. When an editing operation is performed on the bitmap, the operable object is each pixel. The storage format of the lattice map may be a Graphics Interchange Format (GIF), a Portable Network Graphics (PNG) format, or the like.
Vector icons, which may also be referred to as vector icons, are icons using vector graphics, which are images generated by mathematical vector rendering, which are images depicting graphic contents using geometric characteristics such as points, lines, curves, polygons, circles, and the like, and have a characteristic of being undistorted in scaling. The storage format of the vector graph may be a Scalable Vector Graphics (SVG) format or the like. SVG is a markup language that describes two-dimensional vector graphics based on XML.
The vector icon may be composed of one or more elements, and the basic shape elements predefined in the SVG standard include: rectangle rect, circle, ellipse, straight line, polygonal line, polygon, path, etc.
To briefly mention a few examples:
rectangle rect, the rectangle is defined by specifying the upper left corner coordinates (x, y), the length and width (width, height) of the rectangle, and the fillet radius length (rx, ry).
A straight line, which is defined by specifying a start point (x 1, y 1), an end point (x 2, y 2) and a width stroke, is exemplified by the syntax as follows: < line x1= "127" y1= "65" x2= "127" y2= "200" style = "stroke: rgb (0, 0); stroke-width:2"/>. If a very thin line is desired, the stroke-width can be specified to be a value greater than 0 and less than 1.
A circle is defined, and coordinates (cx, cy) of the center of the circle and a radius r are specified, wherein the grammar example is as follows: < circle cx = "143" cy = "163" r = "84" style = "file: rgb (192, 192, 255); stroke: rgb (0, 128); stroke-width:1"/>.
Ellipse ellipsose, defining an ellipse, and similar to defining a circle, can specify the center (cx, cy) and the X, Y-axis radius (rx, ry) of the ellipse, and the syntax example is as follows: < ellipse cx = "160" cy = "163" rx = "101" ry = "81" style = "fill: rgb (192, 192, 255); stroke: rgb (0, 128); stroke-width:1"/>.
Polyline, which is defined by connecting the coordinates of each point, and the syntax is exemplified as follows: < polyline points = "100, 200,20, 10, 200, 20" style = "stroke: rgb (64, 64, 64); stroke-width:1"/>.
Polygon, which is defined by specifying the coordinates of successive points that eventually close to form a polygon. An example syntax is as follows: < polygon points = "250, 250 297, 284 279, 340" style = "fill: rgb (126, 14, 83); stroke: rgb (0, 128); stroke-width:1"/>.
Path path, which is used to define more complex shapes, which may be closed or non-closed geometric shapes, is the most complex and most useful drawing command in SVG. A path node definition may contain several small paths, each of which represents a geometric shape, such as a straight line, a curved line, etc., and the path segments defined in a path node are substantially independent of each other. An example syntax is as follows: < path d = "M10 20L110 120 L10" style = "file: rgb (0, 22) "/>. The d attribute of the < path > tag is used to describe the path data to be defined below, M10 denotes that the brush is moved to the point 10, 20, L110 20 denotes that a line is drawn from the current point to the coordinates 110, 20, etc.
Several commands commonly used in path include: an M command, (Mx, y), indicating that the brush is moved to a specified coordinate position (x, y); an L command, (L x, y), indicating drawing a straight line to a specified coordinate position (x, y); an H command, (Hx), indicating that a horizontal line is drawn to the specified x coordinate position; a V command, (Vy), indicating that a vertical line is drawn to the specified y-coordinate position; a command C, (C x1, y1, x2, y2, endx, endy), a cubic Bezier curve, (x 1, y 1), (x 2, y 2) are two control points of the curve, and (endx, endy) are end points of the curve; a Q command, (Q x, y, endx, endy), a quadratic Bezier curve, (x, y) is a control point of the curve, and (endx, endy) is an end point of the curve; a Z command is used for closing the path and connecting the end point and the starting point; and so on.
To take another example of a cubic bezier curve, < path d = "M50,70c50,20, 200,20 200" >, which means that a curve is drawn from the starting point (50, 70) to the point (200, 70), and (50, 20), (200, 70) are two control points. The first control point (50, 20) controls the angle between the start of the curve and the horizontal line, called the start control point, which is actually determined by the coordinates of the start point defined by M and the angle between the horizontal line and a straight line drawn by the coordinate point defined by the first control point, which can be regarded as a tangent at the start of the curve. Similarly, the direction of the end point of the curve is determined by the angle formed by the horizontal line and a straight line drawn by the coordinates of the end point (200, 70) and the second control point (200, 20) (which can be regarded as a tangent line at the end point of the curve).
Since the path tag can combine multiple commands, more complex shapes can be generated.
In addition, the style of the appearance may also be defined using style sheet attributes, such as fill color fill, edge color store, edge thickness store-width, transparency option, fill color transparency fill-option, stroke color transparency stroke-option, and so on, which are not described herein again.
On terminal equipment such as mobile phones and computers, application scenes of variable fonts are gradually enriched, and a user can set the fonts displayed on a display interface on the terminal according to requirements, adjust the sizes, thicknesses, types and the like of the fonts and enable the fonts to present different display effects. However, the same icon is often displayed in a fixed image or shape, and does not support variable icons. Particularly, on the interface adjacent to the characters and the icons, under the condition that the fonts can be adjusted, if the icons only have one display effect, the icons are not beautiful and flexible enough to be displayed, and the user experience is not good.
To address the above issues, variable icons are implemented, and in one implementation, the solution of iconFont can be used that can call icons in text form, supporting adjustment of icon size, but not icon thickness. In another implementation, a solution of SF Symbol may be used, where 27 variants are stored for each icon, that is, three size categories, and each size category is further divided into 9 thickness categories, the solution only enables the icon to be changed in the 9 thickness categories, and stepless adjustment of the icon cannot be achieved, and each icon needs to store data of the 27 variants, and the occupied space is relatively large.
The embodiment of the application provides an icon processing method and electronic equipment, and is used for solving the problem of split display appearance caused by the fact that the thickness degree of an icon line is inconsistent with the thickness degree of a text font in a display interface of the electronic equipment. According to the method, when the electronic equipment detects that the font weight of the current text is the first font weight, the lines of the first icon correspondingly display the first thickness degree. The displayed line is a first icon with a first thickness degree, and the electronic equipment generates the first icon according to the vector diagram data of the first icon with the first character weight and the thinnest line and the vector diagram data of the first icon with the thickest line. The thickness degree presented by the line of the displayed first icon is positively correlated with the font thickness degree of the current text.
According to the scheme provided by the embodiment of the application, the system can support the icons to automatically generate the variable shapes with different thickness degrees on the basis of the same line profile based on different character weights, the display effect of the icons is more flexible and attractive, the display effects of the characters and the icons can be more uniform and harmonious, the interface display effect is improved, more optimal visual display is achieved, the browsing habits of users are better met, and the impression experience of the users is further improved.
The following describes an exemplary structure of an electronic device provided in an embodiment of the present application.
The exemplary electronic device 100 provided in the embodiments of the present application may include, but is not limited to, a mobile phone, a notebook computer, a desktop computer, a tablet computer, or other types of electronic devices, such as a desktop computer, a laptop computer, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, an internet of things (IOT) device, a vehicle-mounted device, a game console, a smart watch, a smart bracelet, or other smart wearable device, and the like, and may further include an internet of things (IOT) device and/or a smart home device and/or a smart city device, such as a smart home, a smart light fixture, a smart air conditioner, a water heater, and the like. The embodiment of the present application does not set any limit to the specific type of the electronic device 100. In this embodiment, the terminal device may also be referred to as a terminal for short, and the terminal device is generally an intelligent electronic device that can provide a user interface, interact with a user, and provide a service function for the user.
Can be mounted on the electronic device 100
Figure BDA0003000947940000061
The system,
Figure BDA0003000947940000062
The system,
Figure BDA0003000947940000063
The system,
Figure BDA0003000947940000064
A system (harmony os, HOS) or other type of operating system, which is not limited in this application.
Fig. 1 is a schematic hardware structure diagram of an electronic device 100 according to an embodiment of the present disclosure.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, a charger, a flash, a camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display screen 194, the camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the method can also be used for connecting a headset and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory has the characteristics of high reading/writing speed and volatility. Volatile means that upon power down, the data stored in the RAM will subsequently disappear. In general, the ram has a very low static power consumption and a relatively large operating power consumption.
The nonvolatile memory has nonvolatile and stable storage data. The nonvolatile property means that after power is off, the stored data can not disappear, and the data can be stored for a long time after power is off.
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like.
The nonvolatile memory may include a magnetic disk storage (magnetic disk storage), a flash memory (flash memory), and the like.
The magnetic disk storage device is a storage device using a magnetic disk as a storage medium, and has the characteristics of large storage capacity, high data transmission rate, long-term storage of stored data and the like.
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, may include single-level cells (SLC), multi-level cells (MLC), three-level cells (TLC), four-level cells (QLC), etc. according to the level order of the memory cell, and may include universal FLASH memory (UFS), embedded multimedia memory cards (eMMC), etc. according to the storage specification.
The random access memory may be read directly by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other programs that are running, and may also be used to store data for user and application programs, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect an external nonvolatile memory to extend the storage capability of the electronic device 100. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. When the electronic apparatus 100 receives a call or voice information, it is possible to receive voice by placing the receiver 170B close to the human ear.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can input a voice signal to the microphone 170C by uttering a voice signal close to the microphone 170C through the mouth of the user. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to unlock a fingerprint, access an application lock, photograph a fingerprint, answer an incoming call with a fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M can acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human voice vibrating a bone mass. The bone conduction sensor 180M may also contact the human body pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so that the heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the invention adopts a layered architecture
Figure BDA0003000947940000131
The system exemplifies a software structure of the electronic device 100.
Fig. 2 is a block diagram of the software configuration of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the method can be used for
Figure BDA0003000947940000132
The system is divided into four layers, namely an application program layer, an application program framework layer and an android runtime from top to bottom (
Figure BDA0003000947940000133
runtime) and system libraries, and kernel layer.
The application layer may include a series of application packages.
As shown in fig. 2, the application packages may include camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, settings, etc. applications. The setting application can set the size, thickness, etc. of the font.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. Such data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
Figure BDA0003000947940000134
The Runtime comprises a core library and a virtual machine.
Figure BDA0003000947940000135
runtime is responsible for the scheduling and management of the android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
The above description of the software architecture of the electronic device 100 is only an example, and it should be understood that the software architecture illustrated in the embodiment of the present invention is not specifically limited to the present application. In other embodiments of the present application, the software architecture of electronic device 100 may include more or fewer modules than shown, or combine certain modules, or split certain modules, or a different architectural arrangement. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
A technical implementation scheme provided by the embodiment of the present application is described below.
The embodiment is to mount
Figure BDA0003000947940000141
The electronic device 100 of the system is illustrated as an example. It should be understood that this embodiment does not limit any other embodiments of the present application, and in other embodiments of the present application, the electronic device 100 may also be equipped with other operating systems, and the implementation may be different. But based on the same inventive idea, only the different implementations of the solution should fall within the protection scope of the present application. The flow of steps of the scheme refers to fig. 3.
The method comprises the following steps: the electronic device 100 parses the vector graphics data for the first icon with the finest line and the vector graphics data for the coarsest line.
In the present embodiment, two kinds of thick and thin vector graphics can be designed for each icon. Here, the first icon is described as an example. The electronic device 100 may store two vector graphics designed by the developer/designer for the first icon, one vector graphic having thinner lines and the other vector graphic having thicker lines. The electronic device 100 regards the vector diagram with the thinner line as the vector diagram corresponding to the first icon with the thinnest line, which is referred to as the thinnest vector diagram for short hereinafter, and regards the vector diagram with the thicker line as the vector diagram corresponding to the first icon with the thickest line, which is referred to as the thickest vector diagram for short hereinafter.
The file format of the finest vector diagram and the coarsest vector diagram can be SVG format. The production tool of the SVG file can comprise Adobe Illustrator software and the like. For SVG, reference may be made to the foregoing description and no further description is provided herein.
SVG is a set of grammatical specifications used by the front end, which is data described by vectors. In that
Figure BDA0003000947940000142
In the system, in order to improve the loading efficiency of vector graphics data, path data in the SVG grammar needs to be extracted, then data is reconstructed, and the data is converted into a vector format to generate a specific label.
Since for vector data, the vector diagram can be changed and scaled without distortion as long as the vector data is effectively modified. Therefore, in this embodiment, the vector data may be modified based on the data of the finest vector diagram and the coarsest vector diagram, and an icon having a line thickness degree between the finest line and the thickest line represented by the finest vector diagram and the coarsest vector diagram may be generated.
In one example, as shown in fig. 4, for a plus add icon, (a) is the vector diagram with the thinnest lines, and (b) is the vector diagram with the thickest lines. Data corresponding to the two vector diagrams can be placed in the same SVG file, for example, data with id "ic _ add _ thin" can be named to correspond to the vector diagram with the thinnest line, and data with id "ic _ add _ bold" corresponds to the vector diagram with the thickest line.
Example code one is as follows:
Figure BDA0003000947940000151
importing in the SVG file
Figure BDA0003000947940000152
After the system is finished, the system is started,
Figure BDA0003000947940000153
the system can extract the path data in the SVG file, then reconstruct the data, convert the data into a vector format, and add different name attributes to each path, thereby facilitating system identification.
In one example, for the two paths contained in the vector diagram with the thinnest lines in the above example code one, a name attribute may be added: HUAWEI _ VARIATION _ ICON _ START _ PATH _0, HUAWEI _ VARIATION _ ICON _ START _ PATH _1; similarly, for two paths contained in the vector diagram with the thickest lines, the name attribute is also added: HUAWEI _ VARIATION _ ICON _ END _ PATH _0, HUAWEI _ VARIATION _ ICON _ END _ PATH _1.
Meanwhile, an additional path node is added to the vector to carry the vector icon data corresponding to the current word weight obtained through subsequent calculation. The number of the extra added paths is the same as the number of the paths corresponding to the thinnest/thickest vector diagram, and the name attributes of the extra added paths are respectively as follows: HUAWEI _ VARIATION _ ICON _ CURRENT _ PATH _0, HUAWEI _ VARIATION _ ICON _ CURRENT _ PATH _1.
It should be noted that the colors of the path data of the finest and bolder vector graphics can be set to be transparent, and the color of the path data of the vector icon corresponding to the current word weight is opaque, so that when the file is loaded, the icons corresponding to the finest and bolder lines are not displayed, and only the vector icon calculated according to the current word weight is displayed.
Example code two is as follows:
Figure BDA0003000947940000154
Figure BDA0003000947940000161
Figure BDA0003000947940000171
in the example code, path data in svg is extracted and put into path data in vector. The same corresponding path in different vector data represents the same line in the icon, and the line presents different thickness degrees due to different path data. For example, "HUAWEI _ variance _ ICON _ START _ PATH _0", "HUAWEI _ variance _ ICON _ END _ PATH _0" and "HUAWEI _ variance _ ICON _ CURRENT _ PATH _0" are PATH data corresponding to different thickness degrees of the same line, and the curve types of the PATHs are the same, and the values of the data points on the PATHs are different.
The electronic device 100 can analyze the vector diagram data with the finest line and the vector diagram data with the coarsest line of the first icon in pathData of the vector, so as to facilitate subsequent calculation of the vector icon data under the current word weight.
Step two: the electronic device 100 detects that the font weight of the current text is the first font weight.
In some embodiments, the system or application may automatically set the word weight for the variable font in the current display interface, or the user may manually set the word weight parameter value in the font setting in the system or application.
The font weight represents the thickness degree of the font, and the thickness of the font can be represented numerically. In some embodiments, the value range of the parameter of the word weight may be any value greater than or equal to 0 and less than or equal to 1. For example, a system developer may set a word weight parameter value of a finest font to be 0, a word weight parameter value of a coarsest font to be 1, and a minimum variation to be 0.1, and then a user may adjust the word weight parameter value autonomously in the system setting, where the adjustment range is 0 to 1, for example, the adjustment range of the word weight parameter value to be 0.5 indicates that the font is coarser and the coarse degree is closer to the coarsest font as the numerical value is larger.
For example, in another example, a system developer may also display the value range of the set parameter value of the word weight as 0 to 100, the word weight parameter value of the finest font as 0, the word weight parameter value of the coarsest font as 100, and the minimum variation as 1, so that more accurate word readjustment can be achieved.
For the convenience of subsequent calculation, regardless of the value of the parameter value of the word weight, the parameter value of each word weight can be converted into a parameter value which is greater than or equal to 0 and less than or equal to 1 according to a linear scale, and the first word weight corresponds to the first parameter. For example, in one example, the word weight parameter value is set to range from 0 to 100, and the user sets the word weight parameter value 65, where the parameter value 65 is 0.65 compared to the maximum parameter value 100, then the first word weight parameter may be 0.65. In another example, the system developer may also display the value range of the set parameter value of the word weight as-50 to 50, and similarly, the value range may also be scaled to a value between 0 and 1 to represent the first parameter of the word weight, which is not described herein again.
Therefore, after the parameter value representing the first word weight set by the user or the system or the application, the electronic device 100 may obtain a first parameter representing the font weight degree, where a value range of the first parameter is greater than or equal to 0 and less than or equal to 1, and a font weight degree represented by the first parameter is between the finest font and the coarsest font designed by the system developer. In some embodiments, the larger the weight of the font, the larger the first parameter value, the coarser the font, the closer to the coarsest font, and the smaller the weight of the font, the smaller the first parameter value, the finer the font, the closer to the finest font. If the first parameter is equal to 0, the font of the displayed text is finest, and if the first parameter is equal to 1, the font of the displayed text is coarsest.
Step three: the electronic device 100 obtains the first vector diagram data of the current first icon through calculation by interpolation according to the vector diagram data with the first font weight and the finest line and the vector diagram data with the coarsest line.
In consideration of the visual experience of the user and harmony and attractiveness of the display interface, the font thickness degree and the icon line thickness degree can be set to be in one-to-one correspondence.
In some embodiments, the line of the first icon exhibits a positive correlation in the vector map of the degree of thickness to the degree of thickness of the font of the word re-characterization. For example, when the word weight of the text is the minimum word weight, the first icon is displayed as a vector diagram with the thinnest lines; when the character weight of the text is the maximum character weight, the first icon is displayed as a vector diagram with the thickest line. When the importance of the character of the adjusting text is larger than the minimum weight and smaller than the maximum weight, the thickness degree of the lines in the first icon is thicker than that in the line thickness vector diagram and thinner than that in the line thickness vector diagram.
In some embodiments, the electronic device 100 may adaptively adjust the thickness of the line of the displayed first icon based on the first parameter of the first word weight. For example, the electronic device 100 may obtain current vector map data of the first icon, that is, first vector map data corresponding to the first character repetition, by linear interpolation based on the first parameter, and the finest vector map data and the coarsest vector map data of the line of the first icon.
Linear interpolation is a simple interpolation method widely used in the fields of mathematics, computer graphics, etc., and generally determines an unknown quantity between straight lines connected by two known quantities through the two known quantities.
If the coordinates a (x 1, y 1) and B (x 2, y 2) are known, the value of a certain position C (x, y) on the straight line connecting the points a and B can be obtained according to the interpolation coefficient w. The interpolation coefficient is a value representing a ratio.
In this embodiment, the interpolation coefficient may be a first parameter converted by the first word repetition, and the first parameter is greater than or equal to 0 and less than or equal to 1.
It can be seen that, in the path data analyzed by the line finest vector diagram and the line coarsest vector diagram, for the same line, the curve type is the same, and the data points describing the line path are different. Therefore, linear interpolation calculation is correspondingly performed on each data point which depicts the same line in the line finest vector diagram and the line coarsest vector diagram, and first vector diagram data of the first icon under the condition that the first parameter corresponds to the first word weight can be obtained. Interpolation may be performed between respective corresponding data points, e.g., between a start point and a start point, between respective data points of a bezier curve, between an end point and an end point, etc.
An example of a calculation formula is as follows:
x = x1+ (x 2-x 1) weight, y = y1+ (y 2-y 1) weight, wherein weight represents the current word weight, and weight is more than or equal to 0 and less than or equal to 1. And (x, y) is a coordinate point corresponding to the current first character, (x 1, y 1) is a data point corresponding to the finest icon, and (x 2, y 2) is a data point corresponding to the coarsest icon.
In one example, weight is 0.5, and pathData = "M39,44c38,4538,4536.5,45.5, 45l36.5,45 of the currently displayed first ICON," pathData = "M59,31l79.5,48.5c80.5,49.5, 51.5.81, 52" of the "HUAWEI _ variance _ ICON _ CURRENT _ PATH _1" PATH may be calculated based on the data in the above example code.
The linear interpolation calculation is only an example, and is not limited to the linear interpolation method, and other methods may be used to calculate the first vector diagram data, which is not limited in this embodiment of the present application.
Step four: the electronic device 100 reads the first vector graphics data and displays the first icon.
After obtaining the first vector graphics data for the first icon, electronic device 100 may generate an icon resource file that may be read for display, such as at
Figure BDA0003000947940000181
In the system, a vector type file may be generated. The first vector image data includes not only line paths but also rendering parameters such as drawing line widths, filling modes, coloring styles, and the like, which may be kept consistent for different images displayed by the first icon, except that the line thickness of the icon is changed.
The electronic device 100 may generate a drawing or rendering command after reading the first vector graphics data of the first icon, draw or render the first icon through a CPU and/or a GPU, and send the first icon to the display screen to display the first icon, where a line displayed by the first icon presents a first thickness degree. Moreover, the effect that the thickness degree of the line displayed by the first icon is consistent with the thickness degree of the text can be presented, and the visual experience is more attractive.
And the thickness degree of the line of the first icon presented in the first vector diagram is greater than or equal to that of the line of the first icon presented in the line finest vector diagram, and the thickness degree of the line of the first icon presented in the line coarsest vector diagram is less than or equal to that of the line of the first icon.
In one example, the word weight is set to 0.5, and the line thickness of the first icon displayed is the target icon with an intermediate thickness between the finest line and the thickest line, as shown in fig. 4 (c).
It should be noted that, the examples of fig. 3 and fig. 4 described herein are only used to assist in describing the technical solutions provided by the embodiments of the present application, and do not limit the embodiments of the present application.
In conjunction with the above description, some possible user interfaces displayed on the electronic device 100 are exemplarily shown below in order to more fully explain the present application.
FIG. 5 illustrates an example user interface of the electronic device 100 with respect to setting fonts.
As shown in fig. 5 (a), the setting interface 500 may include one or more setting items, such as an airplane mode setting item, a Wi-Fi setting item, a bluetooth setting item, a personal hotspot setting item, a mobile network setting item, a font setting item 501, a display and brightness setting item, a hua account setting item, and the like.
Entering the font setting item 501, a detailed font setting interface 502 as shown in fig. 5 (b) may be displayed. In the font setting interface 502, a font demonstration area 503, a font size adjustment control 504, a font thickness adjustment control 505, and the like may be included. Wherein a font demonstration area 503 is used to demonstrate the font adjusted effect. The user can adjust the size and thickness of the font through a font size adjustment control 504 and a font thickness adjustment control 505. In the example interface of fig. 5 (b), the adjustment button in font size adjustment control 504 may be controlled to slide left and right, with the font being smaller the further left and the font being larger the further right. Likewise, the adjustment button in the font weight adjustment control 505 can be controlled to slide left and right, and the thinner the font is, the thicker the font is, the farther the font is to the right. In addition to adjusting the font size and thickness, the font properties such as the font spacing, width, height, etc. may be adjusted, which is not shown in the interface of the present embodiment, but this does not limit the present embodiment.
According to the scheme in the embodiment of the application, after the user adjusts the character weight, namely the font thickness degree, the line thickness degree of the icon in the user interface can be changed accordingly. The line thickness degree of the icon is positively correlated with the font thickness degree. Some exemplary user interfaces are shown below to illustrate the effects that can be achieved by embodiments of the present application.
As shown in fig. 6, the font is bolded to a certain extent by pulling the adjustment button in the font weight adjustment control 505 to the right. In some embodiments, the degree of font weight may also be expressed in terms of a parameter value, with larger values resulting in a thicker font. In fig. 6, assuming that the font weight adjustment range is 0 to 100, we can adjust the weight degree 50 shown in (a) in fig. 6 to the weight degree 80 shown in (b) in fig. 6, and the font becomes thicker in the system. The font adjustment may be applied to a system application, and may also be applied to a third-party application that supports a variable font, which is not limited in this embodiment.
After the fonts are bolded, as can be seen by comparing (a) and (b) in fig. 6, the text fonts in the font setting interface 502 are both bolded and are consistent in thickness, including the display text in the font demonstration area 503, the font size adjustment control 504, and the font thickness adjustment control 505.
After the electronic device 100 detects the change of the font weight, the electronic device 100 may also adaptively adjust the line weight of the icon. Based on the word rescaling shown in fig. 6, the change of the thickness degree of the line of the icon is described below by taking a screen locking interface, a setting interface, and a pull-down toolbar interface as examples. Assuming that the font shown in fig. 6 (a) is the first font weight and the font shown in fig. 6 (b) is the second font weight, in the case shown in fig. 6 (a) and (b), the second font weight is greater than the first font weight, and the font is thickened, the line of the icon is also changed from the first thickness degree to the second thickness degree. When the second word is more important than the first word, the second thickness degree is larger than the first thickness degree.
Fig. 7 (a) and (b) show screen lock interfaces, where the screen lock interface 701 shown in fig. 7 (a) corresponds to the user interface in fig. 6 (a) under the first font, and the screen lock interface 703 shown in fig. 7 (b) corresponds to the user interface in fig. 6 (b) under the second font.
Specifically, the screen locking interface 701 includes indication information of time, date, etc., a slide unlocking control, and a top status bar 702, where the top status bar 702 includes indication information of a mobile operator, a mobile signal strength indicator, a wireless network signal strength indicator, a battery status indicator, a time indicator, etc.
It can be seen that the font of the text in the screen locking interface 703 is thicker than the font of the text in the screen locking interface 701, and the line thickness degree of each icon in the screen locking interface 703 is thicker than the line thickness degree of each corresponding icon in the screen locking interface 701. The font thickness degree of the text is thicker than the text correspondingly displayed in the lock screen interface 701 and the top status bar 702. Meanwhile, the line thickness of the indication icons such as the slide unlock control included in the lock screen interface 703 and the icons such as the mobile signal strength indicator, the wireless network signal strength indicator, and the battery status indicator included in the top status bar 704 is thicker than the icons correspondingly displayed in the lock screen interface 701 and the top status bar 702.
Fig. 8 (a) and (b) show system setting interfaces, a setting interface 801 shown in fig. 8 (a) corresponds to a user interface in fig. 6 (a) with the first letter being heavy, and a setting interface 805 shown in fig. 8 (b) corresponds to a user interface in fig. 6 (b) with the second letter being heavy.
Specifically, the setting interface 801 includes one or more setting items, such as an airplane mode setting item, a Wi-Fi setting item, a bluetooth setting item, a personal hotspot setting item, a mobile network setting item, a font setting item, a display and brightness setting item, a hua account setting item, and the like. Each setting item comprises an indication icon, an indication text and a setting control. The left column in the setting interface 801 is an indication icon 803 of a setting item, the right column is a corresponding setting control icon 804, and the middle column is a setting item indication text. Also included in fig. 8 (a) is a top status column 802, where the top status column 802 includes information indicative of a mobile operator, a mobile signal strength indicator, a wireless network signal strength indicator, a battery status indicator, a time indicator, and the like.
It can be seen that the font of the text in the setting interface 805 is thicker than the font of the text in the setting interface 801, and the line thickness degree of each icon in the setting interface 805 is thicker than the line thickness degree of each corresponding icon in the setting interface 801. In fig. 8 (a), (b), the font weight of the instruction text of each setting item included in the setting interface 805, and the instruction information text, the time indicator text, and the like of the mobile operator included in the top status bar 806 are thicker than the text correspondingly displayed in the setting interface 801 and the top status bar 802. Meanwhile, the indication icon 807 of each setting item, the corresponding setting control icon 808, and the icons such as the mobile signal strength indicator, the wireless network signal strength indicator, and the battery status indicator, which are included in the setting interface 805, are thicker than the indication icon 803 of each setting item, the corresponding setting control icon 804, and the icons correspondingly displayed in the top status bar 802 in the setting interface 801.
Fig. 9 (a) and (b) show a pull-down toolbar interface, the interface shown in fig. 9 (a) corresponds to the user interface in fig. 6 (a) with the first letter being heavy, and the interface shown in fig. 9 (b) corresponds to the user interface in fig. 6 (b) with the second letter being heavy.
Specifically, the pull-down toolbar interface 901 includes one or more shortcut setting items, such as a shortcut setting item in WLAN, auto-rotation, flashlight, bluetooth, flight mode, mobile data, location, screen capture, hotspot, screen recording, large screen projection, NFC, and the like, and a user can quickly turn on or off a corresponding function by clicking a shortcut setting item icon in the pull-down toolbar. Each shortcut setting item comprises an indication icon and an indication text. Also included in the drop-down toolbar interface 901 are a time indicator, a date indicator, a brightness adjustment control, and the like. The user interface of fig. 9 (a) further includes a top status bar 902, and the top status bar 902 includes indication information of the mobile operator, a mobile signal strength indicator, a wireless network signal strength indicator, a battery status indicator, a time indicator, and the like. The user interface in fig. 9 (a) further includes a Tab column 903 at the bottom for indicating icons of common applications, and in the example in fig. 9 (a), the Tab column includes icons and names of applications for phone, address book, browser, and search.
It can be seen that the font of the text in the user interface shown in fig. 9 (b) is thicker than the font of the text in the user interface shown in fig. 9 (a), and the line thickness degree of each icon in fig. 9 (b) is thicker than the line thickness degree of the corresponding icon in fig. 9 (a). In the interfaces shown in (a) and (b) of fig. 9, the shortcut setting items, the indication texts of the time and the date included in the pull-down toolbar interface 904, the indication information texts of the mobile operator, the time indicator texts, and the like included in the top status bar 905, and the APP icon names included in the bottom Tab bar 906 are thicker in font thickness than the texts correspondingly displayed in the pull-down toolbar interface 901, the top status bar 902, and the bottom Tab bar 903. Meanwhile, the line thickness of the icons indicating the shortcut setting items in the pull-down toolbar interface 904, the APP indicating icons in the bottom Tab field 906, the mobile signal strength indicator, the wireless network signal strength indicator, the battery status indicator and the like in the top status field 905 is thicker than the corresponding icons indicating the shortcut setting items in the toolbar interface 901, the APP indicating icons in the bottom Tab field 903 and the corresponding icons displayed in the top status field 902.
The above description of the user interface is merely exemplary and is not intended to limit other embodiments of the present application. In other embodiments, the user interface may include more or fewer elements. It is understood that the method provided by the present application can be applied to other interfaces not shown based on the same inventive concept. The type of variable icon is not limited to a system icon, and may also be a third party APP icon.
An icon processing method provided in the embodiment of the present application is described below. The method can be applied to the electronic device 100. The examples provided in this embodiment do not set any limit to the other embodiments of the present application.
Fig. 10 is a flowchart of an icon processing method provided in an embodiment of the present application, which specifically includes the following steps:
s101, the electronic device 100 displays a text, and the character weight of the text is the first character weight.
In some embodiments, the system or application may automatically set the word weight for the variable font in the current display interface, or the user may manually set the word weight parameter value in the font setting in the system or application.
The character weight represents the thickness degree of the font, and the thickness of the font can be represented numerically. In some embodiments, the value range of the parameter of the word weight may be any value greater than or equal to 0 and less than or equal to 1. For example, a system developer may set a word weight parameter value of a finest font to be 0, a word weight parameter value of a coarsest font to be 1, and a minimum variation to be 0.1, and then a user may independently adjust the word weight parameter value in the system setting, where the adjustment range is 0 to 1, for example, adjusting the word weight parameter value to be 0.5, where a larger value indicates a thicker font, and the thicker degree is closer to the coarsest font.
In another example, a system developer may also display the value range of the set parameter value of the word weight as 0 to 100, the value range of the word weight parameter of the finest font is 0, the value range of the word weight parameter of the coarsest font is 100, and the minimum variation is 1, so that more accurate word readjustment can be achieved.
For the convenience of subsequent calculation, regardless of the value of the parameter value of the word weight, the parameter value of each word weight can be converted into a parameter value which is greater than or equal to 0 and less than or equal to 1 according to a linear scale, and the first word weight corresponds to the first parameter. For example, in one example, the word weight parameter value is set to range from 0 to 100, and the user sets the word weight parameter value 65, where the parameter value 65 is 0.65 compared to the maximum parameter value 100, then the first word weight parameter may be 0.65. In another example, the system developer may also display the value range of the set parameter value of the word weight as-50 to 50, and similarly, the value range may also be scaled to a value between 0 and 1 to represent the first parameter of the word weight, which is not described herein again.
Therefore, after the parameter value representing the first word weight set by the user or the system or the application, the electronic device 100 may obtain a first parameter representing the font weight degree, where a value range of the first parameter is greater than or equal to 0 and less than or equal to 1, and a font weight degree represented by the first parameter is between the finest font and the coarsest font designed by the system developer. In some embodiments, the larger the weight of the font, the larger the first parameter value, the coarser the font, the closer to the coarsest font, and the smaller the weight of the font, the smaller the first parameter value, the finer the font, the closer to the finest font. If the first parameter is equal to 0, the font of the displayed text is thinnest, and if the first parameter is equal to 1, the font of the displayed text is thickest.
S102, the electronic device 100 generates first vector graphics data of the first icon according to the first parameter of the first font weight, the third vector graphics data of the first icon, and the fourth vector graphics data of the first icon.
The first vector diagram, the third vector diagram and the fourth vector diagram are different vector diagram images of the first icon. The vector diagram is an xml-based image, does not provide specific pixels, only provides drawing instructions, has the advantages of very small memory occupation, high performance, free scaling without distortion and has the defect of no rich colors expressed by bitmaps. With respect to the vector map and the bitmap, the foregoing description may be referred to, and will not be described herein.
In the embodiment of the present application, for the first icon indicating the same function or meaning, there may be a plurality of images, i.e., different graphic styles, in each of which the line thickness degree of the first icon is different. In this embodiment, for the same character weight, the first icon displays a graphic style corresponding to a thickness degree.
In some embodiments, the third vector image is the image with the thinnest lines in the first icon and the fourth vector image is the image with the coarsest lines in the first icon. A third vector diagram, a fourth vector diagram, may be provided by the developer/designer, the two vector diagrams having similar graphics with the same lines indicating the same contour but the lines depicted are of different thicknesses, the line in the third vector diagram being the thinnest line and the line in the fourth vector diagram being the thickest line.
In consideration of the visual experience of the user and harmony and attractiveness of the display interface, the font thickness degree and the icon line thickness degree can be set to be in one-to-one correspondence.
In some embodiments, the line of the first icon appears in the vector map with a degree of thickness that is positively correlated with a degree of thickness of the font being re-characterized. For example, when the word weight of the text is the third word weight, the first icon is displayed as a third vector diagram, that is, an image with the thinnest lines; when the word weight of the text is the fourth word weight, the first icon is displayed as a fourth vector diagram, namely, an image with the thickest line. Wherein the third character is the smallest character, i.e. the finest font, and the fourth character is the largest character, i.e. the coarsest font. And when the importance of the character of the adjusting text is greater than the third weight and less than the fourth weight, the thickness degree of the line in the displayed first icon is thicker than that in the third vector diagram and thinner than that in the fourth vector diagram.
In some embodiments, the electronic device 100 may adaptively adjust the thickness of the line of the displayed first icon based on the first parameter of the first word weight. For example, the electronic device 100 may calculate the first vector graphics data for the first icon by linear interpolation based on the first parameter, and the third vector graphics data for the first icon and the fourth vector graphics data for the first icon.
Specifically, each vector map may be composed of various elements such as lines, curves, circles, polygons, etc., and is essentially composed of various types of line paths. Each vector graphics data may include one or more paths that indicate a line of the icon, each path being described by a line type and a plurality of data points.
For example, the first vector diagram comprises a first path, the third vector diagram comprises a third path, the fourth vector diagram comprises a fourth path, the first path, the third path and the fourth path correspond to the same line in the first icon, the line types of the same line, and the first path is calculated by the electronic device according to the first word weight, the third path and the fourth path. For example, each data point for describing the first path may be obtained by performing linear interpolation calculation on each data point corresponding to the third path and the fourth path, respectively, based on the first parameter. For an example of the specific implementation, reference may be made to the foregoing description, which is not repeated here.
S103, the electronic device 100 reads the first vector image data, displays the first icon, and the line of the first icon shows the first thickness degree.
And the thickness degree of the line of the first icon presented in the first vector diagram is greater than or equal to that of the line of the first icon presented in the third vector diagram, and the thickness degree of the line of the first icon presented in the fourth vector diagram is less than or equal to that of the line of the first icon.
The electronic device 100 may generate a drawing or rendering command after reading the first vector graphics data of the first icon, draw or render the first icon through a CPU and/or a GPU, and send the first icon to a display screen to display the first icon, where a line displayed by the first icon presents a first thickness degree.
S104, the electronic device 100 detects a first operation of changing the word weight, and the first operation enables the text to be changed from the first word weight to the second word weight.
In some embodiments, the user can manually adjust the text weight in the system setting, the user can also adjust the text weight in the shortcut setting bar, and the system can also automatically adjust the text weight. The present application is not limited in any way with respect to the specific manner of the first operation.
S105, the electronic device 100 displays the text, and the character weight of the text is the second character weight.
The second word corresponds to the second parameter. For the description of the second word repetition, reference may be made to the first word repetition, which is not described herein again.
S106, the electronic device 100 generates second vector diagram data of the first icon according to the second parameter of the second font weight, the third vector diagram data of the first icon, and the fourth vector diagram data of the first icon.
In some embodiments, the electronic device 100 may adaptively adjust the thickness of the line of the displayed first icon based on a second parameter of the second font weight. For example, the electronic device 100 may calculate the second vector map data of the first icon by linear interpolation based on the second parameter, and the third vector map data of the first icon and the fourth vector map data of the first icon.
For example, the second vector diagram includes a second path, the third vector diagram includes a third path, the fourth vector diagram includes a fourth path, the second path, the third path, and the fourth path correspond to the same line in the first icon, the line types are the same, and the second path is calculated by the electronic device according to the second word weight, the third path, and the fourth path. For example, each data point for describing the second path may be obtained by performing linear interpolation calculation on each data point corresponding to the third path and the fourth path, respectively, based on the second parameter. For an example of the specific implementation, reference may be made to the foregoing description, which is not repeated here.
S107, the electronic device 100 reads the second vector graphics data, and displays the first icon, wherein a line of the first icon represents a second thickness degree.
And the thickness degree of the line of the first icon presented in the second vector diagram is greater than or equal to that of the line of the first icon presented in the third vector diagram, and the thickness degree of the line of the first icon presented in the fourth vector diagram is less than or equal to that of the line of the first icon.
The electronic device 100 may generate a drawing command after reading the second vector diagram data of the first icon, draw or render the first icon through a CPU and/or a GPU, and send the first icon to the display screen to display the first icon, where a line displayed by the first icon presents a second thickness degree.
In some embodiments, the line of the first icon exhibits a positive correlation in the vector map of the degree of thickness to the degree of thickness of the font of the word re-characterization. Then the second degree of coarseness is finer than the first degree of coarseness if the second word weight is less than the first word weight; the second depth level is coarser than the first depth level if the second word is more significant than the first word.
It can be understood that the icon processing may not only adjust the line thickness in the icon based on the word re-weight, but also adjust the width, size, height, etc. of the icon according to the width, size, height, etc. of the font based on the same inventive idea. The above embodiments describe schemes only as examples, and do not limit other embodiments of the present application in any way.
By implementing the method provided by the embodiment, the icons displayed by the electronic equipment can be changed more abundantly, the display effect of the icons is more flexible and beautiful, the fonts and the display effect of the icons can be unified, the interface display effect is improved, a better visual display effect is achieved, the browsing habits of users are better met, and the viewing experience of the users is improved.
The implementation manner described in the above embodiments is only an example, and does not set any limit to other embodiments of the present application. The specific internal implementation manner may be different according to different types of electronic devices, different loaded operating systems, different used programs, and different called interfaces, and the embodiments of the present application are not limited at all, and may implement the feature functions described in the embodiments of the present application.
As used in the above embodiments, the term "when 8230; may be interpreted to mean" if 8230, "or" after 8230; or "in response to a determination of 8230," or "in response to a detection of 8230," depending on the context. Similarly, the phrase "at the time of determination of \8230;" or "if (a stated condition or event) is detected" may be interpreted to mean "if it is determined 8230;" or "in response to the determination of 8230;" or "upon detection (a stated condition or event)" or "in response to the detection (a stated condition or event)" depending on the context.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. An icon processing method, characterized in that the method comprises:
the electronic equipment displays a text, wherein the character weight of the text is a first character weight, and the character weight represents the thickness degree of a font;
the electronic equipment displays a first vector diagram of a first icon, wherein a line of the first icon presents a first thickness degree in the first vector diagram, and the thickness degree presented by the line of the first icon in the vector diagram is positively correlated with the thickness degree of a font represented by a character repetition;
the electronic equipment detects a first operation of changing the word weight;
the electronic equipment displays a text, and the character weight of the text is the second character weight;
the electronic device displaying a second vector diagram of the first icon, wherein a line of the first icon presents a second thickness degree in the second vector diagram;
if the second word weight is smaller than the first word weight, the second thickness degree is smaller than the first thickness degree;
the second level of coarseness is coarser than the first level of coarseness if the second word is more significant than the first word.
2. The method of claim 1,
when the character weight of the text is the first character weight, the first icon is displayed as the first vector diagram;
when the word weight of the text is the second word weight, the first icon is displayed as the second vector diagram.
3. The method according to claim 1 or 2,
the first vector diagram is obtained by the electronic device according to the first word weight, the third vector diagram of the first icon and the fourth vector diagram of the first icon, wherein the thickness degree of the line of the first icon presented in the first vector diagram is greater than or equal to that of the line of the first icon presented in the third vector diagram, and the thickness degree of the line of the first icon presented in the fourth vector diagram is less than or equal to that of the line of the first icon;
the second vector diagram is obtained by the electronic equipment according to the second word weight, the third vector diagram of the first icon and the fourth vector diagram of the first icon, wherein the thickness degree of the line of the first icon presented in the second vector diagram is greater than or equal to that of the line of the first icon presented in the third vector diagram, and is less than or equal to that of the line of the first icon presented in the fourth vector diagram.
4. The method according to any one of claims 1 to 3,
the word repetition of the text comprises a third word repetition and a fourth word repetition, and the degree of the thickness of the font represented by the first word repetition or the second word repetition is more than or equal to the thickness degree represented by the third word repetition and less than or equal to the thickness degree represented by the fourth word repetition.
5. The method of claim 4,
when the word weight of the text is the third word weight, the first icon is displayed as the third vector diagram;
when the word weight of the text is the fourth word weight, the first icon is displayed as the fourth vector diagram.
6. The method according to any one of claims 3 to 5,
the first vector diagram comprises a first path, the second vector diagram comprises a second path, the third vector diagram comprises a third path, the fourth vector diagram comprises a fourth path, the first path, the second path, the third path and the fourth path correspond to the same line in the first icon, the first path is calculated by the electronic device according to the first word weight, the third path and the fourth path, and the second path is calculated by the electronic device according to the second word weight, the third path and the fourth path.
7. The method according to any one of claims 1 to 6,
the electronic device displays a text, the word weight of the text is a first word weight, and the electronic device displays a first vector diagram of a first icon, a line of the first icon presents a first thickness degree in the first vector diagram, specifically including:
the electronic equipment displays a user interface, wherein the user interface comprises a status bar, a first text used for indicating a mobile operator and a first vector diagram of a first icon used for indicating the strength of a wireless communication signal are displayed in the status bar, the word weight of the first text is the first word weight, and a line of the first icon presents a first thickness degree in the first vector diagram;
the electronic device displays a text, the word weight of the text is a second word weight, the electronic device displays a second vector diagram of the first icon, and a line of the first icon presents a second thickness degree in the second vector diagram, and the method specifically comprises the following steps:
the electronic equipment displays a user interface, the user interface comprises a status bar, a second text used for indicating the mobile operator and a second vector diagram of the first icon used for indicating the wireless communication signal strength are displayed in the status bar, the word weight of the second text is a second word weight, and the line of the first icon presents a second thickness degree in the second vector diagram.
8. An electronic device, characterized in that the electronic device comprises: a display screen, a memory, and a processor coupled to the memory, a plurality of applications, and one or more programs; the memory has stored therein computer-executable instructions that, when executed by the processor, cause the electronic device to implement the method of any of claims 1-7.
9. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-7.
10. A computer program product comprising instructions for causing an electronic device to perform the method according to any one of claims 1 to 7 when the computer program product is run on the electronic device.
CN202110346370.0A 2021-03-31 Icon processing method and electronic equipment Active CN115145436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110346370.0A CN115145436B (en) 2021-03-31 Icon processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110346370.0A CN115145436B (en) 2021-03-31 Icon processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115145436A true CN115145436A (en) 2022-10-04
CN115145436B CN115145436B (en) 2024-05-03

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702701A (en) * 2022-10-26 2023-09-05 荣耀终端有限公司 Word weight adjusting method, terminal and storage medium
WO2024027205A1 (en) * 2022-07-30 2024-02-08 荣耀终端有限公司 Interface adjustment method and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226615A1 (en) * 2006-03-27 2007-09-27 Microsoft Corporation Fonts with feelings
US20070240057A1 (en) * 2006-04-11 2007-10-11 Microsoft Corporation User interface element for displaying contextual information
US20170038917A1 (en) * 2008-10-22 2017-02-09 D.R. Systems, Inc. User interface systems and methods
CN109144619A (en) * 2017-06-14 2019-01-04 阿里巴巴集团控股有限公司 Icon font information processing method, apparatus and system
CN110109531A (en) * 2019-05-07 2019-08-09 北京字节跳动网络技术有限公司 Display control method, device, electronic equipment and storage medium
CN110442313A (en) * 2019-06-27 2019-11-12 华为技术有限公司 A kind of display properties method of adjustment and relevant device
CN110908765A (en) * 2019-11-29 2020-03-24 五八有限公司 Interface display method and device, terminal equipment and storage medium
CN111258700A (en) * 2020-01-22 2020-06-09 华为技术有限公司 Icon management method and intelligent terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226615A1 (en) * 2006-03-27 2007-09-27 Microsoft Corporation Fonts with feelings
US20070240057A1 (en) * 2006-04-11 2007-10-11 Microsoft Corporation User interface element for displaying contextual information
US20170038917A1 (en) * 2008-10-22 2017-02-09 D.R. Systems, Inc. User interface systems and methods
CN109144619A (en) * 2017-06-14 2019-01-04 阿里巴巴集团控股有限公司 Icon font information processing method, apparatus and system
CN110109531A (en) * 2019-05-07 2019-08-09 北京字节跳动网络技术有限公司 Display control method, device, electronic equipment and storage medium
CN110442313A (en) * 2019-06-27 2019-11-12 华为技术有限公司 A kind of display properties method of adjustment and relevant device
CN110908765A (en) * 2019-11-29 2020-03-24 五八有限公司 Interface display method and device, terminal equipment and storage medium
CN111258700A (en) * 2020-01-22 2020-06-09 华为技术有限公司 Icon management method and intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱迪;: "苹果与华为手机UI设计比较分析", 大众文艺, no. 05, pages 60 - 61 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027205A1 (en) * 2022-07-30 2024-02-08 荣耀终端有限公司 Interface adjustment method and electronic device
CN116702701A (en) * 2022-10-26 2023-09-05 荣耀终端有限公司 Word weight adjusting method, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN109814766B (en) Application display method and electronic equipment
WO2020093988A1 (en) Image processing method and electronic device
CN110471606B (en) Input method and electronic equipment
CN113994317A (en) User interface layout method and electronic equipment
CN113630572A (en) Frame rate switching method and related device
CN111669459A (en) Keyboard display method, electronic device and computer readable storage medium
CN113553130A (en) Method for executing drawing operation by application and electronic equipment
WO2022095744A1 (en) Vr display control method, electronic device, and computer readable storage medium
CN114979457B (en) Image processing method and related device
CN112150499A (en) Image processing method and related device
WO2023016014A1 (en) Video editing method and electronic device
CN113448658A (en) Screen capture processing method, graphical user interface and terminal
CN114173189B (en) Video editing method, electronic device and storage medium
CN113489895B (en) Method for determining recommended scene and electronic equipment
CN113380240B (en) Voice interaction method and electronic equipment
WO2022022406A1 (en) Always-on display method and electronic device
CN111722896B (en) Animation playing method, device, terminal and computer readable storage medium
CN115145436B (en) Icon processing method and electronic equipment
CN115964231A (en) Load model-based assessment method and device
CN115145436A (en) Icon processing method and electronic equipment
CN116193275B (en) Video processing method and related equipment
WO2022166550A1 (en) Data transmission method and electronic device
WO2024046010A1 (en) Interface display method, and device and system
WO2024067551A1 (en) Interface display method and electronic device
CN116048933B (en) Fluency detection method

Legal Events

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