Movatterモバイル変換


[0]ホーム

URL:


CN113641369A - Font loading method, device, electronic device and storage medium - Google Patents

Font loading method, device, electronic device and storage medium
Download PDF

Info

Publication number
CN113641369A
CN113641369ACN202110931213.6ACN202110931213ACN113641369ACN 113641369 ACN113641369 ACN 113641369ACN 202110931213 ACN202110931213 ACN 202110931213ACN 113641369 ACN113641369 ACN 113641369A
Authority
CN
China
Prior art keywords
font
directory
uri
font file
program
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
CN202110931213.6A
Other languages
Chinese (zh)
Other versions
CN113641369B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN202110931213.6ApriorityCriticalpatent/CN113641369B/en
Publication of CN113641369ApublicationCriticalpatent/CN113641369A/en
Application grantedgrantedCritical
Publication of CN113641369BpublicationCriticalpatent/CN113641369B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application discloses a font loading method and device, electronic equipment and a storage medium. The method comprises the following steps: a first program of the electronic equipment caches a font file under a first directory of the electronic equipment to a preset second directory of the electronic equipment; the font file under the first directory contains Native font resources of the first program; the first program acquires the font file under the second directory by using at least one preset URI (Uniform resource identifier), and loads Native fonts on the Flutter page by using the font file under the second directory; each URI corresponds to at least one font file under the second directory.

Description

Translated fromChinese
字体加载方法、装置、电子设备及存储介质Font loading method, device, electronic device and storage medium

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种数据处理方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, electronic device, and storage medium.

背景技术Background technique

针对应用程序(APP)的开发,出现了越来越多的跨平台解决方案。其中,Flutter技术是谷歌(Google)推出的跨平台开发框架,在性能、适配能力等方面的表现具有很大的优势。基于Flutter技术的APP开发通常存在两种模式:There are more and more cross-platform solutions for application development (APP). Among them, Flutter technology is a cross-platform development framework launched by Google, which has great advantages in performance and adaptability. There are usually two modes of APP development based on Flutter technology:

1)基于新建的Flutter工程进行APP开发;1) APP development based on the new Flutter project;

2)在Native工程中嵌入Flutter页面进行APP的混合开发。2) Embed the Flutter page in the Native project for the hybrid development of the APP.

由于大多数原生APP中的业务逻辑相对复杂,如果全部采用Flutter技术进行APP的重构,周期长,风险大;并且,Flutter技术作为新技术还不是很成熟。因此,通常采用上述第二种模式(即在Native工程中嵌入Flutter页面进行APP的混合开发)进行APP开发。Since the business logic in most native APPs is relatively complex, if all use Flutter technology for APP reconstruction, the cycle is long and the risk is high; and Flutter technology is not very mature as a new technology. Therefore, the second mode above (that is, embedding the Flutter page in the Native project for the hybrid development of the APP) is usually used for APP development.

然而,相关技术中,针对基于Native技术和Flutter技术混合开发的APP,Native页面和Flutter页面无法共享字体资源。However, in the related art, for an APP developed based on a mixture of Native technology and Flutter technology, the native page and the Flutter page cannot share font resources.

发明内容SUMMARY OF THE INVENTION

为解决相关技术问题,本申请实施例提供一种字体加载方法、装置、电子设备及存储介质。To solve related technical problems, embodiments of the present application provide a font loading method, apparatus, electronic device, and storage medium.

本申请实施例的技术方案是这样实现的:The technical solutions of the embodiments of the present application are implemented as follows:

本申请实施例提供了一种字体加载方法,应用于电子设备,包括:The embodiment of the present application provides a font loading method, which is applied to an electronic device, including:

所述电子设备的第一程序将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;所述第一目录下的字体文件包含所述第一程序的Native字体资源;The first program of the electronic device caches the font file in the first directory of the electronic device to the preset second directory of the electronic device; the font file in the first directory contains the first program The Native font resource;

所述第一程序利用预设的至少一个统一资源标识符(URI,Uniform ResourceIdentifier)获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。The first program uses a preset at least one Uniform Resource Identifier (URI, Uniform ResourceIdentifier) to obtain font files in the second directory, and uses the font files in the second directory to load Native fonts on a Flutter page; Each URI corresponds to at least one font file in the second directory.

上述方案中,所述将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录,包括:In the above solution, the caching of the font files in the first directory of the electronic device to the preset second directory of the electronic device includes:

所述第一程序在启动时检测所述第二目录是否存在缓存的字体文件;The first program detects whether there is a cached font file in the second directory when it is started;

所述第一程序在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。The first program caches the font files in the first directory to the second directory when the cached font files are not detected in the second directory.

上述方案中,所述利用预设的至少一个URI获取所述第二目录下的字体文件,包括:In the above solution, the use of at least one preset URI to obtain font files in the second directory includes:

所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that a font file corresponding to the corresponding URI exists in the second directory, Get the font file corresponding to the corresponding URI.

上述方案中,每个URI还对应一个字体文件的云端下载地址;所述利用预设的至少一个URI获取所述第二目录下的字体文件,包括:In the above solution, each URI also corresponds to a cloud download address of a font file; the use of at least one preset URI to obtain the font file in the second directory includes:

所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录不存在相应URI对应的字体文件的情况下,利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录;并获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that there is no font file corresponding to the corresponding URI in the second directory , download the font file corresponding to the corresponding URI to the second directory by using the cloud download address corresponding to the corresponding URI; and obtain the font file corresponding to the corresponding URI.

上述方案中,所述利用所述第二目录下的字体文件在Flutter页面加载Native字体,包括:In the above scheme, the use of the font file in the second directory to load the Native font on the Flutter page includes:

所述第一程序校验所述第二目录下的每个字体文件的有效性;在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体。The first program verifies the validity of each font file in the second directory; in the case that the validity check of the corresponding font file is passed, the corresponding font file is used to load the corresponding Native font on the Flutter page.

上述方案中,所述在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体,包括:In the above scheme, when the validity verification of the corresponding font file is passed, the corresponding font file is used to load the corresponding Native font on the Flutter page, including:

所述第一程序在相应字体文件的有效性校验通过的情况下,对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。The first program decrypts the corresponding font file when the validity verification of the corresponding font file passes, and uses the decrypted font file to load the corresponding Native font on the Flutter page.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

所述第一程序在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。The first program loads a preset system font on the Flutter page when the native font cannot be successfully loaded by using the font file in the second directory.

本申请实施例还提供了一种字体加载装置,设置在电子设备上,包括:The embodiment of the present application also provides a font loading device, which is arranged on an electronic device, including:

第一程序单元,用于将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;所述第一目录下的字体文件包含所述第一程序单元的Native字体资源;每个URI至少对应所述第二目录下的一个字体文件。The first program unit is used to cache the font files in the first directory of the electronic device to the preset second directory of the electronic device; use the preset at least one URI to obtain the fonts in the second directory file, and use the font file in the second directory to load the Native font on the Flutter page; the font file in the first directory contains the Native font resource of the first program unit; each URI corresponds to at least the second A font file in the directory.

本申请实施例还提供了一种电子设备,包括:处理器及和用于存储能够在处理器上运行的计算机程序的存储器,Embodiments of the present application also provide an electronic device, including: a processor and a memory for storing a computer program that can be run on the processor,

其中,所述处理器用于运行所述计算机程序时,执行上述任一方法的步骤。Wherein, when the processor is configured to execute the steps of any of the above methods when running the computer program.

本申请实施例还提供了一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一方法的步骤。Embodiments of the present application further provide a storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any of the foregoing methods.

本申请实施例提供的字体加载方法、装置、电子设备及存储介质,电子设备的第一程序将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;所述第一目录下的字体文件包含所述第一程序的Native字体资源;所述第一程序利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。本申请实施例的方案,第一程序将包含Native字体资源的第一目录下的字体文件缓存到预设的第二目录,并利用第二目录下的字体文件在Flutter页面加载Native字体;如此,针对基于Native技术和Flutter技术混合开发的APP,Native页面和Flutter页面能够共享一份Native字体资源(即第一目录下的字体文件),换句话说,不需要在APP的安装包分别针对Native页面和Flutter页面存放两份相同的字体资源,而只需要在APP的安装包存放一份字体资源,从而能够有效减小APP的安装包的体积,进而提高用户下载和安装APP的效率,提升用户体验。In the font loading method, device, electronic device, and storage medium provided by the embodiments of the present application, the first program of the electronic device caches the font files in the first directory of the electronic device to the preset second directory of the electronic device ; The font file under the first directory contains the Native font resource of the first program; The first program utilizes a preset at least one URI to obtain the font file under the second directory, and utilizes the second The font files in the directory load Native fonts on the Flutter page; each URI corresponds to at least one font file in the second directory. In the solution of the embodiment of the present application, the first program caches the font file in the first directory containing the Native font resource to the preset second directory, and uses the font file in the second directory to load the Native font on the Flutter page; thus, For the APP based on the hybrid development of Native technology and Flutter technology, the Native page and the Flutter page can share a Native font resource (that is, the font file in the first directory). In other words, there is no need to separately target the Native page in the APP installation package. Store two copies of the same font resources as the Flutter page, but only need to store one font resource in the APP installation package, which can effectively reduce the size of the APP installation package, thereby improving the efficiency of users downloading and installing the APP, and improving the user experience. .

附图说明Description of drawings

图1为本申请实施例字体加载方法的流程示意图;1 is a schematic flowchart of a font loading method according to an embodiment of the present application;

图2为本申请应用实施例字体加载的流程示意图;2 is a schematic flowchart of font loading in an application embodiment of the present application;

图3为本申请实施例字体加载装置的结构示意图;3 is a schematic structural diagram of a font loading device according to an embodiment of the present application;

图4为本申请实施例电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

下面结合附图及实施例对本申请再作进一步详细的描述。The present application will be further described in detail below with reference to the accompanying drawings and embodiments.

相关技术中,针对基于Native技术和Flutter技术混合开发的APP,如果Flutter页面需要加载自定义字体,则需要将相应的字体资源内置到工程中(即存放到APP的安装包),从而可以通过增加参数设置的方式在Flutter页面显示文字时呈现自定义字体。然而,由于Native页面和Flutter页面对应的字体资源的存放位置(即存储路径)不同,所以Native页面和Flutter页面无法共享字体资源。In related technologies, for an APP based on a mixture of Native technology and Flutter technology, if the Flutter page needs to load custom fonts, the corresponding font resources need to be built into the project (that is, stored in the APP's installation package), so that it can be added by adding The way the parameters are set renders the custom font when the text is displayed on the Flutter page. However, since the font resources corresponding to the Native page and the Flutter page have different storage locations (that is, storage paths), the Native page and the Flutter page cannot share font resources.

实际应用时,为了解决Native页面和Flutter页面无法共享字体资源的问题,可以考虑在APP的安装包分别针对Native页面和Flutter页面存放两份相同的字体资源。然而,这样会导致APP内置(即保存)的字体资源的浪费,并给APP的安装包增加额外的体积。In practical applications, in order to solve the problem that the native page and the Flutter page cannot share font resources, you can consider storing two identical font resources in the APP installation package for the Native page and the Flutter page respectively. However, this will result in a waste of font resources built into the APP (ie, saved), and add extra volume to the APP's installation package.

基于此,在本申请的各种实施例中,电子设备安装的第一程序(即APP)将包含Native字体资源的第一目录下的字体文件缓存到预设的第二目录,并利用第二目录下的字体文件在Flutter页面加载Native字体;如此,针对基于Native技术和Flutter技术混合开发的APP,Native页面和Flutter页面能够共享一份Native字体资源(即第一目录下的字体文件),换句话说,不需要在APP的安装包分别针对Native页面和Flutter页面存放两份相同的字体资源,而只需要在APP的安装包存放一份字体资源,从而能够有效减小APP的安装包的体积,进而提高用户下载和安装APP的效率,提升用户体验。Based on this, in various embodiments of the present application, the first program (ie APP) installed on the electronic device caches the font files in the first directory containing the Native font resources to the preset second directory, and uses the second The font files in the directory are loaded with Native fonts on the Flutter page; in this way, for an APP developed based on the combination of Native technology and Flutter technology, the Native page and the Flutter page can share a Native font resource (that is, the font file in the first directory), change In other words, it is not necessary to store two identical font resources in the APP installation package for the Native page and the Flutter page, but only one font resource needs to be stored in the APP installation package, which can effectively reduce the size of the APP installation package. , thereby improving the efficiency of users downloading and installing APP, and improving the user experience.

本申请实施例提供一种字体加载方法,应用于电子设备,如图1所示,该方法包括:An embodiment of the present application provides a font loading method, which is applied to an electronic device. As shown in FIG. 1 , the method includes:

步骤101:所述电子设备的第一程序将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;Step 101: the first program of the electronic device caches the font files in the first directory of the electronic device to the preset second directory of the electronic device;

这里,所述第一程序是基于Native技术和Flutter技术实现的;所述第一目录下的字体文件包含所述第一程序的Native字体资源;Here, the first program is realized based on Native technology and Flutter technology; the font file under the first directory contains the Native font resource of the first program;

步骤102:所述第一程序利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。Step 102: The first program uses at least one preset URI to obtain font files in the second directory, and uses the font files in the second directory to load Native fonts on the Flutter page; each URI corresponds to at least the A font file in the second directory.

实际应用时,所述电子设备可以包括个人电脑(PC,Personal Computer)、手机、可穿戴设备等;所述PC可以包括台式电脑、笔记本电脑、平板电脑、车载电脑等。In practical application, the electronic device may include a personal computer (PC, Personal Computer), a mobile phone, a wearable device, and the like; the PC may include a desktop computer, a notebook computer, a tablet computer, a vehicle-mounted computer, and the like.

实际应用时,所述第一目录可以理解为所述第一程序的Native字体资源的存储路径;所述第二目录可以理解为所述第一程序的Flutter页面对应的字体资源缓存路径;所述将所述第一目录下的字体文件缓存到所述第二目录,可以理解为将所述第一目录下的字体文件复制到指定的缓存路径(即所述第二目录)。这里,所述第一目录和所述第二目录可以根据需求预先设置;所述第一目录和所述第二目录可以是在所述电子设备安装所述第一程序的过程中产生的。In practical application, the first directory can be understood as the storage path of the native font resources of the first program; the second directory can be understood as the font resource cache path corresponding to the Flutter page of the first program; the Caching the font files in the first directory to the second directory can be understood as copying the font files in the first directory to a specified cache path (ie, the second directory). Here, the first directory and the second directory may be preset according to requirements; the first directory and the second directory may be generated during the process of installing the first program on the electronic device.

在步骤101中,实际应用时,由于所述第二目录中缓存的字体文件可能在特定情况下被清除,比如用户主动删除字体文件、缓存管理软件清空所述第一程序的缓存等情况,因此,为了保障Flutter页面能够加载Native字体,所述第一程序需要在启动时检测所述第二目录是否存在缓存的字体文件,并在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。Instep 101, in actual application, since the font file cached in the second directory may be cleared under certain circumstances, such as the user actively deletes the font file, the cache management software clears the cache of the first program, etc., therefore , in order to ensure that the Flutter page can load Native fonts, the first program needs to detect whether there are cached font files in the second directory at startup, and in the case that the second directory does not detect the cached font files, Cache the font files in the first directory to the second directory.

基于此,在一实施例中,所述将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录,可以包括:Based on this, in an embodiment, the caching of the font files in the first directory of the electronic device to the preset second directory of the electronic device may include:

所述第一程序在启动时检测所述第二目录是否存在缓存的字体文件;The first program detects whether there is a cached font file in the second directory when it is started;

所述第一程序在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。The first program caches the font files in the first directory to the second directory when the cached font files are not detected in the second directory.

这里,所述第一程序在所述第二目录检测到缓存的字体文件的情况下,则可以执行所述步骤102。Here, when the first program detects a cached font file in the second directory, thestep 102 may be executed.

实际应用时,在所述电子设备安装所述第一程序后第一次启动所述第一程序的情况下,由于还没有将所述第一目录下的字体文件缓存到所述第二目录,因此,所述第一程序可以不检测所述第二目录是否存在缓存的字体文件,而直接将所述第一目录下的字体文件缓存到所述第二目录。在第二次启动等后续启动情况下,所述第一程序再对所述第二目录是否存在缓存的字体文件进行检测,并基于检测结果确定是否需要执行缓存操作。In practical application, when the electronic device starts the first program for the first time after installing the first program, since the font files in the first directory have not been cached in the second directory, Therefore, the first program may directly cache the font files in the first directory to the second directory without detecting whether there are cached font files in the second directory. In the case of subsequent startups such as the second startup, the first program then detects whether there are cached font files in the second directory, and determines whether a cache operation needs to be performed based on the detection result.

其中,由于所述第一程序仅在第一次启动时不检测所述第二目录是否存在缓存的字体文件,因此,所述第一程序在第一次启动时,可以单独开启一个预先设置的线程(后续描述中记作第一线程)来将所述第一目录下的字体文件缓存到所述第二目录。在第二次启动等后续启动情况下,所述第一程序再通过预先设定的其他线程(后续描述中记作第二线程)对所述第二目录是否存在缓存的字体文件进行检测,并在通过所述第二线程在所述第二目录未检测到缓存的字体文件的情况下,通过所述第一线程将所述第一目录下的字体文件缓存到所述第二目录。Wherein, since the first program does not detect whether there is a cached font file in the second directory only when it is started for the first time, the first program can separately start a preset font file when it is started for the first time. thread (referred to as the first thread in the subsequent description) to cache the font files in the first directory to the second directory. In the case of subsequent startups such as the second startup, the first program then uses another preset thread (referred to as the second thread in the subsequent description) to detect whether there is a cached font file in the second directory, and If the cached font file is not detected in the second directory by the second thread, the font file in the first directory is cached in the second directory by the first thread.

实际应用时,所述第一程序在启动时可以通过所述电子设备的操作系统提供的应用程序接口(API,Application Programming Interface),检测所述第二目录是否存在缓存的字体文件。In practical application, the first program can detect whether there is a cached font file in the second directory through an application programming interface (API, Application Programming Interface) provided by the operating system of the electronic device when it is started.

在步骤102中,实际应用时,由于所述第二目录中缓存的字体文件可能在任一时刻被清除,因此,为了保障Flutter页面能够加载Native字体,所述第一程序需要在利用预设的至少一个URI获取所述第二目录下的字体文件的过程中,再次检测所述第二目录是否存在各URI对应的字体文件,并在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。Instep 102, during the actual application, since the font files cached in the second directory may be cleared at any time, in order to ensure that the Flutter page can load the Native font, the first program needs to use the preset at least In the process of obtaining a font file in the second directory by a URI, it is detected again whether the font file corresponding to each URI exists in the second directory, and when it is determined that the font file corresponding to the corresponding URI exists in the second directory , get the font file corresponding to the corresponding URI.

基于此,在一实施例中,所述利用预设的至少一个URI获取所述第二目录下的字体文件,可以包括:Based on this, in an embodiment, the obtaining the font file in the second directory by using the preset at least one URI may include:

所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that a font file corresponding to the corresponding URI exists in the second directory, Get the font file corresponding to the corresponding URI.

实际应用时,在所述第一程序需要利用预设的至少一个URI获取所述第二目录下的字体文件的情况下,所述第二目录下的字体文件可能已经被清除,因此,为了进一步保障Flutter页面能够加载Native字体,可以预先将字体文件存储在云端服务器,并为每个URI预先设定一个能够从所述云端服务器下载相应字体文件的云端下载地址;如此,在确定所述第二目录不存在相应URI对应的字体文件的情况下,所述第一程序可以利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录,从而使得Flutter页面能够加载Native字体。In practical application, in the case that the first program needs to use the preset at least one URI to obtain font files in the second directory, the font files in the second directory may have been cleared. Therefore, in order to further To ensure that the Flutter page can load Native fonts, the font files can be stored in the cloud server in advance, and a cloud download address that can download the corresponding font file from the cloud server is preset for each URI; in this way, after determining the second If there is no font file corresponding to the corresponding URI in the directory, the first program can use the cloud download address corresponding to the corresponding URI to download the font file corresponding to the corresponding URI to the second directory, so that the Flutter page can load Native fonts .

基于此,在一实施例中,每个URI还可以对应一个字体文件的云端下载地址;所述利用预设的至少一个URI获取所述第二目录下的字体文件,可以包括:Based on this, in an embodiment, each URI may also correspond to a cloud download address of a font file; the obtaining the font file in the second directory by using at least one preset URI may include:

所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录不存在相应URI对应的字体文件的情况下,利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录;并获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that there is no font file corresponding to the corresponding URI in the second directory , download the font file corresponding to the corresponding URI to the second directory by using the cloud download address corresponding to the corresponding URI; and obtain the font file corresponding to the corresponding URI.

实际应用时,所述至少一个URI中每个URI的格式可以根据需求设置。示例性地,每个URI可以包含“nativeFont:字体名称”;此时,所述第一程序在检测所述第二目录是否存在相应URI对应的字体文件时,可以通过URI获取相应URI对应的字体名称,再通过所述电子设备的操作系统提供的API,检测所述第二目录是否存在该字体名称对应的字体文件。In practical application, the format of each URI in the at least one URI can be set according to requirements. Exemplarily, each URI may include "nativeFont: font name"; at this time, when the first program detects whether a font file corresponding to the corresponding URI exists in the second directory, the first program may obtain the font corresponding to the corresponding URI through the URI name, and then use the API provided by the operating system of the electronic device to detect whether the font file corresponding to the font name exists in the second directory.

实际应用时,为了进一步保障Flutter页面能够加载Native字体,可以预先设置文件下载失败时允许重试的次数N(N为大于0的整数),即所述第一程序利用相应URI对应的云端下载地址,最多可以对相应URI对应的字体文件进行N+1次下载操作。这里,N的取值可以根据需求设置。示例性地,N可以等于相应URI对应的云端下载地址在域名解析后对应的网际互连协议(IP)地址列表的个数。In practical application, in order to further ensure that the Flutter page can load Native fonts, the number of retries allowed when the file download fails, N (N is an integer greater than 0) can be preset, that is, the first program uses the cloud download address corresponding to the corresponding URI. , the font file corresponding to the corresponding URI can be downloaded at most N+1 times. Here, the value of N can be set as required. Exemplarily, N may be equal to the number of Internet Protocol (IP) address lists corresponding to the cloud download address corresponding to the corresponding URI after domain name resolution.

实际应用时,在利用所述第二目录下的字体文件在Flutter页面加载Native字体的过程中,为了避免字体文件被恶意串改,以保障用户的数据安全,可以对字体文件进行有效性校验。In practical application, in the process of using the font files in the second directory to load Native fonts on the Flutter page, in order to prevent the font files from being maliciously modified and to protect the user's data security, the font files can be verified for validity. .

基于此,在一实施例中,所述利用所述第二目录下的字体文件在Flutter页面加载Native字体,可以包括:Based on this, in one embodiment, the loading of Native fonts on the Flutter page by using the font files in the second directory may include:

所述第一程序校验所述第二目录下的每个字体文件的有效性;在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体。The first program verifies the validity of each font file in the second directory; in the case that the validity check of the corresponding font file is passed, the corresponding font file is used to load the corresponding Native font on the Flutter page.

实际应用时,所述第一程序可以基于预设的第一策略校验相应URI对应的字体文件的有效性。所述第一策略可以根据需求设置,比如利用MD5信息摘要算法(英文可以表达为Message Digest Algorithm 5)校验相应URI对应的字体文件的有效性等。In practical application, the first program may verify the validity of the font file corresponding to the corresponding URI based on the preset first policy. The first strategy can be set according to requirements, for example, the validity of the font file corresponding to the corresponding URI is checked by using the MD5 message digest algorithm (which can be expressed as Message Digest Algorithm 5 in English).

实际应用时,为了进一步避免字体文件被恶意串改,以保障用户的数据安全,可以预先对每个字体文件进行加密处理,相应地,所述第一程序可以对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。In practical application, in order to further prevent the font file from being maliciously modified and to protect the data security of the user, each font file can be encrypted in advance, and accordingly, the first program can decrypt the corresponding font file, and use The decrypted font file loads the corresponding Native font on the Flutter page.

基于此,在一实施例中,所述在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体,可以包括:Based on this, in an embodiment, when the validity check of the corresponding font file is passed, the corresponding font file is used to load the corresponding Native font on the Flutter page, which may include:

所述第一程序在相应字体文件的有效性校验通过的情况下,对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。The first program decrypts the corresponding font file when the validity verification of the corresponding font file passes, and uses the decrypted font file to load the corresponding Native font on the Flutter page.

实际应用时,所述第一程序可以基于预设的第二策略对相应字体文件进行解密。所述第二策略可以根据需求设置,比如利用FontCreator、FontForge等字体编辑软件对相应字体文件进行解密等。In practical application, the first program may decrypt the corresponding font file based on the preset second strategy. The second strategy can be set according to requirements, for example, using font editing software such as FontCreator and FontForge to decrypt the corresponding font file.

实际应用时,为了保障Flutter页面能够正常显示,可以预先设置在Flutter页面无法成功加载Native字体的情况下加载的系统字体,即所述第一程序可以在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。In actual application, in order to ensure that the Flutter page can be displayed normally, the system font to be loaded in the case where the Flutter page cannot successfully load the Native font can be preset, that is, the first program can use the font file in the second directory. When the Native font is successfully loaded, the default system font is loaded on the Flutter page.

基于此,在一实施例中,该方法还可以包括:Based on this, in one embodiment, the method may further include:

所述第一程序在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。The first program loads a preset system font on the Flutter page when the native font cannot be successfully loaded by using the font file in the second directory.

实际应用时,所述利用所述第二目录下的字体文件无法成功加载Native字体的情况可以包括以下之一:In practical application, the situation that the native font cannot be successfully loaded by using the font file in the second directory may include one of the following:

利用相应URI对应的云端下载地址无法将相应URI对应的字体文件下载到所述第二目录;The font file corresponding to the corresponding URI cannot be downloaded to the second directory by using the cloud download address corresponding to the corresponding URI;

相应字体文件未通过有效性校验;The corresponding font file has not passed the validity check;

相应字体文件无法成功解密。The corresponding font file could not be successfully decrypted.

实际应用时,利用所述至少一个URI,还可以使得所述第一程序和所述电子设备的其他程序(后续描述中记作第二程序)共享同一份字体资源,即所述第二程序可以利用所述至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面和/或Native页面加载Native字体;可以理解,所述第一程序和所述第二程序均具有所述第二目录的访问权限。In practical application, by using the at least one URI, the first program and other programs of the electronic device (referred to as the second program in the subsequent description) can also share the same font resource, that is, the second program can Use the at least one URI to obtain the font file in the second directory, and use the font file in the second directory to load the native font on the Flutter page and/or the Native page; it can be understood that the first program and all All the second programs have access rights to the second directory.

本申请实施例提供的字体加载方法,电子设备的第一程序将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;所述第一目录下的字体文件包含所述第一程序的Native字体资源;所述第一程序利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。本申请实施例的方案,第一程序将包含Native字体资源的第一目录下的字体文件缓存到预设的第二目录,并利用第二目录下的字体文件在Flutter页面加载Native字体;如此,针对基于Native技术和Flutter技术混合开发的APP,Native页面和Flutter页面能够共享一份Native字体资源(即第一目录下的字体文件),换句话说,不需要在APP的安装包分别针对Native页面和Flutter页面存放两份相同的字体资源,而只需要在APP的安装包存放一份字体资源,从而能够有效减小APP的安装包的体积,进而提高用户下载和安装APP的效率,提升用户体验。In the font loading method provided by the embodiment of the present application, the first program of the electronic device caches the font files in the first directory of the electronic device to the preset second directory of the electronic device; The font file contains the Native font resource of the first program; the first program obtains the font file in the second directory by using at least one preset URI, and uses the font file in the second directory on the Flutter page Load the native font; each URI corresponds to at least one font file in the second directory. In the solution of the embodiment of the present application, the first program caches the font file in the first directory containing the Native font resource to the preset second directory, and uses the font file in the second directory to load the Native font on the Flutter page; thus, For the APP based on the hybrid development of Native technology and Flutter technology, the Native page and the Flutter page can share a Native font resource (that is, the font file in the first directory). In other words, there is no need to separately target the Native page in the APP installation package. Store two copies of the same font resources as the Flutter page, but only need to store one font resource in the APP installation package, which can effectively reduce the size of the APP installation package, thereby improving the efficiency of users downloading and installing the APP, and improving the user experience. .

下面结合应用实施例对本申请再作进一步详细的描述。The present application will be described in further detail below in conjunction with application examples.

在本应用实施例中,APP(即上述第一程序)首次启动后,将已有的Native内置字体资源(即APP的安装包中存放的Native字体资源)通过缓存的方式预先存放到指定目录(即上述第二目录),并通过URI加载的方式,将Native字体资源共享给本APP的Flutter端(即Flutter页面)使用,或共享给其他APP(比如上述第二程序)使用。In this application embodiment, after the APP (that is, the above-mentioned first program) is started for the first time, the existing Native built-in font resources (that is, the Native font resources stored in the installation package of the APP) are pre-stored in the specified directory ( That is, the above-mentioned second directory), and share the Native font resources to the Flutter side of this APP (that is, the Flutter page) by means of URI loading, or to other APPs (such as the above-mentioned second program) for use.

在本应用实施例中,APP包含字体预加载模块、字体URI解析模块和云端加载模块;其中,In this application embodiment, the APP includes a font preloading module, a font URI parsing module and a cloud loading module; wherein,

所述字体预加载模块,用于在APP首次启动的同时,通过开启预先设置的单独的线程(即上述第一线程),处理包含Native字体资源的字体文件的缓存操作,以将Native字体资源循环地缓存到磁盘的指定的缓存目录中(即上述电子设备的第二目录)。这里,所述循环是指:当缓存的字体文件在特定情况下被删除时(比如用户主动删除缓存、缓存管理软件清空APP缓存等情况),APP会在下次启动后检查缓存目录是否存在缓存的字体文件,并在检查到不存在缓存的字体文件的情况下自动将包含Native字体资源的字体文件缓存到缓存目录。The font preloading module is used to process the cache operation of the font file containing the Native font resource by opening a pre-set separate thread (that is, the above-mentioned first thread) when the APP is started for the first time, so as to circulate the Native font resource. and cached in the designated cache directory of the disk (ie, the second directory of the above-mentioned electronic device). Here, the cycle refers to: when the cached font file is deleted under certain circumstances (for example, the user actively deletes the cache, the cache management software clears the APP cache, etc.), the APP will check whether there is a cache in the cache directory after the next startup. Font files, and automatically cache font files containing Native font resources to the cache directory if no cached font files are detected.

所述字体URI解析模块,用于通过字体显示组件中配置的URI参数信息(即上述预设的至少一个URI),在Flutter页面需要加载Native字体时,检查缓存目录中是否存在相应的字体文件。这里,URI参数信息可以包含“nativeFont:字体名称”,所述字体URI解析模块可以根据URI参数信息包含的字体名称,检查缓存目录中是否存在该字体名称对应的字体文件。另外,每种内置Native字体可以和云端的字体文件一一对应,即所述字体URI解析模块可以在本地字体文件无法正常加载时,通知所述云端加载模块,以拉取云端的字体文件进行加载。The font URI parsing module is configured to check whether a corresponding font file exists in the cache directory when the Flutter page needs to load a native font through the URI parameter information configured in the font display component (ie, at least one URI preset above). Here, the URI parameter information may include "nativeFont: font name", and the font URI parsing module may check whether a font file corresponding to the font name exists in the cache directory according to the font name included in the URI parameter information. In addition, each built-in Native font can be in a one-to-one correspondence with a font file in the cloud, that is, the font URI parsing module can notify the cloud loading module when the local font file cannot be loaded normally, so as to pull the font file in the cloud for loading .

所述云端加载模块,用于通过URI参数信息解析对应的云端字体下载地址,换句话说,每个URI对应一个云端字体下载地址,所述云端加载模块可以对云端字体下载地址进行域名解析,并利用解析得到的IP地址下载相应字体文件。这里,字体文件下载失败可以允许重试N次(N代表域名解析后对应的IP地址列表个数),即最多可以进行N+1次的字体文件下载操作。The cloud loading module is used to resolve the corresponding cloud font download address through the URI parameter information, in other words, each URI corresponds to a cloud font download address, and the cloud loading module can perform domain name resolution on the cloud font download address, and Use the parsed IP address to download the corresponding font file. Here, the font file download failure can be allowed to retry N times (N represents the number of IP address lists corresponding to the domain name resolution), that is, the font file download operation can be performed at most N+1 times.

在本应用实施例中,APP会对从本地或云端获取的字体文件进行有效性校验,防止字体文件被恶意串改而影响用户使用。另外,字体文件可以预先加密,即APP会在对字体文件进行解密后加载对应的Native字体。In this application embodiment, the APP will verify the validity of the font file obtained locally or from the cloud, so as to prevent the font file from being maliciously altered and affecting the use of the user. In addition, the font file can be encrypted in advance, that is, the APP will load the corresponding Native font after decrypting the font file.

在本应用实施例中,如图2所示,APP的字体加载过程具体可以包括以下步骤:In this application embodiment, as shown in FIG. 2 , the font loading process of the APP may specifically include the following steps:

步骤201:字体预加载模块检查字体文件是否缓存成功;若否,执行步骤202;若是,则执行步骤203;Step 201: the font preloading module checks whether the font file is cached successfully; if not, go toStep 202; if yes, go toStep 203;

步骤202:缓存字体文件;之后执行步骤203;Step 202: Cache the font file; then executeStep 203;

步骤203:打开Flutter页面加载Native字体;之后执行步骤204;Step 203: Open the Flutter page to load the Native font; then performStep 204;

步骤204:字体URI解析模块检测URI对应的字体文件是否存在;若存在,执行步骤207;若不存在,则执行步骤205;Step 204: the font URI parsing module detects whether the font file corresponding to the URI exists; if it exists, executestep 207; if not, executestep 205;

步骤205:云端加载模块下载URI对应的字体文件;之后执行步骤206;Step 205: the cloud loading module downloads the font file corresponding to the URI; then step 206 is executed;

步骤206:判断字体文件是否下载成功;若是,执行步骤207;若否,则执行步骤208;Step 206: determine whether the font file is downloaded successfully; if yes, go to step 207; if not, go to step 208;

步骤207:判断字体文件是否通过有效性校验;若是,则执行步骤209;若否,则执行步骤208;Step 207: Determine whether the font file has passed the validity check; if yes, go toStep 209; if not, go toStep 208;

步骤208:Flutter页面显示系统字体;Step 208: The Flutter page displays the system font;

步骤209:判断字体文件是否成功解密;若是,则执行步骤210;若否,则执行步骤208;Step 209: determine whether the font file is successfully decrypted; if yes, go to step 210; if not, go to step 208;

步骤210:Flutter页面显示Native字体。Step 210: The Flutter page displays Native fonts.

在本应用实施例中,APP首次启动的同时,对包含Native字体资源的字体文件进行缓存;下次APP启动后,会进行字体缓存文件的检查,若未检测到缓存的字体文件,则会自动缓存Native字体文件到指定的缓存目录;APP的Flutter页面可以通过字体显示组件中配置的URI参数信息加载指定的Native字体。In this application embodiment, when the APP is started for the first time, the font file containing the Native font resource is cached; after the next time the APP is started, the font cache file will be checked, and if the cached font file is not detected, it will automatically Cache Native font files to the specified cache directory; the Flutter page of the APP can load the specified Native font through the URI parameter information configured in the font display component.

在本应用实施例中,加载Native字体的规则包括:利用解析URI链接得到的字体名称,优先加载本地缓存的字体文件,每个字体文件又与云端字体文件一一对应(也可以理解为每种Native字体与云端字体文件一一对应),在本地缓存的字体文件无法正常加载时,APP会拉取云端的字体文件进行加载以显示Native字体,在APP从云端下载字体文件失败时,APP默认在Flutter页面显示指定的系统字体。In this application embodiment, the rules for loading native fonts include: using the font name obtained by parsing the URI link, preferentially loading the locally cached font file, and each font file corresponds one-to-one with the cloud font file (it can also be understood as each type of font file). Native fonts correspond to cloud font files one-to-one). When the locally cached font file cannot be loaded normally, the APP will pull the font file from the cloud to load it to display the Native font. When the APP fails to download the font file from the cloud, the APP defaults to Flutter pages display the specified system font.

实际应用时,在APP的Flutter页面渲染Native字体的过程中,APP可以首先进行本地缓存的字体文件的预加载,即检查本地缓存的字体文件是否存在及是否可用(即有效性校验),如果有效,APP可以直接从缓存目录中读取字体文件并显示相应的自定义Native字体,可以理解,这种读取方式需要在Flutter页面加载前预先加载自定义字体资源(即缓存目录的字体文件)。In actual application, in the process of rendering native fonts on the Flutter page of the APP, the APP can first preload the locally cached font file, that is, check whether the locally cached font file exists and is available (ie, validity check). Effective, the APP can directly read the font file from the cache directory and display the corresponding custom native font. It is understandable that this reading method requires pre-loading the custom font resource (ie the font file in the cache directory) before the Flutter page is loaded. .

本应用实施例提供的方案,对Flutter页面的Native字体加载方式进行了优化和改进,具体具有以下优点:The solution provided by this application example optimizes and improves the native font loading method of Flutter pages, and has the following advantages:

1)Flutter页面和Native页面可以共用同一份字体资源;1) Flutter pages and Native pages can share the same font resource;

2)有效减小APP的安装包的体积;2) Effectively reduce the size of the APP installation package;

3)多APP可以共享同一份字体资源。3) Multiple apps can share the same font resource.

为了实现本申请实施例的方法,本申请实施例还提供了一种字体加载装置,如图3所示,字体加载装置302设置在电子设备301上,该装置包括:In order to implement the method of the embodiment of the present application, the embodiment of the present application further provides a font loading device. As shown in FIG. 3 , thefont loading device 302 is set on theelectronic device 301, and the device includes:

第一程序单元303,用于将所述电子设备301的第一目录下的字体文件缓存到预设的所述电子设备301的第二目录;利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;所述第一程序单元303是基于Native技术和Flutter技术实现的;所述第一目录下的字体文件包含所述第一程序单元303的Native字体资源;每个URI至少对应所述第二目录下的一个字体文件。Thefirst program unit 303 is used to cache the font files in the first directory of theelectronic device 301 to the preset second directory of theelectronic device 301; use the preset at least one URI to obtain the second directory The font file under the second directory, and use the font file under the second directory to load the Native font on the Flutter page; thefirst program unit 303 is realized based on the Native technology and the Flutter technology; the font file under the first directory contains Native font resources of thefirst program unit 303; each URI corresponds to at least one font file in the second directory.

其中,在一实施例中,所述第一程序单元303,具体用于:Wherein, in one embodiment, thefirst program unit 303 is specifically used for:

在启动时检测所述第二目录是否存在缓存的字体文件;Detecting whether there is a cached font file in the second directory at startup;

在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。If the cached font file is not detected in the second directory, the font file in the first directory is cached to the second directory.

在一实施例中,所述第一程序单元303,还用于针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。In an embodiment, thefirst program unit 303 is further configured to, for each URI in the at least one URI, detect whether there is a font file corresponding to the corresponding URI in the second directory; If a font file corresponding to the corresponding URI exists in the directory, obtain the font file corresponding to the corresponding URI.

在一实施例中,每个URI还对应一个字体文件的云端下载地址;所述第一程序单元303,还用于对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录不存在相应URI对应的字体文件的情况下,利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录;并获取相应URI对应的字体文件。In one embodiment, each URI also corresponds to a cloud download address of a font file; thefirst program unit 303 is further configured to detect whether the second directory exists for each URI in the at least one URI the font file corresponding to the corresponding URI; when it is determined that the second directory does not have the font file corresponding to the corresponding URI, use the cloud download address corresponding to the corresponding URI to download the font file corresponding to the corresponding URI to the second directory; and Get the font file corresponding to the corresponding URI.

在一实施例中,所述第一程序单元303,还用于校验所述第二目录下的每个字体文件的有效性;在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体。In one embodiment, thefirst program unit 303 is also used to verify the validity of each font file under the second directory; in the case of passing the validity check of the corresponding font file, use the corresponding The font file loads the corresponding Native font on the Flutter page.

在一实施例中,所述第一程序单元303,还用于在相应字体文件的有效性校验通过的情况下,对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。In one embodiment, thefirst program unit 303 is further configured to decrypt the corresponding font file when the validity verification of the corresponding font file is passed, and use the decrypted font file to load the corresponding font file on the Flutter page. Native font.

在一实施例中,所述第一程序单元303,还用于在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。In one embodiment, thefirst program unit 303 is further configured to load a preset system font on the Flutter page when the native font cannot be successfully loaded by using the font file in the second directory.

这里,所述第一程序单元303的功能相当于上述应用实施例中字体预加载模块、字体URI解析模块和云端加载模块的功能。Here, the functions of thefirst program unit 303 are equivalent to the functions of the font preloading module, the font URI parsing module and the cloud loading module in the above application embodiments.

实际应用时,所述第一程序单元303可由所述字体加载装置中的处理器实现。In practical application, thefirst program unit 303 may be implemented by a processor in the font loading apparatus.

需要说明的是:上述实施例提供的字体加载装置在加载字体时,仅以上述各程序模块的划分进行举例说明,实际应用时,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的字体加载装置与字体加载方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the font loading device provided by the above embodiment loads fonts, only the division of the above program modules is used as an example for illustration. In practical applications, the above processing can be allocated to different program modules to complete as needed. The internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the font loading device and the font loading method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.

基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备,如图4所示,该电子设备400包括:Based on the hardware implementation of the above-mentioned program modules, and in order to implement the methods of the embodiments of the present application, the embodiments of the present application further provide an electronic device. As shown in FIG. 4 , theelectronic device 400 includes:

通信接口401,能够与其他电子设备进行信息交互;Acommunication interface 401, capable of information interaction with other electronic devices;

处理器402,与所述通信接口401连接,以实现与其他电子设备进行信息交互,用于运行计算机程序时,执行上述一个或多个技术方案提供的方法;Aprocessor 402, connected to thecommunication interface 401, to realize information interaction with other electronic devices, for executing the method provided by one or more of the above technical solutions when running a computer program;

存储器403,存储能够在所述处理器402上运行的计算机程序。Thememory 403 stores computer programs that can run on theprocessor 402 .

具体地,所述处理器402,用于:Specifically, theprocessor 402 is used for:

通过运行所述存储器403存储的第一程序,将所述电子设备400的第一目录下的字体文件缓存到预设的所述电子设备400的第二目录;所述第一程序是基于Native技术和Flutter技术实现的;所述第一目录下的字体文件包含所述第一程序的Native字体资源;By running the first program stored in thememory 403, the font files in the first directory of theelectronic device 400 are cached to the preset second directory of theelectronic device 400; the first program is based on the Native technology And Flutter technology realizes; The font file under described first directory contains the Native font resource of described first program;

通过运行所述第一程序,利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。By running the first program, use a preset at least one URI to obtain font files in the second directory, and use the font files in the second directory to load Native fonts on the Flutter page; each URI corresponds to at least one A font file in the second directory described above.

其中,在一实施例中,所述处理器402,具体用于:Wherein, in an embodiment, theprocessor 402 is specifically configured to:

通过运行所述第一程序,在所述第一程序启动时检测所述第二目录是否存在缓存的字体文件;By running the first program, when the first program is started, it is detected whether there is a cached font file in the second directory;

通过运行所述第一程序,在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。By running the first program, if the cached font file is not detected in the second directory, the font file in the first directory is cached to the second directory.

在一实施例中,所述处理器402,还用于通过运行所述第一程序,针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。In an embodiment, theprocessor 402 is further configured to, by running the first program, for each URI in the at least one URI, detect whether there is a font file corresponding to the corresponding URI in the second directory; In the case that it is determined that a font file corresponding to the corresponding URI exists in the second directory, the font file corresponding to the corresponding URI is acquired.

在一实施例中,每个URI还对应一个字体文件的云端下载地址;所述处理器402,还用于通过运行所述第一程序,针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录不存在相应URI对应的字体文件的情况下,利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录;并获取相应URI对应的字体文件。In an embodiment, each URI also corresponds to a cloud download address of a font file; theprocessor 402 is further configured to, by running the first program, detect all the URIs in the at least one URI for each URI. whether there is a font file corresponding to the corresponding URI in the second directory; if it is determined that there is no font file corresponding to the corresponding URI in the second directory, use the cloud download address corresponding to the corresponding URI to download the font file corresponding to the corresponding URI to the Describe the second directory; and obtain the font file corresponding to the corresponding URI.

在一实施例中,所述处理器402,还用于通过运行所述第一程序,校验所述第二目录下的每个字体文件的有效性;在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体。In one embodiment, theprocessor 402 is further configured to check the validity of each font file under the second directory by running the first program; after the validity check of the corresponding font file passes In the case of , use the corresponding font file to load the corresponding Native font on the Flutter page.

在一实施例中,所述处理器402,还用于通过运行所述第一程序,在相应字体文件的有效性校验通过的情况下,对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。In one embodiment, theprocessor 402 is further configured to decrypt the corresponding font file and use the decrypted font when the validity check of the corresponding font file is passed by running the first program. The file loads the corresponding Native font on the Flutter page.

在一实施例中,所述处理器402,还用于通过运行所述第一程序,在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。In one embodiment, theprocessor 402 is further configured to, by running the first program, load the default font on the Flutter page under the condition that the font file in the second directory cannot be used to successfully load the Native font. System font.

需要说明的是:所述处理器402具体执行上述操作的过程详见方法实施例,这里不再赘述。It should be noted that: the specific process for theprocessor 402 to perform the above operations can be found in the method embodiments, and details are not repeated here.

当然,实际应用时,电子设备400中的各个组件通过总线系统404耦合在一起。可理解,总线系统404用于实现这些组件之间的连接通信。总线系统404除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图4中将各种总线都标为总线系统404。Of course, in practical application, various components in theelectronic device 400 are coupled together through thebus system 404 . It will be appreciated that thebus system 404 is used to implement the connection communication between these components. In addition to the data bus, thebus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity of illustration, the various buses are labeled asbus system 404 in FIG. 4 .

本申请实施例中的存储器403用于存储各种类型的数据以支持电子设备400的操作。这些数据的示例包括:用于在电子设备400上操作的任何计算机程序。Thememory 403 in this embodiment of the present application is used to store various types of data to support the operation of theelectronic device 400 . Examples of such data include: any computer program used to operate onelectronic device 400 .

上述本申请实施例揭示的方法可以应用于处理器402中,或者由处理器402实现。处理器402可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器402中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器402可以是通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器402可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器403,处理器402读取存储器403中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the above embodiments of the present application may be applied to theprocessor 402 or implemented by theprocessor 402 . Theprocessor 402 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method can be completed by an integrated logic circuit of hardware in theprocessor 402 or an instruction in the form of software. The above-mentionedprocessor 402 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. Theprocessor 402 may implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of this application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in thememory 403, and theprocessor 402 reads the information in thememory 403, and completes the steps of the foregoing method in combination with its hardware.

在示例性实施例中,电子设备400可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,ProgrammableLogic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)、通用处理器、控制器、微控制器(MCU,Micro Controller Unit)、微处理器(Microprocessor)、或者其他电子元件实现,用于执行前述方法。In an exemplary embodiment, theelectronic device 400 may be implemented by one or more Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), DSP, Programmable Logic Device (PLD, Programmable Logic Device), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), Field-Programmable Gate Array (FPGA, Field-Programmable Gate Array), general-purpose processor, controller, microcontroller (MCU, Micro Controller Unit), microprocessor (Microprocessor), or other electronic components implementation for performing the aforementioned method.

可以理解,本申请实施例的存储器403可以是易失性存储器或者非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(FlashMemory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random AccessMemory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random AccessMemory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器旨在包括但不限于这些和任意其他适合类型的存储器。It can be understood that thememory 403 in this embodiment of the present application may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-only memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (FlashMemory), Magnetic Surface Memory, Optical disk, or Compact Disc Read-Only Memory (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a magnetic tape memory. The volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), Synchronous Dynamic Random Access Memory (SDRAM, Synchronous Dynamic Random Access Memory), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), Enhanced Type Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory). The memories described in the embodiments of the present application are intended to include, but not be limited to, these and any other suitable types of memories.

在示例性实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的存储器403,上述计算机程序可由电子设备400的处理器402执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。In an exemplary embodiment, an embodiment of the present application further provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including amemory 403 for storing a computer program, and the above-mentioned computer program can be processed by theelectronic device 400 Thedevice 402 is executed to complete the steps of the aforementioned method. The computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.

需要说明的是:“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.

另外,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。In addition, the technical solutions described in the embodiments of the present application may be combined arbitrarily unless there is a conflict.

以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application.

Claims (10)

Translated fromChinese
1.一种字体加载方法,其特征在于,应用于电子设备,包括:1. a font loading method, is characterized in that, is applied to electronic equipment, comprises:所述电子设备的第一程序将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;所述第一目录下的字体文件包含所述第一程序的Native字体资源;The first program of the electronic device caches the font file in the first directory of the electronic device to the preset second directory of the electronic device; the font file in the first directory contains the first program The Native font resource;所述第一程序利用预设的至少一个统一资源标识符URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;每个URI至少对应所述第二目录下的一个字体文件。The first program uses the preset at least one Uniform Resource Identifier URI to obtain font files in the second directory, and uses the font files in the second directory to load Native fonts on the Flutter page; each URI corresponds to at least A font file in the second directory.2.根据权利要求1所述的方法,其特征在于,所述将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录,包括:2. The method according to claim 1, wherein the caching of the font files in the first directory of the electronic device to the preset second directory of the electronic device comprises:所述第一程序在启动时检测所述第二目录是否存在缓存的字体文件;The first program detects whether there is a cached font file in the second directory when it is started;所述第一程序在所述第二目录未检测到缓存的字体文件的情况下,将所述第一目录下的字体文件缓存到所述第二目录。The first program caches the font files in the first directory to the second directory when the cached font files are not detected in the second directory.3.根据权利要求1所述的方法,其特征在于,所述利用预设的至少一个URI获取所述第二目录下的字体文件,包括:3. The method according to claim 1, wherein the obtaining the font file in the second directory by using at least one preset URI comprises:所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录存在相应URI对应的字体文件的情况下,获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that a font file corresponding to the corresponding URI exists in the second directory, Get the font file corresponding to the corresponding URI.4.根据权利要求1所述的方法,其特征在于,每个URI还对应一个字体文件的云端下载地址;所述利用预设的至少一个URI获取所述第二目录下的字体文件,包括:4. The method according to claim 1, wherein each URI also corresponds to a cloud download address of a font file; and the use of at least one preset URI to obtain the font file in the second directory comprises:所述第一程序针对所述至少一个URI中的每个URI,检测所述第二目录是否存在相应URI对应的字体文件;在确定所述第二目录不存在相应URI对应的字体文件的情况下,利用相应URI对应的云端下载地址将相应URI对应的字体文件下载到所述第二目录;并获取相应URI对应的字体文件。For each URI in the at least one URI, the first program detects whether a font file corresponding to the corresponding URI exists in the second directory; if it is determined that there is no font file corresponding to the corresponding URI in the second directory , download the font file corresponding to the corresponding URI to the second directory by using the cloud download address corresponding to the corresponding URI; and obtain the font file corresponding to the corresponding URI.5.根据权利要求1至4任一项所述的方法,其特征在于,所述利用所述第二目录下的字体文件在Flutter页面加载Native字体,包括:5. according to the method described in any one of claim 1 to 4, it is characterized in that, described utilizing the font file under described second directory to load Native font on Flutter page, comprising:所述第一程序校验所述第二目录下的每个字体文件的有效性;在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体。The first program verifies the validity of each font file in the second directory; in the case that the validity check of the corresponding font file is passed, the corresponding font file is used to load the corresponding Native font on the Flutter page.6.根据权利要求5所述的方法,其特征在于,所述在相应字体文件的有效性校验通过的情况下,利用相应字体文件在Flutter页面加载对应的Native字体,包括:6. method according to claim 5, is characterized in that, described under the situation that the validity verification of corresponding font file passes, utilizes corresponding font file to load corresponding Native font on Flutter page, comprises:所述第一程序在相应字体文件的有效性校验通过的情况下,对相应字体文件进行解密,并利用解密后的字体文件在Flutter页面加载对应的Native字体。The first program decrypts the corresponding font file when the validity verification of the corresponding font file passes, and uses the decrypted font file to load the corresponding Native font on the Flutter page.7.根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 4, wherein the method further comprises:所述第一程序在利用所述第二目录下的字体文件无法成功加载Native字体的情况下,在Flutter页面加载预设的系统字体。The first program loads a preset system font on the Flutter page when the native font cannot be successfully loaded by using the font file in the second directory.8.一种字体加载装置,其特征在于,设置在电子设备上,包括:8. a font loading device, is characterized in that, is arranged on electronic equipment, comprises:第一程序单元,用于将所述电子设备的第一目录下的字体文件缓存到预设的所述电子设备的第二目录;利用预设的至少一个URI获取所述第二目录下的字体文件,并利用所述第二目录下的字体文件在Flutter页面加载Native字体;所述第一目录下的字体文件包含所述第一程序单元的Native字体资源;每个URI至少对应所述第二目录下的一个字体文件。The first program unit is used to cache the font files in the first directory of the electronic device to the preset second directory of the electronic device; use the preset at least one URI to obtain the fonts in the second directory file, and use the font file in the second directory to load the Native font on the Flutter page; the font file in the first directory contains the Native font resource of the first program unit; each URI corresponds to at least the second A font file in the directory.9.一种电子设备,其特征在于,包括:处理器及和用于存储能够在处理器上运行的计算机程序的存储器,9. An electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor,其中,所述处理器用于运行所述计算机程序时,执行权利要求1至7任一项所述方法的步骤。Wherein, the processor is configured to execute the steps of the method of any one of claims 1 to 7 when running the computer program.10.一种存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7任一项所述方法的步骤。10. A storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202110931213.6A2021-08-132021-08-13 Font loading method, device, electronic device and storage mediumActiveCN113641369B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110931213.6ACN113641369B (en)2021-08-132021-08-13 Font loading method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110931213.6ACN113641369B (en)2021-08-132021-08-13 Font loading method, device, electronic device and storage medium

Publications (2)

Publication NumberPublication Date
CN113641369Atrue CN113641369A (en)2021-11-12
CN113641369B CN113641369B (en)2025-07-15

Family

ID=78421493

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110931213.6AActiveCN113641369B (en)2021-08-132021-08-13 Font loading method, device, electronic device and storage medium

Country Status (1)

CountryLink
CN (1)CN113641369B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20120124566A1 (en)*2010-11-172012-05-17Federighi Craig MShared resource dependencies
CN103440143A (en)*2013-08-022013-12-11安徽科大讯飞信息科技股份有限公司System and method for upgrading mobile web application
US20140033219A1 (en)*2012-07-242014-01-30Mstar Semiconductor, Inc.Method, apparatus and computer for loading resource file for game engine
US20170048319A1 (en)*2015-08-112017-02-16Oracle International CorporationAsynchronous pre-caching of synchronously loaded resources
CN106886419A (en)*2017-03-282017-06-23武汉斗鱼网络科技有限公司Network picture loading method and device
CN107995245A (en)*2016-10-272018-05-04腾讯科技(深圳)有限公司The method and terminal of a kind of resource-sharing
CN108549556A (en)*2018-04-162018-09-18腾讯科技(深圳)有限公司A kind of application program accelerated method, device, terminal and storage medium
CN109144619A (en)*2017-06-142019-01-04阿里巴巴集团控股有限公司Icon font information processing method, apparatus and system
CN109857454A (en)*2018-12-152019-06-07中国平安人寿保险股份有限公司Installation kit generates and caching method, device, electronic equipment and storage medium
CN110168539A (en)*2017-01-132019-08-23微软技术许可有限责任公司Fast Page load in mixing application

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20120124566A1 (en)*2010-11-172012-05-17Federighi Craig MShared resource dependencies
US20140033219A1 (en)*2012-07-242014-01-30Mstar Semiconductor, Inc.Method, apparatus and computer for loading resource file for game engine
CN103440143A (en)*2013-08-022013-12-11安徽科大讯飞信息科技股份有限公司System and method for upgrading mobile web application
US20170048319A1 (en)*2015-08-112017-02-16Oracle International CorporationAsynchronous pre-caching of synchronously loaded resources
CN107995245A (en)*2016-10-272018-05-04腾讯科技(深圳)有限公司The method and terminal of a kind of resource-sharing
CN110168539A (en)*2017-01-132019-08-23微软技术许可有限责任公司Fast Page load in mixing application
CN106886419A (en)*2017-03-282017-06-23武汉斗鱼网络科技有限公司Network picture loading method and device
CN109144619A (en)*2017-06-142019-01-04阿里巴巴集团控股有限公司Icon font information processing method, apparatus and system
CN108549556A (en)*2018-04-162018-09-18腾讯科技(深圳)有限公司A kind of application program accelerated method, device, terminal and storage medium
CN109857454A (en)*2018-12-152019-06-07中国平安人寿保险股份有限公司Installation kit generates and caching method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李正权;: "基于云端的面向构件开发的企业软件架构", 现代计算机(专业版), no. 14, 15 May 2018 (2018-05-15)*

Also Published As

Publication numberPublication date
CN113641369B (en)2025-07-15

Similar Documents

PublicationPublication DateTitle
JP5821034B2 (en) Information processing apparatus, virtual machine generation method, and application distribution system
US11221838B2 (en)Hot update method, operating system, terminal device, system, and computer-readable storage medium for a system process
CN106462476B (en) Extends an app's functionality to another app's compatible extension points that allow extensions
CN108229112B (en)Protection application program, and running method and device of application program
US9009739B2 (en)Safe browser plugins using native code modules
KR101966754B1 (en)Generating and caching software code
US9342689B2 (en)File system access for one or more sandboxed applications
EP3528149B1 (en)Software repackaging prevention method and device
WO2016078130A1 (en)Dynamic loading method for preventing reverse of apk file
US8271995B1 (en)System services for native code modules
CN110333868B (en)Method and system for generating installation packages of sub-applications
US20130062401A1 (en)Pervasive Package Identifiers
CN113779652A (en) Method and apparatus for data integrity protection
US8930894B2 (en)Method and system for executing an executable file
US10579592B2 (en)Method and apparatus for compressing an application
US9513762B1 (en)Static content updates
CN111201553A (en) A security element and related equipment
CN112069468B (en)Page dynamic watermark method and device
CN114048169A (en) Document access method, device, server and storage medium
CN119938077A (en) Linux system burning method, device, electronic equipment and storage medium
CN112579138A (en)Page display method and device, electronic equipment and storage medium
CN114371887A (en) Method, device, device and medium for preloading application program based on Weex framework
CN114417281A (en) Method, apparatus, computer device and storage medium for responding to permission request
CN111949301B (en)Application program hot update method, device and computer readable storage medium
CN118568743A (en) Data encryption and decryption method, device, medium and equipment based on hardware encryption card

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp