Note search method, electronic device, storage medium, and program product
By introducing category search, word segmentation search, and pinyin search into the note-taking application, and combining the collaborative work of multiple modules, the problem of users finding it difficult to quickly and accurately search notes in the note-taking application has been solved, realizing diversified search methods and efficient note finding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2023-12-28
- Publication Date
- 2026-05-19
AI Technical Summary
In note-taking applications, users often struggle to quickly and accurately find the notes they need. Existing technologies typically rely on word or monosyllabic search, resulting in inefficient and inaccurate searches.
By providing multiple search options in the note-taking application interface, including category search, word segmentation search, and pinyin search, and combining them with the list display interface, data storage module, and index query module, the application achieves a combination of multiple search methods, thereby improving search efficiency and accuracy.
Users can quickly and accurately find the notes they need, with diverse search methods that reduce search results and improve search efficiency and accuracy.
Smart Images

Figure CN120277226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a note-searching method, electronic device, storage medium, and program product. Background Technology
[0002] With the continuous development of electronic technology, electronic devices have become common tools in people's lives and work, and users often need to install various types of applications on their electronic devices due to different needs. For example, installing note-taking applications on electronic devices allows users to add corresponding notes to record information in their lives and work.
[0003] If a user has stored many notes in a note-taking app, they will need to search for the specific note they need. Therefore, how to quickly and accurately find the relevant note within a note-taking app becomes a problem that needs to be solved. Summary of the Invention
[0004] This application provides a note-searching method, electronic device, storage medium, and program product, enabling users to quickly and accurately search for relevant notes in note-taking applications.
[0005] In a first aspect, embodiments of this application propose a note search method applied to an electronic device, the electronic device including a note-taking application. The note search method includes: the electronic device displaying a first interface of the note-taking application; the electronic device, in response to a target operation input on the first interface, searching for note data corresponding to a target note from stored note data; the target operation includes at least one of a first operation, a second operation, and a third operation; and the electronic device displaying the target note based on the note data corresponding to the target note. Specifically, the first operation is an input operation to a target category search option among multiple category search options included in the first interface, the target note being a first note, and the attachment type of the attachments included in the first note being the attachment type indicated by the target category search option; the second operation is an input operation to multiple search terms spaced apart from each other in a search box included in the first interface, the target note being a second note, and the second note including multiple search terms; and the third operation is an input operation to pinyin in a search box included in the first interface, the target note being a third note, and the third note including keywords corresponding to the pinyin.
[0006] This allows users to categorize and search notes stored in the note-taking application based on the multiple search options included in the first interface; perform word-based searches by entering multiple search terms spaced apart in the search box; and conduct pinyin searches by entering pinyin in the search box. This enables users to quickly and accurately find relevant notes and makes note-taking search more diverse.
[0007] In one possible implementation, the note-taking application includes a list display interface, a data storage module, and an index query module. In response to a target operation input on the first interface, the electronic device searches for note data corresponding to a target note from the stored note data. This includes: the list display interface, in response to a first operation inputting a target category search option, sending a first search request to the index query module; the first search request includes the attachment type indicated by the target category search option; the index query module sending the first search request to the data storage module; the data storage module searching for note data corresponding to a first note from the stored note data based on the first search request; the data storage module returning the note data corresponding to the first note to the index query module; and the index query module returning the note data corresponding to the first note to the list display interface. In this way, a categorized search of notes stored in the note-taking application can be achieved through the list display interface, the data storage module, and the index query module.
[0008] In one possible implementation, the note-taking application includes a list display interface, a data storage module, and an index query module, and the electronic device also includes a search platform. In response to a target operation input on the first interface, the electronic device searches for note data corresponding to the target note from the stored note data. This includes: the list display interface responding to a second operation of inputting multiple search terms spaced apart in the search box, sending a second search request to the index query module; the second search request includes multiple search terms; the index query module, based on the second search request, sends a third search request to the search platform; the third search request includes multiple search terms and a first search method; the search platform, according to the first search method, searches for first index content from the stored index content; the first index content includes multiple search terms; the search platform returns the first index content to the index query module; the index query module, based on the first index content, searches for note data corresponding to the second note from the note data stored in the data storage module; and the index query module returns the note data corresponding to the second note to the list display interface. In this way, word segmentation search of notes stored in the note-taking application can be achieved through the list display interface, data storage module, index query module, and search platform.
[0009] In one possible implementation, the first index content further includes a first note identifier. The index query module, based on the first index content, searches for note data corresponding to the second note from the note data stored in the data storage module, including: the index query module sending a fourth search request to the data storage module based on the first index content; the fourth search request including the first note identifier; the data storage module searching for note data corresponding to the second note from the stored note data based on the fourth search request; the note data corresponding to the second note including a note identifier matching the first note identifier; and the data storage module returning the note data corresponding to the second note to the index query module.
[0010] In one possible implementation, the first search method includes a single-word search method. The search platform retrieves the first index content from the stored index content using the first search method, including: the search platform obtaining the index of each keyword in the search terms using the single-word search method; each keyword's index is its index in the index content to be filtered, and the index content to be filtered consists of at least one index content in the index content stored by the search platform that includes the keyword; the search platform detects whether the indexes of each keyword in the search terms are adjacent; if the indexes of each keyword in the search terms are adjacent, the search platform determines that the search terms have matched successfully; if multiple search terms have matched successfully, the search platform retrieves the first index content from the index content to be filtered that matches all the search terms. In this way, the first search content containing multiple search terms can be searched from all the stored index content based on the single-word search method, resulting in higher accuracy in searching the first search content.
[0011] In one possible implementation, the note-taking application includes a list display interface, a data storage module, and an index query module. The electronic device also includes a search platform. In response to a target operation input on the first interface, the electronic device searches for note data corresponding to the target note from the stored note data. This includes: the list display interface responding to a third operation of inputting pinyin in the search box, sending a fifth search request to the index query module; the fifth search request includes pinyin; the index query module, based on the fifth search request, sends a sixth search request to the search platform; the sixth search request includes pinyin and a second search method, the second search method including a pinyin search method; the search platform, according to the pinyin search method, searches for second index content from the stored index content; the second index content includes keywords corresponding to the pinyin; the search platform returns the second index content to the index query module; the index query module, based on the second index content, searches for note data corresponding to a third note from the note data stored in the data storage module; and the index query module returns the note data corresponding to the third note to the list display interface. Thus, pinyin searching of notes stored in the note-taking application can be achieved through the list display interface, data storage module, index query module, and search platform.
[0012] In one possible implementation, the second index content further includes a second note identifier. The index query module, based on the second index content, searches for note data corresponding to the third note from the note data stored in the data storage module, including: the index query module sending a seventh search request to the data storage module based on the second index content; the seventh search request including the second note identifier; the data storage module searching for note data corresponding to the third note from the stored note data based on the seventh search request; the note data corresponding to the third note including a note identifier matching the second note identifier; and the data storage module returning the note data corresponding to the third note to the index query module.
[0013] In one possible implementation, before the electronic device displays the target note based on the corresponding note data, the process includes: if there are multiple target notes, the electronic device sorts the note data corresponding to the multiple target notes according to a preset sorting method. The preset sorting method includes a first sorting method and / or a second sorting method; the first sorting method is used to sort by note creation time or note editing time; the second sorting method is used to sort by the position of matching words in the target notes, where the position of the matching words in the target notes includes at least one of the following: title position, body position, and image position; if the target note is a second note, the matching words are multiple search terms; if the target note is a third note, the matching words are keywords corresponding to the pinyin. This allows the electronic device to display multiple sorted target notes for user viewing.
[0014] In one possible implementation, the note-taking application further includes a details editing display interface. After the electronic device displays the target note based on the note data corresponding to the target note, the application further includes: a list display interface responding to a fourth operation on any target note by sending the note data and matching words corresponding to the target note selected in the fourth operation to the details editing display interface; the details editing display interface, based on the note data corresponding to the target note selected in the fourth operation, displays the target note selected in the fourth operation and displays the matching words in the target note selected in the fourth operation in a preset display mode. Specifically, if the target note is a second note, the matching words are multiple search terms; if the target note is a third note, the matching words are keywords corresponding to the pinyin; the preset display mode includes at least one of highlighting, bolding, and italicizing. This preset display mode allows the user to quickly locate the position of the matching words in the target note selected in the fourth operation.
[0015] In one possible implementation, the details editing display interface displays the matching words in the target note selected in the fourth operation in a preset display mode, including: if the matching words in the target note selected in the fourth operation include handwritten matching words, the details editing display interface obtains the location information of the handwritten matching words; the details editing display interface highlights the area corresponding to the location information. This allows for the highlighting of handwritten matching words.
[0016] In one possible implementation, the details editing display interface displays the matching words in the target note selected in the fourth operation using a preset display method. This includes: if the matching words in the target note selected in the fourth operation include multiple non-handwritten matching words, and there are overlapping matching characters among these multiple non-handwritten matching words, the details editing display interface displays the longest non-handwritten matching word among the multiple non-handwritten matching words using the preset display method. This allows for the highlighting of non-handwritten matching words and reduces the likelihood of repeatedly highlighting overlapping matching characters among multiple non-handwritten matching words.
[0017] In one possible implementation, the note-taking application includes a details editing display interface, a data storage module, and an index creation module. The electronic device also includes a search platform. Before the electronic device displays the first interface of the note-taking application, the following steps are included: the details editing display interface, in response to a fifth operation on the edited fourth note, saves the note data corresponding to the fourth note to the data storage module and sends a text index insertion request corresponding to the fourth note to the index creation module; the text index insertion request includes the note data corresponding to the fourth note; the index creation module constructs the text index content corresponding to the fourth note based on the note data corresponding to the fourth note in the text index insertion request; the index creation module sends the text index content corresponding to the fourth note to the search platform; the data storage module sends an image index insertion request corresponding to the fourth note to the index creation module; the image index insertion request includes the note data corresponding to the fourth note; the index creation module constructs the image index content corresponding to the fourth note based on the note data corresponding to the fourth note in the image index insertion request; the index creation module sends the image index content corresponding to the fourth note to the search platform. In this way, index content corresponding to notes can be constructed to support functions such as category search, word segmentation search, and pinyin search on electronic devices. Furthermore, by saving note data first and then triggering the insertion of image index content, in scenarios such as system malfunctions or restarts of electronic devices, for the same note, the data storage module stores the note data of that note, and the search platform also stores the index content of that note, thereby improving the situation where the data in the data storage module and the data in the search platform do not correspond.
[0018] Secondly, embodiments of this application propose an electronic device, including a memory and a processor. The memory is used to store a computer program, and the processor is used to invoke the computer program to execute the above-described note search method.
[0019] Thirdly, embodiments of this application propose a computer-readable storage medium storing a computer program or instructions, which, when executed, implements the aforementioned note-searching method.
[0020] Fourthly, embodiments of this application propose a computer program product, including a computer program that, when run, causes a computer to execute the aforementioned note search method.
[0021] The possible implementations of aspects two through four have similar effects to those of aspect one and the possible designs of aspect one, and will not be elaborated upon here. Attached Figure Description
[0022] Figure 1 A schematic diagram of the hardware system structure of the electronic device provided in the embodiments of this application;
[0023] Figure 2 A schematic diagram of the software system structure of the electronic device provided in the embodiments of this application;
[0024] Figure 3 A schematic diagram of the interface during the note creation process provided in this application embodiment;
[0025] Figure 4 A schematic diagram of the interface for adding audio recordings, handwritten content, and images to a note, provided for an embodiment of this application;
[0026] Figure 5 A schematic diagram illustrating the module interaction for creating the note index provided in this application embodiment;
[0027] Figure 6 A schematic diagram illustrating the process of creating a note index provided in this application embodiment;
[0028] Figure 7 A schematic diagram of an interface for classifying and searching notes is provided for embodiments of this application;
[0029] Figure 8 This application provides a schematic diagram illustrating the module interaction for classifying and searching notes in an embodiment.
[0030] Figure 9 This application provides an example of an interface diagram for classifying and searching notes using search terms.
[0031] Figure 10This application provides a schematic diagram illustrating the module interaction for classifying and searching notes using search terms in its embodiments.
[0032] Figure 11 This application provides a flowchart illustrating the process of classifying and searching notes using search terms in its embodiments.
[0033] Figure 12 A schematic diagram of the interface for word segmentation search of notes is provided for embodiments of this application;
[0034] Figure 13 This application provides a schematic diagram illustrating the module interaction for performing word segmentation search on notes in an embodiment of the present application;
[0035] Figure 14 This application provides a flowchart illustrating the word segmentation search process for notes in its embodiments.
[0036] Figure 15 A schematic diagram of the interface for performing pinyin search on notes is provided for embodiments of this application;
[0037] Figure 16 This application provides a schematic diagram illustrating the module interaction for performing pinyin search on notes in an embodiment of the present application;
[0038] Figure 17 This application provides an example of an interface diagram that highlights search terms in the searched target notes.
[0039] Figure 18 This application provides a schematic diagram illustrating the module interaction for highlighting search terms in the searched target notes.
[0040] Figure 19 This application provides a flowchart illustrating the process of highlighting search terms in the target notes found in the search results.
[0041] Figure 20 This is a schematic diagram of the structure of a note search device provided in an embodiment of this application;
[0042] Figure 21 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0043] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" do not necessarily imply that they are different.
[0044] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0045] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0046] In related technologies, if a user has stored many notes in a note-taking application, when the user needs to use the information recorded in one of the notes, they need to search through the note list displayed on the application interface, or enter a single search term in the search box on the application interface to search for it among all the notes stored in the note-taking application.
[0047] Let's take the example of searching by entering a single search term in the search box of a note-taking app. If a user wants to find a user's ID information stored in the notes, the information is complex and difficult for the user to remember, making it hard to find by simply entering a search term. Alternatively, if the user finds many notes using a single search term, they still need to search through them, which takes a lot of time. Or, if the search term contains homophones, it might not match the words stored in the notes, making it impossible to find the corresponding notes.
[0048] Therefore, the way related technologies search for notes in note-taking applications may prevent users from quickly and accurately finding the corresponding notes.
[0049] Based on this, embodiments of this application provide a note search method. By displaying a first interface of a note application, in response to a target operation input on the first interface, the method searches for note data corresponding to a target note from stored note data, and displays the target note based on the note data corresponding to the target note. The target operation includes at least one of a first operation, a second operation, and a third operation. The first operation is an input to a target category search option among multiple category search options included in the first interface; the target note is the first note, and the attachment type of the attachments included in the first note is the attachment type indicated by the target category search option. The second operation is an input to multiple search terms spaced apart within a search box included in the first interface; the target note is the second note, and the second note includes multiple search terms. The third operation is an input of pinyin within a search box included in the first interface; the target note is the third note, and the third note includes keywords corresponding to the pinyin.
[0050] Therefore, based on the multiple category search options included in the first interface, users can perform category searches on the notes stored in the note-taking application; they can perform word-based searches by entering multiple search terms spaced apart in the search box; and they can perform pinyin searches by entering pinyin in the search box. This allows users to quickly and accurately find the relevant notes and makes note searching more diverse.
[0051] For example, if a user wants to find a user's ID card information stored in the notes app, the user can enter the first operation in the card search option among the multiple category search options to search for notes containing ID card information from the notes stored in the notes app, thus allowing the user to quickly and accurately find the corresponding notes; or, the user can enter multiple search terms spaced apart in the search box to search for notes containing multiple search terms from the notes stored in the notes app, reducing the number of notes found, thus allowing the user to quickly and accurately find the corresponding notes; or, the user can enter pinyin in the search box to search for notes containing the keywords corresponding to that pinyin from the notes stored in the notes app, and among the searched notes, the keywords corresponding to that pinyin may contain Chinese characters with the same pronunciation but different characters, thus allowing the user to quickly and accurately find the corresponding notes.
[0052] The note-search method provided in this application can be applied to electronic devices with note-taking capabilities. Electronic devices include terminal devices, which can also be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Electronic devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, self-driving, remote medical surgery, smart grids, transportation safety, smart cities, smart homes, and so on. The embodiments of this application do not limit the specific technologies or device forms used in the electronic devices.
[0053] To better understand the embodiments of this application, the structure of the electronic device of the embodiments of this application is described below.
[0054] Figure 1 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0055] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0056] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0057] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0058] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0059] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0060] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, display 194, camera 193, and wireless communication module 160, etc.
[0061] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0062] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. The antennas in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0063] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
[0064] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0065] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0066] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0067] The display screen 194 is used to display images, display videos, and receive swipe operations, etc. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.
[0068] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0069] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0070] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or more cameras 193.
[0071] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0072] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located within the processor.
[0073] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0074] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0075] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
[0076] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0077] Figure 2 This is a software structure block diagram of an electronic device according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0078] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package can include note-taking applications, a search platform, and a global search module.
[0079] A note-taking application is an application with note-taking functionality. For example, a note-taking application may also be called a memo application, an electronic notepad application, or a notepad application, etc.
[0080] In some embodiments, a note-taking application may include an index creation module, an index query module, a list display interface, a data storage module, and a details editing display interface, and the index creation module, index query module, list display interface, data storage module, and details editing display interface are all modules used to implement the note-taking function of the note-taking application.
[0081] The index creation module can include the creation of index content for the main text, handwritten content, image content, and other searchable content of the notes.
[0082] The index query module can include a local search submodule, a kit search submodule, and a data merging and processing submodule.
[0083] The local search submodule can be used to search for the note data corresponding to the target note from the note data stored in the data storage module when the first operation is entered for the target category search option among multiple category search options and no search term is entered in the search box; or, the local search submodule can also be used to search for the note data corresponding to the target note from the note data stored in the data storage module when the index content corresponding to the target note is not found in the search platform.
[0084] The kit search submodule can be used to search for the index content corresponding to the target note from the search platform. This index content includes text index content and / or image index content.
[0085] The data merging and organizing submodule can be used to merge the note data corresponding to the image and the note data corresponding to the text when the target note includes both images and text; the data merging and organizing submodule can also be used to sort the note data corresponding to multiple target notes according to a preset sorting method.
[0086] The list display interface shows the list of notes retrieved through a search. The data storage module stores the note data, including a note table and an attachment table. The details editing interface displays notes during creation or editing, and shows the note's details, including its content, when a note in the list is opened.
[0087] In some embodiments, the search platform may include a note index. This note index may include text indexes, image indexes, handwritten text box indexes, and other indexes.
[0088] In addition, the search platform can also include a calendar index, a photo library index, a document management index, and other indexes. The calendar index is for calendar applications, the photo library index is for photo library applications, and the document management index is for file management applications.
[0089] In some embodiments, the global search module may include a search submodule that can support searching within a search box included on the negative one screen of an electronic device.
[0090] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes a set of predefined functions.
[0091] like Figure 2As shown, the application framework layer may include an input system, window manager, activity manager, resource manager, phone manager, view system, and notification manager, etc.
[0092] An input system is a program used to manage input devices. For example, an input system can identify input operations such as mouse clicks, keyboard inputs, and touch swipes.
[0093] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0094] The Activity Manager manages the lifecycle of each application and the navigation / back functionality. It is responsible for creating the Android main thread and maintaining the lifecycle of each application.
[0095] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0096] The phone manager is used to manage mobile device functions, including: phone call status, obtaining phone information (device, SIM card, network information), monitoring phone status, and calling the phone dialer to make calls.
[0097] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0098] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0099] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0100] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0101] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0102] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0103] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0104] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG2, H.262, MP3, AAC, AMR, JPG, and PNG.
[0105] 3D graphics processing libraries are used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engines are drawing engines for 2D graphics.
[0106] The kernel layer is the layer between hardware and software. The kernel layer includes at least camera drivers, sensor drivers, and display drivers.
[0107] It should be noted that although the embodiments of this application are described using the Android system, the principle of the note search method is also applicable to electronic devices with operating systems such as iOS or Windows.
[0108] The technical solution of this application and how it solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be implemented independently or in combination with each other. The same or similar concepts or processes may not be described again in some embodiments.
[0109] For ease of understanding, this application uses a mobile phone as an electronic device. First, we will use some user interfaces shown in this application to illustrate the application scenarios in the note-making process.
[0110] For example, multiple applications can be installed on an electronic device, and icons for these applications, such as file manager, email, weather, calculator, clock, voice recorder, music, and note-taking applications, can be displayed on the device's desktop. The electronic device can receive user input on the note-taking application's icon, such as a click. In response to this input, the electronic device launches the note-taking application and displays an icon such as... Figure 3 The first application interface 301 is shown in (a) of the diagram.
[0111] The first application interface 301 can display the notes that the user has entered, such as Note 1, Note 2, Note 3, Note 4, etc. The creation time or editing time of each note can also be displayed around it. Furthermore, the first application interface 301 also includes a first search box 3011 for searching notes, a note addition control 3012 for creating new notes, controls for displaying notes, and controls for displaying to-do items.
[0112] The electronic device can receive touch operations from the user on the note-adding control 3012, such as click operations, and respond to the touch operations on the note-adding control 3012 by displaying, for example, Figure 3 The second application interface 302 is shown in (b) above. The second application interface 302 includes a note type selection control 3021. For example, the note type selection control 3021 may include a text note selection control and a handwritten note selection control, wherein the text note selection control is used to create text notes, and the handwritten note selection control is used to create handwritten notes.
[0113] Electronic devices can receive touch operations from users on text note selection controls, such as clicks, and respond to these touch operations by displaying, for example,... Figure 3 The third application interface 303 is shown in (c). The third application interface 303 includes an editing area for recording notes, a control 3031 for indicating completion of note editing, a control for undoing, a control for canceling undoing, a control for exiting note editing, a style control, a list control, an add control 3032, a recording control 3033, and a keyboard area, which displays a nine-space Pinyin keyboard.
[0114] The electronic device can receive touch operations from the user on the added control 3032, such as click operations, and respond to the touch operations on the added control 3032 by displaying, for example, Figure 3The fourth application interface 304 is shown in (d) above. The fourth application interface 304 includes an editing area for recording notes, a control 3031 for indicating completion of note editing, a control for undoing, a control for canceling undoing, a control for exiting note editing, a style control, a list control, an add control 3032, a record control 3033, a control for selecting images from the gallery, a photo control, a handwriting control, a table control, a hyperlink control, an import control, a document scanning control, a table extraction control, and a card / certificate collection control, etc.
[0115] The audio recording control 3033 is used to add audio recordings to notes; the image selection control from the gallery and the photo capture control can be used to add images to notes; the handwriting control is used to add handwritten content to notes; the table control is used to add tables to notes; the document scanning control is used to add documents to notes; and the card collection control is used to add card information, such as ID card information, to notes.
[0116] For example, the electronic device can receive touch operations, such as click operations, from the user on the recording control 3033 in the third application interface 303 or the recording control 3033 in the fourth application interface 304, and in response to the touch operation on the recording control 3033, display such as Figure 4 The fifth application interface 401 shown in (a) is used to display the recordings added to the notes.
[0117] For example, the electronic device can receive touch operations from the user on the handwriting controls in the fourth application interface 304, such as click operations, and in response to the touch operations on the handwriting controls, display such as Figure 4 The sixth application interface 402 shown in (b) is used to display the handwritten content added to the notes.
[0118] For example, the electronic device can receive touch operations from the user on the control for selecting an image from the gallery or the camera control in the fourth application interface 304, such as a click operation, and in response to the touch operation on the control for selecting an image from the gallery or the camera control, display as shown in the image. Figure 4 The seventh application interface 403 shown in (c) is used to display the pictures added to the notes.
[0119] When a user finishes editing the content of a note, they can perform a touch operation, such as a click operation, on the control 3031 used to indicate the completion of note editing. The electronic device receives the user's touch operation on the control 3031 used to indicate the completion of note editing and, in response to the touch operation, stores the note.
[0120] The above describes the note-taking scenario. Of course, users may already have notes created in the note-taking application. For some notes, users may need to edit them. In this case, users can click on the title of the note they want to edit. The electronic device responds to the user's touch operation on the selected note title and displays an interface containing the note content corresponding to that title. This interface can be called the note editing interface. Users can add audio recordings, handwritten content, images, tables, etc., to the notes they want to edit in the note editing interface.
[0121] For example, Figure 5 A schematic diagram illustrating the module interaction for creating a note index as provided in this application embodiment. (Refer to...) Figure 5 As shown, the electronic device includes a note-taking application, a search platform, and a handwriting recognition module. The handwriting recognition module is also located in the application layer of the electronic device. The note-taking application may include a details editing and display interface, a data storage module, and an index creation module. The process of creating the note index may specifically include the following steps:
[0122] S501, the details editing display interface receives the user's editing operation on the fourth note, which includes adding handwritten content to the fourth note.
[0123] A newly created note or a note that is being edited from an existing one can be referred to as a fourth note. Users can edit the fourth note in the details editing display interface, such as adding handwritten content, allowing the details editing display interface to receive user edits. For example, the details editing display interface could be as follows: Figure 4 The sixth application interface 402 is shown in (b) of the diagram.
[0124] S502, the details editing display interface responds to the editing operation on the fourth note by sending the handwritten content to the handwriting recognition module.
[0125] S503, the handwriting recognition module returns the handwriting recognition result corresponding to the handwritten content to the details editing and display interface.
[0126] The details editing display interface responds to the user's editing operation on the fourth note by sending the handwritten content added to the fourth note to the handwriting recognition module. The handwriting recognition module can recognize the handwritten content added to the fourth note and return the corresponding handwriting recognition result to the details editing display interface.
[0127] It is understandable that if the user does not add handwritten content to the fourth note in the details editing display interface, the steps corresponding to S502 and S503 mentioned above can be skipped.
[0128] S504, the details editing display interface receives the user's save operation for the edited fourth note.
[0129] When the user finishes editing the fourth note in the details editing display interface, the user can touch the save control in the details editing display interface. The save control can be a control 3031 used to indicate the completion of note editing. In this way, the details editing display interface can receive the user's save operation on the edited fourth note. This save operation can also be called the fifth operation.
[0130] S505, in response to the save operation of the edited fourth note, the details editing display interface sends a text index insertion request corresponding to the fourth note to the index creation module; the text index insertion request includes the note data corresponding to the fourth note.
[0131] After receiving a user's save operation on the edited fourth note, the details editing display interface responds by sending a text index insertion request for the fourth note to the index creation module.
[0132] The text index insertion request includes the note data corresponding to the fourth note, which may include the handwriting recognition results corresponding to the handwritten content added in the fourth note.
[0133] In some embodiments, the note data for each note may include a NoteDao and an AttachDao.
[0134] For example, a note table may include the following fields:
[0135] Field Name Field Description Uuid Unique identifier for notes Title Note title Type Note types: handwritten notes, text notes, etc. Has_attachment Does it include attachments? Delete_flag Has it been deleted? Create_time Note creation time, used for list sorting Modify_time Note editing time, used for list sorting Lock_status Lock notes Is_top Whether to pin a note for use in list sorting html_content The main body of the notes contains HTML content, including interface layout information. Search_content Search results Folder_uuid Notes folder information
[0136] In the note table, the Uuid field is used to represent the unique identifier of the note, which can also be called the note identifier; the Title field is used to represent the note title; the Type field is used to represent the note type, such as handwritten notes or text notes; the Has_attachment field is used to indicate whether the note contains attachments; the Delete_flag field is used to indicate whether the note has been deleted; the Create_time field is used to represent the note creation time, which can be used to sort and display multiple notes in the note list when a user finds multiple notes; the Modify_time field is used to represent the note editing time, which can also be used to sort and display multiple notes in the note list when a user finds multiple notes; the Lock_status field is used to represent whether the note is locked; the Is_top field is used to represent whether the note is pinned, and if a note is pinned, it will be displayed at the top of the note list; the html_content field is used to represent the Hypertext Markup Language (HTML) of the note body. The content (language, HTML) can include the layout information of the note content; the Search_content field is used to indicate the search content; the Folder_uuid field is used to indicate the folder information where the note is located.
[0137] The attachment table for notes is used to record information related to attachments. For example, the attachment table for notes may include the following fields:
[0138]
[0139]
[0140] In the attachment table, the Uuid field is used to represent the unique identifier of the attachment, which can also be called the attachment identifier; the Attachment_type field is used to indicate the location of the attachment, which is used when the note is displayed; the Mimetype field is used to indicate the attachment type, which is used to distinguish the attachment type added to the note, such as images, audio, video, tables, etc.; the Parent_uuid field is used to represent the Uuid of the note, which is used to identify the note to which this attachment belongs; the File_name field is used to indicate the storage name of the attachment; the Content_uri field is used to indicate the storage location of the attachment; the Display_name field is used to indicate the display name of the attachment; the size field is used to indicate the size of the attachment; the Send_mms field is used to indicate whether the attachment has been indexed for search; and the Attachment_details field is used to store the text content after handwriting recognition, that is, the handwriting recognition result corresponding to the handwriting content added to the note.
[0141] S506, the index creation module constructs the text index content corresponding to the fourth note based on the note data corresponding to the fourth note in the text index insertion request.
[0142] After receiving the text index insertion request for the fourth note from the details editing display interface, the index creation module constructs the text index content for the fourth note based on the note data in the text index insertion request. Specifically, the index creation module generates the text index content for the fourth note based on the content included in the note table and attachment table corresponding to the fourth note.
[0143] For example, the text index content corresponding to a note may include the following fields:
[0144] Field Name Field Description Identifier Note UUID, used to uniquely identify a note noteId null noteType Used to identify note type: handwritten notes, text notes noteCategory Note tags are used for deleted notes, locked notes, etc. noteAttachInfo Notes categorization and category search. noteModifiedTime The note modification time is used to determine whether the index has been updated. noteSearchContent Main text, locked notes Title Note titles, used for title search Description Main text content, for use in unlocked notes. File_path null Ocr null Lable null Content type NOTEPDA, representing a text type index.
[0145] The text index contains several key information: The `Identifier` field represents the note's UUID, uniquely identifying each note. The content of the `Identifier` field is generated based on the content of the `Uuid` field in the note table. The `noteId` field is empty, containing no identifiers. The `noteType` field identifies the note's type, such as handwritten or text notes. The content of the `noteType` field is generated based on the content of the `Type` field in the note table. The `noteCategory` field represents the note's tag, indicating whether it's a deleted or locked note. The content of the `noteCategory` field is generated based on the content of the `Delete_flag` or `Lock_status` fields in the note table. The `noteAttachInfo` field represents the note's category, used for category-based searches. The content of the `noteAttachInfo` field is generated based on the content of the `Mimetype` field in the attachment table. For example, when the attachment in the notes is a table, the noteAttachInfo field can contain the content "table"; when the attachment is an audio recording, the noteAttachInfo field can contain the content "record"; when the attachment is a video, the noteAttachInfo field can contain the content "video"; when the attachment is a card, the noteAttachInfo field can contain the content "card"; and when the attachment is a document, the noteAttachInfo field can contain the content "scan".
[0146] The `noteModifiedTime` field in the text index represents the note's modification time, used to determine if the index has been updated. The content of the `noteModifiedTime` field is generated based on the content of the `Modify_time` field in the note table. The `noteSearchContent` field in the text index represents the note's main content, used when the note is locked. The content of the `noteSearchContent` field is generated based on the content of the `Search_content` field in the note table and the content of the `Attachment_details` field in the attachment table. The `Title` field in the text index represents the note's title, which can be used to search for user-entered search terms within the title. The content of the `Title` field in the text index is generated based on the content of the `Title` field in the note table. The `Description` field in the text index represents the note's main content, used when the note is unlocked. The content of the `Description` field is generated based on the content of the `Search_content` field in the note table and the content of the `Attachment_details` field in the attachment table. The File_path, Ocr, and Label fields in the text index are all empty fields; no identifiers are populated in them. The Content type field in the text index can contain NOTEPDA, indicating that the text index is a text-based index.
[0147] S507, the index creation module sends the text index content corresponding to the fourth note to the search platform.
[0148] After constructing the text index content corresponding to the fourth note, the index creation module sends the text index content corresponding to the fourth note to the search platform to insert the text index content corresponding to the fourth note into the search platform.
[0149] S508, the details editing display interface responds to the save operation of the edited fourth note by saving the note data corresponding to the fourth note to the data storage module.
[0150] Upon receiving a save operation from the user for the edited fourth note, the details editing display interface responds by saving the corresponding note data to the data storage module. This note data includes the aforementioned note table and attachment table.
[0151] It should be noted that the steps corresponding to S508 and the steps corresponding to S505 above do not have a fixed order and can be executed simultaneously.
[0152] S509, the data storage module sends an image index insertion request corresponding to the fourth note to the index creation module; the image index insertion request includes the note data corresponding to the fourth note.
[0153] After saving the note data corresponding to the fourth note, the data storage module can send an image index insertion request for the fourth note to the index creation module. This image index insertion request includes the note data corresponding to the fourth note, such as the note table and attachment table mentioned above.
[0154] S510, the index creation module constructs the image index content corresponding to the fourth note based on the note data corresponding to the fourth note in the image index insertion request.
[0155] After receiving the image index insertion request for the fourth note from the data storage module, the index creation module constructs the image index content for the fourth note based on the note data in the image index insertion request. Specifically, the index creation module generates the image index content for the fourth note based on the content included in the note table and attachment table corresponding to the fourth note.
[0156] For example, the image index content corresponding to a note may include the following fields:
[0157] Field Name Field Description Identifier Attachment UUID, used to uniquely identify the attachment. noteId The attached note's UUID is used to associate the note. noteType null noteCategory null noteAttachInfo null noteModifiedTime null noteSearchContent null Title null Description null File_path Image location Ocr The text in the image is recognized and then filled into this field. Lable This field will be filled after image recognition. Content type PHOTO indicates the image type index.
[0158] The `Identifier` field in the image index represents the attachment's UUID, used to uniquely identify the attachment. The content of the `Identifier` field in the image index can be generated based on the content of the `UUID` field in the attachment table. The `noteId` field in the image index represents the note's UUID associated with the attachment, used to link the note. The content of the `noteId` field in the image index can be generated based on the content of the `Parent_uuid` field in the attachment table.
[0159] The noteType, noteCategory, noteAttachInfo, noteModifiedTime, noteSearchContent, Title, and Description fields in the image index content are all empty fields, with no identifiers filled in them.
[0160] The File_path field in the image index indicates the image location. The content of the File_path field can be generated based on the Uuid and Content_uri fields in the attached table. The Ocr field in the image index is used to populate this field after text recognition in the image. The Label field in the image index is used to populate this field after natural language processing of objects within the image; for example, an image containing a tiger can be identified as a tiger or an animal. The Content type field in the image index can contain "PHOTO," indicating that the image index is an image type index.
[0161] S511, the index creation module sends the image index content corresponding to the fourth note to the search platform.
[0162] After constructing the image index content corresponding to the fourth note, the index creation module sends the image index content corresponding to the fourth note to the search platform so that the image index content corresponding to the fourth note can be inserted into the search platform.
[0163] In this way, when a newly created or edited note includes both text and image content, after inserting the note's index content into the search platform in the manner described above, the search platform will save the index content of that note, which includes both text and image index content.
[0164] It should be noted that, in this embodiment of the application, after receiving the user's save operation on the edited fourth note, the details editing display interface can simultaneously execute the steps corresponding to S505 and S508, instead of directly sending the image index insertion request for the fourth note to the index creation module through the details editing display interface. The reason for this is that when constructing the image index content, it is necessary to recognize the text in the image and perform natural language processing on the image. Furthermore, due to the large size of the image content, saving it is time-consuming. Therefore, saving the note data first and then triggering the insertion of the image index content ensures that, in scenarios such as system malfunctions or restarts of the electronic device, for the same note, both the data storage module and the search platform will contain the note data and the index content. However, if the insertion of the image index content is triggered without saving the note data, in scenarios such as system malfunctions or restarts of the electronic device, for the same note, the data storage module may not contain the note data, while the search platform may contain the index content.
[0165] In some scenarios, besides creating new notes within a note-taking app, other third-party applications can also be used to create new notes. In this case, the third-party application can save the note data corresponding to the newly created note to the data storage module in the background of the electronic device. The data storage module then returns a note identifier to the third-party application. The third-party application then sends the note identifier to the index creation module. Based on the note identifier, the index creation module retrieves the note data from the data storage module and constructs text index content and / or image index content according to the note data, which is then sent to the search platform.
[0166] For example, Figure 6 A schematic diagram illustrating the process of creating a note index as provided in an embodiment of this application. (Refer to...) Figure 6 As shown, the process of creating this note index may specifically include the following steps:
[0167] S601, the details editing display interface receives the user's save operation for the edited fourth note.
[0168] S602, in response to the save operation of the edited fourth note, the details editing display interface sends a text index insertion request corresponding to the fourth note to the index creation module.
[0169] The implementation process of steps S601 and S602 is similar to that of steps S504 and S505 above. To avoid repetition, it will not be described again here.
[0170] S603, the index creation module determines whether the fourth note is a locked note based on the note data corresponding to the fourth note in the text index insertion request.
[0171] S604, when the fourth note is a locked note, the index creation module populates the noteSearchContent field.
[0172] S605, when the fourth note is an unlocked note, the index creation module populates the Description field.
[0173] The index creation module can determine whether the fourth note is a locked note based on the contents of the Lock_status field in the note table of the fourth note.
[0174] When the fourth note is a locked note, the index creation module can fill the corresponding content into the noteSearchContent field of the text index content when constructing the text index content; when the fourth note is an unlocked note, the index creation module can fill the corresponding content into the Description field of the text index content when constructing the text index content.
[0175] Therefore, when constructing the text index content, the index creation module needs to fill in different fields depending on whether the note is locked. This way, when searching for notes using the global search module on the negative one screen of an electronic device, the global search module can only search for unlocked notes; while when searching for notes within the note application, if the note is currently unlocked, the content of locked notes can be searched.
[0176] S606, the index creation module determines whether the fourth note contains an attachment based on the note data corresponding to the fourth note in the text index insertion request.
[0177] S607, When the fourth note contains attachments, the index creation module populates the noteAttachInfo field according to the attachment type of the attachment in the fourth note.
[0178] The index creation module can determine whether the fourth note contains attachments based on the content of the Has_attachment field in the note table of the fourth note.
[0179] When the fourth note contains attachments, the index creation module can fill the corresponding content in the noteAttachInfo field of the text index content according to the contents of the Mimetype field in the attachment table of the fourth note when constructing the text index content.
[0180] S608, the index creation module sends the text index content corresponding to the fourth note to the search platform.
[0181] Thus, through the steps corresponding to S603 to S307, the index creation module can construct the text index content corresponding to the fourth note, and the index creation module can send the text index content corresponding to the fourth note to the search platform.
[0182] When the fourth note does not contain attachments, there is no need to fill in the corresponding content in the noteAttachInfo field of the text index content. After the index creation module constructs the text index content corresponding to the fourth note, it directly sends the text index content corresponding to the fourth note to the search platform.
[0183] S609, the details editing display interface responds to the save operation of the edited fourth note by saving the note data corresponding to the fourth note to the data storage module.
[0184] S610, the data storage module sends an image index insertion request corresponding to the fourth note to the index creation module.
[0185] S611, the index creation module constructs the image index content corresponding to the fourth note based on the note data corresponding to the fourth note in the image index insertion request.
[0186] S612, the index creation module sends the image index content corresponding to the fourth note to the search platform.
[0187] The implementation process of steps S609 to S612 is similar to that of steps S508 to S511 above. To avoid repetition, it will not be described again here.
[0188] The above combination Figures 3 to 6 The process of creating a note index provided in the embodiments of this application has been described. The following describes the process of category search, word segmentation search, pinyin search, and highlighting of search terms provided in the embodiments of this application.
[0189] For ease of understanding, this application uses a mobile phone as an electronic device. First, we will use some user interfaces shown in this application to illustrate the application scenario of classifying and searching notes.
[0190] For example, an electronic device may display such as Figure 7 The first application interface 301 shown in (a) includes a first search box 3011 for searching notes.
[0191] The electronic device can receive touch operations from the user on the first search box 3011, such as a click operation, and respond to the touch operation on the first search box 3011 by displaying, for example, Figure 7 The eighth application interface 701 is shown in (b) above. The eighth application interface 701 includes a second search box 7011 for searching notes and multiple category search options 7012, which may include table search options, document search options, audio search options, video search options, and card search options, etc.
[0192] The table search option searches for notes with attachments in the form of tables; the document search option searches for notes with attachments in the form of documents; the audio search option searches for notes with attachments in the form of audio recordings; the video search option searches for notes with attachments in the form of videos; and the card search option searches for notes with attachments in the form of cards. The "All Search" option searches for notes with all attachment types.
[0193] For example, an electronic device can receive a user's touch operation on a card search option, such as a click, and in response to the touch operation on the card search option, display such as Figure 7The ninth application interface 702 is shown in (c) above. The ninth application interface 702 can display the searched notes containing cards or certificates. For example, it can search for two notes containing cards or certificates from all notes stored in the note application. The notes containing cards or certificates can be ID card information.
[0194] For example, an electronic device can receive a user's touch operation on the recording search option, such as a click operation, and in response to the touch operation on the recording search option, display such as Figure 7 The tenth application interface 703 is shown in (d) above. The tenth application interface 703 can display searched notes containing audio recordings; for example, it can search for three notes containing audio recordings from all notes stored in the note-taking application.
[0195] Of course, users can also use the video search option to search for notes containing videos from all notes stored in the note-taking app; or, users can use the document search option to search for notes containing documents from all notes stored in the note-taking app; or users can use the table search option to search for notes containing tables from all notes stored in the note-taking app.
[0196] For example, Figure 8 This application provides a schematic diagram illustrating the module interaction for classifying and searching notes in an embodiment. (Refer to...) Figure 8 As shown, the electronic device includes a note-taking application, which may include a list display interface, a data storage module, and an index query module. The process of categorizing and searching notes may specifically include the following steps:
[0197] S801, the list display interface receives the user's first input of the target category search options.
[0198] S802, in response to the first operation of inputting the target category search option, the list display interface sends a first search request to the index query module; the first search request includes the attachment type indicated by the target category search option.
[0199] Electronic devices can display the first interface of a note-taking application, which can be, for example... Figure 7 The eighth application interface 701 shown in (b) can be a list display interface.
[0200] The first interface includes multiple search options, such as table search, document search, audio search, video search, and card search.
[0201] The list display interface can receive the user's first operation on the target category search option. The first operation is the operation on the target category search option among the multiple category search options included in the first interface. The target category search option can be any one of the multiple category search options.
[0202] Then, in response to the user's first input of the target category search option, the list display interface sends a first search request to the index query module. This first search request includes the attachment type indicated by the target category search option.
[0203] For example, the first operation may be a touch operation on the card search option, and the first search request includes the attachment type indicated by the card search option; or, the first operation may be a touch operation on the audio recording search option, and the first search request includes the attachment type indicated by the audio recording search option.
[0204] S803, the index query module sends the first search request to the data storage module.
[0205] S804, the data storage module searches for the note data corresponding to the first note from the stored note data based on the first search request.
[0206] After receiving the first search request from the list display interface, the index query module forwards the first search request to the data storage module. The first search request includes the attachment type indicated by the target category search option.
[0207] The data storage module can search for the note data corresponding to the first note from all the note data stored in the data storage module according to the first search request. The attachment type of the attachments included in the first note is the attachment type indicated by the target category search option.
[0208] Specifically, the data storage module checks whether the contents of the Mimetype field in the attachment table of each stored note data match the attachment type indicated by the target category search option in the first search request. Note data whose Mimetype field contents match the attachment type indicated by the target category search option are identified as the note data corresponding to the first note. The note data corresponding to the first note includes the note table and attachment table corresponding to the first note.
[0209] S805, the data storage module returns the note data corresponding to the first note to the index query module.
[0210] S806, when there are multiple first notes, the index query module sorts the note data corresponding to the multiple first notes according to the first sorting method.
[0211] The first sorting method is used to sort notes by creation time or editing time.
[0212] One approach is to sort the note data corresponding to multiple first notes based on the content of the Create_time field in the note table for each first note. The first note whose creation time is more recent than the current time will be sorted further down the list, and the first note whose creation time is more recent than the current time will be sorted further down the list.
[0213] Another approach is to sort the note data corresponding to multiple first notes based on the content of the Modify_time field in the note table of each first note. The first note whose editing time is more recent than the current time will be sorted further down the list, and the first note whose editing time is more recent than the current time will be sorted further down the list.
[0214] S807, the index query module returns the sorted note data corresponding to multiple first notes to the list display interface.
[0215] S808, the list display interface displays multiple first notes based on the sorted first note data.
[0216] Of course, after receiving the note data corresponding to multiple first notes from the data storage module, the index query module may not sort the multiple first notes. In this case, the index query module directly returns the note data corresponding to multiple first notes to the list display interface, allowing the list display interface to display multiple first notes based on the note data corresponding to multiple first notes.
[0217] Alternatively, if the data storage module returns only one first note to the index query module, the index query module does not need to execute the steps corresponding to S806 above. Instead, it can directly return the note data corresponding to this first note to the list display interface, and the list display interface displays the first note based on the note data corresponding to this first note.
[0218] It should be noted that, Figure 7 and Figure 8 The corresponding scenario is for performing a category search within a note-taking application, where the search term is not entered into the search box included in the first interface. The search box included in the first interface can be, for example, Figure 7 The second search box 7011 in the eighth application interface 701 shown in (b) is an example. Of course, this embodiment of the application can also perform category search and search term search on notes.
[0219] For example, an electronic device may display such as Figure 9The first application interface 301 shown in (a) includes a first search box 3011 for searching notes.
[0220] The electronic device can receive touch operations from the user on the first search box 3011, such as a click operation, and respond to the touch operation on the first search box 3011 by displaying, for example, Figure 9 The eighth application interface 701 is shown in (b) above. The eighth application interface 701 includes a second search box 7011 for searching notes and multiple category search options 7012, which may include table search options, document search options, audio search options, video search options, and card search options, etc.
[0221] The electronic device can receive search terms entered by the user in the second search box 7011, and in response to the operation of entering search terms in the second search box 7011, display as shown below. Figure 9 The eleventh application interface 901 is shown in (c) above. The eleventh application interface 901 is used to display the searched notes containing the search terms.
[0222] For example, if a user enters the search term "tiger" in the second search box 7011, the search will find 3 notes containing the word "tiger" from all the notes stored in the note-taking application, as well as 2 pictures containing the word "tiger". These 3 notes containing the word "tiger" and the 2 pictures containing the word "tiger" will be displayed on the eleventh application interface 901.
[0223] Next, the electronic device can also receive touch operations from the user on the table search option among the multiple category search options 7012 included in the eleventh application interface 901, such as click operations, and in response to the touch operation on the table search option, display as follows: Figure 9 The twelfth application interface 902 is shown in (d) in the diagram. The twelfth application interface 902 can display notes that contain both the search term "tiger" and a table, found from all notes stored in the note application. For example, it can search for one note that contains both the search term "tiger" and a table from all notes stored in the note application.
[0224] Figure 9 The corresponding scenario is to first enter the search term in the second search box 7011, and after displaying the notes containing the search term, select the target category search option from multiple category search options 7012 to search for notes containing the search term and the target category search option from all notes stored in the note application.
[0225] Of course, you can also first select the target category search option from multiple category search options 7012, and after displaying the notes containing the target category search option, enter the search term in the second search box 7011 to search for notes containing the search term and the target category search option from all notes stored in the note application.
[0226] Let's take the scenario where you first select the target category search option from multiple category search options 7012, and then enter the search term in the second search box 7011 as an example. For instance, Figure 10 This application provides a schematic diagram illustrating the module interaction for classifying and searching notes using search terms, as shown in the embodiments of this application. (Refer to...) Figure 10 As shown, the electronic device includes a note-taking application and a search platform. The note-taking application may include a list display interface, a data storage module, and an index query module. The process of performing categorized search and keyword search on notes may specifically include the following steps:
[0227] S1001, the list display interface receives the user's first input of the target category search options.
[0228] S1002, in response to the first operation of inputting the target category search option, the list display interface sends a first search request to the index query module; the first search request includes the attachment type indicated by the target category search option.
[0229] S1003, the index query module sends the first search request to the data storage module.
[0230] S1004, the data storage module searches for the note data corresponding to the first note from the stored note data based on the first search request.
[0231] S1005, the data storage module returns the note data corresponding to the first note to the index query module.
[0232] S1006, when there are multiple first notes, the index query module sorts the note data corresponding to the multiple first notes according to the first sorting method.
[0233] S1007, the index query module returns the sorted note data corresponding to the first notes to the list display interface.
[0234] S1008, the list display interface displays multiple first notes based on the sorted note data corresponding to multiple first notes.
[0235] The implementation process of steps S1001 to S1008 is similar to that of steps S801 to S808 above. To avoid repetition, it will not be described again here.
[0236] S1009, the list display interface receives the search terms entered by the user in the search box.
[0237] S1010, in response to the operation of entering a search term in the search box, the list display interface sends an eighth search request to the index query module; the eighth search request includes the search term and the attachment type indicated by the target category search option.
[0238] After displaying the first note, the list display interface can also receive search terms entered by the user in the search box included in the first interface. The search box included in the first interface can be a second search box 7011. In response to the operation of entering search terms in the search box included in the first interface, the list display interface sends an eighth search request to the index query module; the eighth search request includes the search terms and the attachment type indicated by the target category search option.
[0239] S1011, the index query module sends the eighth search request to the search platform.
[0240] S1012, the search platform retrieves the third index content from the stored index content.
[0241] The search platform retrieves the third index content from all index content stored in the search platform, based on the search terms and attachment types indicated by the target category search options in the eighth search request. The third index content includes the index content containing the search terms and attachment types indicated by the target category search options.
[0242] Specifically, when the note-taking application is currently locked, the search platform can query the index content including the search terms in the eighth search request from the Title field, Description field, Ocr field, and Label field in the text index content of all notes, and search for the index content of the attachment type indicated by the target category search option from the noteAttachInfo field in the text index content of all notes.
[0243] With the note-taking application currently unlocked, the search platform can query the index content including the search terms in the eighth search request from the Title field, Description field, noteSearchContent field, Ocr field, and Label field in the text index content of all notes, and search for the index content of the attachment type indicated by the target category search option from the noteAttachInfo field in the text index content of all notes.
[0244] When the index content of a note contains both the search term and the attachment type indicated by the target category search options, the index content of this note is determined to be third-party index content. Third-party index content includes text index content and / or image index content.
[0245] S1013, the search platform returns the content of the third index to the index query module.
[0246] S1014, the index query module sends a ninth search request to the data storage module based on the third index content; the ninth search request includes the third note identifier.
[0247] The index query module can extract the third note identifier from the third index content to generate the ninth search request and send the ninth search request to the data storage module.
[0248] For example, the third note identifier may include: the note identifier included in the Identifier field of the text index content, the note identifier included in the noteId field of the image index content, and the attachment identifier included in the Identifier field of the image index content, etc.
[0249] S1015, the data storage module searches for the note data corresponding to the fifth note from the stored note data based on the ninth search request; the note data corresponding to the fifth note includes a note identifier that matches the third note identifier.
[0250] Specifically, the data storage module can check whether the note identifiers included in the Uuid field of the note table in each stored note data match the note identifiers included in the Identifier field in the text index content, and determine the note corresponding to the matching note data as the fifth note.
[0251] Furthermore, the data storage module can check whether the note identifier in the Parent_uuid field of the attachment table in each stored note data matches the note identifier included in the noteId field in the image index content, and determine the note corresponding to the matching note data as the fifth note.
[0252] In addition, the data storage module can also check whether the Uuid field of the attachment table in each stored note data matches the attachment identifier included in the Identifier in the image index content, and determine the note corresponding to the matching note data as the fifth note.
[0253] The note data corresponding to the fifth note includes the note table and attachment table corresponding to the fifth note.
[0254] S1016, the data storage module returns the note data corresponding to the fifth note to the index query module.
[0255] S1017, the index query module organizes the note data corresponding to the fifth note.
[0256] After the index query module receives the note data corresponding to the fifth note returned by the data storage module, if the note data corresponding to the fifth note contains both the note data corresponding to the image and the note data corresponding to the text, then the note data corresponding to the image and the note data corresponding to the text can be merged.
[0257] Furthermore, when there are multiple fifth notes, the index query module can sort the note data corresponding to multiple fifth notes according to a preset sorting method.
[0258] The preset sorting methods include a first sorting method and / or a second sorting method; the first sorting method is used to sort according to the note creation time or note editing time; the second sorting method is used to sort according to the position of the search term in the fifth note, and the position of the search term in the fifth note includes at least one of the title position, the body position, and the image position.
[0259] For example, the fifth note whose creation time is more recent than the current time will be ranked lower in the list, and the fifth note whose creation time is more recent than the current time will be ranked higher in the list. Alternatively, the fifth note whose editing time is more recent than the current time will be ranked lower in the list, and the fifth note whose editing time is more recent than the current time will be ranked higher in the list. Search terms located in the title are ranked higher than search terms located in the body text, and search terms located in the body text are ranked higher than search terms located in images.
[0260] S1018, the index query module returns the organized note data corresponding to the fifth note to the list display interface.
[0261] S1019, the list display interface displays the fifth note based on the note data corresponding to the organized fifth note.
[0262] For example, Figure 11 This application provides a flowchart illustrating the process of classifying and searching notes using search terms in its embodiments. (Refer to...) Figure 11 As shown, the process of categorizing and searching notes by search terms can specifically include the following steps:
[0263] S1101, receives the user's first input of the target category search options.
[0264] S1102, Determine whether a search term has been entered in the search box.
[0265] S1103, when no search term is entered in the search box, search for the first note with the attachment type indicated by the target category search option.
[0266] The list display interface can determine whether the user has entered a search term in the search box of the first interface. When no search term is entered in the search box, the actual scenario is a category search within the note-taking application, and the search term is not entered in the search box included in the first interface. For details, please refer to the steps corresponding to S801 to S8085 above, which will not be repeated here.
[0267] S1104, When a search term is entered in the search box, determine whether the note-taking application is unlocked.
[0268] S1105, when the note application is unlocked, query the contents of the noteSearchContent field.
[0269] S1106, When the note-taking application is in a locked state, query the contents of the Description field.
[0270] When you enter a search term in the search box, the list display interface can determine whether the note-taking application is unlocked.
[0271] When the note-taking application is unlocked, the list display interface can send the search terms, the attachment type indicated by the target category search options, and the instruction to query the noteSearchContent field together to the index query module. This allows the index query module to search for the content included in the noteSearchContent and Description fields of all notes stored in the search platform when querying third-party index content.
[0272] When the note-taking application is locked, the list display interface can send the search terms, the attachment type indicated by the target category search options, and the query instruction for the Description field to the index query module. This allows the index query module to search for the content included in the Description field of all notes stored in the search platform when querying third-party index content.
[0273] S1107, The search includes third-party index content of the type of attachment indicated by the search terms and target category search options.
[0274] The implementation method of this step is similar to that of the step corresponding to S1012 above. To avoid repetition, it will not be described again here.
[0275] S1108, determine whether the content of the third index was found.
[0276] The index query module can determine whether the search platform has found the third-party index content. When the index query module receives the third-party index content returned by the search platform, it determines that the search platform has found the third-party index content; when the index query module has not received the third-party index content returned by the search platform within a preset time period, it determines that the search platform has not found the third-party index content.
[0277] S1109, when no third index content is found, retrieve notes containing the search terms and the attachment type indicated by the target category search options from the data storage module.
[0278] When no content is found in the third index, the index query module can send a search request to the data storage module. The search request can include search terms and the attachment type indicated by the target category search option. The data storage module can search for notes containing the search terms and the attachment type indicated by the target category search option from all the stored notes data and return them to the index query module.
[0279] S1110, when the third index content is found, determine whether an image has been found.
[0280] S1111: When an image is found, group the images according to their noteId field.
[0281] The index query module determines whether an image is found. When an image is found, it groups the images belonging to the same note according to the note identifier included in the noteId field of the image index content in the third index content.
[0282] S1112, Query the note data corresponding to the fifth note from the data storage module based on the noteId of the image.
[0283] The index query module can send the note identifier included in the noteId field of the image index content to the data storage module. The data storage module can then check whether the note identifier included in the Parent_uuid field of the attachment table of each stored note data matches the note identifier included in the noteId field of the image index content. The note corresponding to the matching note data is identified as the fifth note, and the note data corresponding to the fifth note is returned to the index query module.
[0284] S1113, when no image is found, retrieve the note data corresponding to the fifth note from the data storage module based on the note's Identifier field.
[0285] When no image is found, the index query module can send the note identifier included in the Identifier field of the text index content to the data storage module. The data storage module can then check whether the note identifier included in the Uuid field of the note table in each stored note data matches the note identifier included in the Identifier field of the text index content. The note corresponding to the matching note data is identified as the fifth note, and the note data corresponding to the fifth note is returned to the index query module.
[0286] S1114, merge the note data corresponding to the image and the note data corresponding to the text.
[0287] S1115, Sort the note data corresponding to multiple notes according to the preset sorting method.
[0288] The implementation methods of steps S1114 and S1115 are similar to those of steps S1017 above, and will not be repeated here to avoid repetition.
[0289] S1116 Returns the sorted note data and search terms to the list display interface.
[0290] After retrieving the note data for the fifth note, or obtaining notes containing the search terms and the attachment type indicated by the target category search options from the data storage module, the search query module can extract the search terms from each note. The search query module can then send the note data and search terms from multiple sorted notes together to the list display interface.
[0291] S1117, Displaying notes.
[0292] For example, after completing the step corresponding to S1103 and finding the first note, the note displayed in S1117 can be the first note; or, after completing the step corresponding to S1116, the note displayed in S1117 can be the fifth note, or a note obtained from the data storage module containing the search terms and the attachment type indicated by the target category search options.
[0293] In this way, all notes that meet the criteria can be found with a single query.
[0294] For ease of understanding, this application uses a mobile phone as an electronic device. First, we will use some user interfaces shown in this application to illustrate the application scenario of word segmentation search for notes.
[0295] For example, an electronic device may display such as Figure 12 The eighth application interface 701 shown in (a) includes a second search box 7011 for searching notes.
[0296] The electronic device can receive multiple search terms that are spaced apart from each other and entered by the user in the second search box 7011, and in response to the operation of entering multiple search terms that are spaced apart from each other in the second search box 7011, display as shown Figure 12 The thirteenth application interface 1201 is shown in (b) above. The thirteenth application interface 1201 can display notes searched from all notes stored in the note-taking application, including notes with multiple search terms.
[0297] For example, the multiple search terms that the user enters in the second search box 7011, spaced apart from each other, can be "mobile news". The content of the notes stored in the note application can be "Mobile XX Network News Center is the focus of XX Network...". Therefore, this searched note can be displayed on the thirteenth application interface 1201.
[0298] For example, Figure 13 This document provides a schematic diagram illustrating the module interaction for word segmentation and search of notes, as shown in the embodiments of this application. (Refer to...) Figure 13 As shown, the electronic device includes a note-taking application and a search platform. The note-taking application may include a list display interface, a data storage module, and an index query module. The process of performing word segmentation search on notes may specifically include the following steps:
[0299] S1301, the list display interface receives multiple search terms that the user enters in the search box with intervals set between them.
[0300] S1302, in response to the second operation of entering multiple search terms spaced apart in the search box, the list display interface sends a second search request to the index query module; the second search request includes multiple search terms.
[0301] Electronic devices can display the first interface of a note-taking application, which can be, for example... Figure 12 The eighth application interface 701 shown in (a) can be a list display interface. The first interface includes a search box, which can be, for example,... Figure 12 The second search box 7011 in the eighth application interface 701 shown in (a) of the diagram.
[0302] The list display interface can receive multiple search terms (e.g., multiple search terms separated by spaces) entered by the user in the search box included in the first interface. In response to the second operation of entering multiple search terms in the search box, the list display interface sends a second search request to the index query module. The second search request includes multiple search terms.
[0303] S1303, the index query module sends a third search request to the search platform based on the second search request; the third search request includes multiple search terms and the first search method.
[0304] The index query module can split multiple search terms in the second search request according to their intervals to generate a third search request, and then send the third search request to the search platform.
[0305] The third search request includes multiple search terms and a first search method. The first search method is used to instruct the search platform on how to match multiple keywords when searching for first index content from stored index content based on multiple search terms.
[0306] S1304, the search platform retrieves the first index content from the stored index content according to the first search method; the first index content includes multiple search terms.
[0307] The search platform retrieves the first index content from all index content stored in the search platform, based on multiple search terms in the third search request and following the first search method. The first index content comprises multiple search terms and includes text index content and / or image index content.
[0308] Specifically, when the note-taking application is currently locked, the search platform can query the index content, including multiple search terms from the Title field, Description field, Ocr field, and Label field in the text index content of all notes.
[0309] With the note-taking application currently unlocked, the search platform can query the index content, including multiple search terms from the Title field, Description field, noteSearchContent field, Ocr field, and Label field in the text index content of all notes, from the content included in the image index content.
[0310] In some embodiments, the first search method includes a single-word search method, which is used to instruct the search platform to match multiple keywords according to the principle of single-word matching when searching for the first index content from the stored index content based on multiple search terms.
[0311] Specifically, the search middleware obtains the index of each keyword in the search term in the single-word search mode; the index of each keyword is the index of the keyword in the index content to be filtered, and the index content to be filtered is at least one index content including the keyword in the index content stored by the search middleware; the search middleware detects whether the indexes of each keyword in the search term are adjacent; in the case where the indexes of each keyword in the search term are adjacent, the search middleware determines that the search term matches successfully; in the case where multiple search terms all match successfully, the search middleware obtains the first index content that matches all the multiple search terms from the index content to be filtered.
[0312] When storing the index content of each note, the search middleware stores the content included in the Title field, the Description field, the noteSearchContent field in the text index content, the Ocr field in the picture index content, and the Lable field in the picture index content in the single-word type manner for word segmentation search.
[0313] For example, if the note content of a certain note is "The news center of Mobile XX Network is the focus of XX Network", when storing the index content of this note, the search middleware can store it in the Description field or the noteSearchContent field in the text index content in the single-word type manner. The index corresponding to the character "手" is 0, the index corresponding to the character "机" is 1, the index corresponding to the character "网" is 4, the index corresponding to the character "新" is 5, the index corresponding to the character "闻" is 6, and so on.
[0314] In this way, when the multiple search terms entered by the user in the search box on the first interface are spaced apart from each other as "Mobile" and "News", the index query module can split "Mobile" and "News" into two search terms.
[0315] When the search platform searches for the index content corresponding to "Mobile", it can first search for the index of the character "手" in the stored index content, and then search for the index of the character "机" in the stored index content, and detect whether the index corresponding to the character "手" and the index corresponding to the character "机" are adjacent in the index content of the same note.
[0316] For example, in the index content of a certain note, if the index corresponding to the character "手" is 0 and the index corresponding to the character "机" is 1, it can be determined that the index corresponding to the character "手" and the index corresponding to the character "机" are adjacent. In this way, it can be determined that the search term "Mobile" matches successfully in the index content of this note.
[0317] Next, the search platform continues searching within the index containing "mobile phone" to see if it contains the search term "news". Similarly, it can first search for the index containing the character "new" within that index, then search for the index containing the character "news" within that index, checking if the indexes corresponding to "new" and "news" are adjacent.
[0318] For example, in the indexed content containing "mobile phone," the index for the word "new" is 5, and the index for the word "news" is 6. Therefore, it can be determined that the indexes for "new" and "news" are adjacent. This confirms that both the search terms "mobile phone" and "news" are successfully matched within the indexed content of the same note, and the indexed content of this note is the first search result that meets the search criteria.
[0319] It should be noted that the relevant technologies match search terms according to natural semantics. For example, searching for the first search content containing the search term from all stored index content according to natural semantics may result in some first search content not being found. However, the embodiments of this application can search for the first search content containing multiple search terms from all stored index content based on single-character search, which makes the search accuracy of the first search content higher.
[0320] S1305, the search platform returns the first index content to the index query module.
[0321] When the search platform returns the first index content to the index query module, it also returns multiple search terms and the location of each search term, such as whether each search term is located in the title, body text, or image.
[0322] S1306, the index query module sends a fourth search request to the data storage module based on the first index content; the fourth search request includes the first note identifier.
[0323] The index query module can extract the first note identifier from the first index content to generate a fourth search request and send the fourth search request to the data storage module.
[0324] For example, the first note identifier may include: the note identifier included in the Identifier field of the text index content, the note identifier included in the noteId field of the image index content, and the attachment identifier included in the Identifier field of the image index content, etc.
[0325] S1307, the data storage module searches for the note data corresponding to the second note from the stored note data based on the fourth search request; the note data corresponding to the second note includes a note identifier that matches the first note identifier.
[0326] Specifically, the data storage module can check whether the note identifiers included in the Uuid field of the note table in each stored note data match the note identifiers included in the Identifier field in the text index content, and determine the note corresponding to the matching note data as the second note.
[0327] Furthermore, the data storage module can check whether the note identifier included in the Parent_uuid field of the attachment table in each stored note data matches the note identifier included in the note Id field in the image index content, and determine the note corresponding to the matching note data as the second note.
[0328] In addition, the data storage module can also check whether the Uuid field of the attachment table in each stored note data matches the attachment identifier included in the Identifier in the image index content, and determine the note corresponding to the matching note data as the second note.
[0329] The note data corresponding to the second note includes the note table and attachment table corresponding to the second note.
[0330] S1308, the data storage module returns the note data corresponding to the second note to the index query module.
[0331] Therefore, through the steps corresponding to S1306 to S1308 described above, the index query module searches for the note data corresponding to the second note from the note data stored in the data storage module based on the first index content.
[0332] S1309, the index query module organizes the note data corresponding to the second note.
[0333] After the index query module receives the note data corresponding to the second note returned by the data storage module, if the note data corresponding to the second note contains both the note data corresponding to the image and the note data corresponding to the text, then the note data corresponding to the image and the note data corresponding to the text can be merged.
[0334] Furthermore, when there are multiple second notes, the index query module can sort the note data corresponding to multiple second notes according to a preset sorting method.
[0335] The preset sorting methods include a first sorting method and / or a second sorting method; the first sorting method is used to sort according to the note creation time or note editing time; the second sorting method is used to sort according to the position of multiple search terms in the second note, and the position of multiple search terms in the second note includes at least one of the title position, the body position and the image position.
[0336] S1310, the index query module returns the organized note data corresponding to the second note to the list display interface.
[0337] S1311, The list display interface displays the second note based on the note data corresponding to the organized second note.
[0338] Of course, the index query module may also choose not to organize the note data corresponding to the second note, but directly return the note data corresponding to the second note to the list display interface, and the list display interface displays the second note based on the note data corresponding to the second note.
[0339] For example, Figure 14 This application provides a flowchart illustrating the word segmentation search process for notes in an embodiment. (Refer to...) Figure 14 As shown, the process of performing word segmentation search on notes can specifically include the following steps:
[0340] S1401 receives multiple search terms entered by the user in the search box.
[0341] The list display interface can receive multiple search terms entered by the user in the search box. These multiple search terms can be separated by spaces or not.
[0342] For example, a user may enter multiple search terms for "mobile news" in the search box, separated by spaces; or, a user may enter multiple search terms for "mobile news" in the search box, but without spaces.
[0343] S1402, determine whether multiple search terms are separated by spaces.
[0344] The list display interface responds to multiple search terms entered in the search box by sending a search request to the index query module. Based on the search request, the index query module determines whether the multiple search terms are separated by spaces.
[0345] S1403: When multiple search terms are separated by spaces, the multiple search terms are split according to the spaces.
[0346] S1404, search for each search term separately.
[0347] S1405, Match each search term according to the single-character search method.
[0348] The implementation methods of steps S1404 and S1405 can be referred to the implementation methods of steps S1304 above, and will not be repeated here.
[0349] S1406: When the index content of the same note includes multiple search terms, return the index content of the note.
[0350] S1407: When multiple search terms are not separated by spaces, the multiple search terms are matched as a single term.
[0351] S1408: When the index of a note includes a merge word, return the index of the note.
[0352] When multiple search terms are not separated by spaces, the index query module can treat them as a single term to retrieve indexed content that includes that term from the search platform. Specifically, the search platform can also perform matching using a single-character search method when querying indexed content that includes the single term.
[0353] For ease of understanding, this application uses a mobile phone as an electronic device. First, we will use some user interfaces shown in this application to illustrate the application scenario of searching notes by pinyin.
[0354] For example, an electronic device may display such as Figure 15 The eighth application interface 701 shown in (a) includes a second search box 7011 for searching notes.
[0355] The electronic device can receive the pinyin input by the user in the second search box 7011, and in response to the input of pinyin in the second search box 7011, display as shown below. Figure 15 The fourteenth application interface 1501 is shown in (b) above. The fourteenth application interface 1501 displays notes searched from all notes stored in the note-taking application, including keywords corresponding to the pinyin.
[0356] For example, the pinyin entered by the user in the second search box 7011 can be "zhongxin". The content of the note stored in the note application can be "The mobile XX website news center is the focus of XX website...". The keywords corresponding to the pinyin "zhongxin" can be "center" or "focus", etc. Therefore, this searched note can be displayed on the fourteenth application interface 1501.
[0357] For example, Figure 16 This application provides a schematic diagram illustrating the module interaction for performing pinyin search on notes, as part of an embodiment of the present application. (Refer to...) Figure 16 As shown, the electronic device includes a note-taking application and a search platform. The note-taking application may include a list display interface, a data storage module, and an index query module. The process of performing a pinyin search on notes may specifically include the following steps:
[0358] S1601, the list display interface receives the pinyin entered by the user in the search box.
[0359] S1602, in response to the third operation of entering pinyin in the search box, the list display interface sends a fifth search request to the index query module; the fifth search request includes pinyin.
[0360] Electronic devices can display the first interface of a note-taking application, which can be, for example... Figure 15 The eighth application interface 701 shown in (a) can be a list display interface. The first interface includes a search box, which can be, for example,... Figure 15 The second search box 7011 in the eighth application interface 701 shown in (a) of the diagram.
[0361] The list display interface can receive the pinyin entered by the user in the search box included in the first interface. In response to the third operation of entering pinyin in the search box, the list display interface sends a fifth search request to the index query module. The fifth search request includes the pinyin.
[0362] S1603, the index query module sends a sixth search request to the search platform based on the fifth search request; the sixth search request includes pinyin and a second search method, and the second search method includes pinyin search.
[0363] Based on the pinyin in the fifth search request, the index query module can determine that it needs to search for matching index content using pinyin search. Therefore, the index query module can generate a sixth search request and send the sixth search request to the search platform.
[0364] The sixth search request includes pinyin and pinyin search method. The pinyin search method is used to instruct the search platform to search for index content containing keywords corresponding to pinyin when searching for the second index content from the stored index content based on pinyin.
[0365] S1604, the search platform retrieves the second index content from the stored index content using the pinyin search method; the second index content includes keywords corresponding to the pinyin.
[0366] Based on the pinyin in the sixth search request and following the pinyin search method, the search platform retrieves the second index content from all index content stored in the search platform. The second index content includes keywords corresponding to the pinyin, and includes text index content and / or image index content.
[0367] For example, the content of a certain note is "The news center of Mobile XX Network is the core of XX Network". When the search middle platform stores the index content of this note, it can be stored in the Description field in the text index content or the noteSearchContent field in the text index content in the form of single characters. The index corresponding to the character "zhong" included in "center" is 7, the index corresponding to the character "xin" included in "center" is 8, the index corresponding to the character "zhong" included in "core" is 13, and the index corresponding to the character "xin" included in "core" is 14.
[0368] In this way, when the user enters the pinyin "zhongxin" in the search box on the first interface, the search middle platform can, through the index, match the keywords corresponding to "zhongxin" to obtain the two keywords "center" and "core", and determine the index content containing the keywords "center" or "core" as the second index content.
[0369] S1605, the search middle platform returns the second index content to the index query module.
[0370] When the search middle platform returns the second index content to the index query module, it will also return the keywords corresponding to the pinyin and the positions where the keywords corresponding to the pinyin are located, such as whether the keywords corresponding to the pinyin are located in the title position, the body text position or the picture position.
[0371] S1606, the index query module sends a seventh search request to the data storage module based on the second index content; the seventh search request includes the second note identifier.
[0372] The index query module can extract the second note identifier from the second index content to generate the seventh search request and send the seventh search request to the data storage module.
[0373] Exemplarily, the second note identifier may include: the note identifier included in the Identifier field in the text index content, the note identifier included in the noteId field in the picture index content, and the attachment identifier included in the Identifier in the picture index content, etc.
[0374] S1607, the data storage module searches for the note data corresponding to the third note from the stored note data based on the seventh search request; the note data corresponding to the third note includes the note identifier that matches the second note identifier.
[0375] S1608, the data storage module returns the note data corresponding to the third note to the index query module.
[0376] Therefore, through the steps corresponding to S1606 to S1608 described above, the index query module searches for the note data corresponding to the third note from the note data stored in the data storage module based on the second index content.
[0377] S1609, the index query module organizes the note data corresponding to the third note.
[0378] After the index query module receives the note data corresponding to the third note returned by the data storage module, if the note data corresponding to the third note contains both the note data corresponding to the image and the note data corresponding to the text, then the note data corresponding to the image and the note data corresponding to the text can be merged.
[0379] Furthermore, when there are multiple third notes, the index query module can sort the note data corresponding to multiple third notes according to a preset sorting method.
[0380] The preset sorting methods include a first sorting method and / or a second sorting method; the first sorting method is used to sort according to the note creation time or note editing time; the second sorting method is used to sort according to the position of the keyword corresponding to the pinyin in the third note, and the position of the keyword corresponding to the pinyin in the third note includes at least one of the title position, the body position, and the image position.
[0381] S1610, the index query module returns the organized note data corresponding to the third note to the list display interface.
[0382] S1611, the list display interface displays the third note based on the note data corresponding to the organized third note.
[0383] Of course, the index query module may also choose not to organize the note data corresponding to the third note, but directly return the note data corresponding to the third note to the list display interface. The list display interface then displays the third note based on the note data corresponding to the third note.
[0384] For ease of understanding, this application uses a mobile phone as an electronic device. First, we will use some user interfaces shown in this application to illustrate the application scenario of highlighting search terms in the searched target notes.
[0385] For example, an electronic device may display such as Figure 17 The thirteenth application interface 1201 shown in (a) displays the searched notes including multiple search terms.
[0386] Electronic devices can receive touch input from users on searched notes and, in response to the touch input, display, as shown below. Figure 17The fifteenth application interface 1701 is shown in (b) above. The fifteenth application interface 1701 can display the note content and highlight multiple search terms in the note content.
[0387] For example, if multiple search terms can be "mobile news", then "mobile" and "news" can be highlighted in the notes displayed on the fifteenth application interface 1701, which reads "Mobile XX Network News Center is the focus of XX Network...".
[0388] For example, Figure 18 This embodiment of the application provides a schematic diagram of a module interaction that highlights search terms in the searched target notes. (Refer to...) Figure 18 As shown, the electronic device includes a note-taking application, which includes a list display interface and a details editing display interface. The process of highlighting search terms in the target notes may specifically include the following steps:
[0389] S1801, the list display interface displays the target notes.
[0390] The list display interface can show target notes, which can be second notes, third notes, etc.
[0391] S1802, the list display interface receives the user's fourth operation on any target note.
[0392] S1803, in response to the fourth operation on any target note, the list display interface sends the note data and matching words corresponding to the target note selected by the fourth operation to the details editing display interface.
[0393] The list display interface can receive a fourth action from the user on any target note. In response to the fourth action on any target note, it sends the note data and matching words corresponding to the target note selected by the fourth action to the details editing display interface.
[0394] Specifically, when the target note is the second note, the matching words are multiple search terms; when the target note is the third note, the matching words are keywords corresponding to the pinyin.
[0395] S1804, the details editing display interface displays the target note selected in the fourth operation based on the note data corresponding to the target note selected in the fourth operation, and displays the matching words in the target note selected in the fourth operation in a preset display mode.
[0396] After receiving the note data and matching words corresponding to the target note selected in the fourth operation, the details editing display interface displays the target note selected in the fourth operation based on the note data corresponding to the target note selected in the fourth operation, and displays the matching words in the target note selected in the fourth operation using at least one of the following display methods: highlighting, bolding, and italics.
[0397] For example, the fifteenth application interface 1701 can be a details editing display interface, where multiple search terms are highlighted in the notes displayed on the fifteenth application interface 1701.
[0398] For example, Figure 19 This application provides a flowchart illustrating the process of highlighting search terms in the searched target notes. (Refer to...) Figure 19 As shown, the process of highlighting search terms in the target notes may specifically include the following steps:
[0399] S1901, the list display interface receives the user's fourth operation on any target note.
[0400] S1902, in response to the fourth operation on any target note, the list display interface sends the note data and matching words corresponding to the target note selected by the fourth operation to the details editing display interface.
[0401] The implementation methods of steps S1901 and S1902 are similar to those of steps S1802 and S1803 above. To avoid repetition, they will not be described again here.
[0402] S1903, the details editing display interface determines whether the matching words in the target note selected in the fourth operation include handwritten matching words.
[0403] S1904, if the matching words in the target note selected in the fourth operation include handwritten matching words, the details editing display interface obtains the location information of the handwritten matching words.
[0404] The fourth operation selects a target note whose corresponding note data includes an attachment table. The Attachment_type field in the attachment table stores a JSON file. The details editing display interface can parse the JSON file to obtain the location information of the handwritten matching words.
[0405] S1905, the details editing display interface highlights the area corresponding to the location information.
[0406] S1906. When the matching words in the target note selected in the fourth operation include multiple non-handwritten matching words and there are overlapping matching characters among the multiple non-handwritten matching words, the detailed editing display interface displays the non-handwritten matching word with the largest length among the multiple non-handwritten matching words in a preset display manner.
[0407] For example, the matching words in the target note selected in the fourth operation include two non-handwritten matching words, namely "hundred" and "Baidu", and the note content in the target note selected in the fourth operation includes "Baidu Encyclopedia". Therefore, the overlapping matching character between "hundred" in "Baidu" and "Baidu" in "Baidu" is the character "hundred". The detailed editing display interface can highlight the non-handwritten matching word "Baidu" with the largest length in "Baidu", and no longer highlight the non-handwritten matching word "hundred" with a shorter length in "Baidu".
[0408] In summary, the note search method provided in the embodiments of the present application may include the following steps: The electronic device displays a first interface of a note application; the electronic device searches for the note data corresponding to the target note from the stored note data in response to a target operation input to the first interface; the electronic device displays the target note based on the note data corresponding to the target note. Among them, the target operation includes at least one of the first operation, the second operation, and the third operation; the first operation is an operation input to a target classification search option among multiple classification search options included in the first interface, the target note is a first note, and the attachment type of the attachment included in the first note is the attachment type indicated by the target classification search option; the second operation is an operation of inputting multiple search words spaced apart from each other in a search box included in the first interface, the target note is a second note, and the second note includes multiple search words; the third operation is an operation of inputting pinyin in a search box included in the first interface, the target note is a third note, and the third note includes a keyword corresponding to the pinyin.
[0409] In this way, classification search of the notes stored in the note application can be implemented based on multiple classification search options included in the first interface; by inputting multiple search words spaced apart from each other in the search box, word segmentation search of the notes stored in the note application can be implemented; by inputting pinyin in the search box, pinyin search of the notes stored in the note application can be implemented. In this way, the user can quickly and accurately search for the corresponding notes, and the note search method is more diversified.
[0410] The above Figures 3 to 19 , the note search method provided in the embodiments of the present application has been described. Next, the device for executing the above method provided in the embodiments of the present application will be described. As Figure 20 shown, Figure 20This is a schematic diagram of a note-search device provided in an embodiment of this application. The note-search device may be an electronic device as described in this application embodiment, or a chip or chip system within an electronic device.
[0411] like Figure 20 As shown, the note search device 2000 may include a display unit 2001 and a processing unit 2002. The display unit 2001 supports the note search device 2000 in performing the aforementioned display steps; the processing unit 2002 supports the note search device 2000 in performing the aforementioned processing steps.
[0412] Specifically, the display unit 2001 is used to display the first interface of the note-taking application; the processing unit 2002 is used to search for note data corresponding to the target note from the stored note data in response to the target operation input on the first interface; the display unit 2001 is also used to display the target note based on the note data corresponding to the target note.
[0413] The target operation includes at least one of the first operation, the second operation, and the third operation; the first operation is the operation of inputting the target category search option among the multiple category search options included in the first interface, the target note is the first note, and the attachment type of the attachments included in the first note is the attachment type indicated by the target category search option; the second operation is the operation of inputting multiple search terms set at intervals in the search box included in the first interface, the target note is the second note, and the second note includes multiple search terms; the third operation is the operation of inputting pinyin in the search box included in the first interface, the target note is the third note, and the third note includes the keywords corresponding to the pinyin.
[0414] In one possible implementation, the note-taking search device 2000 further includes a storage unit 2003. The storage unit 2003 and the processing unit 2002 are connected via a circuit. The storage unit 2003 may include one or more memories, which can be devices in one or more devices or circuits used to store programs or data. The storage unit 2003 can exist independently and be connected to the processing unit 2002 via a communication bus. Alternatively, the storage unit 2003 can be integrated with the processing unit 2002.
[0415] Storage unit 2003 may store computer-executable instructions for methods in an electronic device, so that processing unit 2002 executes the methods in the above embodiments. Storage unit 2003 may be a register, cache, or random access memory (RAM), etc., and storage unit 2003 may be integrated with processing unit 2002. Storage unit 2003 may be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, and storage unit 2003 may be independent of processing unit 2002.
[0416] Figure 21 This is a schematic diagram of a chip structure provided in an embodiment of this application. Figure 21 As shown, chip 2100 includes one or more processors 2101, communication lines 2102 and communication interfaces 2103. Optionally, chip 2100 also includes memory 2104.
[0417] In some implementations, memory 2104 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.
[0418] The methods described in the embodiments of this application can be applied to, or implemented by, processor 2101. Processor 2101 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 2101 or by instructions in software form. Processor 2101 may be a general-purpose processor (e.g., a microprocessor or conventional processor), a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates, transistor logic devices, or discrete hardware components. Processor 2101 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0419] The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM). This storage medium is located in memory 2104, and processor 2101 reads information from memory 2104 and, in conjunction with its hardware, completes the steps of the above method.
[0420] The processor 2101, memory 2104 and communication interface 2103 can communicate with each other via communication line 2102.
[0421] In the above embodiments, the instructions stored in the memory for execution by the processor can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.
[0422] This application also provides a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disk, hard disk, or magnetic tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid-state disk (SSD)).
[0423] This application provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor invokes the computer program to execute the above-described note search method.
[0424] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0425] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0426] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0427] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0428] The above specific embodiments further illustrate the purpose, technical solution and beneficial effects of this application. It should be understood that the above are only specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this application should be included within the scope of protection of this application.
Claims
1. A note search method, characterized in that, Applied to an electronic device, including a note-taking application, the method includes: The electronic device displays the first interface of the note-taking application; The electronic device responds to a target operation input to the first interface by searching for note data corresponding to a target note from stored note data; the target operation includes at least one of a first operation, a second operation, and a third operation. The electronic device displays the target note based on the note data corresponding to the target note; The first operation is an operation of inputting a target category search option among the multiple category search options included in the first interface, the target note is the first note, and the attachment type of the attachments included in the first note is the attachment type indicated by the target category search option; The second operation is to input multiple search terms that are spaced apart from each other in the search box included in the first interface, and the target note is the second note, which includes the multiple search terms; The third operation is to input pinyin in the search box included in the first interface, and the target note is the third note, which includes the keywords corresponding to the pinyin. The note-taking application includes a list display interface, a data storage module, and an index query module. The electronic device also includes a search platform. When the target operation is the second operation, the electronic device, in response to the target operation input on the first interface, searches for note data corresponding to the target note from the stored note data, including: In response to the second operation of entering multiple search terms spaced apart in the search box, the list display interface sends a second search request to the index query module; the second search request includes the multiple search terms. The index query module sends a third search request to the search platform based on the second search request; the third search request includes the multiple search terms and the first search method; The search platform retrieves the first index content from the stored index content according to the first search method; the first index content includes the plurality of search terms. The search platform returns the first index content to the index query module; The index query module searches for the note data corresponding to the second note from the note data stored in the data storage module based on the first index content; The index query module returns the note data corresponding to the second note to the list display interface.
2. The method according to claim 1, characterized in that, When the target operation includes the first operation, the electronic device, in response to the target operation input to the first interface, searches for note data corresponding to the target note from the stored note data, including: In response to the first operation of inputting the target category search option, the list display interface sends a first search request to the index query module; the first search request includes the attachment type indicated by the target category search option; The index query module sends the first search request to the data storage module; The data storage module searches for the note data corresponding to the first note from the stored note data based on the first search request; The data storage module returns the note data corresponding to the first note to the index query module; The index query module returns the note data corresponding to the first note to the list display interface.
3. The method according to claim 1, characterized in that, The first index content also includes a first note identifier; the index query module, based on the first index content, searches for note data corresponding to the second note from the note data stored in the data storage module, including: The index query module sends a fourth search request to the data storage module based on the first index content; the fourth search request includes the first note identifier; The data storage module searches for note data corresponding to the second note from the stored note data based on the fourth search request; the note data corresponding to the second note includes a note identifier that matches the first note identifier; The data storage module returns the note data corresponding to the second note to the index query module.
4. The method according to claim 1, characterized in that, The first search method includes a single-word search method; the search platform retrieves the first index content from the stored index content according to the first search method, including: The search platform obtains the index of each keyword in the search term according to the single-character search method; the index of each keyword is the index of the keyword in the index content to be filtered, and the index content to be filtered is at least one index content that includes the keyword in the index content stored by the search platform; The search platform detects whether the indices of each keyword in the search term are adjacent; If the indices of each keyword in the search term are adjacent, the search platform determines that the search term is a successful match; If all the search terms are successfully matched, the search platform retrieves the first index content that matches all the search terms from the index content to be filtered.
5. The method according to claim 1, characterized in that, The electronic device further includes a search platform; when the target operation includes the third operation, the electronic device, in response to the target operation input on the first interface, searches for note data corresponding to the target note from the stored note data, including: In response to the third operation of entering pinyin in the search box, the list display interface sends a fifth search request to the index query module; the fifth search request includes the pinyin. The index query module sends a sixth search request to the search platform based on the fifth search request; the sixth search request includes the pinyin and the second search method, and the second search method includes the pinyin search method. The search platform retrieves the second index content from the stored index content according to the pinyin search method; the second index content includes keywords corresponding to the pinyin. The search platform returns the second index content to the index query module; The index query module searches for the note data corresponding to the third note from the note data stored in the data storage module based on the content of the second index; The index query module returns the note data corresponding to the third note to the list display interface.
6. The method according to claim 5, characterized in that, The second index content also includes a second note identifier; the index query module, based on the second index content, searches for note data corresponding to the third note from the note data stored in the data storage module, including: The index query module sends a seventh search request to the data storage module based on the second index content; the seventh search request includes the second note identifier; The data storage module searches for the note data corresponding to the third note from the stored note data based on the seventh search request; the note data corresponding to the third note includes a note identifier that matches the second note identifier; The data storage module returns the note data corresponding to the third note to the index query module.
7. The method according to any one of claims 1 to 6, characterized in that, Before the electronic device displays the target note based on the note data corresponding to the target note, the process includes: When there are multiple target notes, the electronic device sorts the note data corresponding to the multiple target notes according to a preset sorting method; The preset sorting method includes a first sorting method and / or a second sorting method; the first sorting method is used to sort according to the note creation time or the note editing time; the second sorting method is used to sort according to the position of the matching words in the target note, wherein the position of the matching words in the target note includes at least one of the title position, the body position, and the image position; When the target note is the second note, the matching word is the plurality of search terms; when the target note is the third note, the matching word is the keyword corresponding to the pinyin.
8. The method according to claim 1 or 5, characterized in that, The note-taking application also includes a details editing and display interface; after the electronic device displays the target note based on the note data corresponding to the target note, it further includes: In response to a fourth operation on any of the target notes, the list display interface sends the note data and matching words corresponding to the target note selected by the fourth operation to the details editing display interface; The details editing display interface displays the target note selected in the fourth operation based on the note data corresponding to the target note selected in the fourth operation, and displays the matching words in the target note selected in the fourth operation in a preset display mode; Wherein, when the target note is the second note, the matching word is the plurality of search terms; when the target note is the third note, the matching word is the keyword corresponding to the pinyin; the preset display mode includes at least one of highlight display, bold display, and italic display.
9. The method according to claim 8, characterized in that, The details editing display interface displays the matching words in the target note selected in the fourth operation in a preset display mode, including: If the matching words in the target note selected in the fourth operation include handwritten matching words, the details editing display interface obtains the location information of the handwritten matching words; The details editing and display interface highlights the area corresponding to the location information.
10. The method according to claim 8, characterized in that, The details editing display interface displays the matching words in the target note selected in the fourth operation in a preset display mode, including: If the matching words in the target note selected in the fourth operation include multiple non-handwritten matching words, and there are overlapping matching characters among the multiple non-handwritten matching words, the details editing display interface displays the longest non-handwritten matching word among the multiple non-handwritten matching words in the preset display mode.
11. The method according to claim 1, characterized in that, The note-taking application includes a details editing and display interface, a data storage module, and an index creation module. The electronic device also includes a search platform. Before the electronic device displays the first interface of the note-taking application, it further includes: In response to the fifth operation on the edited fourth note, the details editing display interface saves the note data corresponding to the fourth note to the data storage module and sends a text index insertion request corresponding to the fourth note to the index creation module; the text index insertion request includes the note data corresponding to the fourth note. The index creation module constructs the text index content corresponding to the fourth note based on the note data corresponding to the fourth note in the text index insertion request; The index creation module sends the text index content corresponding to the fourth note to the search platform; The data storage module sends an image index insertion request corresponding to the fourth note to the index creation module; the image index insertion request includes the note data corresponding to the fourth note. The index creation module constructs the image index content corresponding to the fourth note based on the note data corresponding to the fourth note in the image index insertion request; The index creation module sends the image index content corresponding to the fourth note to the search platform.
12. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program, and the processor being used to invoke the computer program to perform the note search method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed, implement the note search method as described in any one of claims 1 to 11.
14. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the note search method as described in any one of claims 1 to 11.