WO2024032564A1 - 仪表数字显示方法、装置、设备及计算机可读存储介质 - Google Patents

仪表数字显示方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2024032564A1
WO2024032564A1 PCT/CN2023/111532 CN2023111532W WO2024032564A1 WO 2024032564 A1 WO2024032564 A1 WO 2024032564A1 CN 2023111532 W CN2023111532 W CN 2023111532W WO 2024032564 A1 WO2024032564 A1 WO 2024032564A1
Authority
WO
WIPO (PCT)
Prior art keywords
digit
text element
digital display
offset
pixel
Prior art date
Application number
PCT/CN2023/111532
Other languages
English (en)
French (fr)
Inventor
胡华智
何昌威
Original Assignee
亿航智能设备(广州)有限公司
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 亿航智能设备(广州)有限公司 filed Critical 亿航智能设备(广州)有限公司
Publication of WO2024032564A1 publication Critical patent/WO2024032564A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the technical field of instrument digital display, and in particular to an instrument digital display method, device, equipment and computer-readable storage medium.
  • the purpose of the present invention is to provide an instrument digital display method, device, equipment and computer-readable storage medium to solve the problem that existing instrument data display requires frequent instances of multiple UI objects, resulting in reduced UI drawing performance and garbage collection.
  • the burden on the computer increases, and the operating performance of the system software decreases, which affects the timely display of data information on the dashboard, causing problems that affect users' predictions and adverse consequences when using the equipment.
  • an instrument digital display method is provided, which is applied to an interface that presents digital change trends.
  • the method includes the following steps:
  • Each digit is fixedly configured with five text elements in descending order from large to small and from top to bottom;
  • the transparency displayed by the text element on the current digit is controlled according to the distance of the overall offset pixel on the current digit.
  • an instrument digital display device uses the steps in the above-mentioned instrument digital display method.
  • the device includes an interconnected digital setting unit and a text element configuration unit. , calculation unit, offset pixel calculation unit and text element transparency control unit;
  • the digit setting unit is configured to set the digits required for the digital display of the instrument
  • the text element configuration unit is configured to fixedly configure five text elements in each digit in descending order from large to small and from top to bottom;
  • the calculation unit is configured to calculate the pixel height of each text element and determine the offset coefficient on each digit;
  • the offset pixel calculation unit is configured to calculate the overall offset pixels of the five text elements at the current digit according to the offset coefficient and the pixel height of each text element;
  • the text element transparency control unit is configured to control the transparency displayed by the text element at the current digit according to the distance of the overall offset pixel at the current digit. The greater the distance, the smaller the transparency displayed by the text element. .
  • an instrument digital display device includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the computer program is When the processor is executed, the steps of the instrument digital display method described above are implemented.
  • the present invention also provides a computer-readable storage medium, which includes a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium.
  • a computer program stored on the computer-readable storage medium.
  • the instrument digital display method, device, equipment and computer-readable storage medium provided by the embodiment of the present invention.
  • the instrument digital display method sets the digits required for the instrument digital display; and arranges each digit according to the numerical order from large to Small, fixedly configure five text elements in descending order from top to bottom; calculate the pixel height of each text element and the offset coefficient on each digit; calculate the current value based on the offset coefficient and the pixel height of each text element
  • the overall offset pixels of the five text elements on the current digit; the transparency displayed by the text elements on the current digit is controlled according to the distance of the overall offset pixels on the current digit.
  • the instrument digital display speed is faster and can Effectively avoid the need to frequently instantiate multiple UI objects to display existing instrument data, resulting in reduced UI drawing performance, increased burden on the garbage collector, and reduced operating performance of system software, which affects the timely display of data information on the dashboard, which is detrimental to users when using the device. Problems that affect predictions and adverse consequences will occur, seriously affecting the user experience.
  • Figure 1 is a method flow chart of an embodiment of an instrument digital display method related to the present invention.
  • Figure 2 is a schematic diagram of the digital display process of an instrument digital display method according to an embodiment of the present invention.
  • Figure 3 is a method flow chart of another embodiment of the instrument digital display method according to the embodiment of the present invention.
  • Figure 4 is a schematic diagram of changes in digital display transparency of an instrument digital display method according to an embodiment of the present invention.
  • Figure 5 is a schematic display diagram of an instrument digital display method applied to a car according to an embodiment of the present invention.
  • Figure 6 is a schematic structural diagram of an instrument digital display device according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method for displaying instrument digits.
  • the method is applied to an interface that presents a trend of digital changes.
  • it can be used on display devices with instrument panels such as automobiles, airplanes, and digital electricity meters. Please refer to Figures 1 to 1.
  • Figure 3 the method includes the following steps:
  • the digits required for the digital display of the instrument are set on the device on the interface that shows the trend of digital changes, such as the instrument panel.
  • the digits include the units, tens, hundreds, thousands, and ten thousand digits set before the decimal point.
  • the first digit after the decimal point is tenths, the second digit is hundredths, and the third digit is thousands.
  • the specific number of digits that need to be set can be determined according to actual needs.
  • five text elements are fixedly configured for each digit in descending order from large to small and from top to bottom, as shown in Table 1 below. For example, for each digit (one, ten, hundred%) respectively Allocate five fixed text elements.
  • T3 displays the number X on the current digit
  • T1 displays X+2.
  • T2 displays X+1
  • T4 displays X-1
  • T5 displays X-2. In this way, the numbers displayed on T1 ⁇ T5 gradually form a descending sequence.
  • the offset coefficient of the current digit is the number on one digit lower than it.
  • the first digit after the decimal point is used as the offset of the ones digit.
  • Shift coefficient when calculating the overall offset pixel on the tens digit, use the number on the ones digit as the offset coefficient on the tens digit, and so on.
  • the number on the digit that is one digit lower than the current digit is used as the offset coefficient P of the current digit;
  • the center line of the text element arranged in the middle position is set as the reference line, which corresponds to the reference number 0, and the size of the overall offset pixel and the reference number 0 is determined;
  • the overall offset pixel L is equal to the reference number 0, it means that the five text elements at the current digit are offset by a distance of H pixels, and 1 is added to the number of the originally displayed text element. Or subtract 1 to display and serve as the basis for the next iteration display.
  • controlling the transparency displayed by the text element at the current digit based on the distance of the overall offset pixel at the current digit further includes:
  • the five text elements T1, T2, T3, T4, and T5 are regarded as a large drawing area, and the horizontal center line of T3 is used as the original center line, and 3 samples are calibrated for each text element.
  • Points A, B, and C (corresponding to the top, middle, and bottom of the text element respectively), calculate the distance between each sampling point of each text element and the original center line. The smaller the distance, the greater the opacity of the sampling point.
  • the instrument digital display method described in the embodiment of the present invention is applied to an interface that presents digital changing trends, such as the kilometers traveled by a car, the flight altitude of an airplane, the reading of a digital electric meter, etc.
  • the number 5 in the tens digit follows the number 9 in the ones digit and gradually slides into the display from top to bottom; conversely, when returning from 150 to 149, the number 5 in the tens digit follows the number 0 in the ones digit. They gradually draw upward and disappear together, and the number 4 in the tens digit gradually slides into the display from bottom to top, following the number 9 in the ones digit.
  • it is to realize the associated display of individuals, tens, hundreds and thousands digits similar to that of a household electric meter.
  • the instrument digital display method sets the digits required for the instrument digital display; and fixes and configures five text elements on each digit in descending order from large to small and from top to bottom; calculates each digit.
  • the pixel height of the text element and the offset coefficient on each digit calculate the overall offset pixels of the five text elements on the current digit according to the offset coefficient and the pixel height of each text element; based on all the pixels on the current digit
  • the distance size of the overall offset pixel is used to control the transparency displayed by the text element on the digit.
  • the display speed of instrument numbers is faster, which can effectively avoid the need to frequently instantiate multiple UI objects for existing instrument data display, resulting in UI drawing performance Decreasing, the burden on the garbage collector increases, and the operating performance of the system software decreases, which affects the timely display of data information on the dashboard, causing prejudgments and adverse consequences for users when using the device, and seriously affecting the user experience.
  • An embodiment of the present invention also provides an instrument digital display device.
  • the instrument digital display device adopts the steps of the instrument digital display method described in the first embodiment. Please refer to Figure 6.
  • the instrument digital display device includes interconnected Digital setting unit 201, text element configuration unit 301, calculation unit 401, offset pixel calculation unit 501, and text element transparency control unit 601.
  • the digit setting unit 201 is configured to set the digits required for the digital display of the instrument
  • the digit setting unit 201 is used to set the digits required for the digital display of the instrument on a device on an interface that presents a digital change trend such as an instrument panel.
  • the digits include the ones, tens, and hundreds digits set before the decimal point. , thousands, ten thousand, and the first tenth digit after the decimal point, the second digit hundredth, and the third digit thousandth.
  • the specific number of digits that need to be set can be determined according to actual needs.
  • the text element configuration unit 301 is configured to fixedly configure five text elements in each digit in descending order from large to small and from top to bottom.
  • the text element configuration unit 301 five text elements are fixedly configured for each digit in descending order from large to small and from top to bottom, for example, for each digit (one, ten, hundred). ...) allocate fixed 5 text elements respectively, assuming that the five text elements are T1, T2, T3, T4, T5, arranged in order from top to bottom, where T3 displays the number X on the current digit, then T1 Then it displays X+2, T2 displays X+1, T4 displays X-1, and T5 displays X-2. In this way, the numbers displayed on T1 ⁇ T5 gradually form a descending sequence.
  • the calculation unit 401 is configured to calculate the pixel height of each text element and determine the offset coefficient on each digit.
  • the pixel height of each text element is H; calculate the offset coefficient P on each digit, where the offset coefficient of the current digit is the number on the digit one lower than it.
  • the offset coefficient of the current digit is the number on the digit one lower than it.
  • the offset pixel calculation unit 501 is configured to calculate the overall offset pixels of the five text elements at the current digit according to the offset coefficient and the pixel height of each text element.
  • the text element transparency control unit 601 is configured to control the transparency displayed by the text element at the current digit according to the distance of the overall offset pixel at the current digit. The greater the distance, the greater the transparency displayed by the text element. Small.
  • the center line of the middle text element on the current digit is used as the original center line, and three sampling points are calibrated on each text element. These three sampling points correspond to the top, middle, and bottom of the text element respectively, and each text element is calculated.
  • the distance between each sampling point of the element and the original midline; the transparency of the sampling point is controlled according to the distance between each sampling point of each text element and the original midline; the smaller the distance, the greater the opacity of the sampling point.
  • the displayed position of the text element will also be moved up or down.
  • the specific steps of the up or down movement of the text element are:
  • the overall offset pixel L is equal to the reference number 0, it means that the five text elements at the current digit are offset by a distance of H pixels, and 1 is added to the number of the originally displayed text element. Or subtract 1 to display and serve as the basis for the next iteration display.
  • the instrument digital display device described in the embodiment of the present invention can generally be set on an interface that presents a digital change trend, such as the kilometers traveled by a car, the flight altitude of an airplane, the reading of a digital electric meter, etc.
  • a digital change trend such as the kilometers traveled by a car, the flight altitude of an airplane, the reading of a digital electric meter, etc.
  • the instrument digital display device uses the digit setting unit 201 to set the digits required for the instrument digital display; the text element configuration unit 301 sets each digit in descending order from large to small and from top to bottom. Five text elements are arranged in a fixed order; the calculation unit 401 calculates the pixel height of each text element and the offset coefficient on each digit; the offset pixel calculation unit 501 calculates the offset coefficient according to the offset coefficient and the pixel height of each text element. Calculate the overall offset pixels of the five text elements at the current digit; the text element transparency control unit 601 controls the transparency displayed by the text element at the current digit according to the distance of the overall offset pixels at the current digit.
  • An embodiment of the present invention also provides an instrument digital display device.
  • the device includes a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the computer program is processed by the When the device is executed, the steps of the instrument digital display method described in the first embodiment are implemented.
  • a computer-readable storage medium provided according to an embodiment of the present invention has a computer program stored thereon, and when the computer program is executed by a processor, the steps in the instrument digital display method described in the first embodiment are implemented, The specific steps are as described in Embodiment 1 and will not be repeated here.
  • the memory in this embodiment can be used to store software programs and various data.
  • the memory may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, at least one application required for a function, etc.; the stored data area may store data created based on the use of the mobile phone, etc.
  • the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • all or part of the processes in the method of the above embodiment can be completed by instructing relevant hardware through a computer program.
  • the program can be stored in a computer-readable storage medium.
  • the program can be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement processes including the embodiments of the above methods.
  • the storage media includes but is not limited to magnetic disks, USB flash drives, optical disks, read-only memory (Read-Only Memory, ROM), etc.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present invention can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
  • the instrument digital display method, device, equipment and computer-readable storage medium provided by the embodiment of the present invention.
  • the instrument digital display method sets the digits required for the instrument digital display; and arranges each digit according to the numerical order from large to Small, fixedly configure five text elements in descending order from top to bottom; calculate the pixel height of each text element and the offset coefficient on each digit; calculate the current value based on the offset coefficient and the pixel height of each text element
  • the overall offset pixels of the five text elements on the current digit; the transparency displayed by the text elements on the current digit is controlled according to the distance of the overall offset pixels on the current digit.
  • the instrument digital display speed is fast and effective.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

本发明提供一种仪表数字显示方法、装置、设备及计算机可读存储介质,属于仪表数字显示技术领域。所述方法包括:设置仪表数字显示所需要的数位(S101);每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素(S102);计算每个文本元素的像素高度(S103);计算每个数位上的偏移系数;其中,当前数位的偏移系数为比它低一位的数位上的数字(S104);根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素(S105);根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度(S106)。从而使得仪表数字显示速度较快。

Description

仪表数字显示方法、装置、设备及计算机可读存储介质 技术领域
本发明涉及仪表数字显示技术领域,尤其涉及一种仪表数字显示方法、装置、设备及计算机可读存储介质。
背景技术
目前的汽车、飞机以及数字电表上均具有大量的仪表盘用于显示设备静态或动态的的数据参数信息,比如汽车上行程信息显示、油表信息显示、飞机上的高度信息显示、数字电表上的用电量信息显示等等。根据所述仪表盘上所述数据信息的显示,便于用户根据所述显示的数字显示对设备的当前状态以及使用情况进行判断。现有的设备上的仪表盘上的仪表数字的显示一般是将所述数据信息频繁实例多个UI对象,且采用透明掩码方式实现滚入/滚出所述UI对象以实现数字显示的渐变效果。由于不断的UI对象滚入/滚出,这将导致UI绘图性能下降、垃圾回收器负担加重,使得整个控制***的软件运行性能下降而影响用户使用体感或者导致延迟数据信息的显示而使用户在使用设备时产生错误预判或不良后果。
技术问题
有鉴于此,本发明的目的在于提供一种仪表数字显示方法、装置、设备及计算机可读存储介质,以解决现有仪表数据显示需要频繁实例多个UI对象,导致UI绘图性能下降、垃圾回收器负担加重,***软件的运行性能下降而影响仪表盘上数据信息的及时显示,对用户在使用设备时产生影响预判及不良后果的问题。
技术解决方案
本发明解决上述技术问题所采用的技术方案如下:
根据本发明的第一方面,提供一种仪表数字显示方法,应用于呈现数字变化趋势的界面上,所述方法包括如下步骤:
设置仪表数字显示所需要的数位;
每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;
计算每个文本元素的像素高度;
计算每个数位上的偏移系数;其中,当前数位的偏移系数为比它低一位的数位上的数字;
根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;
根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度。
根据本发明的第二方面,还提供一种仪表数字显示装置,所述仪表数字显示装置使用上述所述仪表数字显示方法中的步骤,所述装置包括相互连接的数位设置单元、文本元素配置单元、计算单元、偏移像素计算单元以及文本元素透明度控制单元;
所述数位设置单元,设置为设置仪表数字显示所需要的数位;
所述文本元素配置单元,设置为将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;
所述计算单元,设置为计算每个文本元素的像素高度以及确定每个数位上的偏移系数;
所述偏移像素计算单元,设置为根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;
所述文本元素透明度控制单元,设置为根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,距离越大,文本元素显示的透明度越小。
根据本发明的第三方面,还提供一种仪表数字显示设备,所述设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述所述的仪表数字显示方法的步骤。
此外,本发明还提供一种计算机可读存储介质,包括处理器、计算机可读存储介质以及在所述计算机可读存储介质上存储的计算机程序,所述计算机程序被处理器执行时实现如上述所述方法中的步骤。
有益效果
本发明实施例提供的所述仪表数字显示方法、装置、设备及计算机可读存储介质,所述仪表数字显示方法通过设置仪表数字显示所需要的数位;并将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;计算每个文本元素的像素高度及每个数位上的偏移系数;根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,仪表数字显示速度较快,能有效避免现有仪表数据显示需要频繁实例多个UI对象,导致UI绘图性能下降、垃圾回收器负担加重,***软件的运行性能下降而影响仪表盘上数据信息的及时显示,对用户在使用设备时产生影响预判及不良后果,严重影响用户使用体验感的问题。
附图说明
图1为本发明涉及的一种仪表数字显示方法一实施例的方法流程图。
图2为本发明实施例一种仪表数字显示方法的数字显示过程示意图。
图3为本发明实施例的仪表数字显示方法另一实施例的方法流程图。
图4为本发明实施例一种仪表数字显示方法的数字显示透明度的变化示意图。
图5为本发明实施例的一种仪表数字显示方法运用在汽车上的显示示意图。
图6为本发明实施例的一种仪表数字显示装置的结构示意图。
本发明的实施方式
为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身没有特定的意义。因此,“模块”、“部件”或“单元”可以混合地使用。
实施例一
本发明实施例提供一种仪表数字显示方法,所述方法应用于呈现数字变化趋势的界面上,比如可以用于汽车、飞机以及数字电表上等具有仪表盘的显示设备上,请参阅图1至图3,所述方法包括如下步骤:
S101、设置仪表数字显示所需要的数位。
具体地,在仪表盘等呈现数字变化趋势的界面上的设备上设置仪表数字显示所需要的数位,所述数位包括设置在小数点前的个位、十位、百位、千位、万位以及小数点后第一数位十分位、第二数位百分位、第三数位千分位,具体需要设置的数位的多少可以根据实际需求情况来确定。
S102、每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素。
具体地,每个数位上按照数字的数值从大到小,从上往下依次递减排序固定配置五个文本元素,如下表1,比如为每个数位(个、十、百...)分别分配固定的5个文本元素,设该五个文本元素分别为T1、T2、T3、T4、T5,从上往下依次排列,其中T3显示当前数位上的数字X,那么T1则显示X+2,T2显示X+1,T4显示X-1,T5显示X-2,这样T1~T5上显示的数字逐渐形成递减序列排列。
表1:
S103、计算每个文本元素的像素高度。
具体地,可根据实际情况测量得到每个文本元素的像素高度均为H。
S104、计算每个数位上的偏移系数;其中,当前数位的偏移系数为比它低一位的数位上的数字。
具体的,当前数位的偏移系数为比它低一位的数位上的数字,比如计算数位为个位上的整体偏移像素时,将小数点所在数位后的第一位数字作为个位的偏移系数;计算数位为十位上的整体偏移像素时,将个位上的数字作为十位的偏移系数,依次类推。
S105、根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素。
具体地,将当前数位比它低一位的数位上的数字作为当前数位的偏移系数P;
计算当前数位上的每个文本元素的像素高度H;
根据所述偏移系数P和每个文本元素的像素高度H计算当前数位的五个文本元素的整体偏移像素L,即L=P*H。
比如计算数位为个位上的整体偏移像素时,将小数点所在数位后的第一位数字作为个位的偏移系数P,计算数位为个位上的每个文本元素的像素高度H;根据所述偏移系数和每个文本元素的像素高度计算当前数位为个位的五个文本元素的整体偏移像素L,即L=P*H。
同理,当计算数位为十位上的整体偏移像素时,将个位上的数字作为十位的偏移系数P’,计算数位为十位上的每个文本元素的像素高度H’;根据所述偏移系数和每个文本元素的像素高度计算当前数位为十位的五个文本元素的整体偏移像素L’,即L’=P’*H’。
S106、根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度。
具体地,将排列在中间位置的文本元素的中心线设置为基准线,该基准线对应基准数0,判断所述整体偏移像素与基准数0的大小;
当所述整体偏移像素L小于所述基准数0时,则控制当前数位上的所述文本元素整体向上偏移;
当所述整体偏移像素L大于所述基准数0时,则控制当前数位上的所述文本元素整体向下偏移。
当所述整体偏移像素L等于所述基准数0时,则说明当前数位上的所述五个文本元素偏移了一个H像素距离,在所述原本显示的文本元素的数字上进行加1或减1显示,并作为下次迭代显示基础。
在所述原本显示的文本元素的数字上进行加1或减1之后,这样T1~T5就形成新的数字序列X’+2、X’+1、X’、X’-1、X’-2(X’=X+1或X’=X-1)。下次迭代时以X’替代X并重复进行即可。从而达到T1~T5重复利用的目的。
在一实施例中,所述根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度还包括:
S1061、将当前数位上的中间文本元素的中心线作为原始中线。
S1062、在每个文本元素上标定三个采样点,这三个采样点分别对应文本元素的顶部、中间和底部。
S1063、计算每个文本元素的每个采样点与原始中线的距离。
S1064、根据所述每个文本元素的每个采样点与原始中线的距离的大小来控制采样点的透明度;距离越小,采样点的不透明度越大。
具体地,如图图4所示,把T1、T2、T3、T4、T5五个文本元素看成一个大绘图区,以T3的横向的中线作为原始中线,为每个文本元素标定3个采样点A、B、C(分别对应文本元素的顶部、中间、底部),计算每个文本元素的每个采样点与原始中线的距离,距离越小,采样点的不透明度越大。
本发明实施例所述仪表数字显示方法应用在呈现数字变化趋势的界面上,比如汽车行驶公里数、飞机的飞行高度、数字电表的读数等。如图5中从149进入150时,十位的数字5是跟随个位的数字9从上向下逐渐滑入显示;反之若从150退回 149时十位的数字5是跟随个位的数字0一起向上逐渐画出消失,十位的数字4跟随个位的数字9从下往上逐渐滑入显示。概括起来就是实现类似家用电表的个、十、百、千位的关联显示。
本发明实施例所述仪表数字显示方法通过设置仪表数字显示所需要的数位;并将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;计算每个文本元素的像素高度及每个数位上的偏移系数;根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,仪表数字显示速度较快,能有效避免现有仪表数据显示需要频繁实例多个UI对象,导致UI绘图性能下降、垃圾回收器负担加重,***软件的运行性能下降而影响仪表盘上数据信息的及时显示,对用户在使用设备时产生影响预判及不良后果,严重影响用户使用体验感的问题。
实施例二
本发明实施例还提供一种仪表数字显示装置,所述仪表数字显示装置采用上述实施例一中所述的仪表数字显示方法中步骤,请参阅图6,所述仪表数字显示装置包括相互连接的数位设置单元201、文本元素配置单元301、计算单元401、偏移像素计算单元501以及文本元素透明度控制单元601。
所述数位设置单元201,设置为设置仪表数字显示所需要的数位;
具体地,通过所述数位设置单元201在仪表盘等呈现数字变化趋势的界面上的设备上设置仪表数字显示所需要的数位,所述数位包括设置在小数点前的个位、十位、百位、千位、万位以及小数点后第一数位十分位、第二数位百分位、第三数位千分位,具体需要设置的数位的多少可以根据实际需求情况来确定。
所述文本元素配置单元301,设置为将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素。
具体地,通过所述文本元素配置单元301将每个数位上按照数字的数值从大到小,从上往下依次递减排序固定配置五个文本元素,比如为每个数位(个、十、百...)分别分配固定的5个文本元素,设该五个文本元素分别为T1、T2、T3、T4、T5,从上往下依次排列,其中T3显示当前数位上的数字X,那么T1则显示X+2,T2显示X+1,T4显示X-1,T5显示X-2,这样T1~T5上显示的数字逐渐形成递减序列排列。
所述计算单元401,设置为计算每个文本元素的像素高度以及确定每个数位上的偏移系数。
具体地,可根据实际情况测量得到每个文本元素的像素高度均为H;计算每个数位上的偏移系数P,其中,当前数位的偏移系数为比它低一位的数位上的数字,比如计算数位为个位上的整体偏移像素时,将小数点所在数位后的第一位数字作为个位的偏移系数;计算数位为十位上的整体偏移像素时,将个位上的数字作为十位的偏移系数,依次类推。
所述偏移像素计算单元501,设置为根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素。
具体地,根据所述偏移系数P和每个文本元素的像素高度H计算当前数位的五个文本元素的整体偏移像素L,即L=P*H。
所述文本元素透明度控制单元601,设置为根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,距离越大,文本元素显示的透明度越小。
具体地,将当前数位上的中间文本元素的中心线作为原始中线,在每个文本元素上标定三个采样点,这三个采样点分别对应文本元素的顶部、中间和底部,计算每个文本元素的每个采样点与原始中线的距离;根据所述每个文本元素的每个采样点与原始中线的距离的大小来控制采样点的透明度;距离越小,采样点的不透明度越大。
除了所述文本元素显示的透明度的显示之外,还会对文本元素所显示的位置进行上移或者下移,所述文本元素上移或者下移具体为:
将排列在中间位置的文本元素的中心线设置为基准线,该基准线对应基准数0,判断所述整体偏移像素与基准数0的大小。
当所述整体偏移像素L小于所述基准数0时,则控制当前数位上的所述文本元素整体向上偏移。
当所述整体偏移像素L大于所述基准数0时,则控制当前数位上的所述文本元素整体向下偏移。
当所述整体偏移像素L等于所述基准数0时,则说明当前数位上的所述五个文本元素偏移了一个H像素距离,在所述原本显示的文本元素的数字上进行加1或减1显示,并作为下次迭代显示基础。
在所述原本显示的文本元素的数字上进行加1或减1之后,这样T1~T5就形成新的数字序列X’+2、X’+1、X’、X’-1、X’-2(X’=X+1或X’=X-1)。下次迭代时以X’替代X并重复进行即可。从而达到T1~T5重复利用的目的。
本发明实施例所述仪表数字显示装置一般可设置于呈现数字变化趋势的界面上,比如汽车行驶公里数、飞机的飞行高度、数字电表的读数等。如5图从149进入150时,十位的数字5是跟随个位的数字9从上向下逐渐滑入显示;反之若从150退回149时十位的数字5是跟随个位的数字0一起向上逐渐画出消失,十位的数字4跟随个位的数字9从下往上逐渐滑入显示。概括起来就是实现类似家用电表的个、十、百、千位的关联显示。
本发明实施例所述仪表数字显示装置通过采用通过数位设置单元201设置仪表数字显示所需要的数位;由文本元素配置单元301将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;计算单元401计算每个文本元素的像素高度及每个数位上的偏移系数;由偏移像素计算单元501根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;由文本元素透明度控制单元601根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,从而实现仪表数字的快速显示,显示速度较快,能有效避免现有仪表数据显示需要频繁实例多个 UI对象,导致UI绘图性能下降、垃圾回收器负担加重,***软件的运行性能下降而影响仪表盘上数据信息的及时显示,对用户在使用设备时产生影响预判及不良后果,严重影响用户使用体验感的问题。
实施例三
本发明实施例还提供的一种仪表数字显示设备,所述设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上述实施例一所述的仪表数字显示方法的步骤。
实施例四
根据本发明的一个实施例提供的一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述实施例一所述的仪表数字显示方法中的步骤,具体步骤如实施例一中描述所述,在此不再赘述。
本实施例中的存储器可用于存储软件程序以及各种数据。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序等;存储数据区可存储根据手机的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
根据本实施例的一个示例,上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述程序可存储于一计算机可读取存储介质中,如本发明实施例中,该程序可存储于计算机***的存储介质中,并被该计算机***中的至少一个处理器执行,以实现包括如上述各方法的实施例的流程。该存储介质包括但不限于磁碟、优盘、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。
工业实用性
本发明实施例提供的所述仪表数字显示方法、装置、设备及计算机可读存储介质,所述仪表数字显示方法通过设置仪表数字显示所需要的数位;并将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;计算每个文本元素的像素高度及每个数位上的偏移系数;根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,仪表数字显示速度较快,有效避免现有仪表数据显示需要频繁实例多个UI对象,导致UI绘图性能下降、垃圾回收器负担加重,***软件的运行性能下降而影响仪表盘上数据信息的及时显示,对用户在使用设备时产生影响预判及不良后果,严重影响用户使用体验感的问题。因此,具有工业实用性。

Claims (10)

  1. 一种仪表数字显示方法,应用于呈现数字变化趋势的界面上,所述方法包括如下步骤:
    设置仪表数字显示所需要的数位;
    每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;
    计算每个文本元素的像素高度;
    计算每个数位上的偏移系数;其中,当前数位的偏移系数为比它低一位的数位上的数字;
    根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;
    根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度。
  2. 根据权利要求1所述的仪表数字显示方法,其中,所述根据所述偏移系数和每个文本元素的像素高度计算当前五个文本元素的整体偏移像素包括:
    将当前数位比它低一位的数位上的数字作为当前数位的偏移系数P;
    计算当前数位上的每个文本元素的像素高度H;
    根据所述偏移系数P和每个文本元素的像素高度H计算当前数位的五个文本元素的整体偏移像素L,即L=P*H。
  3. 根据权利要求2所述的仪表数字显示方法,其中,所述根据所述偏移系数和每个文本元素的像素高度计算当前五个文本元素的整体偏移像素包括计算数位为个位上的整体偏移像素,具体包括:
    将小数点所在数位后的第一位数字作为个位的偏移系数;
    计算数位为个位上的每个文本元素的像素高度;
    根据所述偏移系数和每个文本元素的像素高度计算当前数位为个位的五个文本元素的整体偏移像素。
  4. 根据权利要求2所述的仪表数字显示方法,其中,所述根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度包括:
    将排列在中间位置的文本元素的中心线设置为基准线,该基准线对应基准数0,判断所述整体偏移像素与基准数0的大小;
    当所述整体偏移像素L小于所述基准数0时,则控制当前数位上的所述文本元素整体向上偏移;
    当所述整体偏移像素L大于所述基准数0时,则控制当前数位上的所述文本元素整体向下偏移。
  5. 根据权利要求2所述的仪表数字显示方法,其中,所述根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度还包括:当所述整体偏移像素L等于所述基准数0时,则说明当前数位上的所述五个文本元素偏移了一个H像素距离,在所述原本显示的文本元素的数字上进行加1或减1显示,并作为下次迭代显示基础。
  6. 根据权利要求2所述的仪表数字显示方法,其中,所述根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度包括:
    将当前数位上的中间文本元素的中心线作为原始中线;
    在每个文本元素上标定三个采样点,这三个采样点分别对应文本元素的顶部、中间和底部;
    计算每个文本元素的每个采样点与原始中线的距离;
    根据所述每个文本元素的每个采样点与原始中线的距离的大小来控制采样点的透明度;距离越小,采样点的不透明度越大。
  7. 根据权利要求2所述的仪表数字显示方法,其中,所述设置仪表数字显示所需要的数位包括:
    根据仪表数字显示需要设置的数位包括小数点前的数位个位、十位、百位、千位、万位以及小数点后第一数位十分位、第二数位百分位、第三数位千分位。
  8. 一种仪表数字显示装置,其中,所述仪表数字显示装置采用如权利要求1-7任一项所述的仪表数字显示方法中步骤,所述仪表数字显示装置包括相互连接的数位设置单元、文本元素配置单元、计算单元、偏移像素计算单元以及文本元素透明度控制单元;
    所述数位设置单元,设置为设置仪表数字显示所需要的数位;
    所述文本元素配置单元,设置为将每个数位上按照数字从大到小,从上往下依次递减排序固定配置五个文本元素;
    所述计算单元,设置为计算每个文本元素的像素高度以及确定每个数位上的偏移系数;
    所述偏移像素计算单元,设置为根据所述偏移系数和每个文本元素的像素高度计算当前数位上的五个文本元素的整体偏移像素;
    所述文本元素透明度控制单元,设置为根据当前数位上的所述整体偏移像素的距离大小来控制所在数位上的所述文本元素所显示的透明度,距离越大,文本元素显示的透明度越小。
  9. 一种仪表数字显示设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至7中任一项所述的仪表数字显示方法的步骤。
  10. 一种计算机可读存储介质其上存储有仪表数字显示方法的控制程序,所述仪表数字显示方法的控制程序被处理器执行时实现如权利要求1至7中任一项所述的仪表数字显示方法的步骤。
PCT/CN2023/111532 2022-08-12 2023-08-07 仪表数字显示方法、装置、设备及计算机可读存储介质 WO2024032564A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210968457.6 2022-08-12
CN202210968457.6A CN115291991A (zh) 2022-08-12 2022-08-12 仪表数字显示方法、装置、设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2024032564A1 true WO2024032564A1 (zh) 2024-02-15

Family

ID=83829875

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/111532 WO2024032564A1 (zh) 2022-08-12 2023-08-07 仪表数字显示方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN115291991A (zh)
WO (1) WO2024032564A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115291991A (zh) * 2022-08-12 2022-11-04 亿航智能设备(广州)有限公司 仪表数字显示方法、装置、设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140108984A1 (en) * 2012-10-16 2014-04-17 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, and storage medium
CN106919320A (zh) * 2015-12-24 2017-07-04 阿里巴巴集团控股有限公司 一种数位信息提示方法及装置
CN111198997A (zh) * 2019-12-30 2020-05-26 深圳市优必选科技股份有限公司 一种基于网页的数字显示方法及装置
CN114611031A (zh) * 2022-03-09 2022-06-10 平安科技(深圳)有限公司 数字滚动显示方法、装置、设备及介质
CN115291991A (zh) * 2022-08-12 2022-11-04 亿航智能设备(广州)有限公司 仪表数字显示方法、装置、设备及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140108984A1 (en) * 2012-10-16 2014-04-17 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, and storage medium
CN106919320A (zh) * 2015-12-24 2017-07-04 阿里巴巴集团控股有限公司 一种数位信息提示方法及装置
CN111198997A (zh) * 2019-12-30 2020-05-26 深圳市优必选科技股份有限公司 一种基于网页的数字显示方法及装置
CN114611031A (zh) * 2022-03-09 2022-06-10 平安科技(深圳)有限公司 数字滚动显示方法、装置、设备及介质
CN115291991A (zh) * 2022-08-12 2022-11-04 亿航智能设备(广州)有限公司 仪表数字显示方法、装置、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN115291991A (zh) 2022-11-04

Similar Documents

Publication Publication Date Title
WO2024032564A1 (zh) 仪表数字显示方法、装置、设备及计算机可读存储介质
CN106575308B (zh) 数据元素向可视化边缘的基于语义距离的指派
US11403358B2 (en) Interactive geographical map
US10290128B2 (en) Interactive scene graph manipulation for visualization authoring
US10749755B2 (en) Network topology self-adapting data visualization method, device, apparatus, and storage medium
JP6126608B2 (ja) インプレースで値を編集するためのユーザーインターフェース
CN102200880B (zh) 曲线图显示装置以及曲线图显示方法
CN102902408B (zh) 一种控制电子设备触摸屏工作的方法及一种电子设备
JP2013164822A (ja) 負荷閾値算出プログラム、負荷閾値算出装置および負荷閾値算出方法
CN103578553B (zh) 一种矢量线型快速擦除方法
CN110675728A (zh) 热力图的生成方法、装置、设备及计算机可读存储介质
CN109343903A (zh) 一种更新用户界面的方法及终端
CN108038117A (zh) 一种网页布局方法及装置
CN107395594A (zh) 一种拖拽验证码的自动识别方法
CN104375211B (zh) 一种气象预报等值线图更新方法及***
CN108241505A (zh) 一种页面适配方法及装置
CN116206012A (zh) 元素布局方法以及相关设备
CN109062461A (zh) 触控面板
US8959424B2 (en) Comparative and analytic lens for displaying a window with a first column for first data and a second column for comparison values of the first data and second data
CN111259270A (zh) 天气提醒方法、设备以及计算机可读介质
US20140192082A1 (en) Methods and systems for generating an aggregated data visualization
JP5866957B2 (ja) 情報処理装置、表示制御方法及びプログラム
CN105988703A (zh) 一种业务对象的展示方法和装置
US9547431B2 (en) Consuming data on a touchscreen device
CN107515751A (zh) 一种ui布局自适应方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23851785

Country of ref document: EP

Kind code of ref document: A1