Text storage method and device, electronic equipment and medium

CN116662475BActive Publication Date: 2026-09-22APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310644915.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-09-22
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

[0002]现有技术中,针对基于文本匹配的语音触控屏,通常使用单一的存储方式来存储文本控件对应的泛化文本,从而导致语音指令的文字识别结果和文本控件的泛化文本进行文本匹配时效率较低,相应地,文本控件对语音指令的响应也会较慢

Benefits of technology

[0009]根据本公开的一个或多个实施例,根据语音触控屏中注册文本控件所采用的文本匹配方式来确定该文本控件对应的泛化文本的存储方式,从而能够在基于语音指令的文字识别结果来确定所针对的文本控件时,针对不同存储方式采用不同的获取手段,以有效适应不同的文本匹配方式,提高了文本匹配过程中读取和检索泛化文本的速度,并因此加快了文本控件对语音指令的响应速度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662475B_ABST
    Figure CN116662475B_ABST
Patent Text Reader

Abstract

The present disclosure provides a text storage method and device, electronic equipment, computer readable storage medium and computer program product, relates to the field of voice interaction and data processing, in particular to the field of data storage technology. The implementation scheme is: obtaining a plurality of generalized texts of a text control, wherein the plurality of generalized texts are obtained by generalizing the text content of the text control; determining a text matching mode for the text control, wherein the text matching mode indicates the mode adopted when the text matching is performed between the text recognition result generated according to the user voice instruction and the plurality of generalized texts; determining a target storage mode according to the text matching mode; and storing the plurality of generalized texts by using the target storage mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of voice interaction and data processing, and more particularly to the field of data storage technology, specifically to a text storage method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In existing technologies, for voice-controlled touchscreens based on text matching, a single storage method is typically used to store the generalized text corresponding to the text control. This results in low efficiency when matching the text recognition results of the voice command with the generalized text of the text control, and consequently, the text control responds to the voice command more slowly. Summary of the Invention

[0003] This disclosure provides a text storage method, apparatus, electronic device, computer-readable storage medium, and computer program product.

[0004] According to one aspect of this disclosure, a text storage method is provided, comprising: acquiring a plurality of generalized texts of a text control, wherein the plurality of generalized texts are obtained by generalizing the text content of the text control; determining a text matching method for the text control, wherein the text matching method indicates the method used when matching text recognition results generated according to user voice commands with the plurality of generalized texts; determining a target storage method according to the text matching method; and storing the plurality of generalized texts using the target storage method.

[0005] According to another aspect of this disclosure, a text storage device is provided, comprising: an acquisition unit configured to acquire a plurality of generalized texts of a text control, wherein the plurality of generalized texts are obtained by generalizing the text content of the text control; a first determination unit configured to determine a text matching method for the text control, wherein the text matching method indicates the method used when matching text recognition results generated according to user voice commands with the plurality of generalized texts; a second determination unit configured to determine a target storage method based on the text matching method; and a storage unit configured to store the plurality of generalized texts using the target storage method.

[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the text storage method as described above.

[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the text storage method described above.

[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the text storage method as described above.

[0009] According to one or more embodiments of this disclosure, the storage method of the generalized text corresponding to the text control is determined based on the text matching method used by the registered text control in the voice touch screen. This enables different acquisition methods to be used for different storage methods when determining the target text control based on the text recognition result of the voice command, so as to effectively adapt to different text matching methods, improve the speed of reading and retrieving generalized text during the text matching process, and thus speed up the response speed of the text control to the voice command.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0012] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown;

[0013] Figure 2 An exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown;

[0014] Figure 3 A partial exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown;

[0015] Figure 4 Another exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown;

[0016] Figure 5 A further exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown;

[0017] Figure 6A further exemplary flowchart of a text storage method according to embodiments of the present disclosure is shown;

[0018] Figure 7 A further exemplary flowchart of a text storage method according to embodiments of the present disclosure is shown;

[0019] Figure 8A , Figure 8B and Figure 8C The following diagrams illustrate the storage structures of a hash table, a traditional trie, and a first-letter hash trie according to embodiments of the present disclosure.

[0020] Figure 9 A structural block diagram of a text storage device according to an embodiment of the present disclosure is shown; and

[0021] Figure 10 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0022] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0023] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.

[0024] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.

[0025] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0026] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.

[0027] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of generalized text storage methods for text controls.

[0028] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105, and / or 106 under a Software as a Service (SaaS) network.

[0029] exist Figure 1 In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.

[0030] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to implement voice control functionality. The client devices provide an interface that allows users to interact with them. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.

[0031] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.

[0032] Network 110 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0033] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0034] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0035] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0036] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0037] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and text files. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.

[0038] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.

[0039] Figure 1The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.

[0040] In existing technologies, for voice-controlled touchscreens based on text matching, a single storage method is typically used to store the generalized text corresponding to the text control. This results in low efficiency when matching the text recognition results of the voice command with the generalized text of the text control, and consequently, the text control responds to the voice command more slowly.

[0041] In response, Figure 2 An exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown. It can be utilized... Figure 1 The client or server implementation shown in the figure Figure 2 Method 200.

[0042] like Figure 2 As shown, an embodiment of this disclosure provides a text storage method 200, comprising: obtaining a plurality of generalized texts of a text control, wherein the plurality of generalized texts are obtained by generalizing the text content of the text control (step 210); determining a text matching method for the text control, wherein the text matching method indicates the method used when matching the text recognition result generated according to the user's voice command with the plurality of generalized texts (step 220); determining a target storage method according to the text matching method (step 230); and storing the plurality of generalized texts using the target storage method (step 240).

[0043] The way text data is stored determines the way it is read when it is retrieved. Therefore, the storage method of the generalized text corresponding to the text control is determined according to the text matching method used by the registered text control in the voice touch screen. This allows for different retrieval methods to be used for different storage methods when determining the target text control based on the text recognition results of the voice command. This effectively adapts to different text matching methods, improves the speed of reading and retrieving generalized text during the text matching process, and thus speeds up the response speed of the text control to voice commands.

[0044] In step 210, multiple generalized texts of the text control are obtained. These generalized texts are obtained by generalizing the text content of the text control.

[0045] In some embodiments, each generalized text instruction performs one or more operations on the text control.

[0046] In some embodiments, when a user manipulates a text control on the screen via voice, it is often necessary to add descriptions of the specific operation based on the text content of the text control (e.g., the text control name) to clarify the instruction. For example, to turn on the "Bluetooth" control, the user's instruction could be "Bluetooth", "Turn on Bluetooth", or "Tap Bluetooth", etc.; or, to select the control with episode number "1" from the video playlist, the user's instruction could be "1", "Episode 1", or "Play Episode 1", etc.

[0047] Therefore, when registering a text control, several generalized texts can be generated based on the high-frequency expressions associated with the text control and by adding prefixes and / or suffixes to the text content of the text control. This allows for accurate identification of the text control that the user wants to target and the corresponding operation that the user wants to perform, based on the user's different expressions.

[0048] In step 220, the text matching method for the text control is determined. The text matching method indicates the method used when matching the text recognition results generated based on the user's voice command with multiple generalized texts.

[0049] In some embodiments, in response to a text recognition result matching at least one of a plurality of generalized texts, at least one operation corresponding to at least one generalized text is performed on the text control.

[0050] In some embodiments, the text control and operation indicated by the user's voice command are determined based on text matching rather than semantic recognition. In the example, the acquired user voice command can be subjected to text recognition to obtain a text recognition result, which is then matched with the generalized text of multiple text controls to determine the text control and corresponding operation content targeted by the user.

[0051] Figure 3 A partial exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown.

[0052] like Figure 3 As shown, according to some embodiments, step 220 includes: obtaining the number of characters in the text control, the text type, and the control type (step 310); and determining the text matching method based on the number of characters in the text control, the text type, and the control type (step 320).

[0053] In some embodiments, for steps 310 and 320, the text type may include pure numeric text and non-pure numeric text, the control type may include input controls and selection controls, and the text matching method may include full text matching and fuzzy text matching. Based on this, different text matching methods are determined through different attributes of the text control, thereby effectively improving text matching efficiency and correspondingly enhancing the response speed of the text control to user voice commands.

[0054] In some embodiments, full text matching means determining that the two are matched when the text recognition result of the user's voice command is exactly the same as any generalized text of the text control; fuzzy text matching means determining that the two are matched when the text recognition result of the user's voice command has at least n consecutive identical characters with any generalized text of the text control, where n is an integer greater than or equal to 1.

[0055] It should be noted that the specific details regarding text types, control types, and text matching methods mentioned above are for illustrative purposes only and are not intended to limit the scope of the examples. For instance, text types can be further categorized into pure numeric text, numeric + text text, and pure text text, etc.

[0056] Figure 4 Another exemplary flowchart of a text storage method according to an embodiment of the present disclosure is shown.

[0057] like Figure 4 According to some embodiments, the text type includes pure numeric text and non-pure numeric text, and the control type includes input control and selection control. Step 320 includes: determining the text matching method as full text matching in response to the text character count being less than a third threshold, the text type being non-pure numeric text, and the control type being a selection control (step 410); determining the text matching method as fuzzy text matching in response to the text character count being not less than the third threshold, the text type being non-pure numeric text, and the control type being a selection control (step 420); and determining the text matching method as fuzzy text matching in response to the text type being pure numeric text, or in response to the control type being an input control (step 430).

[0058] In some embodiments, the third threshold value can be 3 for the number of text characters. When the number of text characters in the text control is less than 3, full text matching is used to improve the accuracy of text matching; when the number of text characters in the text control is greater than or equal to 3, fuzzy text matching is used to improve the efficiency of text matching. It should be understood that the above-mentioned value of the third threshold is for illustrative purposes only and is not intended to limit the application of this method.

[0059] In some embodiments, the text type includes both pure numeric text and non-pure numeric text. For pure numeric text, by adding different quantifiers, the number of generalized texts that can be generated is typically much larger than the number of generalized texts generated by non-pure numeric text. For example, for the pure numeric text "13", the generated basic generalized texts excluding actions could be "episode 13", "the 13th", and "the 13th item", etc. When prefixes or suffixes related to actions are added to these basic generalized texts, the final number of generalized texts generated is significantly larger. Therefore, for pure numeric text, fuzzy text matching is used to reduce matching difficulty and improve efficiency.

[0060] In some embodiments, the control types include selection controls and input controls. For selection controls, the corresponding text content is fixed; therefore, full text matching can be considered when the text length is less than a third threshold and is not purely numeric, in order to improve the accuracy of text matching. For input controls, since the content entered by the user each time is uncertain, fuzzy text matching is used for input controls to improve the efficiency and effectiveness of text matching.

[0061] By analyzing the number of characters, text type, and control type of a text control, we can determine the most effective text matching method for that text control. This will allow us to subsequently determine the appropriate storage method for the generalized text of the text control based on the text matching method.

[0062] In step 230, the target storage method is determined based on the text matching method.

[0063] Figure 5 An exemplary flowchart of another part of a text storage method according to an embodiment of the present disclosure is shown.

[0064] like Figure 5 According to some embodiments, the text matching method includes full text matching and fuzzy text matching, the target storage method includes a trie and a hash table, and step 230 includes: in response to the text matching method being full text matching, determining the target storage method as a trie or a hash table (step 510); and in response to the text matching method being fuzzy text matching, determining the target storage method as a hash table (step 520).

[0065] For step 510, when the text matching method is full text matching, it is necessary to match each character of the text recognition result of the user's voice command with the generalized text of the text control. Therefore, a trie can be used to store the generalized text to improve the subsequent matching efficiency; or, this character-by-character matching method can also use a hash table to store the generalized text.

[0066] For step 520, when the text matching method is fuzzy text matching, due to the uncertainty of the number of matched characters, if a trie is used for storage, the amount of computation when retrieving data for matching may be large. Therefore, a hash table can be used to store the generalized text to reduce the difficulty of implementing text matching.

[0067] Figure 6 An exemplary flowchart of another part of a text storage method according to an embodiment of the present disclosure is shown.

[0068] like Figure 6As shown, according to some embodiments, step 230 includes: determining the number of texts in the plurality of generalized texts (step 610); and determining the target storage method based on the text matching method and the number of texts (step 620).

[0069] Based on determining the storage method of the generalized text according to the text matching method of the text control, the number of generalized texts of the text control is introduced as a condition for determining the target storage method. This can further improve the efficiency of obtaining generalized text during text matching, and thus improve the response speed of the text control to user voice commands.

[0070] Figure 7 An exemplary flowchart of another part of a text storage method according to an embodiment of the present disclosure is shown.

[0071] like Figure 7 As shown, according to some embodiments, the trie includes a traditional trie and a first-letter hash trie. Step 620 includes: determining the target storage method as a hash table in response to the text matching method being fuzzy text matching, or in response to the text matching method being full text matching and the number of texts being less than a first threshold (step 710); determining the target storage method as a traditional trie in response to the text matching method being full text matching and in response to the number of texts being not less than a first threshold and less than a second threshold (step 720); and determining the target storage method as a first-letter hash trie in response to the text matching method being full text matching and the number of texts being not less than a second threshold (step 730).

[0072] In some embodiments, the first threshold may be, for example, 5000, and the second threshold may be, for example, 30000, without limitation.

[0073] Figure 8A , Figure 8B and Figure 8C The following are schematic diagrams illustrating the storage structures of a conventional trie, a first-letter hash trie, and a hash table, respectively, according to examples of this disclosure.

[0074] In one example, when the text matching mode of the "Bluetooth" control is fuzzy text matching, or when the text matching method of the "Bluetooth" control is full text matching and the number of generalized texts is less than a first threshold, a hash table is used to store its generalized text. The specific storage structure is as follows: Figure 8A As shown.

[0075] refer to Figure 8AA preset hash function can be used to calculate the corresponding hexadecimal number for each generalized text, which serves as the storage representation of that generalized text. During text matching, by using the preset hash function to calculate the text recognition result of the user's voice command, the corresponding storage area can be indexed based on the obtained hexadecimal number calculation result, thereby determining the matched generalized text.

[0076] For example, in one scenario, if the text recognition result of the user's voice command is "89a0a", it can be determined that the user's voice command matches the "Tap Bluetooth" text associated with the "Bluetooth" control. In another scenario, if the text recognition result of the user's voice command is "ada89", the user's voice command may be associated with two generalized texts: "Turn on Bluetooth" and "Tap Bluetooth". In this case, the text recognition result is then matched character by character with the two generalized texts, thus significantly improving the matching efficiency.

[0077] In another example, when the text matching mode of the "Bluetooth" control is full text matching, and the number of characters in the generalized text is not less than the first threshold and less than the second threshold, its generalized text is stored using a traditional trie, with the specific storage structure as follows: Figure 8B As shown.

[0078] refer to Figure 8B By storing each generalized text using a traditional trie structure, with each tree node representing a Chinese character, this tree structure can speed up retrieval and improve matching efficiency when storing large amounts of text and requiring character-by-character matching.

[0079] In another example, when the "Bluetooth" control's text matching method is full text matching and the number of generalized text characters is not less than the second threshold, its generalized text is stored using a first-letter hash trie, with the specific storage structure as follows: Figure 8C As shown.

[0080] refer to Figure 8C In languages ​​like Java, Chinese characters can be mapped to integer values ​​with a maximum limit of 65K using hash functions. Therefore, during full-text matching, the first character of the text recognition result of the user's voice command can be mapped using a hash function. Then, the tree node corresponding to that first character can be directly determined based on the mapped integer value, and then character-by-character matching can continue. In this method, since the first character of the voice command has the highest uncertainty, avoiding traversal matching of the first character can greatly improve matching efficiency.

[0081] Figure 9 A structural block diagram of a text storage device according to an embodiment of the present disclosure is shown.

[0082] like Figure 9As shown, an embodiment of the present disclosure provides a text storage device, including: an acquisition unit 910 configured to acquire a plurality of generalized texts of a text control, wherein the plurality of generalized texts are obtained by generalizing the text content of the text control; a first determination unit 920 configured to determine a text matching method for the text control, wherein the text matching method indicates the method used when matching the text recognition result generated according to the user's voice command with the plurality of generalized texts; a second determination unit 930 configured to determine a target storage method based on the text matching method; and a storage unit 940 configured to store the plurality of generalized texts using the target storage method.

[0083] Here, the operation of each of the above-mentioned units 910 to 940 of the storage device 900 is similar to the operation of steps 210 to 240 described above, and will not be repeated here.

[0084] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.

[0085] refer to Figure 10 The present invention describes a structural block diagram of an electronic device 1000 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0086] like Figure 10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of the electronic device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0087] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, output unit 1007, storage unit 1008, and communication unit 1009. Input unit 1006 can be any type of device capable of inputting information to electronic device 1000. Input unit 1006 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 1007 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1008 may include, but is not limited to, a hard disk and an optical disk. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets, such as Bluetooth devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices and / or the like.

[0088] The computing unit 1001 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning network algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute method 200 by any other suitable means (e.g., by means of firmware).

[0089] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0090] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0091] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0092] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0093] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0094] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0095] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0096] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.

Claims

1. A text storage method, comprising: Obtain multiple generalized texts of a text control, wherein the multiple generalized texts are obtained by generalizing the text content of the text control; Obtain the number of characters in the text control, the text type, and the control type; The text matching method is determined based on the number of characters in the text, the text type, and the control type. The text matching method indicates the method used when matching the text recognition result generated based on the user's voice command with the plurality of generalized texts. Determining the text matching method includes: In response to the text having fewer than a third threshold, the text being of a non-pure numeric type, and the control being a selection control, the text matching method is determined to be full text matching. In response to the fact that the number of characters in the text is not less than a third threshold, the text type is not pure numeric text, and the control type is a selection control, the text matching method is determined to be fuzzy text matching. In response to the text type being plain numeric text, or in response to the control type being an input control, the text matching method is determined to be fuzzy text matching; The target storage method is determined based on the text matching method, wherein the text matching method includes full text matching and fuzzy text matching, and the target storage method includes a trie and a hash table; and The multiple generalized texts are stored using the target storage method.

2. The method according to claim 1, in, Determining the target storage method based on the text matching method includes: In response to the text matching method being full-text matching, the target storage method is determined to be a trie or a hash table; and In response to the text matching method being fuzzy text matching, the target storage method is determined to be a hash table.

3. The method according to claim 1, wherein determining the target storage method based on the text matching method includes: Determine the number of texts in the plurality of generalized texts; as well as The target storage method is determined based on the text matching method and the number of texts.

4. The method according to claim 3, wherein, The trie includes a traditional trie and a first-letter hash trie, and The step of determining the target storage method based on the text matching method and the number of texts includes: In response to the text matching method being fuzzy text matching, or in response to the text matching method being full text matching and the number of texts being less than a first threshold, the target storage method is determined to be a hash table; In response to the text matching method being full-text matching, and in response to the text quantity being not less than the first threshold and less than the second threshold, the target storage method is determined to be a traditional trie; and In response to the text matching method being full-text matching and the number of texts being not less than the second threshold, the target storage method is determined to be a first-letter hash trie.

5. A text storage device, comprising: The acquisition unit is configured to acquire multiple generalized texts of a text control, wherein the multiple generalized texts are obtained by generalizing the text content of the text control; The first acquisition subunit is configured to acquire the number of characters in the text, the text type, and the control type of the text control; The third determining subunit is configured to determine the text matching method based on the number of characters in the text, the text type, and the control type. The text matching method indicates the method used when matching the text recognition result generated based on the user's voice command with the plurality of generalized texts. Determining the text matching method includes: In response to the text having fewer than a third threshold, the text being of a non-pure numeric type, and the control being a selection control, the text matching method is determined to be full text matching. In response to the fact that the number of characters in the text is not less than a third threshold, the text type is not pure numeric text, and the control type is a selection control, the text matching method is determined to be fuzzy text matching. In response to the text type being plain numeric text, or in response to the control type being an input control, the text matching method is determined to be fuzzy text matching; and The second determining unit is configured to determine the target storage method based on the text matching method, wherein the text matching method includes full text matching and fuzzy text matching, and the target storage method includes a trie and a hash table; The storage unit is configured to store the plurality of generalized texts using the target storage method.

6. The apparatus according to claim 5, in, The second determining unit is configured as follows: In response to the text matching method being full-text matching, the target storage method is determined to be a trie or a hash table; and In response to the text matching method being fuzzy text matching, the target storage method is determined to be a hash table.

7. The apparatus according to claim 5, wherein the second determining unit comprises: The first determining subunit is configured to determine the number of texts in the plurality of generalized texts; as well as The second determining subunit is configured to determine the target storage method based on the text matching method and the number of texts.

8. The apparatus according to claim 7, wherein, The trie includes a traditional trie and a first-letter hash trie, and The second determining subunit is configured as follows: In response to the text matching method being fuzzy text matching, or in response to the text matching method being full text matching and the number of texts being less than a first threshold, the target storage method is determined to be a hash table; In response to the text matching method being full-text matching, and in response to the text quantity being not less than the first threshold and less than the second threshold, the target storage method is determined to be a traditional trie; and In response to the text matching method being full-text matching and the number of texts being not less than the second threshold, the target storage method is determined to be a first-letter hash trie.

9. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.

11. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Text template extraction method based on dictionary tree

    CN110147433A

  • Voice-controlled control recognition method and device, equipment, medium and program product

    CN115359798A