CN111125257B - Dictionary updating method, device, equipment and storage medium - Google Patents

Dictionary updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN111125257B
CN111125257B CN201911353606.2A CN201911353606A CN111125257B CN 111125257 B CN111125257 B CN 111125257B CN 201911353606 A CN201911353606 A CN 201911353606A CN 111125257 B CN111125257 B CN 111125257B
Authority
CN
China
Prior art keywords
dictionary
update
updating
target
data
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.)
Active
Application number
CN201911353606.2A
Other languages
Chinese (zh)
Other versions
CN111125257A (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.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
New Founder Holdings Development Co ltd
Beijing Founder Electronics 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 New Founder Holdings Development Co ltd, Beijing Founder Electronics Co Ltd filed Critical New Founder Holdings Development Co ltd
Priority to CN201911353606.2A priority Critical patent/CN111125257B/en
Publication of CN111125257A publication Critical patent/CN111125257A/en
Application granted granted Critical
Publication of CN111125257B publication Critical patent/CN111125257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a dictionary updating method, a dictionary updating device, dictionary updating equipment and a storage medium, wherein the dictionary updating method comprises the following steps: assembling data corresponding to a target update task to generate assembled data, wherein the target update task is a task for updating each dictionary in a target dictionary file, and comprises an incremental update task and/or a full update task; and updating each dictionary in the target dictionary file based on the assembly data, and generating an updating state corresponding to each dictionary. According to the technical scheme provided by the embodiment of the application, timeliness and consistency of dictionary updating of the client side and the server side can be ensured.

Description

Dictionary updating method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a dictionary updating method, device, apparatus, and storage medium.
Background
With the development of computer technology, a large amount of data is generated on a computer network, and in the process of analyzing the data, word segmentation processing needs to be performed on the data, a large amount of dictionaries are needed in word segmentation processing, and how to process update of the dictionaries becomes a focus of attention.
In one technical scheme, synchronization between a word stock server and a word stock client is realized, and when a dictionary in the word stock is updated, a user uploads a user dictionary to the word stock server or downloads the updated dictionary from the word stock server. However, in such a technical scheme, it is difficult to ensure timeliness and consistency of dictionary updating between the client and the server.
Therefore, how to update the dictionary between the client and the server in time and consistently becomes a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a dictionary updating method, device, equipment and storage medium, which are used for solving the problem of how to update a dictionary between a client and a server timely and consistently.
In a first aspect of the embodiment of the present application, a dictionary updating method is provided, including: assembling data corresponding to a target update task to generate assembled data, wherein the target update task is a task for updating each dictionary in a target dictionary file, and comprises an incremental update task and/or a full update task; and updating each dictionary in the target dictionary file based on the assembly data, and generating an updating state corresponding to each dictionary.
In some embodiments of the present application, based on the above-mentioned scheme, the target update task includes the incremental update task, and updating each dictionary in the target dictionary file based on the assembly data includes: taking a first preset time period as a period, acquiring incremental data corresponding to the incremental update task in the assembly data, wherein the incremental data comprises data for updating each dictionary in the target dictionary file by a plurality of users in the first preset time period; updating the incremental data into each dictionary in the target dictionary file.
In some embodiments of the present application, based on the above-mentioned scheme, the target update task includes the full-scale update task, and updating each dictionary in the target dictionary file based on the assembly data includes: acquiring full data corresponding to the full update task in the assembly data by taking a second preset time period as a period, wherein the full data comprises all words of each dictionary in the target dictionary file; updating the full amount of data into each dictionary in the target dictionary file, the second predetermined period of time being greater than the first predetermined period of time.
In some embodiments of the present application, based on the above scheme, the method further includes: and responding to an update state query request sent by the client, and returning the update state of each dictionary in the target dictionary file to the client.
In some embodiments of the application, the dictionary comprises one or more of a general dictionary, an institution dictionary, and a personal dictionary based on the above-described scheme.
In some embodiments of the present application, based on the above scheme, the server side is a distributed system side.
In a second aspect of the embodiment of the present application, there is provided a dictionary updating method, the method including: acquiring the update state of each dictionary in the client from a server, wherein the update state is used for indicating whether the dictionary is updated at the server; and if the update state indicates that the dictionary is updated at the server side, loading the updated dictionary from the server side, wherein the server side is configured with a target update task, the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task.
In some embodiments of the application, based on the above, the dictionary comprises a personal dictionary, the method further comprising: acquiring the update state of the personal dictionary in response to an update task to the personal dictionary; determining whether the personal dictionary has been updated according to the update status; if updated, reloading the personal dictionary.
In a third aspect of the embodiment of the present application, a dictionary updating apparatus is provided, which is applied to a server, and the apparatus includes: the data assembly module is used for assembling data corresponding to a target update task to generate assembled data, wherein the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task; and the updating module is used for updating each dictionary in the target dictionary file based on the assembly data and generating an updating state corresponding to each dictionary.
In some embodiments of the present application, based on the above-described scheme, the target update task includes the incremental update task, and the update module includes: an incremental data obtaining unit, configured to obtain incremental data corresponding to the incremental update task in the assembly data with a first predetermined time period as a period, where the incremental data includes data that a plurality of users update each dictionary in the target dictionary file in the first predetermined time period; and the increment updating unit is used for updating the increment data into each dictionary in the target dictionary file.
In some embodiments of the present application, based on the above-described scheme, the target update task includes the full-scale update task, and the update module includes: a full-volume data obtaining unit, configured to obtain full-volume data corresponding to the full-volume update task in the assembly data with a second predetermined time period as a period, where the full-volume data includes all words of each dictionary in the target dictionary file; and a full-quantity updating unit configured to update the full-quantity data into each dictionary in the target dictionary file, where the second predetermined period of time is greater than the first predetermined period of time.
In some embodiments of the present application, based on the above-mentioned scheme, the apparatus further includes: and the state sending unit is used for responding to the update state query request sent by the client and returning the update state of each dictionary in the target dictionary file to the client.
In some embodiments of the application, the dictionary comprises one or more of a general dictionary, an institution dictionary, and a personal dictionary based on the above-described scheme.
In some embodiments of the present application, based on the above scheme, the server side is a distributed system side.
In a fourth aspect of the embodiment of the present application, there is provided a dictionary updating apparatus applied to a client, the apparatus including: the system comprises an update state acquisition module, a dictionary update module and a dictionary update module, wherein the update state acquisition module is used for acquiring the update state of each dictionary in the client from a server, and the update state is used for indicating whether the dictionary is updated at the server; and the dictionary loading module is used for loading the updated dictionary from the server side if the update state indicates that the dictionary is updated at the server side, wherein the server side is configured with a target update task, the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task.
In some embodiments of the application, based on the above, the dictionary comprises a personal dictionary, and the apparatus further comprises: a personal dictionary update state acquisition module for acquiring the update state of the personal dictionary in response to an update task to the personal dictionary; the updating judging module is used for determining whether the personal dictionary is updated according to the updating state; and the reloading module is used for reloading the personal dictionary if the personal dictionary is updated.
A fifth aspect of an embodiment of the present application provides a dictionary updating apparatus including: a receiver, a processor, a memory, and a transmitter; the memory is used for storing computer programs and data, and the processor calls the computer programs stored in the memory to execute the dictionary updating method provided by any embodiment of the first aspect.
A sixth aspect of the application provides a computer readable storage medium comprising a computer program for performing the dictionary updating method provided by any of the embodiments of the first aspect when executed by a processor.
According to the dictionary updating method, the device, the equipment and the storage medium provided by the embodiment of the application, on one hand, the dictionary in the word stock is updated in an increment way to quickly realize the update of the dictionary, so that the timeliness of the dictionary update is ensured; on the other hand, the consistency of dictionary updating is realized by carrying out full-quantity updating on the dictionary in the word stock; on the other hand, the update state of each dictionary is recorded, so that the client can update the dictionary according to the update state of each dictionary, and timeliness and consistency of dictionary update of the client and the server are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a dictionary updating method provided according to some embodiments of the present application;
FIG. 2 is a flow chart of a dictionary updating method provided in accordance with some embodiments of the present application;
FIG. 3 is a flow chart of a dictionary updating method according to other embodiments of the present application;
FIG. 4 is a flow chart of a dictionary updating method according to still other embodiments of the present application;
FIG. 5 is a flow chart of a dictionary updating method according to still other embodiments of the present application;
FIG. 6 is a flow chart of a dictionary updating method according to other embodiments of the present application;
FIG. 7 is a schematic block diagram of a dictionary updating apparatus provided in accordance with some embodiments of the present application;
FIG. 8 is a schematic block diagram of a dictionary updating apparatus provided in accordance with other embodiments of the present application;
FIG. 9 is a schematic block diagram of an embodiment of a dictionary updating apparatus provided in accordance with some embodiments of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, in a technical scheme, synchronization between a word stock server and a word stock client is realized, and when a dictionary in the word stock is updated, a user uploads a user dictionary defined by the user to the word stock server or downloads the updated dictionary from the word stock server. However, in such a technical scheme, when the dictionary in the word stock is of a large variety or a plurality of users update the dictionary, the problem of untimely and inconsistent dictionary update in the word stock is easily caused.
Based on the above, the basic idea of the application is that: the dictionary is updated rapidly by carrying out incremental update on each dictionary at the server side, so that timeliness of updating is ensured; the dictionary updating consistency is realized by carrying out full-quantity updating on the dictionary at the server side; the update state of each dictionary at the server side is recorded, so that the client side can update the dictionary according to the update state of each dictionary, and timeliness and consistency of dictionary update at the client side and the server side are ensured.
Having described the basic principles of the present application, various non-limiting embodiments of the application are specifically described below.
Fig. 1 is a schematic diagram of an application scenario of a dictionary updating method according to some embodiments of the present application. Referring to fig. 1, the application scenario includes at least one client 110 and a server 120. The client 110 communicates with the server 120 via a network 130. The server side 120 is provided with a plurality of dictionaries, the server side 120 is provided with a target update task, the target update task is a task for updating each dictionary, the target update task comprises an incremental update task and/or a full-quantity update task, and the incremental update task is a task for updating the incremental data of each dictionary in a first preset time period; the full-volume update task is a task of updating the full-volume data of each dictionary for the second predetermined period of time. After the dictionary is updated on the server side 120, the update state of the dictionary is recorded. The client 110 is provided with a dictionary engine, and the client 110 periodically queries the update status of each dictionary from the server 120 through the dictionary engine, and if the update status indicates that the dictionary is updated at the server 120, the updated dictionary is loaded from the server 120.
It should be noted that, the client 110 may be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer, a vehicle computer, or the like. The server 120 may be a physical server comprising a separate host, or a virtual server carried by a cluster of hosts, or a cloud server. The network 130 may be a wired network or a wireless network, for example, the network 130 may be a public switched telephone network (Public Switched Telephone Network, PSTN) or the internet.
A dictionary updating method according to an exemplary embodiment of the present application is described below with reference to the accompanying drawings in conjunction with the application scenario of fig. 1. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in any way. Rather, embodiments of the application may be applied to any scenario where applicable.
Fig. 2 is a flow chart of a dictionary updating method according to some embodiments of the present application. The dictionary updating method is applied to a server side and comprises a step S210 and a step S220, and the dictionary updating method in the example embodiment is described in detail below with reference to the accompanying drawings.
In step S210, data corresponding to the target update task is assembled to generate assembled data, where the target update task is a task of updating each dictionary in the target dictionary file, and the target update task includes an incremental update task and/or a full update task.
In an example embodiment, a target update task is configured at the server side, where the target update task is a task for updating each dictionary in the target dictionary file, and the target update task includes an incremental update task and/or a full update task. The incremental update task is a task of updating incremental data of each dictionary in a first predetermined period of time; the full-volume update task is a task of updating full-volume data of each dictionary for a second predetermined period of time, the second predetermined period of time being greater than the first predetermined period of time.
Further, data corresponding to the target update task is assembled to generate assembled data, and the assembled data comprises incremental data and/or full data. For example, data generated by actions of a user on adding, deleting, modifying and the like of a general dictionary, a mechanism dictionary, a personal dictionary in a first preset time period is assembled; and/or assembling data of each dictionary in the dictionary file for a second predetermined period of time.
The first predetermined period may be 1 hour, and the second predetermined period may be one week, or may be another suitable period, which is not particularly limited in the present application.
In step S220, each dictionary in the target dictionary file is updated based on the assembly data, and an update state corresponding to each dictionary is generated.
In an example embodiment, each dictionary in the target dictionary file is updated based on the assembly data corresponding to the target task, for example, incremental data corresponding to the incremental update task in the assembly data is acquired with a first predetermined period as a period, and the incremental data is updated to each dictionary in the target dictionary file, wherein the incremental data includes data that a plurality of users update each dictionary in the target dictionary file in the first predetermined period; and/or taking the second preset time period as a period, acquiring full data corresponding to the full update task in the assembly data, wherein the full data comprises all words of each dictionary in the target dictionary file; the full amount of data is updated to each dictionary in the target dictionary file, the second predetermined time period being greater than the first predetermined time period.
Further, after the update is completed, a plurality of update states of each dictionary, which may include one or more of a general dictionary, an institution dictionary, and a personal dictionary, are recorded.
According to the technical scheme in the example embodiment of fig. 2, on one hand, the update of the dictionary is quickly realized by performing incremental update on the dictionary in the word stock, so that the timeliness of the dictionary update is ensured; on the other hand, the consistency of dictionary updating is realized by carrying out full-quantity updating on the dictionary in the word stock; on the other hand, the update state of each dictionary is recorded, so that the client can update the dictionary according to the update state of each dictionary, and timeliness and consistency of dictionary update of the client and the server are ensured.
Further, in an example embodiment, the server side is a distributed system server side, and the assembling of the data corresponding to the target update task includes: acquiring data corresponding to a target update task from each node of the service system, and assembling the acquired data of each node, wherein the target update task comprises an incremental update task and/or a full update task; updating each dictionary in the target dictionary file of each node of the distributed system based on the assembly data. The dictionary file is updated in a distributed mode, so that timeliness and consistency of dictionary updating in each node in a distributed system can be ensured.
Fig. 3 is a flowchart of a dictionary updating method according to other embodiments of the present application.
Referring to fig. 3, in step S310, data corresponding to a target update task is assembled.
In an example embodiment, the target update task includes an incremental update task and/or a full update task. The incremental update task is a task of updating incremental data of each dictionary in a first predetermined period of time; the full-volume update task is a task of updating full-volume data of each dictionary for a second predetermined period of time, the second predetermined period of time being greater than the first predetermined period of time.
Further, data corresponding to the target update task is assembled to generate assembled data, and the assembled data comprises incremental data and/or full data. For example, data generated by actions of a user on adding, deleting, modifying and the like of a general dictionary, a mechanism dictionary, a personal dictionary in a first preset time period is assembled; and/or assembling data of each dictionary in the dictionary file for a second predetermined period of time.
Each dictionary includes: the system comprises a general dictionary, a mechanism dictionary and a personal dictionary, wherein the general dictionary comprises a word-misplacement dictionary, a translation dictionary, an irregular noun dictionary, a sensitive word dictionary and the like; the mechanism dictionary comprises a word error dictionary, an irregular noun dictionary, a sensitive word dictionary and other dictionaries; the personal dictionary includes word-misplacement dictionary, irregular noun dictionary, sensitive word dictionary and other dictionaries.
In step S320, data corresponding to the target update task is acquired, and the data is written into the dictionary file.
In an example embodiment, taking a first preset time period as a period, acquiring incremental data corresponding to a group and an incremental update task, and updating the incremental data into each dictionary in a target dictionary file, wherein the incremental data comprises data for updating each dictionary in the target dictionary file by a plurality of users in the first preset time period; and/or taking the second preset time period as a period, acquiring full data corresponding to the full updating task, wherein the full data comprises all words of each dictionary in the target dictionary file; the full amount of data is updated to each dictionary in the target dictionary file, the second predetermined time period being greater than the first predetermined time period.
Further, in an example embodiment, the dictionary file naming format is the following format:
1) General word stock: word-in-word library wrongword_1. Subject; sensitive word library worddetect_1. Subject; the unnormalized nounstandword_1. Subject; the term translation termtrans_1. Subject
Note that: 1 represents a general word stock
2) Mechanism word stock: sensitive word library worddetect_2_1. Subject; worddetect_2_2.… …; worddetect_2_1000. Subject
Word-error library wrongword_2_1. Subject; wrongword_2_2. Subject; … …: wrungword_2_1000. Subject
Unnormalized nounstandardword_2_1. Subject
Note that: 2 represents a mechanism word stock; 2_1 represents the 1 st mechanism under the mechanism word stock; 2_2 represents the 2 nd mechanism under the mechanism word stock; … …; 2_1000 represents the 1000 th mechanism under the mechanism word stock
3) Personal word stock: individuals under a single institution as a dictionary
Sensitive word library worddetect_3_1_1. Subject; worddetect_3_1_2.subject; … …; worddetect_3_1_n.subject
The word library wrongword_3_1_1. Subject; wrongword_3_1_2. Subject; … …; wrungword_3_1_n.subject
Unnormal noun: non-standardword_3_1_1. Subject; non-standardword_3_1_2. Subject; … …; non-nstandardword_3_1_n.subject
Note that: the first position "_3" represents a personal dictionary under a single organization, the second position "_1" represents a corresponding organization id, and the second position "_n" represents a personal id under a corresponding organization
It should be noted that the above dictionary file naming format is merely illustrative, and other suitable dictionary file naming formats may be adopted in the embodiments of the present application, which is not limited in particular.
In step S330, the dictionary state is updated.
In an example embodiment, the timestamp of the last update of the dictionary is recorded, and after the update is completed once, whether a new target update task exists is detected regularly, so that the dictionary is updated iteratively at regular time.
In step S340, a status query service is provided to the client.
In an example embodiment, upon receiving a state query request sent by a client or dictionary engine side, the updated state of each dictionary is returned to the client.
In step S350, if the client detects that the target dictionary at the server side has been updated, the target dictionary is reloaded from the dictionary file at the server side.
Fig. 4 is a flowchart illustrating a dictionary updating method according to still other embodiments of the present application.
Referring to fig. 4, in step S410, each dictionary, for example, a general dictionary, an organization dictionary, a personal dictionary, is loaded.
In an example embodiment, when a client initiates a dictionary service, all of the dictionaries in the dictionary file are acquired and loaded, including a universal dictionary, an institutional dictionary, a personal dictionary, and so on.
In step S420, the update status of each dictionary is acquired.
In an exemplary embodiment, update status codes of each dictionary are periodically acquired from a server side, the update status of each dictionary is detected, and the update status codes are codes indicating whether the dictionary has been updated, for example, the code 1 indicates updated, and the code 0 indicates not updated.
In step S430, it is determined whether or not the dictionary is updated based on the update status of each dictionary, and if the dictionary is updated, the process proceeds to step S440, and if the dictionary is not updated, the process proceeds to step S420.
In step S440, the updated dictionary is reloaded from the server side.
According to the technical solution in the exemplary embodiment of fig. 4, on the one hand, by periodically or regularly acquiring the update status of each dictionary from the server side at the client side, updating each dictionary based on the update status of each dictionary, the timeliness and consistency of dictionary update at the client side and the server side can be maintained; on the other hand, different users can update the general word stock, the mechanism word stock and the personal word stock according to own business requirements; on the other hand, the word stock can be updated under the condition that the service is not interrupted, the word stock can be updated timely and consistently at the client side, and meanwhile, maintenance personnel can conveniently manage the word stock.
Fig. 5 is a flowchart of a dictionary updating method according to still other embodiments of the present application.
Referring to fig. 5, in step S510, each dictionary, for example, a general dictionary, an organization dictionary, and a personal dictionary is loaded.
In an example embodiment, when a client initiates a dictionary service, all of the dictionaries in the dictionary file are acquired and loaded, including a universal dictionary, an institutional dictionary, a personal dictionary, and so on.
In step S520, the updated states of the general dictionary and the mechanism dictionary are acquired.
In an exemplary embodiment, updated status codes of the universal dictionary and the mechanism dictionary are acquired from the server periodically or periodically, the updated status of each dictionary in the universal dictionary and the mechanism dictionary is detected, and the updated status codes are codes indicating whether the dictionary is updated, for example, the codes 1 indicate that the dictionary is updated, and the codes 0 indicate that the dictionary is not updated.
In step S530, it is determined whether or not the dictionary is updated based on the update status of each dictionary, and if the dictionary is updated, the process proceeds to step S540, and if the dictionary is not updated, the process proceeds to step S520.
In step S540, the updated dictionary is reloaded from the server side.
In step S550, a personal dictionary update status query request is transmitted to the server side in response to the personal dictionary update request task.
In step S560, the update state of the personal dictionary is acquired from the server side.
In step S570, it is determined whether or not an updated dictionary exists in the personal dictionary based on the updated state of the personal dictionary, and if the updated dictionary exists, the process proceeds to step S580; if the updated dictionary does not exist, the process proceeds to step S560.
In step S580, the dictionary is reloaded from the server side.
In an example embodiment, the loading manner of the personal dictionary includes the following two ways: (1) Loading a personal dictionary synchronously along with the starting of dictionary service of a client, wherein the personal dictionary exists in a memory for a long time; (2) The personal dictionary is booted in response to the personal dictionary update task.
According to the technical solution in the exemplary embodiment of fig. 5, on the one hand, by periodically or regularly acquiring the update status of each dictionary from the server side at the client side, updating the dictionary based on the update status of each dictionary, the timeliness and consistency of the dictionary update at the client side and the server side can be maintained; on the other hand, the task-driven personal dictionary updating can realize the dynamic updating of the dictionary, so that different users can update the personal word stock according to own business requirements; on the other hand, the word stock can be updated under the condition that the service is not interrupted, the word stock can be updated timely and consistently at the client side, and meanwhile, maintenance personnel can conveniently manage the word stock.
Fig. 6 is a flowchart of a dictionary updating method according to other embodiments of the present application.
Referring to fig. 6, in step S610, an update status of each dictionary in the client is obtained from a server side, where the update status is used to indicate whether the dictionary has been updated at the server side;
in step S620, if the update status indicates that the dictionary is updated at the server side, the updated dictionary is loaded from the server side, where the server side is configured with a target update task, where the target update task is a task of updating each dictionary in a target dictionary file, and the target update task includes an incremental update task and/or a full update task.
In some embodiments of the present application, based on the technical solution of fig. 6, the dictionary comprises a personal dictionary, the method further comprising: acquiring the update state of the personal dictionary in response to an update task to the personal dictionary; determining whether the personal dictionary has been updated according to the update status; if updated, reloading the personal dictionary.
According to the technical solution in the exemplary embodiment of fig. 6, on the one hand, by periodically or regularly acquiring the update status of each dictionary from the server side at the client side, updating the dictionary based on the update status of each dictionary, the timeliness and consistency of the dictionary update at the client side and the server side can be maintained; on the other hand, the task-driven personal dictionary updating can realize the dynamic updating of the dictionary, so that different users can update the personal word stock according to own business requirements; on the other hand, the word stock can be updated under the condition that the service is not interrupted, the word stock can be updated timely and consistently at the client side, and meanwhile, maintenance personnel can conveniently manage the word stock.
The steps of the dictionary updating method in the exemplary embodiment of fig. 6 are similar to the execution process of the steps of the dictionary updating method in fig. 5 described above, and are not described in detail herein.
Fig. 7 is a schematic block diagram of a dictionary updating apparatus provided according to some embodiments of the present application. Referring to fig. 7, the dictionary updating apparatus 700 is applied to a server side, and the dictionary updating apparatus 700 includes: the data assembling module 710 is configured to assemble data corresponding to a target update task, and generate assembled data, where the target update task is a task of updating each dictionary in a target dictionary file, and the target update task includes an incremental update task and/or a full update task; and an updating module 720, configured to update each dictionary in the target dictionary file based on the assembly data, and generate an update status corresponding to each dictionary.
In some embodiments of the present application, based on the above-described scheme, the target update task includes the incremental update task, and the update module includes: an incremental data obtaining unit, configured to obtain incremental data corresponding to the incremental update task in the assembly data with a first predetermined time period as a period, where the incremental data includes data that a plurality of users update each dictionary in the target dictionary file in the first predetermined time period; and the increment updating unit is used for updating the increment data into each dictionary in the target dictionary file.
In some embodiments of the present application, based on the above-described scheme, the target update task includes the full-scale update task, and the update module includes: a full-volume data obtaining unit, configured to obtain full-volume data corresponding to the full-volume update task in the assembly data with a second predetermined time period as a period, where the full-volume data includes all words of each dictionary in the target dictionary file; and a full-quantity updating unit configured to update the full-quantity data into each dictionary in the target dictionary file, where the second predetermined period of time is greater than the first predetermined period of time.
In some embodiments of the present application, based on the above-mentioned scheme, the apparatus further includes: and the state sending unit is used for responding to the update state query request sent by the client and returning the update state of each dictionary in the target dictionary file to the client.
In some embodiments of the application, the dictionary comprises one or more of a general dictionary, an institution dictionary, and a personal dictionary based on the above-described scheme.
In some embodiments of the present application, based on the above scheme, the server side is a distributed system side.
The dictionary updating device provided by the embodiment of the application can realize each process in the embodiment of the method and achieve the same functions and effects, and is not repeated here.
FIG. 8 is a schematic block diagram of a dictionary updating apparatus provided in accordance with other embodiments of the present application. Referring to fig. 8, the dictionary updating apparatus 800 is applied to a client, and the dictionary updating apparatus 800 includes: an update status obtaining module 810, configured to obtain, from a server side, an update status of each dictionary in the client side, where the update status is used to indicate whether the dictionary has been updated at the server side; and a dictionary loading module 820, configured to load the updated dictionary from the server side if the update status indicates that the dictionary is updated at the server side, where the server side is configured with a target update task, where the target update task is a task of updating each dictionary in a target dictionary file, and the target update task includes an incremental update task and/or a full update task.
In some embodiments of the application, based on the above, the dictionary comprises a personal dictionary, and the apparatus further comprises: a personal dictionary update state acquisition module for acquiring the update state of the personal dictionary in response to an update task to the personal dictionary; the updating judging module is used for determining whether the personal dictionary is updated according to the updating state; and the reloading module is used for reloading the personal dictionary if the personal dictionary is updated.
The dictionary updating device provided by the embodiment of the application can realize each process in the embodiment of the method and achieve the same functions and effects, and is not repeated here.
Fig. 9 is a schematic structural diagram of a first embodiment of a dictionary updating apparatus according to some embodiments of the present application, and as shown in fig. 9, a dictionary updating apparatus 900 according to this embodiment may include: memory 910 and processor 920.
Optionally, the dictionary updating apparatus may further include a bus. Wherein the bus is used for realizing the connection between the elements.
The memory is used for storing computer programs and data, and the processor calls the computer programs stored in the memory to execute the technical scheme of the dictionary updating method provided by any one of the method embodiments.
Wherein the memory and the processor are electrically connected directly or indirectly to each other for data transmission or interaction. For example, the elements may be electrically connected to each other via one or more communication buses or signal lines, such as through a bus connection. The memory stores computer-executable instructions for implementing the data access control method, including at least one software functional module that may be stored in the memory in the form of software or firmware, and the processor executes various functional applications and dictionary updates by running the computer programs and modules stored in the memory.
The Memory may be, but is not limited to, random access Memory (Random Access Memory; RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory; PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory; EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory; EEPROM), etc. The memory is used for storing a program, and the processor executes the program after receiving the execution instruction. Further, the software programs and modules within the memory may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor may be an integrated circuit chip with signal processing capabilities. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. It will be appreciated that the configuration of fig. 9 is merely illustrative and may include more or fewer components than shown in fig. 9 or have a different configuration than shown in fig. 9. The components shown in fig. 9 may be implemented in hardware and/or software.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor can implement the dictionary updating method provided by any of the above method embodiments.
The computer readable storage medium in this embodiment may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that contains one or more available medium(s) integrated, and the available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A dictionary updating method, applied to a server, the method comprising:
assembling data corresponding to a target update task to generate assembled data, wherein the target update task is a task for updating each dictionary in a target dictionary file, and comprises an incremental update task and/or a full update task;
updating each dictionary in the target dictionary file based on the assembly data, and generating an updating state corresponding to each dictionary;
the target update task includes the incremental update task, and the updating each dictionary in the target dictionary file based on the assembly data includes:
taking a first preset time period as a period, acquiring incremental data corresponding to the incremental update task in the assembly data, wherein the incremental data comprises data for updating each dictionary in the target dictionary file by a plurality of users in the first preset time period;
updating the incremental data into each dictionary in the target dictionary file;
the target update task includes the full-scale update task, and the updating each dictionary in the target dictionary file based on the assembly data includes:
acquiring full data corresponding to the full update task in the assembly data by taking a second preset time period as a period, wherein the full data comprises all words of each dictionary in the target dictionary file;
updating the full amount of data into each dictionary in the target dictionary file, the second predetermined period of time being greater than the first predetermined period of time.
2. The method according to claim 1, wherein the method further comprises:
and responding to an update state query request sent by the client, and returning the update state of each dictionary in the target dictionary file to the client.
3. The method of claim 1 or 2, wherein the dictionary comprises one or more of a general dictionary, an institutional dictionary, and a personal dictionary.
4. A method according to claim 3, wherein the server side is a distributed system side.
5. A dictionary updating method, applied to a client, the method comprising:
acquiring the update state of each dictionary in the client from a server, wherein the update state is used for indicating whether the dictionary is updated at the server;
if the update state indicates that the dictionary is updated at the server side, loading the updated dictionary from the server side, wherein the server side is configured with a target update task, the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task; the incremental data is used for updating the incremental data corresponding to the incremental updating task by taking a first preset time period as a period, and the incremental data comprises data for updating each dictionary in the target dictionary file by a plurality of users in the first preset time period; the full-volume data is data for updating the full-volume data corresponding to the full-volume updating task with a second preset time period as a period, and the full-volume data comprises all words of each dictionary in the target dictionary file; the second predetermined period of time is greater than the first predetermined period of time.
6. The method of claim 5, wherein the dictionary comprises a personal dictionary, the method further comprising:
acquiring the update state of the personal dictionary in response to an update task to the personal dictionary;
determining whether the personal dictionary has been updated according to the update status;
if updated, reloading the personal dictionary.
7. A dictionary updating apparatus, applied to a server side, comprising:
the data assembly module is used for assembling data corresponding to a target update task to generate assembled data, wherein the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task;
the updating module is used for updating each dictionary in the target dictionary file based on the assembly data and generating an updating state corresponding to each dictionary;
the target update task includes the incremental update task, and the update module includes:
an incremental data obtaining unit, configured to obtain incremental data corresponding to the incremental update task in the assembly data with a first predetermined time period as a period, where the incremental data includes data that a plurality of users update each dictionary in the target dictionary file in the first predetermined time period;
an increment updating unit for updating the increment data to each dictionary in the target dictionary file;
the target update task includes the full-scale update task, and the update module includes:
a full-volume data obtaining unit, configured to obtain full-volume data corresponding to the full-volume update task in the assembly data with a second predetermined time period as a period, where the full-volume data includes all words of each dictionary in the target dictionary file;
and a full-quantity updating unit configured to update the full-quantity data into each dictionary in the target dictionary file, where the second predetermined period of time is greater than the first predetermined period of time.
8. A dictionary updating apparatus, applied to a client, comprising:
the system comprises an update state acquisition module, a dictionary update module and a dictionary update module, wherein the update state acquisition module is used for acquiring the update state of each dictionary in the client from a server, and the update state is used for indicating whether the dictionary is updated at the server;
the dictionary loading module is used for loading the updated dictionary from the server side if the update state indicates that the dictionary is updated at the server side, wherein the server side is configured with a target update task, the target update task is a task for updating each dictionary in a target dictionary file, and the target update task comprises an incremental update task and/or a full update task; the incremental data is used for updating the incremental data corresponding to the incremental updating task by taking a first preset time period as a period, and the incremental data comprises data for updating each dictionary in the target dictionary file by a plurality of users in the first preset time period; the full-volume data is data for updating the full-volume data corresponding to the full-volume updating task with a second preset time period as a period, and the full-volume data comprises all words of each dictionary in the target dictionary file; the second predetermined period of time is greater than the first predetermined period of time.
9. A dictionary updating apparatus characterized by comprising: a processor and a memory; the memory is used for storing a computer program and data, and the processor calls the computer program stored in the memory to execute the dictionary updating method according to any one of claims 1 to 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program for performing the dictionary updating method of any one of claims 1 to 6 when being executed by a processor.
CN201911353606.2A 2019-12-25 2019-12-25 Dictionary updating method, device, equipment and storage medium Active CN111125257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911353606.2A CN111125257B (en) 2019-12-25 2019-12-25 Dictionary updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911353606.2A CN111125257B (en) 2019-12-25 2019-12-25 Dictionary updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111125257A CN111125257A (en) 2020-05-08
CN111125257B true CN111125257B (en) 2023-09-05

Family

ID=70502782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911353606.2A Active CN111125257B (en) 2019-12-25 2019-12-25 Dictionary updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111125257B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988690B (en) * 2021-03-16 2023-02-17 挂号网(杭州)科技有限公司 Dictionary file synchronization method, device, server and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1294352A (en) * 1999-10-20 2001-05-09 英业达集团(西安)电子技术有限公司 Device and method for automatically updating data of palm PC
CN1647072A (en) * 2002-07-24 2005-07-27 卡西欧计算机株式会社 Electronic dictionary terminal, electronic dictionary server, and recording medium
JP2005222492A (en) * 2004-02-09 2005-08-18 Sharp Corp Electronic apparatus, electronic dictionary update system, dictionary update processing program, and computer-readable recording medium with dictionary update processing program recorded
JP2007034801A (en) * 2005-07-28 2007-02-08 Orion Denki Kk Dictionary update system and dictionary update method
CN101470745A (en) * 2007-12-27 2009-07-01 英业达股份有限公司 Electronic dictionary updating method
CN109446205A (en) * 2017-08-28 2019-03-08 中国电信股份有限公司 Judge the device and method of data mode and the device and method that data update
CN109582344A (en) * 2018-11-27 2019-04-05 北京车和家信息技术有限公司 Increment updating method, device, Cloud Server and computer readable storage medium
CN110298031A (en) * 2019-05-28 2019-10-01 北京百度网讯科技有限公司 A kind of Directory Service system and model version consistency allocator

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004280574A (en) * 2003-03-17 2004-10-07 Internatl Business Mach Corp <Ibm> Translation system, dictionary updating server, translation method, programs therefor, and storage medium
US20100274839A1 (en) * 2009-04-28 2010-10-28 Inventec Corporation Updating system for word banks and the method thereof
CN106649415B (en) * 2015-11-03 2019-12-20 广州市动景计算机科技有限公司 Client data checking and updating method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1294352A (en) * 1999-10-20 2001-05-09 英业达集团(西安)电子技术有限公司 Device and method for automatically updating data of palm PC
CN1647072A (en) * 2002-07-24 2005-07-27 卡西欧计算机株式会社 Electronic dictionary terminal, electronic dictionary server, and recording medium
JP2005222492A (en) * 2004-02-09 2005-08-18 Sharp Corp Electronic apparatus, electronic dictionary update system, dictionary update processing program, and computer-readable recording medium with dictionary update processing program recorded
JP2007034801A (en) * 2005-07-28 2007-02-08 Orion Denki Kk Dictionary update system and dictionary update method
CN101470745A (en) * 2007-12-27 2009-07-01 英业达股份有限公司 Electronic dictionary updating method
CN109446205A (en) * 2017-08-28 2019-03-08 中国电信股份有限公司 Judge the device and method of data mode and the device and method that data update
CN109582344A (en) * 2018-11-27 2019-04-05 北京车和家信息技术有限公司 Increment updating method, device, Cloud Server and computer readable storage medium
CN110298031A (en) * 2019-05-28 2019-10-01 北京百度网讯科技有限公司 A kind of Directory Service system and model version consistency allocator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王维 ; 高晓利 ; .基于增量信息的分布式多周期决策融合方法.电子科技.2018,(第08期),全文. *

Also Published As

Publication number Publication date
CN111125257A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN109976667B (en) Mirror image management method, device and system
US10824608B2 (en) Feature generation and storage in a multi-tenant environment
CA2831381C (en) Recovery of tenant data across tenant moves
CN111901294A (en) Method for constructing online machine learning project and machine learning system
CN110266505B (en) Method and equipment for managing session group
US8856365B2 (en) Computer-implemented method, computer system and computer readable medium
US11561972B2 (en) Query conversion for querying disparate data sources
CN105283847A (en) Local store data versioning
US20140365427A1 (en) Smart polling frequency
CN111639061A (en) Data management method, device, medium and electronic equipment in Redis cluster
CN112256676A (en) Method, device, equipment and medium for migrating database
CN113806305A (en) Data export method and device, computer readable storage medium and electronic equipment
CN111338834B (en) Data storage method and device
EP4052126A1 (en) Management of multiple physical function non-volatile memory devices
CN111125257B (en) Dictionary updating method, device, equipment and storage medium
CN114461691A (en) Control method and device of state machine, electronic equipment and storage medium
US20230205619A1 (en) Common platform for fulfilling different actions
CN111198853A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112948733B (en) Interface maintenance method, device, computing equipment and medium
CN114218013A (en) Searching method, searching device and electronic equipment storage medium
CN113110846A (en) Method and device for acquiring environment variable
CN113507529A (en) Method for realizing file downloading based on Web application
CN114968216A (en) Application program development project generation method and device
US11870668B1 (en) System and method for managing data processing systems and hosted devices
CN110889040B (en) Method and device for pushing information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230703

Address after: 3007, Hengqin International Financial Center Building, No. 58 Huajin Street, Hengqin New District, Zhuhai City, Guangdong Province, 519030

Applicant after: New founder holdings development Co.,Ltd.

Applicant after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Applicant before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Applicant before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant