CA3168296A1 - Customizable dictionary-loading method and apparatus - Google Patents
Customizable dictionary-loading method and apparatusInfo
- Publication number
- CA3168296A1 CA3168296A1 CA3168296A CA3168296A CA3168296A1 CA 3168296 A1 CA3168296 A1 CA 3168296A1 CA 3168296 A CA3168296 A CA 3168296A CA 3168296 A CA3168296 A CA 3168296A CA 3168296 A1 CA3168296 A1 CA 3168296A1
- Authority
- CA
- Canada
- Prior art keywords
- dictionary
- loading
- file
- loader
- customizable
- 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.)
- Pending
Links
- 238000011068 loading method Methods 0.000 title claims abstract description 99
- 238000000034 method Methods 0.000 claims abstract description 27
- 230000003213 activating effect Effects 0.000 claims description 16
- 230000008569 process Effects 0.000 claims description 2
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
- Stored Programmes (AREA)
Abstract
A customizable dictionary loading method and device, the method comprising: writing a customizable dictionary loader and configuring a dictionary synchronization time interval, so as to generate a configuration file (S1); and reading the configuration file, instantiating the dictionary loader and starting a timing task, the execution interval of the timing task being the dictionary synchronization time interval (S2). By employing a customizable dictionary loading mode, it is possible to allow dictionary data to no longer be limited to existing text file methods, and the dictionary data may be loaded merely by implementing the interface of the dictionary loader and carrying out corresponding configuration by employing any form of storage mode. The function of updating the dictionary data at a regular time is provided, and the purpose of updating the dictionary data may be achieved without requiring manual operation and restart.
Description
CUSTOMIZABLE DICTIONARY-LOADING METHOD AND APPARATUS
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to the technical field of natural language processing, and more particularly to a customizable dictionary-loading method and an apparatus thereof.
Description of Related Art
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to the technical field of natural language processing, and more particularly to a customizable dictionary-loading method and an apparatus thereof.
Description of Related Art
[0002] Conventionally, dictionary data can only be loaded from files. In particular, this is done by reading dictionary data from the original .txt file or the cached .bin file and loading the dictionary. When the dictionary needs to be updated, a user has to modify the .txt file and manually delete the .bin file and then he/she can reboot the system and re-load dictionary data.
The known approach to loading a dictionary is less flexible and incapable of updating dictionary data in a real-time manner, thus being against adjustment of the dictionary.
SUMMARY OF THE INVENTION
The known approach to loading a dictionary is less flexible and incapable of updating dictionary data in a real-time manner, thus being against adjustment of the dictionary.
SUMMARY OF THE INVENTION
[0003] In order to solve the problems of the prior art, embodiments of the present invention provide customizable dictionary-loading method and apparatus to address the defects of the existing dictionary-loading methods about low flexibility, incapability to update dictionary data in a real-time manner, and awkward adjustment of dictionary.
[0004] Embodiments of the present invention provide the following technical schemes.
[0005] In a first aspect, the present invention provides a customizable dictionary-loading method, comprising the following steps:
[0006] writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and
[0007] reading the configuration file, instantiating the dictionary loader, and activating Date Regue/Date Received 2022-07-18 scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
[0008] Further, the steps of instantiating the dictionary loader comprise:
[0009] S1.1: determining whether the dictionary has to be re-loaded, and if yes, executing S1.2, otherwise, executing S1.3;
[0010] S1.2: re-loading the dictionary by using the dictionary loader, and if the loading is successful, activating scheduled tasks after writing the dictionary into a locally cached file and updating a backup file; otherwise, activating the scheduled tasks after loading the dictionary from the locally cached file and the updated backup file; and
[0011] S1.3: loading the dictionary through the dictionary loader from the locally cached file and the updated backup file, and if the loading is successful, activating the scheduled tasks;
otherwise, returning to S1.2.
otherwise, returning to S1.2.
[0012] Further, the scheduled tasks have processes comprising:
[0013] S2.1: determining whether the dictionary has to be re-loaded, if yes, executing the next step; otherwise, ending the tasks;
[0014] S2.2: re-loading the dictionary by using the dictionary loader; and
[0015] S2.3: determining whether dictionary-loading is successful, and if yes, ending the tasks after writing the dictionary into the locally cached file and updating the backup file; otherwise, directly ending the tasks.
[0016] Further, the step of writing a custom dictionary loader comprises:
[0017] inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
[0018] Further, the dictionary synchronization interval is preferably 300 seconds.
[0019] In another aspect, the present invention provides a customizable dictionary-loading apparatus, which comprises:
[0020] a file configuration module, for writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and
[0021] a dictionary-loading module, for reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled Date Regue/Date Received 2022-07-18 tasks is the dictionary synchronization interval.
[0022] Further, the dictionary-loading module comprises:
[0023] a file reading unit, for reading the configuration file;
[0024] a first determining unit, for determining whether the dictionary has to be re-loaded;
[0025] a first loading unit, for re-loading the dictionary by using the dictionary loader or loading the dictionary from the locally cached file and the updated backup file;
[0026] a data storing unit, for storing locally cached file and backup file;
and
and
[0027] a scheduled updating unit, for according to the dictionary synchronization interval, executing the scheduled tasks.
[0028] The dictionary-loading module further comprises:
[0029] a second determining unit, for determining whether dictionary-loading is successful.
[0030] Further, the file configuration module comprises:
[0031] a method implementing unit, for inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
[0032] Further, the file configuration module further comprises:
[0033] a time setting unit, for setting dictionary synchronization interval, wherein the dictionary synchronization interval is preferably 300 seconds.
[0034] The technical schemes provided in the embodiments of the present invention have the following beneficial effects:
[0035] 1. The customizable dictionary-loading method and apparatus of the present invention use a dictionary loader to allow users to load dictionaries in custom ways (such as loading a dictionary form a database or from a locally cached file), thereby allowing dictionary data to be stored in any form instead of restricted in the form of an existing text file, so that loading of dictionary data can be easily achieved by implementing the interface of the dictionary loader and conducting corresponding configuration; and
[0036] 2. The customizable dictionary-loading method and apparatus of the present invention support scheduled updating of dictionary data according to a preset dictionary synchronization interval, so that dictionary data can be updated without manual operations and rebooting, thereby improving flexibility of dictionary loading and reducing complexity of dictionary adjustment.
Date Regue/Date Received 2022-07-18 BRIEF DESCRIPTION OF THE DRAWINGS
Date Regue/Date Received 2022-07-18 BRIEF DESCRIPTION OF THE DRAWINGS
[0037] To better illustrate the technical schemes as disclosed in the embodiments of the present invention, accompanying drawings referred in the description of the embodiments below are introduced briefly. It is apparent that the accompanying drawings as recited in the following description merely provide a part of possible embodiments of the present invention, and people of ordinary skill in the art would be able to obtain more drawings according to those provided herein without paying creative efforts, wherein:
[0038] FIG. 1 is a flowchart of a customizable dictionary-loading method according to an exemplificative embodiment of the present invention;
[0039] FIG. 2 is a flowchart of instantiating the dictionary loader according to an exemplificative embodiment of the present invention;
[0040] FIG. 3 is a flowchart of executing scheduled tasks according to an exemplificative embodiment of the present invention; and
[0041] FIG. 4 is a structural diagram of a customizable dictionary-loading apparatus according to an exemplificative embodiment of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
DETAILED DESCRIPTION OF THE INVENTION
[0042] To make the foregoing objectives, technical schemes, and advantages of the present invention clearer and more understandable, the following description will be directed to some embodiments as depicted in the accompanying drawings to detail the technical schemes disclosed in these embodiments. It is, however, to be understood that the embodiments referred herein are only a part of all possible embodiments and thus not exhaustive. Based on the embodiments of the present invention, all the other embodiments can be conceived without creative labor by people of ordinary skill in the art, and all these and other embodiments shall be encompassed in the scope of the present invention.
[0043] FIG. 1 is a flowchart of a customizable dictionary-loading method according to an exemplificative embodiment of the present invention. As shown, the method comprises the Date Regue/Date Received 2022-07-18 following steps.
[0044] The step Si is about writing a custom dictionary loader and configuring a dictionary synchronization interval, so as to generate a configuration file.
[0045] Specifically, a configuration file has to be generated first. This at least comprises writing a custom dictionary loader and configuring a dictionary synchronization interval. A user may define the way for loading a dictionary by himself using the dictionary loader, such as loading a dictionary from a database or from a locally cached file. It is to be noted that in virtue of the customizable dictionary-loading approach, the dictionary can be updated without modifying the .txt file and manually deleting the .bin file. This not only makes dictionary loading more flexibility, but also simplifies dictionary adjustment.
[0046] The step S2 is about reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
[0047] Specifically, after activating, the dictionary reads the dictionary loader and the dictionary synchronization interval, among others, from the configuration file. After the dictionary loader is instantiated and the dictionary is loaded (including one or more loading means such as from a database and/or a locally cached file), scheduled tasks can be activated and the dictionary can be synchronized at the pre-configured dictionary synchronization interval, so that the dictionary data can be updated without manual operations and rebooting.
[0048] FIG. 2 is a flowchart of instantiating the dictionary loader according to an exemplificative embodiment of the present invention. As shown, it comprises the following steps.
[0049] S1.1 involves determining whether the dictionary has to be re-loaded, and if yes, executing S1.2, otherwise, executing S1.3.
[0050] Specifically, after the configuration file is read, the first thing is to determine whether the dictionary has to be re-loaded. The determination is made according to whether there is locally a cache file or whether the last modified time of the cache file is earlier than the last modified time of the dictionary data in the database. If the update of the data is not synchronized, the last modified time of the cache file is earlier than the last modified time of the dictionary data in the database. For example, a user may have added self-defined words and attributes to the Date Regue/Date Received 2022-07-18 database. If there is any update, the next thing to do is that the dictionary has to be re-loaded, then the dictionary is reloaded from the database through the dictionary loader. Otherwise, the dictionary can be just loaded from the locally cached file and the updated backup file through the dictionary loader.
[0051] S1.2 is about re-loading the dictionary by using the dictionary loader, and if the loading is successful, activating scheduled tasks after writing the dictionary into a locally cached file and updating a backup file; otherwise, loading the dictionary from the locally cached file and the updated backup file and afterward activating the scheduled tasks.
[0052] Specifically, re-loading of the dictionary from the database through the dictionary loader may be realized by, for example, using a reloading method. The reloading method is an abstract method that must be implemented during writing of a custom loader. Only when the method is implemented, can the dictionary data be re-loaded from the custom carrier. If the loading is successful, the re-loaded dictionary is written into a locally cached file by using a saving method and the backup file is updated and then the scheduled tasks are activated. If the loading fails, the dictionary is loaded from the locally cached file and the updated backup file by using a fromFile method and then the scheduled tasks are activated.
[0053] S1.3: loading the dictionary through the dictionary loader from the locally cached file and the updated backup file, and if the loading is successful, activating the scheduled tasks;
otherwise, returning to S1.2.
otherwise, returning to S1.2.
[0054] Specifically, the dictionary may be loaded form the locally cached file and the updated backup file by using a fromFile method. Like reloading, the fromFile method is an abstract method needed to be implemented during writing of the custom loader. Only when the method is implemented, can the dictionary be loaded from the locally cached file and the updated backup file. If the loading is successful, the scheduled tasks are activated.
Otherwise, the method returns to S1.2, where the dictionary is re-loaded from the database through the dictionary loader. It is to be noted that after the dictionary is loaded from the locally cached file and the updated backup file successfully, there is no need to write the loaded dictionary into the locally cached file and update the backup file. This is not only because the loaded dictionary now is consistent to the dictionary in the locally cached file and the backup file, but also because such a setting helps Date Regue/Date Received 2022-07-18 reduce unnecessary operations, thereby simplifying dictionary adjustment.
Otherwise, the method returns to S1.2, where the dictionary is re-loaded from the database through the dictionary loader. It is to be noted that after the dictionary is loaded from the locally cached file and the updated backup file successfully, there is no need to write the loaded dictionary into the locally cached file and update the backup file. This is not only because the loaded dictionary now is consistent to the dictionary in the locally cached file and the backup file, but also because such a setting helps Date Regue/Date Received 2022-07-18 reduce unnecessary operations, thereby simplifying dictionary adjustment.
[0055] FIG. 3 is a flowchart of executing scheduled tasks according to an exemplificative embodiment of the present invention. As shown, it comprises the flowing steps:
[0056] S2.1: determining whether the dictionary has to be re-loaded, if yes, executing the next step; otherwise, ending the tasks.
[0057] Specifically, after the scheduled tasks are activated, the first thing to do is to determine whether the dictionary has to be re-loaded. Similarly, the determination is also made according to whether there is locally a cache file or whether the last modified time of the cache file is earlier than the last modified time of the dictionary data in the database. If the update of the data is not synchronized, the last modified time of the cache file is earlier than the last modified time of the dictionary data in the database. For example, a user may have added self-defined words and attributes to the database. If re-loading is needed, the next step is executed. If re-loading is not needed, the tasks are ended, which means no operations are performed.
[0058] S2.2 includes re-loading the dictionary by using the dictionary loader.
[0059] Specifically, similarly, re-loading the dictionary from the database may be achieved using a reloading method.
[0060] S2.3 is about determining whether dictionary-loading is successful, and if yes, ending the tasks after writing the dictionary into the locally cached file and updating the backup file;
otherwise, directly ending the tasks.
otherwise, directly ending the tasks.
[0061] Specifically, after the dictionary is loaded, the next thing to do is to determine whether dictionary-loading is successful. If the loading is successful, the re-loaded dictionary is written into a locally cached file and the backup file is updated accordingly and then the tasks are ended.
If the loading fails, the tasks are ended directly, which means no operations are performed and the existing dictionary remains active.
If the loading fails, the tasks are ended directly, which means no operations are performed and the existing dictionary remains active.
[0062] As a preferred implementation, in the embodiment of the present invention, a custom dictionary loader comprises:
[0063] inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
[0064] Specifically, taking a core dictionary in HanLP for example, the written custom Date Regue/Date Received 2022-07-18 dictionary loader has to inherit the class of the abstract code loading program (e.g., AbstractCoreDictionaryLoader) so as to implement the abstract method in the abstract code loading program. For example, the configuration of the loader for the core dictionary may be altered into the fully qualified name of the class of the custom dictionary loader:
[0065] CoreDictionaryLoader=com.hankcs.hanlp.loader.CoreDictionaryDBLoader.
[0066] As a preferred implementation, in the embodiment of the present invention, the dictionary synchronization interval is preferably 300 seconds.
[0067] Specifically, with the same example of the core dictionary in HanLP, a dictionary synchronization interval syncInterval core may be set 300, in seconds.
[0068] FIG. 4 is a structural diagram of a customizable dictionary-loading apparatus according to an exemplificative embodiment of the present invention. As shown, the apparatus comprises components detailed below.
[0069] A file configuration module is for writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary.
[0070] Specifically, a user may define the way for loading a dictionary by using the dictionary loader, from, for example, a database or a locally cached file, thereby making dictionary-loading more flexible.
[0071] A dictionary-loading module is for reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
[0072] As a preferred implementation, in the embodiment of the present invention, the dictionary-loading module comprises:
[0073] a file reading unit, for reading the configuration file;
[0074] a first determining unit, for determining whether the dictionary has to be re-loaded;
[0075] a first loading unit, for re-loading the dictionary by using the dictionary loader or loading the dictionary from the locally cached file and the updated backup file;
[0076] a data storing unit, for storing locally cached file and backup file;
and
and
[0077] a scheduled updating unit, for according to the dictionary synchronization interval, executing the scheduled tasks.
Date Regue/Date Received 2022-07-18
Date Regue/Date Received 2022-07-18
[0078] As a preferred implementation, in the embodiment of the present invention, the dictionary-loading module further comprises:
[0079] a second determining unit, for determining whether dictionary-loading is successful.
[0080] As a preferred implementation, in the embodiment of the present invention, the file configuration module comprises:
[0081] a method implementing unit, for inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
[0082] As a preferred implementation, in the embodiment of the present invention, the file configuration module further comprises:
[0083] a time setting unit, for setting dictionary synchronization interval, wherein the dictionary synchronization interval is preferably 300 seconds.
[0084] To sum up, the technical schemes provided by the embodiments of the present invention have the following beneficial effects:
[0085] 1. The customizable dictionary-loading method and apparatus of the present invention use a dictionary loader to allow users to load dictionaries in custom ways (such as from loading a dictionary form a database or from a locally cached file), thereby allowing dictionary data to be stored in any form instead of restricted in the form of an existing text file, so that loading of dictionary data can be easily achieved by implementing the interface of the dictionary loader and conducting corresponding configuration; and
[0086] 2. The customizable dictionary-loading method and apparatus of the present invention support scheduled updating of dictionary data according to a preset dictionary synchronization interval, so that dictionary data can be updated without manual operations and rebooting, thereby improving flexibility of dictionary loading and reducing complexity of dictionary adjustment.
[0087] It is to be noted that work division among the foregoing functional modules for the customizable dictionary-loading apparatus of the present embodiment is merely exemplary when the customizable dictionary-loading apparatus of the present invention needs to load a dictionary.
In practical implementations, the work division may be made among different functional modules.
In other words, the internal architecture of the customizable dictionary-loading apparatus may be reconfigured with different functional modules to perform all or a part of the functions as Date Regue/Date Received 2022-07-18 described previously. In addition, since the customizable dictionary-loading apparatus of the present embodiment and the disclosed customizable dictionary-loading method in the previous embodiment stem from the same conception, the details of their implementations can be learned from the description of the previous embodiment, and no repetition is made herein.
In practical implementations, the work division may be made among different functional modules.
In other words, the internal architecture of the customizable dictionary-loading apparatus may be reconfigured with different functional modules to perform all or a part of the functions as Date Regue/Date Received 2022-07-18 described previously. In addition, since the customizable dictionary-loading apparatus of the present embodiment and the disclosed customizable dictionary-loading method in the previous embodiment stem from the same conception, the details of their implementations can be learned from the description of the previous embodiment, and no repetition is made herein.
[0088] People of ordinary skill in the art would appreciate that all or part of the steps as described in the foregoing embodiments may be implemented using hardware, or may alternatively be implemented using a program to instruct relevant hardware.
The program may be stored in a computer readable storage medium, and the storage medium may be a read-only storage, a magnetic disk, an optical disk, or the like.
The present invention has been described with reference to the preferred embodiments and it is understood that the embodiments are not intended to limit the scope of the present invention.
Moreover, all modifications, equivalent replacements or improvements which do not depart from the concept of the present invention should be encompassed by the appended claims. Hence, the scope of the present invention shall only be defined by the appended claims.
Date Regue/Date Received 2022-07-18
The program may be stored in a computer readable storage medium, and the storage medium may be a read-only storage, a magnetic disk, an optical disk, or the like.
The present invention has been described with reference to the preferred embodiments and it is understood that the embodiments are not intended to limit the scope of the present invention.
Moreover, all modifications, equivalent replacements or improvements which do not depart from the concept of the present invention should be encompassed by the appended claims. Hence, the scope of the present invention shall only be defined by the appended claims.
Date Regue/Date Received 2022-07-18
Claims (10)
1. A customizable dictionary-loading method, comprising:
writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
2. The customizable dictionary-loading method of claim 1, wherein the steps of instantiating the dictionary loader comprise:
S1.1: determining whether the dictionary has to be re-loaded, and if yes, executing S1.2, otherwise, executing S1.3;
S1.2: re-loading the dictionary by using the dictionary loader, and if the loading is successful, activating scheduled tasks after writing the dictionary into a locally cached file and updating a backup file; otherwise, activating the scheduled tasks after loading the dictionary from the locally cached file and the updated backup file ; and S1.3: loading the dictionary through the dictionary loader from the locally cached file and the updated backup file, and if the loading is successful, activating the scheduled tasks; otherwise, returning to S1.2.
S1.1: determining whether the dictionary has to be re-loaded, and if yes, executing S1.2, otherwise, executing S1.3;
S1.2: re-loading the dictionary by using the dictionary loader, and if the loading is successful, activating scheduled tasks after writing the dictionary into a locally cached file and updating a backup file; otherwise, activating the scheduled tasks after loading the dictionary from the locally cached file and the updated backup file ; and S1.3: loading the dictionary through the dictionary loader from the locally cached file and the updated backup file, and if the loading is successful, activating the scheduled tasks; otherwise, returning to S1.2.
3. The customizable dictionary-loading method of claim 1 or 2, wherein the scheduled tasks have processes comprising:
S2.1: determining whether the dictionary has to be re-loaded, if yes, executing the next step;
otherwise, ending the tasks;
S2.2: re-loading the dictionary by using the dictionary loader;
S2.3: determining whether dictionary-loading is successful, and if yes, ending the tasks after writing the dictionary into the locally cached file and updating the backup file; otherwise, directly Date Regue/Date Received 2022-07-18 ending the tasks.
S2.1: determining whether the dictionary has to be re-loaded, if yes, executing the next step;
otherwise, ending the tasks;
S2.2: re-loading the dictionary by using the dictionary loader;
S2.3: determining whether dictionary-loading is successful, and if yes, ending the tasks after writing the dictionary into the locally cached file and updating the backup file; otherwise, directly Date Regue/Date Received 2022-07-18 ending the tasks.
4. The customizable dictionary-loading method of claim 1 or 2, wherein the step of writing a custom dictionary loader comprises:
inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
5. The customizable dictionary-loading method of claim 1 or 2, wherein the dictionary synchronization interval is preferably 300 seconds.
6. A customizable dictionary-loading apparatus, comprising:
a file configuration module, for writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and a dictionary-loading module, for reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
a file configuration module, for writing a custom dictionary loader and configuring a dictionary synchronization interval thereby generating a configuration file for a dictionary; and a dictionary-loading module, for reading the configuration file, instantiating the dictionary loader, and activating scheduled tasks, wherein an executing interval of the scheduled tasks is the dictionary synchronization interval.
7. The customizable dictionary-loading apparatus of claim 6, wherein the dictionary-loading module comprises:
a file reading unit, for reading the configuration file;
a first determining unit, for determining whether the dictionary has to be re-loaded;
a first loading unit, for re-loading the dictionary by using the dictionary loader or loading the dictionary from the locally cached file and the updated backup file;
a data storing unit, for storing locally cached file and backup file; and a scheduled updating unit, for according to the dictionary synchronization interval, executing the scheduled tasks.
a file reading unit, for reading the configuration file;
a first determining unit, for determining whether the dictionary has to be re-loaded;
a first loading unit, for re-loading the dictionary by using the dictionary loader or loading the dictionary from the locally cached file and the updated backup file;
a data storing unit, for storing locally cached file and backup file; and a scheduled updating unit, for according to the dictionary synchronization interval, executing the scheduled tasks.
8. The customizable dictionary-loading apparatus of claim 6 or 7, wherein the dictionary-loading module further comprises:
Date Regue/Date Received 2022-07-18 a second determining unit, for determining whether dictionary-loading is successful.
Date Regue/Date Received 2022-07-18 a second determining unit, for determining whether dictionary-loading is successful.
9. The customizable dictionary-loading apparatus of claim 6 or 7, wherein the file configuration module comprises:
a method implementing unit, for inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
a method implementing unit, for inheriting a class of an abstract code loading program, and implementing an abstract method of the abstract code loading program.
10. The customizable dictionary-loading apparatus of claim 6 or 7, wherein the file configuration module further comprises:
a time setting unit, for setting dictionary synchronization interval, wherein the dictionary synchronization interval is preferably 300 seconds.
Date Regue/Date Received 2022-07-18
a time setting unit, for setting dictionary synchronization interval, wherein the dictionary synchronization interval is preferably 300 seconds.
Date Regue/Date Received 2022-07-18
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910042768.8 | 2019-01-16 | ||
CN201910042768.8A CN109857837A (en) | 2019-01-16 | 2019-01-16 | A kind of dictionary loading method and device that can customize |
PCT/CN2019/106860 WO2020147333A1 (en) | 2019-01-16 | 2019-09-20 | Customizable dictionary loading method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CA3168296A1 true CA3168296A1 (en) | 2020-07-23 |
Family
ID=66894931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA3168296A Pending CA3168296A1 (en) | 2019-01-16 | 2019-09-20 | Customizable dictionary-loading method and apparatus |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN109857837A (en) |
CA (1) | CA3168296A1 (en) |
WO (1) | WO2020147333A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857837A (en) * | 2019-01-16 | 2019-06-07 | 苏宁易购集团股份有限公司 | A kind of dictionary loading method and device that can customize |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8341120B2 (en) * | 2003-09-05 | 2012-12-25 | Oracle International Corporation | Apparatus and methods for transferring database objects into and out of database systems |
CN101021916A (en) * | 2007-03-09 | 2007-08-22 | 中国移动通信集团福建有限公司 | Business process analysis method |
CN101256557B (en) * | 2008-04-16 | 2010-06-23 | 腾讯科技(深圳)有限公司 | Self-defining word management apparatus and method |
CN103207855B (en) * | 2013-04-12 | 2019-04-26 | 广东工业大学 | Fine-grained sentiment analysis system and method for product review information |
CN104142833A (en) * | 2013-05-06 | 2014-11-12 | 沈阳中科博微自动化技术有限公司 | Equipment dynamic management method for package test production line |
CN104349287A (en) * | 2013-08-05 | 2015-02-11 | 北京信威通信技术股份有限公司 | Method for roaming among vehicular independent networks |
CN107291487A (en) * | 2016-04-13 | 2017-10-24 | 平安科技(深圳)有限公司 | CONFIG.SYS amending method and system |
CN106059825A (en) * | 2016-07-08 | 2016-10-26 | 福建天晴数码有限公司 | Distributed system and configuration method |
US10649965B2 (en) * | 2016-11-14 | 2020-05-12 | International Business Machines Corporation | Data migration in a networked computer environment |
CN108121559B (en) * | 2017-12-29 | 2023-06-23 | 深圳市世芯信息技术有限公司 | Configuration file pushing method, server and storage medium |
CN109857837A (en) * | 2019-01-16 | 2019-06-07 | 苏宁易购集团股份有限公司 | A kind of dictionary loading method and device that can customize |
-
2019
- 2019-01-16 CN CN201910042768.8A patent/CN109857837A/en active Pending
- 2019-09-20 WO PCT/CN2019/106860 patent/WO2020147333A1/en active Application Filing
- 2019-09-20 CA CA3168296A patent/CA3168296A1/en active Pending
Also Published As
Publication number | Publication date |
---|---|
WO2020147333A1 (en) | 2020-07-23 |
CN109857837A (en) | 2019-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8789035B2 (en) | Method and apparatus for updating firmware | |
US9032383B2 (en) | Automatically updating applications on a client's device without interrupting the user's experience | |
US9185174B2 (en) | Maintaining mobile device operations | |
US7584379B2 (en) | Mobile terminal and software update method | |
US20080119178A1 (en) | Allocating Compression-Based Firmware Over the Air | |
CN101539866A (en) | Information processing device, and method of starting information processing device | |
US9910733B2 (en) | Transaction completion in a synchronous replication environment | |
CN105404536A (en) | Terminal software upgrade method and terminal software upgrade apparatus | |
CN111930843B (en) | Database-based data system and processing method | |
CN112114832A (en) | Vehicle upgrade control method, terminal device, vehicle, and computer storage medium | |
US20240378043A1 (en) | Operating System Upgrading Method, Electronic Device, Storage Medium, and Chip System | |
CA3168296A1 (en) | Customizable dictionary-loading method and apparatus | |
US20030037323A1 (en) | Method for upgrading data | |
CN106066806A (en) | A kind of mobile terminal software update method and system | |
US7403792B2 (en) | Cellular phone and automatic program update method used therefor | |
CN109241071A (en) | A kind of Android database upgrade method, apparatus and terminal | |
US20120089827A1 (en) | Computing device and method to reduce the time needed for the device to start | |
CN112426722B (en) | Method and device for thermally updating node map, storage medium and computer equipment | |
JP2004320591A (en) | Portable communication terminal | |
US11526362B2 (en) | Automatic hydration of feature file batches | |
CN110489140B (en) | Software upgrading method and device, computer equipment and computer storage medium | |
JP5275105B2 (en) | Electronics | |
CN116204199B (en) | Command line-based project management method, system, equipment and storage medium | |
CN109298880A (en) | Multi version code generating method, equipment and electronic equipment | |
CN108121555A (en) | The coprocessor upgrade method and device of onboard system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |
|
EEER | Examination request |
Effective date: 20220718 |